source: extensions/lmt/admin/plugin_admin_manage.tpl @ 6872

Last change on this file since 6872 was 6701, checked in by grum, 14 years ago

Version 1.2.3, features:1439,1690

File size: 4.7 KB
Line 
1
2{if $nbphotos==0}
3  <p>{'lmt_caddie_is_empty_please_fill_it'|@translate}</p>
4{else}
5
6{literal}
7<script type="text/javascript">
8$(document).data("nbsel", {/literal}{$nbphotos}{literal});
9
10  function loadpage(pagenum)
11  {
12    $("#list").html("<br><img src='./plugins/GrumPluginClasses/icons/processing.gif'>");
13
14    $.ajax(
15      {
16        type: "POST",
17        url: "{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}"+pagenum,
18        async: true,
19        success: function (msg)
20          {
21            $("#nbphotos").html(msg.substr(0,msg.indexOf("#")));
22            $("#list").html(msg.substr(msg.indexOf("#")+1));
23          }
24      }
25    );
26  }
27
28  function swap_state(id)
29  {
30    if($("#"+id).val()=="1")
31    {
32      $("#"+id).val("0");
33      $("#img"+id).attr("className", "is_off");
34      $(document).data("nbsel", $(document).data("nbsel")-1);
35    }
36    else
37    {
38      $("#"+id).val("1");
39      $("#img"+id).attr("className", "is_on");
40      $(document).data("nbsel", $(document).data("nbsel")+1);
41    }
42    $("#btsubmit").get(0).disabled=($(document).data("nbsel")==0);
43  }
44
45  function change_select()
46  {
47    act=$("#selectlist").val();
48    switch(act)
49    {
50      case '-':
51        break;
52      case 'all':
53        $(document).data("nbsel", {/literal}{$nbphotos}{literal});
54        $("input").filter(".none").each(
55          function(i)
56          {
57            this.value="1";
58            $("#img"+this.id).attr("className", "is_on");
59          }
60        );
61        break;
62      case 'none':
63        $(document).data("nbsel", 0);
64        $("input").filter(".none").each(
65          function(i)
66          {
67            this.value="0";
68            $("#img"+this.id).attr("className", "is_off");
69          }
70        );
71        break;
72      case 'invert':
73        $("input").filter(".none").each(
74          function(i)
75          {
76            if(this.value=="1")
77            {
78              this.value="0";
79              $("#img"+this.id).attr("className", "is_off");
80              $(document).data("nbsel", $(document).data("nbsel")-1);
81            }
82            else
83            {
84              this.value="1";
85              $("#img"+this.id).attr("className", "is_on");
86              $(document).data("nbsel", $(document).data("nbsel")+1);
87            }
88          }
89        );
90        break;
91      default:
92        $(document).data("nbsel", 0);
93        $("input").filter(".none").each(
94          function(i)
95          {
96            if(this.alt==act)
97            {
98              this.value="1";
99              $("#img"+this.id).attr("className", "is_on");
100              $(document).data("nbsel", $(document).data("nbsel")+1);
101            }
102          }
103        );
104        break;
105    }
106    $("#selectlist").get(0).options[0].selected=true;
107    $("#btsubmit").get(0).disabled=($(document).data("nbsel")==0);
108  }
109
110</script>
111{/literal}
112
113
114<form method="POST">
115
116  <fieldset>
117    <legend>{'lmt_caddie_items'|@translate}</legend>
118
119    <div id="list">
120    </div>
121
122    <p class="lmt_page" style="border-top:1px dotted;padding-top:10px;">
123      <span id="nbphotos" style="float:right;"></span>
124      <span>
125          <select id="selectlist" onchange="change_select();">
126            {html_options values=$selectlist_list_values output=$selectlist_list_labels selected=$selectlist_list_selected}
127          </select>
128      </span>
129    </p>
130  </fieldset>
131
132  <fieldset>
133    <legend>{'lmt_licence_to_apply'|@translate}</legend>
134
135    <p class="lmt_page">
136      <table class="formtable">
137        <tr>
138          <td>{'lmt_licence'|@translate}</td>
139          <td>
140            <select name="licence">
141              {html_options values=$licences_list_values output=$licences_list_labels selected=$licences_list_selected}
142            </select>
143          </td>
144        </tr>
145        <tr>
146          <td>{'lmt_author'|@translate}</td>
147          <td>
148            <select name="author">
149              {html_options values=$author_list_values output=$author_list_labels}
150            </select>
151          </td>
152        </tr>
153      </table>
154    </p>
155  </fieldset>
156
157  <fieldset>
158    <legend>{'Caddie management'|@translate}</legend>
159    <label><input type="radio" name="manage_caddie" value="app_nothing" checked>&nbsp;{'lmt_apply_do_nothing'|@translate}</label><br/>
160    <label><input type="radio" name="manage_caddie" value="app_clear">&nbsp;{'lmt_apply_do_clear'|@translate}</label><br/>
161    <label><input type="radio" name="manage_caddie" value="app_clear_selected">&nbsp;{'lmt_apply_do_clear_selected'|@translate}</label><br/>
162    <label><input type="radio" name="manage_caddie" value="napp_clear_selected">&nbsp;{'lmt_dontapply_do_clear_selected'|@translate}</label><br/>
163</fieldset>
164
165  <p><input type="submit" id="btsubmit" name="submit_apply_licence" value="{'lmt_apply'|@translate}"></p>
166
167</form>
168
169<script type="text/javascript">
170  loadpage(1);
171</script>
172
173{/if}
Note: See TracBrowser for help on using the repository browser.