source: trunk/admin/themes/default/template/element_set_ranks.tpl @ 29079

Last change on this file since 29079 was 29079, checked in by mistic100, 10 years ago

change outdated label

  • Property svn:eol-style set to LF
File size: 3.3 KB
Line 
1{footer_script require='jquery.ui.sortable'}{literal}
2jQuery(document).ready(function() {
3  function checkOrderOptions() {
4    jQuery("#image_order_user_define_options").hide();
5    if (jQuery("input[name=image_order_choice]:checked").val() == "user_define") {
6      jQuery("#image_order_user_define_options").show();
7    }       
8  }
9
10  jQuery('ul.thumbnails').sortable( {
11    revert: true, opacity: 0.7,
12    handle: jQuery('.rank-of-image').add('.rank-of-image img'),
13    update: function() {
14      jQuery(this).find('li').each(function(i) {
15        jQuery(this).find("input[name^=rank_of_image]").each(function() {
16          jQuery(this).attr('value', (i+1)*10)
17        });
18      });
19
20      jQuery('#image_order_rank').prop('checked', true);
21      checkOrderOptions();
22    }
23  });
24
25  jQuery("input[name=image_order_choice]").click(function () {
26    checkOrderOptions();
27  });
28
29  checkOrderOptions();
30});
31jQuery(document).ready(function() {
32jQuery('.thumbnail').tipTip({
33'delay' : 0,
34'fadeIn' : 200,
35'fadeOut' : 200
36});
37});
38{/literal}{/footer_script}
39
40<div class="titrePage">
41  <h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
42</div>
43
44<form action="{$F_ACTION}" method="post">
45{if !empty($thumbnails)}
46  <p><input type="submit" value="{'Submit'|@translate}" name="submit"></p>
47  <fieldset>
48    <legend>{'Manual order'|@translate}</legend>
49    {if !empty($thumbnails)}
50    <p>{'Drag to re-order'|@translate}</p>
51    <ul class="thumbnails">
52      {foreach from=$thumbnails item=thumbnail}
53      <li class="rank-of-image">
54        <img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="{$thumbnail.NAME|@replace:'"':' '}" title="{$thumbnail.NAME|@replace:'"':' '}"  style="width:{$thumbnail.SIZE[0]}px; height:{$thumbnail.SIZE[1]}px; ">
55        <input type="text" name="rank_of_image[{$thumbnail.ID}]" value="{$thumbnail.RANK}" style="display:none">
56      </li>
57      {/foreach}
58    </ul>
59    {/if}
60  </fieldset>
61{/if}
62
63  <fieldset>
64    <legend>{'Sort order'|@translate}</legend>
65    <p class="field">
66      <input type="radio" name="image_order_choice" id="image_order_default" value="default"{if $image_order_choice=='default'} checked="checked"{/if}>
67      <label for="image_order_default">{'Use the default photo sort order'|@translate}</label>
68    </p>
69    <p class="field">
70      <input type="radio" name="image_order_choice" id="image_order_rank" value="rank"{if $image_order_choice=='rank'} checked="checked"{/if}>
71      <label for="image_order_rank">{'manual order'|@translate}</label>
72    </p>
73    <p class="field">
74      <input type="radio" name="image_order_choice" id="image_order_user_define" value="user_define"{if $image_order_choice=='user_define'} checked="checked"{/if}>
75      <label for="image_order_user_define">{'automatic order'|@translate}</label>
76      <div id="image_order_user_define_options">
77      {foreach from=$image_order item=order}
78      <p class="field">
79        <select name="image_order[]">
80          {html_options options=$image_order_options selected=$order}
81        </select>
82      </p>
83      {/foreach}
84      </div>
85  </fieldset>
86  <p>
87    <input type="submit" value="{'Submit'|@translate}" name="submit">
88
89    <label>
90      <input type="checkbox" name="image_order_subcats" id="image_order_subcats">
91      {'Apply to sub-albums'|@translate}
92    </label>
93  </p>
94</form>
Note: See TracBrowser for help on using the repository browser.