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

Last change on this file since 11039 was 11039, checked in by patdenice, 10 years ago

Load tags for tokeninput directly in html page. Ajax is too slow.

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