silverstripe-framework/client/dist/js/UploadField_downloadtemplate.js
Ingo Schommer 19de22f427 API Moved frontend assets into admin/client/
admin/javascript => admin/client
admin/javascript/src => admin/client/src/legacy (mostly)
admin/scss/_variables.scss => admin/client/styles/_variables.scss
admin/scss => admin/client/styles/legacy/
admin/css/editor.css => admin/client/dist/css/editor.css
admin/css/screen.css => admin/client/dist/css/bundle.css
admin/images => admin/client/dist/images
admin/images/sprites/src => admin/client/src/sprites
admin/images/sprites/dist => admin/client/dist/sprites
admin/font => admin/client/dist/font
2016-04-20 21:13:10 +12:00

17 lines
2.6 KiB
JavaScript

(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('ss.UploadField_downloadtemplate', [], factory);
} else if (typeof exports !== "undefined") {
factory();
} else {
var mod = {
exports: {}
};
factory();
global.ssUploadField_downloadtemplate = mod.exports;
}
})(this, function () {
'use strict';
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%}">' + '{% if (file.thumbnail_url) { %}' + '<div class="ss-uploadfield-item-preview preview"><span>' + '<img src="{%=file.thumbnail_url%}" alt="" />' + '</span></div>' + '{% } %}' + '<div class="ss-uploadfield-item-info">' + '{% if (!file.error && file.id) { %}' + '<input type="hidden" name="{%=file.fieldname%}[Files][]" value="{%=file.id%}" />' + '{% } %}' + '{% if (!file.error && file.filename) { %}' + '<input type="hidden" value="{%=file.filename%}" name="{%=file.fieldname%}[Filename]" />' + '<input type="hidden" value="{%=file.hash%}" name="{%=file.fieldname%}[Hash]" />' + '<input type="hidden" value="{%=file.variant%}" name="{%=file.fieldname%}[Variant]" />' + '{% } %}' + '<label class="ss-uploadfield-item-name">' + '<span class="name" title="{%=file.name%}">{%=file.name%}</span> ' + '<span class="size">{%=o.formatFileSize(file.size)%}</span>' + '{% if (!file.error) { %}' + '<div class="ss-uploadfield-item-status ui-state-success-text" title="' + ss.i18n._t('UploadField.Uploaded', 'Uploaded') + '">' + ss.i18n._t('UploadField.Uploaded', 'Uploaded') + '</div>' + '{% } else { %}' + '<div class="ss-uploadfield-item-status ui-state-error-text" title="{%=o.options.errorMessages[file.error] || file.error%}">{%=o.options.errorMessages[file.error] || file.error%}</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 delete"><button type="button" class="icon icon-16" data-icon="delete" title="' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '">' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '</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"><iframe frameborder="0" data-src="{%=file.edit_url%}" src="about:blank"></iframe></div>' + '{% } %}' + '</li>' + '{% } %}');
});