source: trunk/admin/themes/default/template/batch_manager_global.tpl @ 11008

Last change on this file since 11008 was 11008, checked in by mistic100, 13 years ago

TokenInput : order tags, theme for roma, 'new' text translated

File size: 27.1 KB
Line 
1{include file='include/tag_selection.inc.tpl'}
2{include file='include/datepicker.inc.tpl'}
3
4{footer_script}{literal}
5  pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set");
6{/literal}{/footer_script}
7
8{combine_script id='jquery.tokeninput' load='footer' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
9{combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'}
10{combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
11
12{footer_script require='jquery.tokeninput'}{literal}
13jQuery(document).ready(function() {
14  jQuery.getJSON('admin.php?fckb_tags=1', function(data) {
15    jQuery("#tags").tokenInput(
16      data,
17      {
18    {/literal}
19        hintText: '{'Type in a search term'|@translate}',
20        noResultsText: '{'No results'|@translate}',
21        searchingText: '{'Searching...'|@translate}',
22        newText: ' ({'new'|@translate})',
23        animateDropdown: false,
24        preventDuplicates: true,
25        allowCreation: true
26    {literal}
27      }
28    );
29  });
30});
31{/literal}{/footer_script}
32
33{footer_script}
34var nb_thumbs_page = {$nb_thumbs_page};
35var nb_thumbs_set = {$nb_thumbs_set};
36var applyOnDetails_pattern = "{'on the %d selected photos'|@translate}";
37var elements = new Array();
38var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}];
39
40var selectedMessage_pattern = "{'%d of %d photos selected'|@translate}";
41var selectedMessage_none = "{'No photo selected, %d photos in current set'|@translate}";
42var selectedMessage_all = "{'All %d photos are selected'|@translate}";
43var regenerateThumbnailsMessage = "{'Thumbnails generation in progress...'|@translate}";
44var regenerateWebsizeMessage = "{'Photos generation in progress...'|@translate}";
45
46var width_str = '{'Width'|@translate}';
47var height_str = '{'Height'|@translate}';
48var max_width_str = '{'Maximum Width'|@translate}';
49var max_height_str = '{'Maximum Height'|@translate}';
50{literal}
51function str_repeat(i, m) {
52        for (var o = []; m > 0; o[--m] = i);
53        return o.join('');
54}
55
56function sprintf() {
57        var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = '';
58        while (f) {
59                if (m = /^[^\x25]+/.exec(f)) {
60                        o.push(m[0]);
61                }
62                else if (m = /^\x25{2}/.exec(f)) {
63                        o.push('%');
64                }
65                else if (m = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)) {
66                        if (((a = arguments[m[1] || i++]) == null) || (a == undefined)) {
67                                throw('Too few arguments.');
68                        }
69                        if (/[^s]/.test(m[7]) && (typeof(a) != 'number')) {
70                                throw('Expecting number but found ' + typeof(a));
71                        }
72                        switch (m[7]) {
73                                case 'b': a = a.toString(2); break;
74                                case 'c': a = String.fromCharCode(a); break;
75                                case 'd': a = parseInt(a); break;
76                                case 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;
77                                case 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;
78                                case 'o': a = a.toString(8); break;
79                                case 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;
80                                case 'u': a = Math.abs(a); break;
81                                case 'x': a = a.toString(16); break;
82                                case 'X': a = a.toString(16).toUpperCase(); break;
83                        }
84                        a = (/[def]/.test(m[7]) && m[2] && a >= 0 ? '+'+ a : a);
85                        c = m[3] ? m[3] == '0' ? '0' : m[3].charAt(1) : ' ';
86                        x = m[5] - String(a).length - s.length;
87                        p = m[5] ? str_repeat(c, x) : '';
88                        o.push(s + (m[4] ? a + p : p + a));
89                }
90                else {
91                        throw('Huh ?!');
92                }
93                f = f.substring(m[0].length);
94        }
95        return o.join('');
96}
97
98function progress(val, max, success) {
99  jQuery('#progressBar').progressBar(val, {
100    max: max,
101    textFormat: 'fraction',
102    boxImage: 'themes/default/images/progressbar.gif',
103    barImage: 'themes/default/images/progressbg_orange.gif'
104  });
105  type = success ? 'regenerateSuccess': 'regenerateError'
106  s = jQuery('[name="'+type+'"]').val();
107  jQuery('[name="'+type+'"]').val(++s);
108
109  if (val == max)
110    jQuery('#applyAction').click();
111}
112
113$(document).ready(function() {
114  function checkPermitAction() {
115    var nbSelected = 0;
116    if ($("input[name=setSelected]").is(':checked')) {
117      nbSelected = nb_thumbs_set;
118    }
119    else {
120      $(".thumbnails input[type=checkbox]").each(function() {
121         if ($(this).is(':checked')) {
122           nbSelected++;
123         }
124      });
125    }
126
127    if (nbSelected == 0) {
128      $("#permitAction").hide();
129      $("#forbidAction").show();
130    }
131    else {
132      $("#permitAction").show();
133      $("#forbidAction").hide();
134    }
135
136    $("#applyOnDetails").text(
137      sprintf(
138        applyOnDetails_pattern,
139        nbSelected
140      )
141    );
142
143    // display the number of currently selected photos in the "Selection" fieldset
144    if (nbSelected == 0) {
145      $("#selectedMessage").text(
146        sprintf(
147          selectedMessage_none,
148          nb_thumbs_set
149        )
150      );
151    }
152    else if (nbSelected == nb_thumbs_set) {
153      $("#selectedMessage").text(
154        sprintf(
155          selectedMessage_all,
156          nb_thumbs_set
157        )
158      );
159    }
160    else {
161      $("#selectedMessage").text(
162        sprintf(
163          selectedMessage_pattern,
164          nbSelected,
165          nb_thumbs_set
166        )
167      );
168    }
169  }
170
171  $('img.thumbnail').tipTip({
172    'delay' : 0,
173    'fadeIn' : 200,
174    'fadeOut' : 200
175  });
176
177  $("[id^=action_]").hide();
178
179  $("select[name=selectAction]").change(function () {
180    $("[id^=action_]").hide();
181    $("#action_"+$(this).attr("value")).show();
182
183    if ($(this).val() != -1) {
184      $("#applyActionBlock").show();
185    }
186    else {
187      $("#applyActionBlock").hide();
188    }
189  });
190
191  $(".wrap1 label").click(function () {
192    $("input[name=setSelected]").attr('checked', false);
193
194    var wrap2 = $(this).children(".wrap2");
195    var checkbox = $(this).children("input[type=checkbox]");
196
197    if ($(checkbox).is(':checked')) {
198      $(wrap2).addClass("thumbSelected");
199    }
200    else {
201      $(wrap2).removeClass('thumbSelected');
202    }
203
204    checkPermitAction();
205  });
206
207  $("#selectAll").click(function () {
208    $("input[name=setSelected]").attr('checked', false);
209    selectPageThumbnails();
210    checkPermitAction();
211    return false;
212  });
213
214  function selectPageThumbnails() {
215    $(".thumbnails label").each(function() {
216      var wrap2 = $(this).children(".wrap2");
217      var checkbox = $(this).children("input[type=checkbox]");
218
219      $(checkbox).attr('checked', true);
220      $(wrap2).addClass("thumbSelected");
221    });
222  }
223
224  $("#selectNone").click(function () {
225    $("input[name=setSelected]").attr('checked', false);
226
227    $(".thumbnails label").each(function() {
228      var wrap2 = $(this).children(".wrap2");
229      var checkbox = $(this).children("input[type=checkbox]");
230
231      $(checkbox).attr('checked', false);
232      $(wrap2).removeClass("thumbSelected");
233    });
234    checkPermitAction();
235    return false;
236  });
237
238  $("#selectInvert").click(function () {
239    $("input[name=setSelected]").attr('checked', false);
240
241    $(".thumbnails label").each(function() {
242      var wrap2 = $(this).children(".wrap2");
243      var checkbox = $(this).children("input[type=checkbox]");
244
245      $(checkbox).attr('checked', !$(checkbox).is(':checked'));
246
247      if ($(checkbox).is(':checked')) {
248        $(wrap2).addClass("thumbSelected");
249      }
250      else {
251        $(wrap2).removeClass('thumbSelected');
252      }
253    });
254    checkPermitAction();
255    return false;
256  });
257
258  $("#selectSet").click(function () {
259    selectPageThumbnails();
260    $("input[name=setSelected]").attr('checked', true);
261    checkPermitAction();
262    return false;
263  });
264
265  $("input[name=remove_author]").click(function () {
266    if ($(this).is(':checked')) {
267      $("input[name=author]").hide();
268    }
269    else {
270      $("input[name=author]").show();
271    }
272  });
273
274  $("input[name=remove_title]").click(function () {
275    if ($(this).is(':checked')) {
276      $("input[name=title]").hide();
277    }
278    else {
279      $("input[name=title]").show();
280    }
281  });
282
283  $("input[name=remove_date_creation]").click(function () {
284    if ($(this).is(':checked')) {
285      $("#set_date_creation").hide();
286    }
287    else {
288      $("#set_date_creation").show();
289    }
290  });
291
292  $(".removeFilter").click(function () {
293    var filter = $(this).parent('li').attr("id");
294    filter_disable(filter);
295
296    return false;
297  });
298
299  function filter_enable(filter) {
300    /* show the filter*/
301    $("#"+filter).show();
302
303    /* check the checkbox to declare we use this filter */
304    $("input[type=checkbox][name="+filter+"_use]").attr("checked", true);
305
306    /* forbid to select this filter in the addFilter list */
307    $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled");
308  }
309
310  $("#addFilter").change(function () {
311    var filter = $(this).attr("value");
312    filter_enable(filter);
313    $(this).attr("value", -1);
314  });
315
316  function filter_disable(filter) {
317    /* hide the filter line */
318    $("#"+filter).hide();
319
320    /* uncheck the checkbox to declare we do not use this filter */
321    $("input[name="+filter+"_use]").removeAttr("checked");
322
323    /* give the possibility to show it again */
324    $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled");
325  }
326
327  $("#removeFilters").click(function() {
328    $("#filterList li").each(function() {
329      var filter = $(this).attr("id");
330      filter_disable(filter);
331    });
332    return false;
333  });
334
335  jQuery('#applyAction').click(function() {
336    if (elements.length != 0)
337    {
338      return true;
339    }
340    else if (jQuery('[name="selectAction"]').val() == 'regenerateThumbnails')
341    {
342      resizeMethod = 'pwg.images.resizeThumbnail';
343      maxRequests = 3;
344      maxwidth = jQuery('input[name="thumb_maxwidth"]').val();
345      maxheight = jQuery('input[name="thumb_maxheight"]').val();
346      regenerationText = regenerateThumbnailsMessage;
347      crop = jQuery('input[name="thumb_crop"]').is(':checked');
348      follow_orientation = jQuery('input[name="thumb_follow_orientation"]').is(':checked');
349    }
350    else if(jQuery('[name="selectAction"]').val() == 'regenerateWebsize')
351    {
352      resizeMethod = 'pwg.images.resizeWebsize';
353      maxRequests = 1;
354      maxwidth = jQuery('input[name="websize_maxwidth"]').val();
355      maxheight = jQuery('input[name="websize_maxheight"]').val();
356      regenerationText = regenerateWebsizeMessage;
357      crop = false;
358      follow_orientation = false;
359    }
360    else return true;
361
362    jQuery('.bulkAction').hide();
363    jQuery('#regenerationText').html(regenerationText);
364
365    var queuedManager = jQuery.manageAjax.create('queued', {
366      queue: true, 
367      cacheResponse: false,
368      maxRequests: maxRequests
369    });
370
371    if (jQuery('input[name="setSelected"]').attr('checked'))
372      elements = all_elements;
373    else
374      jQuery('input[name="selection[]"]').each(function() {
375        if (jQuery(this).attr('checked')) {
376          elements.push(jQuery(this).val());
377        }
378      });
379
380    progressBar_max = elements.length;
381    todo = 0;
382
383    jQuery('#applyActionBlock').hide();
384    jQuery('select[name="selectAction"]').hide();
385    jQuery('#regenerationMsg').show();
386   
387    jQuery('#progressBar').progressBar(0, {
388      max: progressBar_max,
389      textFormat: 'fraction',
390      boxImage: 'themes/default/images/progressbar.gif',
391      barImage: 'themes/default/images/progressbg_orange.gif'
392    });
393
394    for (i=0;i<elements.length;i++) {
395      queuedManager.add({
396        type: 'GET',
397        url: 'ws.php',
398        data: {
399          method: resizeMethod,
400          maxwidth: maxwidth,
401          maxheight: maxheight,
402          crop: crop,
403          follow_orientation: follow_orientation,
404          image_id: elements[i],
405          format: 'json'
406        },
407        dataType: 'json',
408        success: ( function(data) { progress(++todo, progressBar_max, data['result']) }),
409        error: ( function(data) { progress(++todo, progressBar_max, false) })
410      });
411    }
412    return false;
413  });
414
415  function toggleCropFields(prefix) {
416    if (jQuery("#"+prefix+"_crop").is(':checked')) {
417      jQuery("#"+prefix+"_width_th").text(width_str);
418      jQuery("#"+prefix+"_height_th").text(height_str);
419      jQuery("#"+prefix+"_follow_orientation_tr").show();
420    }
421    else {
422      jQuery("#"+prefix+"_width_th").text(max_width_str);
423      jQuery("#"+prefix+"_height_th").text(max_height_str);
424      jQuery("#"+prefix+"_follow_orientation_tr").hide();
425    }
426  }
427
428  toggleCropFields("thumb");
429  jQuery("#thumb_crop").click(function () {toggleCropFields("thumb")});
430
431  checkPermitAction()
432});
433
434jQuery(window).load(function() {
435  var max_dim = 20;
436  $(".thumbnails img").each(function () {
437    if ($(this).height() > (max_dim-20))
438      max_dim = $(this).height() + 20;
439    if ($(this).width() > (max_dim-20))
440      max_dim = $(this).width() + 20;
441    $("ul.thumbnails span, ul.thumbnails label").css('width', max_dim+'px').css('height', max_dim+'px');
442  });
443});
444{/literal}{/footer_script}
445
446<div id="batchManagerGlobal">
447
448<h2>{'Batch Manager'|@translate}</h2>
449
450  <form action="{$F_ACTION}" method="post">
451
452  <fieldset>
453    <legend>{'Filter'|@translate}</legend>
454
455    <ul id="filterList">
456      <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}>
457        <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
458        <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
459        {'predefined filter'|@translate}
460        <select name="filter_prefilter">
461          {foreach from=$prefilters item=prefilter}
462          <option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
463          {/foreach}
464        </select>
465      </li>
466      <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>
467        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
468        <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}>
469        {'album'|@translate}
470        <select style="width:400px" name="filter_category" size="1">
471          {html_options options=$filter_category_options selected=$filter_category_options_selected}
472        </select>
473        <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
474      </li>
475      <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
476        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
477        <input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}>
478        {'Who can see these photos?'|@translate}
479        <select name="filter_level" size="1">
480          {html_options options=$filter_level_options selected=$filter_level_options_selected}
481        </select>
482      </li>
483    </ul>
484
485    <p class="actionButtons" style="">
486      <select id="addFilter">
487        <option value="-1">{'Add a filter'|@translate}</option>
488        <option disabled="disabled">------------------</option>
489        <option value="filter_prefilter">{'predefined filter'|@translate}</option>
490        <option value="filter_category">{'album'|@translate}</option>
491        <option value="filter_level">{'Who can see these photos?'|@translate}</option>
492      </select>
493<!--      <input id="removeFilters" class="submit" type="submit" value="Remove all filters" name="removeFilters"> -->
494      <a id="removeFilters" href="">{'Remove all filters'|@translate}</a>
495    </p>
496
497    <p class="actionButtons" id="applyFilterBlock">
498      <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter">
499    </p>
500
501  </fieldset>
502
503  <fieldset>
504
505    <legend>{'Selection'|@translate}</legend>
506
507  {if !empty($thumbnails)}
508  <p id="checkActions">
509    {'Select:'|@translate}
510{if $nb_thumbs_set > $nb_thumbs_page}
511    <a href="#" id="selectAll">{'The whole page'|@translate}</a>,
512    <a href="#" id="selectSet">{'The whole set'|@translate}</a>,
513{else}
514    <a href="#" id="selectAll">{'All'|@translate}</a>,
515{/if}
516    <a href="#" id="selectNone">{'None'|@translate}</a>,
517    <a href="#" id="selectInvert">{'Invert'|@translate}</a>
518
519    <span id="selectedMessage"></span>
520
521    <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}>
522  </p>
523
524    <ul class="thumbnails">
525      {foreach from=$thumbnails item=thumbnail}
526        {if in_array($thumbnail.ID, $selection)}
527          {assign var='isSelected' value=true}
528        {else}
529          {assign var='isSelected' value=false}
530        {/if}
531
532      <li><span class="wrap1">
533          <label>
534            <span class="wrap2{if $isSelected} thumbSelected{/if}">
535        {if $thumbnail.LEVEL > 0}
536        <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
537        <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
538        {/if}
539            <span>
540              <img src="{$thumbnail.TN_SRC}"
541                 alt="{$thumbnail.FILE}"
542                 title="{$thumbnail.TITLE|@escape:'html'}"
543                 class="thumbnail">
544            </span></span>
545            <input type="checkbox" name="selection[]" value="{$thumbnail.ID}" {if $isSelected}checked="checked"{/if}>
546          </label>
547          </span>
548      </li>
549      {/foreach}
550    </ul>
551
552  {if !empty($navbar) }
553  <div style="clear:both;">
554
555    <div style="float:left">
556    {include file='navigation_bar.tpl'|@get_extent:'navbar'}
557    </div>
558
559    <div style="float:right;margin-top:10px;">{'display'|@translate}
560      <a href="{$U_DISPLAY}&amp;display=20">20</a>
561      &middot; <a href="{$U_DISPLAY}&amp;display=50">50</a>
562      &middot; <a href="{$U_DISPLAY}&amp;display=100">100</a>
563      &middot; <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
564      {'photos per page'|@translate}
565    </div>
566  </div>
567  {/if}
568
569  {else}
570  <div>{'No photo in the current set.'|@translate}</div>
571  {/if}
572  </fieldset>
573
574  <fieldset id="action">
575
576    <legend>{'Action'|@translate}</legend>
577      <div id="forbidAction"{if count($selection) != 0}style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div>
578      <div id="permitAction"{if count($selection) == 0}style="display:none"{/if}>
579
580    <select name="selectAction">
581      <option value="-1">{'Choose an action'|@translate}</option>
582      <option disabled="disabled">------------------</option>
583  {if isset($show_delete_form) }
584      <option value="delete">{'Delete selected photos'|@translate}</option>
585  {/if}
586      <option value="associate">{'Associate to album'|@translate}</option>
587  {if !empty($dissociate_options)}
588      <option value="dissociate">{'Dissociate from album'|@translate}</option>
589  {/if}
590      <option value="add_tags">{'add tags'|@translate}</option>
591  {if !empty($DEL_TAG_SELECTION)}
592      <option value="del_tags">{'remove tags'|@translate}</option>
593  {/if}
594      <option value="author">{'Set author'|@translate}</option>
595      <option value="title">{'Set title'|@translate}</option>
596      <option value="date_creation">{'Set creation date'|@translate}</option>
597      <option value="level">{'Who can see these photos?'|@translate}</option>
598      <option value="metadata">{'synchronize metadata'|@translate}</option>
599  {if ($IN_CADDIE)}
600      <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option>
601  {else}
602      <option value="add_to_caddie">{'add to caddie'|@translate}</option>
603  {/if}
604      <option value="regenerateThumbnails">{'Regenerate Thumbnails'|@translate}</option>
605      <option value="regenerateWebsize">{'Regenerate Websize Photos'|@translate}</option>
606  {if !empty($element_set_global_plugins_actions)}
607    {foreach from=$element_set_global_plugins_actions item=action}
608      <option value="{$action.ID}">{$action.NAME}</option>
609    {/foreach}
610  {/if}
611    </select>
612
613    <!-- delete -->
614    <div id="action_delete" class="bulkAction">
615    <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p>
616    </div>
617
618    <!-- associate -->
619    <div id="action_associate" class="bulkAction">
620          <select style="width:400px" name="associate" size="1">
621            {html_options options=$associate_options }
622         </select>
623    </div>
624
625    <!-- dissociate -->
626    <div id="action_dissociate" class="bulkAction">
627          <select style="width:400px" name="dissociate" size="1">
628            {if !empty($dissociate_options)}{html_options options=$dissociate_options }{/if}
629          </select>
630    </div>
631
632
633    <!-- add_tags -->
634    <div id="action_add_tags" class="bulkAction">
635<select id="tags" name="add_tags">
636</select>
637    </div>
638
639    <!-- del_tags -->
640    <div id="action_del_tags" class="bulkAction">
641{$DEL_TAG_SELECTION}
642    </div>
643
644    <!-- author -->
645    <div id="action_author" class="bulkAction">
646    <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br>
647    {assign var='authorDefaultValue' value='Type here the author name'|@translate}
648<input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue}' : this.value;">
649    </div>   
650
651    <!-- title -->
652    <div id="action_title" class="bulkAction">
653    <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br>
654    {assign var='titleDefaultValue' value='Type here the title'|@translate}
655<input type="text" class="large" name="title" value="{$titleDefaultValue}" onfocus="this.value=(this.value=='{$titleDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$titleDefaultValue}' : this.value;">
656    </div>
657
658    <!-- date_creation -->
659    <div id="action_date_creation" class="bulkAction">
660      <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br>
661      <div id="set_date_creation">
662          <select id="date_creation_day" name="date_creation_day">
663             <option value="0">--</option>
664            {section name=day start=1 loop=32}
665              <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
666            {/section}
667          </select>
668          <select id="date_creation_month" name="date_creation_month">
669            {html_options options=$month_list selected=$DATE_CREATION_MONTH}
670          </select>
671          <input id="date_creation_year"
672                 name="date_creation_year"
673                 type="text"
674                 size="4"
675                 maxlength="4"
676                 value="{$DATE_CREATION_YEAR}">
677          <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled">
678      </div>
679    </div>
680
681    <!-- level -->
682    <div id="action_level" class="bulkAction">
683        <select name="level" size="1">
684          {html_options options=$level_options selected=$level_options_selected}
685        </select>
686    </div>
687
688    <!-- metadata -->
689    <div id="action_metadata" class="bulkAction">
690    </div>
691
692    <!-- regenerate thumbnails -->
693    <div id="action_regenerateThumbnails" class="bulkAction">
694      <table style="margin-left:20px;">
695        <tr>
696          <th><label for="thumb_crop">{'Crop'|@translate}</label></th>
697          <td><input type="checkbox" name="thumb_crop" id="thumb_crop" {if $upload_form_settings.thumb_crop}checked="checked"{/if}></td>
698        </tr>
699        <tr id="thumb_follow_orientation_tr">
700          <th><label for="thumb_follow_orientation">{'Follow Orientation'|@translate}</label></th>
701          <td><input type="checkbox" name="thumb_follow_orientation" id="thumb_follow_orientation" {if $upload_form_settings.thumb_follow_orientation}checked="checked"{/if}></td>
702        </tr>
703        <tr>
704          <th id="thumb_width_th">{'Maximum Width'|@translate}</th>
705          <td><input type="text" name="thumb_maxwidth" value="{$upload_form_settings.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
706        </tr>
707        <tr>
708          <th id="thumb_height_th">{'Maximum Height'|@translate}</th>
709          <td><input type="text" name="thumb_maxheight" value="{$upload_form_settings.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
710        </tr>
711        <tr>
712          <th>{'Image Quality'|@translate}</th>
713          <td><input type="text" name="thumb_quality" value="{$upload_form_settings.thumb_quality}" size="3" maxlength="3"> %</td>
714        </tr>
715      </table>
716    </div>
717
718    <!-- regenerate websize -->
719    <div id="action_regenerateWebsize" class="bulkAction">
720      <p>
721        <img src="admin/themes/default/icon/warning.png" alt="!" style="vertical-align:middle;">
722        {'Only photos with HD can be regenerated!'|@translate}
723      </p>
724
725      <table style="margin:10px 20px;">
726        <tr>
727          <th>{'Maximum Width'|@translate}</th>
728          <td><input type="text" name="websize_maxwidth" value="{$upload_form_settings.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
729        </tr>
730        <tr>
731          <th>{'Maximum Height'|@translate}</th>
732          <td><input type="text" name="websize_maxheight" value="{$upload_form_settings.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
733        </tr>
734        <tr>
735          <th>{'Image Quality'|@translate}</th>
736          <td><input type="text" name="websize_quality" value="{$upload_form_settings.websize_quality}" size="3" maxlength="3"> %</td>
737        </tr>
738      </table>
739    </div>
740
741    <!-- progress bar -->
742    <div id="regenerationMsg" class="bulkAction">
743      <p id="regenerationText" style="margin-bottom:10px;"></p>
744      <span class="progressBar" id="progressBar"></span>
745      <input type="hidden" name="regenerateSuccess" value="0">
746      <input type="hidden" name="regenerateError" value="0">
747    </div>
748
749    <!-- plugins -->
750{if !empty($element_set_global_plugins_actions)}
751  {foreach from=$element_set_global_plugins_actions item=action}
752    <div id="action_{$action.ID}" class="bulkAction">
753    {if !empty($action.CONTENT)}{$action.CONTENT}{/if}
754    </div>
755  {/foreach}
756{/if}
757
758    <p id="applyActionBlock" style="display:none" class="actionButtons">
759      <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p>
760
761    </div> <!-- #permitAction -->
762  </fieldset>
763
764  </form>
765
766</div> <!-- #batchManagerGlobal -->
Note: See TracBrowser for help on using the repository browser.