2012-07-18 11:37:15 +02:00
|
|
|
jQuery(document).ready(function(){
|
2013-06-02 20:07:00 +02:00
|
|
|
window.tmpl.cache['colymba-gfbiu-uploadfield-downloadtemplate'] = tmpl(
|
2012-07-18 11:37:15 +02:00
|
|
|
'{% 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">' +
|
2013-06-02 20:07:00 +02:00
|
|
|
'{% if (!file.error) { %}' +
|
|
|
|
'<input type="hidden" name="{%=file.fieldname%}[Files][]" value="{%=file.id%}" />' +
|
|
|
|
'{% } %}' +
|
2012-07-18 11:37:15 +02:00
|
|
|
'<label class="ss-uploadfield-item-name">' +
|
|
|
|
'<span class="name" title="{%=file.name%}">{%=file.name%}</span> ' +
|
2013-06-02 20:07:00 +02:00
|
|
|
'<span class="size">{%=o.formatFileSize(file.size)%}</span>' +
|
2012-07-18 11:37:15 +02:00
|
|
|
'{% 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">' +
|
2013-06-02 20:07:00 +02:00
|
|
|
'<div class="ss-uploadfield-item-cancel ss-uploadfield-item-cancelfailed delete"><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>' +
|
2012-07-18 11:37:15 +02:00
|
|
|
'</div>' +
|
2013-06-02 20:07:00 +02:00
|
|
|
'{% } else { %}' +
|
|
|
|
//'<div class="ss-uploadfield-item-actions">{% print(file.buttons, true); %}</div>' +
|
2012-07-16 22:39:01 +02:00
|
|
|
'{% } %}' +
|
2013-06-02 20:07:00 +02:00
|
|
|
'</div>' +
|
|
|
|
'{% if (!file.error) { %}' +
|
|
|
|
|
2012-07-18 11:37:15 +02:00
|
|
|
'<div class="ss-uploadfield-item-editform">'+
|
2013-05-19 18:55:59 +02:00
|
|
|
'<form action="" method="post" class="bulkImageUploadUpdateForm" name="BIUUF_{%=file.record.ID%}">'+
|
2012-07-18 11:37:15 +02:00
|
|
|
'<input type="hidden" name="record_{%=file.record.ID%}_ID" value="{%=file.record.ID%}"/>'+
|
|
|
|
'<img class="imgPreview" src="{%=file.preview_url%}" />'+
|
|
|
|
|
2012-08-09 18:38:20 +02:00
|
|
|
'{% for (var key in file.record.fields) { %}' +
|
|
|
|
'{%#file.record.fields[key]%}' +
|
2012-07-18 11:37:15 +02:00
|
|
|
'{% } %}' +
|
|
|
|
|
|
|
|
'</form>'+
|
2013-06-02 20:07:00 +02:00
|
|
|
'</div>' +
|
|
|
|
|
|
|
|
'{% } %}' +
|
2012-07-18 11:37:15 +02:00
|
|
|
'</li>' +
|
|
|
|
'{% } %}'
|
|
|
|
);
|
2013-06-02 20:07:00 +02:00
|
|
|
});
|
|
|
|
//'<div class="ss-uploadfield-item-editform loading"><iframe frameborder="0" src="{%=file.edit_url%}"></iframe></div>' +
|