1 | {literal} |
---|
2 | <script type="text/javascript"> |
---|
3 | |
---|
4 | var globalTagId; |
---|
5 | |
---|
6 | function loadTagList() |
---|
7 | { |
---|
8 | $("body").css("cursor", "wait"); |
---|
9 | order=$('#iSelectOrderTagList').val(); |
---|
10 | filter=$("#iSelectFilterTagList").val(); |
---|
11 | unusedTag=($("#iExcludeUnusedTagList").get(0).checked)?"y":"n"; |
---|
12 | selectedOnly=($("#iSelectedTagOnly").get(0).checked)?"y":"n"; |
---|
13 | |
---|
14 | $("#iListTags").html( |
---|
15 | $.ajax({ |
---|
16 | type: "POST", |
---|
17 | url: "{/literal}{$datas.urlRequest}{literal}", |
---|
18 | async: false, |
---|
19 | data: { ajaxfct:"showStatsGetListTags", orderType:order, filterType:filter, excludeUnusedTag:unusedTag, selectedTagOnly:selectedOnly } |
---|
20 | }).responseText |
---|
21 | ); |
---|
22 | $("#iListTagsNb").html( |
---|
23 | "{/literal}{'g003_number_of_filtered_metadata'|@translate}{literal} "+$("#iListTags table tr").length |
---|
24 | ); |
---|
25 | $("body").css("cursor", "default"); |
---|
26 | } |
---|
27 | |
---|
28 | function loadTagDetail(tag) |
---|
29 | { |
---|
30 | globalTagId=tag; |
---|
31 | order=$('#iSelectOrderImageList').val(); |
---|
32 | $("#iListImages").html("<br>{/literal}{'g003_loading'|@translate}{literal}"); |
---|
33 | $("#iHeaderListImagesTagName").html("["+tag+"]"); |
---|
34 | |
---|
35 | $.ajax( |
---|
36 | { |
---|
37 | type: "POST", |
---|
38 | url: "{/literal}{$datas.urlRequest}{literal}", |
---|
39 | async: true, |
---|
40 | data: { ajaxfct:"showStatsGetListImages", orderType:order, tagId:tag, }, |
---|
41 | success: |
---|
42 | function(msg) |
---|
43 | { |
---|
44 | $("#iListImages").html(msg); |
---|
45 | $("#iListImagesNb").html( |
---|
46 | "{/literal}{'g003_number_of_distinct_values'|@translate}{literal} "+$("#iListImages table tr").length |
---|
47 | ); |
---|
48 | } |
---|
49 | } |
---|
50 | ); |
---|
51 | } |
---|
52 | |
---|
53 | function updateTagSelect(numId) |
---|
54 | { |
---|
55 | $("body").css("cursor", "wait"); |
---|
56 | selected=($("#"+numId).get(0).checked)?"y":"n"; |
---|
57 | |
---|
58 | $("#iListImages").html( |
---|
59 | $.ajax({ |
---|
60 | type: "POST", |
---|
61 | url: "{/literal}{$datas.urlRequest}{literal}", |
---|
62 | async: false, |
---|
63 | data: { ajaxfct:"updateTagSelect", tagSelected:selected, numId:numId.substr(6) } |
---|
64 | }).responseText |
---|
65 | ); |
---|
66 | $("body").css("cursor", "default"); |
---|
67 | } |
---|
68 | |
---|
69 | |
---|
70 | </script> |
---|
71 | {/literal} |
---|
72 | |
---|
73 | |
---|
74 | <h3>{'g003_select_metadata'|@translate}</h3> |
---|
75 | |
---|
76 | <form> |
---|
77 | <label>{'g003_order'|@translate} |
---|
78 | <select id="iSelectOrderTagList" onchange="loadTagList();"> |
---|
79 | <option value="tag" {if $datas.config_GetListTags_OrderType=="tag"}selected{/if}>{'g003_tagOrder'|@translate}</option> |
---|
80 | <option value="num" {if $datas.config_GetListTags_OrderType=="num"}selected{/if}>{'g003_numOrder'|@translate}</option> |
---|
81 | </select> |
---|
82 | </label> |
---|
83 | |
---|
84 | <label>{'g003_filter'|@translate} |
---|
85 | <select id="iSelectFilterTagList" onchange="loadTagList();"> |
---|
86 | <option value="" {if $datas.config_GetListTags_FilterType==""}selected{/if}>{'g003_no_filter'|@translate}</option> |
---|
87 | <option value="magic" {if $datas.config_GetListTags_FilterType=="magic"}selected{/if}>{'g003_magic_filter'|@translate}</option> |
---|
88 | <option value="exif" {if $datas.config_GetListTags_FilterType=="exif"}selected{/if}>Exif</option> |
---|
89 | <option value="xmp" {if $datas.config_GetListTags_FilterType=="xmp"}selected{/if}>Xmp</option> |
---|
90 | <option value="iptc" {if $datas.config_GetListTags_FilterType=="iptc"}selected{/if}>Iptc</option> |
---|
91 | </select> |
---|
92 | </label> |
---|
93 | |
---|
94 | <label> |
---|
95 | <input type="checkbox" id="iExcludeUnusedTagList" onchange="loadTagList();" {if $datas.config_GetListTags_ExcludeUnusedTag=="y"}checked{/if}> {'g003_exclude_unused_tags'|@translate} |
---|
96 | </label> |
---|
97 | |
---|
98 | <label> |
---|
99 | <input type="checkbox" id="iSelectedTagOnly" onchange="loadTagList();" {if $datas.config_GetListTags_SelectedTagOnly=="y"}checked{/if}> {'g003_selected_tags_only'|@translate} |
---|
100 | </label> |
---|
101 | |
---|
102 | </form> |
---|
103 | |
---|
104 | <table id='iHeaderListTags' class="littlefont"> |
---|
105 | <tr> |
---|
106 | <th style="width:35%;min-width:340px;">{'g003_TagId'|@translate}</th> |
---|
107 | <th>{'g003_TagLabel'|@translate}</th> |
---|
108 | <th width="80px">{'g003_NumOfImage'|@translate}</th> |
---|
109 | <th width="40px">{'g003_Pct'|@translate}</th> |
---|
110 | <th width="110px"> </th> |
---|
111 | </tr> |
---|
112 | </table> |
---|
113 | <div id='iListTags'> |
---|
114 | </div> |
---|
115 | <div id="iListTagsNb"></div> |
---|
116 | |
---|
117 | |
---|
118 | <form> |
---|
119 | <label>{'g003_order'|@translate} |
---|
120 | <select id="iSelectOrderImageList" onchange="loadTagDetail(globalTagId);"> |
---|
121 | <option value="value" {if $datas.config_GetListImages_OrderType=="value"}selected{/if}>{'g003_valueOrder'|@translate}</option> |
---|
122 | <option value="num" {if $datas.config_GetListImages_OrderType=="num"}selected{/if}>{'g003_numOrder'|@translate}</option> |
---|
123 | </select> |
---|
124 | </label> |
---|
125 | </form> |
---|
126 | |
---|
127 | <table id='iHeaderListImages' class="littlefont"> |
---|
128 | <tr> |
---|
129 | <th>{'g003_Value'|@translate} <span id="iHeaderListImagesTagName"></span></th> |
---|
130 | <th width="80px">{'g003_NumOfImage'|@translate}</th> |
---|
131 | <th width="40px">{'g003_Pct'|@translate}</th> |
---|
132 | <th width="110px"> </th> |
---|
133 | </tr> |
---|
134 | </table> |
---|
135 | |
---|
136 | <div id='iListImages'> |
---|
137 | <div style="width:100%;text-align:center;padding-top:20px;">{'g003_no_items_selected'|@translate}</div> |
---|
138 | </div> |
---|
139 | <div id="iListImagesNb"></div> |
---|
140 | |
---|
141 | |
---|
142 | <script type="text/javascript"> |
---|
143 | loadTagList(); |
---|
144 | </script> |
---|