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

Last change on this file since 11754 was 11754, checked in by rvelices, 13 years ago

faster javascript on batch manager page with many pictures

File size: 27.0 KB
RevLine 
[8394]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
[10970]8{combine_script id='jquery.tokeninput' load='footer' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
[10592]9{combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'}
[10389]10{combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
[8394]11
[11039]12{footer_script require='jquery.tokeninput'}
13jQuery(document).ready(function() {ldelim}
14  jQuery("#tags").tokenInput(
[11212]15    [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name|@escape:'javascript'}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}],
[11039]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  );
[8394]26});
[11039]27{/footer_script}
[8394]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}";
[10389]33var elements = new Array();
[10637]34var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}];
[8394]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}";
[10389]39var regenerateThumbnailsMessage = "{'Thumbnails generation in progress...'|@translate}";
[10454]40var regenerateWebsizeMessage = "{'Photos generation in progress...'|@translate}";
[10553]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}';
[8394]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
[10389]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
[8394]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,
[9466]170    'fadeOut' : 200
[8394]171  });
172
173  $("[id^=action_]").hide();
174
[9806]175  $("select[name=selectAction]").change(function () {
[8394]176    $("[id^=action_]").hide();
177    $("#action_"+$(this).attr("value")).show();
[9806]178
179    if ($(this).val() != -1) {
180      $("#applyActionBlock").show();
181    }
182    else {
183      $("#applyActionBlock").hide();
184    }
[8394]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 () {
[9064]204    $("input[name=setSelected]").attr('checked', false);
205    selectPageThumbnails();
206    checkPermitAction();
207    return false;
208  });
209
210  function selectPageThumbnails() {
[8394]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    });
[9064]218  }
[8394]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 () {
[9064]255    selectPageThumbnails();
[8394]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
[8408]270  $("input[name=remove_title]").click(function () {
[8394]271    if ($(this).is(':checked')) {
[8408]272      $("input[name=title]").hide();
[8394]273    }
274    else {
[8408]275      $("input[name=title]").show();
[8394]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
[10389]331  jQuery('#applyAction').click(function() {
[10454]332    if (elements.length != 0)
333    {
334      return true;
335    }
336    else if (jQuery('[name="selectAction"]').val() == 'regenerateThumbnails')
337    {
[10686]338      resizeMethod = 'pwg.images.resizeThumbnail';
[10454]339      maxRequests = 3;
[10389]340      maxwidth = jQuery('input[name="thumb_maxwidth"]').val();
341      maxheight = jQuery('input[name="thumb_maxheight"]').val();
[10454]342      regenerationText = regenerateThumbnailsMessage;
[10553]343      crop = jQuery('input[name="thumb_crop"]').is(':checked');
344      follow_orientation = jQuery('input[name="thumb_follow_orientation"]').is(':checked');
[10454]345    }
346    else if(jQuery('[name="selectAction"]').val() == 'regenerateWebsize')
347    {
[10686]348      resizeMethod = 'pwg.images.resizeWebsize';
[10454]349      maxRequests = 1;
350      maxwidth = jQuery('input[name="websize_maxwidth"]').val();
351      maxheight = jQuery('input[name="websize_maxheight"]').val();
352      regenerationText = regenerateWebsizeMessage;
[10553]353      crop = false;
354      follow_orientation = false;
[10454]355    }
356    else return true;
[10389]357
[10454]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        }
[10389]374      });
375
[10454]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: {
[10686]395          method: resizeMethod,
[10454]396          maxwidth: maxwidth,
397          maxheight: maxheight,
[10553]398          crop: crop,
399          follow_orientation: follow_orientation,
[10454]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      });
[10389]407    }
[10454]408    return false;
[10389]409  });
410
[10553]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
[10164]427  checkPermitAction()
428});
429
430jQuery(window).load(function() {
[11754]431        var max_dim = 0;
432        $(".thumbnails img").each(function () {
433                max_dim = Math.max(max_dim, $(this).height(), $(this).width() );
434        });
435        max_dim += 20;
436        $("ul.thumbnails span, ul.thumbnails label").css('width', max_dim+'px').css('height', max_dim+'px');
[8394]437});
438{/literal}{/footer_script}
439
[9815]440<div id="batchManagerGlobal">
[8394]441
[8408]442<h2>{'Batch Manager'|@translate}</h2>
[8394]443
444  <form action="{$F_ACTION}" method="post">
445
446  <fieldset>
447    <legend>{'Filter'|@translate}</legend>
448
449    <ul id="filterList">
450      <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}>
[8408]451        <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
[8394]452        <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
[8408]453        {'predefined filter'|@translate}
[8394]454        <select name="filter_prefilter">
[10380]455          {foreach from=$prefilters item=prefilter}
456          <option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
[10354]457          {/foreach}
[8394]458        </select>
459      </li>
460      <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>
461        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
462        <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}>
[8408]463        {'album'|@translate}
[8394]464        <select style="width:400px" name="filter_category" size="1">
465          {html_options options=$filter_category_options selected=$filter_category_options_selected}
466        </select>
467        <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
468      </li>
469      <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
470        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
471        <input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}>
472        {'Who can see these photos?'|@translate}
473        <select name="filter_level" size="1">
474          {html_options options=$filter_level_options selected=$filter_level_options_selected}
475        </select>
476      </li>
477    </ul>
478
479    <p class="actionButtons" style="">
480      <select id="addFilter">
[8408]481        <option value="-1">{'Add a filter'|@translate}</option>
[8394]482        <option disabled="disabled">------------------</option>
[8408]483        <option value="filter_prefilter">{'predefined filter'|@translate}</option>
484        <option value="filter_category">{'album'|@translate}</option>
[8394]485        <option value="filter_level">{'Who can see these photos?'|@translate}</option>
486      </select>
487<!--      <input id="removeFilters" class="submit" type="submit" value="Remove all filters" name="removeFilters"> -->
[8408]488      <a id="removeFilters" href="">{'Remove all filters'|@translate}</a>
[8394]489    </p>
490
491    <p class="actionButtons" id="applyFilterBlock">
[8408]492      <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter">
[8394]493    </p>
494
495  </fieldset>
496
497  <fieldset>
498
499    <legend>{'Selection'|@translate}</legend>
500
501  {if !empty($thumbnails)}
502  <p id="checkActions">
503    {'Select:'|@translate}
[8408]504{if $nb_thumbs_set > $nb_thumbs_page}
505    <a href="#" id="selectAll">{'The whole page'|@translate}</a>,
506    <a href="#" id="selectSet">{'The whole set'|@translate}</a>,
507{else}
508    <a href="#" id="selectAll">{'All'|@translate}</a>,
509{/if}
[8394]510    <a href="#" id="selectNone">{'None'|@translate}</a>,
511    <a href="#" id="selectInvert">{'Invert'|@translate}</a>
512
513    <span id="selectedMessage"></span>
514
515    <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}>
516  </p>
517
518    <ul class="thumbnails">
519      {foreach from=$thumbnails item=thumbnail}
520        {if in_array($thumbnail.ID, $selection)}
521          {assign var='isSelected' value=true}
522        {else}
523          {assign var='isSelected' value=false}
524        {/if}
525
526      <li><span class="wrap1">
527          <label>
528            <span class="wrap2{if $isSelected} thumbSelected{/if}">
529        {if $thumbnail.LEVEL > 0}
530        <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
531        <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
532        {/if}
533            <span>
534              <img src="{$thumbnail.TN_SRC}"
535                 alt="{$thumbnail.FILE}"
536                 title="{$thumbnail.TITLE|@escape:'html'}"
537                 class="thumbnail">
538            </span></span>
539            <input type="checkbox" name="selection[]" value="{$thumbnail.ID}" {if $isSelected}checked="checked"{/if}>
540          </label>
541          </span>
542      </li>
543      {/foreach}
544    </ul>
545
546  {if !empty($navbar) }
547  <div style="clear:both;">
548
549    <div style="float:left">
550    {include file='navigation_bar.tpl'|@get_extent:'navbar'}
551    </div>
552
553    <div style="float:right;margin-top:10px;">{'display'|@translate}
554      <a href="{$U_DISPLAY}&amp;display=20">20</a>
555      &middot; <a href="{$U_DISPLAY}&amp;display=50">50</a>
556      &middot; <a href="{$U_DISPLAY}&amp;display=100">100</a>
557      &middot; <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
[8723]558      {'photos per page'|@translate}
[8394]559    </div>
560  </div>
561  {/if}
562
563  {else}
[8408]564  <div>{'No photo in the current set.'|@translate}</div>
[8394]565  {/if}
566  </fieldset>
567
568  <fieldset id="action">
569
570    <legend>{'Action'|@translate}</legend>
[8408]571      <div id="forbidAction"{if count($selection) != 0}style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div>
[8394]572      <div id="permitAction"{if count($selection) == 0}style="display:none"{/if}>
573
574    <select name="selectAction">
[8408]575      <option value="-1">{'Choose an action'|@translate}</option>
[8394]576      <option disabled="disabled">------------------</option>
577  {if isset($show_delete_form) }
578      <option value="delete">{'Delete selected photos'|@translate}</option>
579  {/if}
[8408]580      <option value="associate">{'Associate to album'|@translate}</option>
[8394]581  {if !empty($dissociate_options)}
[8408]582      <option value="dissociate">{'Dissociate from album'|@translate}</option>
[8394]583  {/if}
584      <option value="add_tags">{'add tags'|@translate}</option>
585  {if !empty($DEL_TAG_SELECTION)}
586      <option value="del_tags">{'remove tags'|@translate}</option>
587  {/if}
588      <option value="author">{'Set author'|@translate}</option>
[8408]589      <option value="title">{'Set title'|@translate}</option>
[8394]590      <option value="date_creation">{'Set creation date'|@translate}</option>
591      <option value="level">{'Who can see these photos?'|@translate}</option>
[8422]592      <option value="metadata">{'synchronize metadata'|@translate}</option>
[8394]593  {if ($IN_CADDIE)}
[9124]594      <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option>
[8394]595  {else}
[8408]596      <option value="add_to_caddie">{'add to caddie'|@translate}</option>
[8394]597  {/if}
[10389]598      <option value="regenerateThumbnails">{'Regenerate Thumbnails'|@translate}</option>
[10454]599      <option value="regenerateWebsize">{'Regenerate Websize Photos'|@translate}</option>
[9916]600  {if !empty($element_set_global_plugins_actions)}
601    {foreach from=$element_set_global_plugins_actions item=action}
602      <option value="{$action.ID}">{$action.NAME}</option>
603    {/foreach}
604  {/if}
[8394]605    </select>
606
607    <!-- delete -->
608    <div id="action_delete" class="bulkAction">
609    <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p>
610    </div>
611
612    <!-- associate -->
613    <div id="action_associate" class="bulkAction">
614          <select style="width:400px" name="associate" size="1">
615            {html_options options=$associate_options }
616         </select>
617    </div>
618
619    <!-- dissociate -->
620    <div id="action_dissociate" class="bulkAction">
621          <select style="width:400px" name="dissociate" size="1">
622            {if !empty($dissociate_options)}{html_options options=$dissociate_options }{/if}
623          </select>
624    </div>
625
626
627    <!-- add_tags -->
628    <div id="action_add_tags" class="bulkAction">
629<select id="tags" name="add_tags">
630</select>
631    </div>
632
633    <!-- del_tags -->
634    <div id="action_del_tags" class="bulkAction">
635{$DEL_TAG_SELECTION}
636    </div>
637
638    <!-- author -->
639    <div id="action_author" class="bulkAction">
[8408]640    <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br>
641    {assign var='authorDefaultValue' value='Type here the author name'|@translate}
[8394]642<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;">
643    </div>   
644
[8408]645    <!-- title -->
646    <div id="action_title" class="bulkAction">
647    <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br>
648    {assign var='titleDefaultValue' value='Type here the title'|@translate}
649<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;">
[8394]650    </div>
651
652    <!-- date_creation -->
653    <div id="action_date_creation" class="bulkAction">
[8408]654      <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br>
[8394]655      <div id="set_date_creation">
656          <select id="date_creation_day" name="date_creation_day">
657             <option value="0">--</option>
658            {section name=day start=1 loop=32}
659              <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
660            {/section}
661          </select>
662          <select id="date_creation_month" name="date_creation_month">
663            {html_options options=$month_list selected=$DATE_CREATION_MONTH}
664          </select>
665          <input id="date_creation_year"
666                 name="date_creation_year"
667                 type="text"
668                 size="4"
669                 maxlength="4"
670                 value="{$DATE_CREATION_YEAR}">
671          <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled">
672      </div>
673    </div>
674
675    <!-- level -->
676    <div id="action_level" class="bulkAction">
677        <select name="level" size="1">
678          {html_options options=$level_options selected=$level_options_selected}
679        </select>
680    </div>
681
[8422]682    <!-- metadata -->
683    <div id="action_metadata" class="bulkAction">
684    </div>
685
[10389]686    <!-- regenerate thumbnails -->
687    <div id="action_regenerateThumbnails" class="bulkAction">
[10454]688      <table style="margin-left:20px;">
[10389]689        <tr>
[10553]690          <th><label for="thumb_crop">{'Crop'|@translate}</label></th>
691          <td><input type="checkbox" name="thumb_crop" id="thumb_crop" {if $upload_form_settings.thumb_crop}checked="checked"{/if}></td>
692        </tr>
693        <tr id="thumb_follow_orientation_tr">
694          <th><label for="thumb_follow_orientation">{'Follow Orientation'|@translate}</label></th>
695          <td><input type="checkbox" name="thumb_follow_orientation" id="thumb_follow_orientation" {if $upload_form_settings.thumb_follow_orientation}checked="checked"{/if}></td>
696        </tr>
697        <tr>
698          <th id="thumb_width_th">{'Maximum Width'|@translate}</th>
[10389]699          <td><input type="text" name="thumb_maxwidth" value="{$upload_form_settings.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
700        </tr>
701        <tr>
[10553]702          <th id="thumb_height_th">{'Maximum Height'|@translate}</th>
[10389]703          <td><input type="text" name="thumb_maxheight" value="{$upload_form_settings.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
704        </tr>
705        <tr>
706          <th>{'Image Quality'|@translate}</th>
707          <td><input type="text" name="thumb_quality" value="{$upload_form_settings.thumb_quality}" size="3" maxlength="3"> %</td>
708        </tr>
709      </table>
710    </div>
711
[10454]712    <!-- regenerate websize -->
713    <div id="action_regenerateWebsize" class="bulkAction">
714      <p>
715        <img src="admin/themes/default/icon/warning.png" alt="!" style="vertical-align:middle;">
716        {'Only photos with HD can be regenerated!'|@translate}
717      </p>
718
719      <table style="margin:10px 20px;">
720        <tr>
721          <th>{'Maximum Width'|@translate}</th>
722          <td><input type="text" name="websize_maxwidth" value="{$upload_form_settings.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
723        </tr>
724        <tr>
725          <th>{'Maximum Height'|@translate}</th>
726          <td><input type="text" name="websize_maxheight" value="{$upload_form_settings.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
727        </tr>
728        <tr>
729          <th>{'Image Quality'|@translate}</th>
730          <td><input type="text" name="websize_quality" value="{$upload_form_settings.websize_quality}" size="3" maxlength="3"> %</td>
731        </tr>
732      </table>
733    </div>
734
[10389]735    <!-- progress bar -->
[10454]736    <div id="regenerationMsg" class="bulkAction">
[10389]737      <p id="regenerationText" style="margin-bottom:10px;"></p>
738      <span class="progressBar" id="progressBar"></span>
739      <input type="hidden" name="regenerateSuccess" value="0">
740      <input type="hidden" name="regenerateError" value="0">
741    </div>
742
[9916]743    <!-- plugins -->
744{if !empty($element_set_global_plugins_actions)}
745  {foreach from=$element_set_global_plugins_actions item=action}
746    <div id="action_{$action.ID}" class="bulkAction">
747    {if !empty($action.CONTENT)}{$action.CONTENT}{/if}
748    </div>
749  {/foreach}
750{/if}
751
[8394]752    <p id="applyActionBlock" style="display:none" class="actionButtons">
[8407]753      <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p>
[8394]754
755    </div> <!-- #permitAction -->
756  </fieldset>
757
758  </form>
[9815]759
760</div> <!-- #batchManagerGlobal -->
Note: See TracBrowser for help on using the repository browser.