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

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

remplace FCBKcomplete by TokenInput

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