Skip to content
Commit c70688e5 authored by Daniel Calviño Sánchez's avatar Daniel Calviño Sánchez
Browse files

Update the whole file item instead of only its contents



The "done" and "fail" callbacks both update the item for the uploaded
file using "setFileIcon". "setFileIcon" updates the contents of the
"<li>" element for the file, but the "fail" callback was giving
"setFileIcon" an element generated by the template,  so the resulting
HTML contained a "<li>" element nested in another "<li>" element.

However, generating the HTML is better done through a template, so the
template now receives the icon to show in order to be used by a
successful upload and a failed one, and "setFileIcon" was changed to
"updateFileItem".

Note that the mimeTypeUrl does no longer need to be escaped, as
Handlebars templates escape the needed characters automatically.

Signed-off-by: default avatarDaniel Calviño Sánchez <danxuliu@gmail.com>
parent 2860ce02
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment