mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
68f9cde226
Altered files from ENHANCEMENT: UI Changes to FileUpload Area (TRAC-7219 that were missed in the prior push
30 lines
1.5 KiB
JavaScript
30 lines
1.5 KiB
JavaScript
window.tmpl.cache['ss-uploadfield-downloadtemplate'] = tmpl(
|
|
'{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}' +
|
|
'<li class="ss-uploadfield-item template-download{% if (file.error) { %} ui-state-error{% } %}" data-fileid="{%=file.id%}">' +
|
|
'<div class="ss-uploadfield-item-preview preview"><span>' +
|
|
'<img src="{%=file.thumbnail_url%}" alt="" />' +
|
|
'</span></div>' +
|
|
'<div class="ss-uploadfield-item-info">' +
|
|
'<label class="ss-uploadfield-item-name">' +
|
|
'<span class="name">{%=file.name%}</span> ' +
|
|
'{% if (!file.error) { %}' +
|
|
'<div class="ss-uploadfield-item-status ui-state-success-text">Uploaded</div>' +
|
|
'{% } else { %}' +
|
|
'<div class="ss-uploadfield-item-status ui-state-error-text">{%=o.options.errorMessages[file.error].substring(0,25) || file.error.substring(0,25)%}</div>' +
|
|
'{% } %}' +
|
|
'<div class="clear"><!-- --></div>' +
|
|
'</label>' +
|
|
'{% if (file.error) { %}' +
|
|
'<div class="ss-uploadfield-item-actions">' +
|
|
'<div class="ss-uploadfield-item-cancel ss-uploadfield-item-cancelfailed"><button class="icon icon-16">' + ss.i18n._t('UploadField.CANCEL', 'Cancel') + '</button></div>' +
|
|
'</div>' +
|
|
'{% } else { %}' +
|
|
'<div class="ss-uploadfield-item-actions">{% print(file.buttons, true); %}</div>' +
|
|
'{% } %}' +
|
|
'</div>' +
|
|
'{% if (!file.error) { %}' +
|
|
'<div class="ss-uploadfield-item-editform loading"><iframe frameborder="0" src="{%=file.edit_url%}"></iframe></div>' +
|
|
'{% } %}' +
|
|
'</li>' +
|
|
'{% } %}'
|
|
); |