plupload
plupload copied to clipboard
delete button is missing - plupload Queue
Hi,
I discovered a bug when i downloaded both versions : 2.3.6 and 3.1.2. With the plupload widget, if i add one file to the queue, the delete button icon does not appear.
On your demo page, if i'm looking the code there is a class on the "li" called "plupload_delete" but i don't have this class on the icon in the scripts i downloaded from your website.
If i'm looking the file jquery.plupload.queue.js to the line 224:
fileList.append( '<li id="' + file.id + '">' + '<div class="plupload_file_name"><span>' + file.name + '</span></div>' + '<div class="plupload_file_action"><a href="#"></a></div>' + '<div class="plupload_file_status">' + file.percent + '%</div>' + '<div class="plupload_file_size">' + plupload.formatSize(file.size) + '</div>' + '<div class="plupload_clearer"> </div>' + inputHTML + '</li>' );
and if i add: class="plupload_delete" after the id of the LI tag like this :
fileList.append( '<li id="' + file.id + '" class="plupload_delete">' + '<div class="plupload_file_name"><span>' + file.name + '</span></div>' + '<div class="plupload_file_action"><a href="#"></a></div>' + '<div class="plupload_file_status">' + file.percent + '%</div>' + '<div class="plupload_file_size">' + plupload.formatSize(file.size) + '</div>' + '<div class="plupload_clearer"> </div>' + inputHTML + '</li>' );
the delete icon appears when i add a file.
I don't know if this is a bug or not, sorry if it is not (maybe i've done a mistake somewhere ? )
Hey, @Matkill, I've just noticed the same issue. You're right the li
element doesn't appear to have the plupload_delete
class.
Hi, I could fix the problem by replacing file.status
with file.state
in the function called handleStatus
at line 172. So at the end, code looks like this:
var actionClass;
if (file.state == plupload.DONE) {
actionClass = 'plupload_done';
}
if (file.state == plupload.FAILED) {
actionClass = 'plupload_failed';
}
if (file.state == plupload.QUEUED) {
actionClass = 'plupload_delete';
}
if (file.state == plupload.UPLOADING) {
actionClass = 'plupload_uploading';
}
@onuryukselen , thanks for the solution. I don't understand why the owners/developers didn't do this simple fix, but your 'bug fix' worked for me.
@onuryukselen Problem still present on 2021 LOL I confirm that your bug fix also worked for me Thank you !