Changeset 5088 for extensions/AMetaData/admin/amd_metadata_select.tpl
- Timestamp:
- Mar 8, 2010, 11:20:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/admin/amd_metadata_select.tpl
r5005 r5088 3 3 4 4 var globalTagId; 5 6 function init() 7 { 8 computedWidth=$("#content").get(0).clientWidth; 9 computedHeight=$("#content").get(0).clientHeight; 10 $("#dialogViewDetail") 11 .dialog( 12 { 13 autoOpen: false, 14 resizable: false, 15 width:computedWidth, 16 height:computedHeight, 17 modal: true, 18 draggable:false, 19 title: '{/literal}{"g003_metadata_detail"|@translate}{literal}', 20 overlay: 21 { 22 backgroundColor: '#000', 23 opacity: 0.5 24 }, 25 open: function(event, ui) 26 { 27 bH=$("div.ui-dialog-buttonpane").get(0).clientHeight; 28 $("#dialogViewDetail").css('height', (this.clientHeight-bH)+"px"); 29 $("#iListImages").css('height', (this.clientHeight-bH-$("#iListImagesNb").get(0).clientHeight-$("#iHeaderListImages").get(0).clientHeight)+"px"); 30 }, 31 buttons: 32 { 33 '{/literal}{"g003_ok"|@translate}{literal}': 34 function() 35 { 36 $(this).dialog('close'); 37 } 38 } 39 } 40 ); 41 } 5 42 6 43 function loadTagList() … … 11 48 unusedTag=($("#iExcludeUnusedTagList").get(0).checked)?"y":"n"; 12 49 selectedOnly=($("#iSelectedTagOnly").get(0).checked)?"y":"n"; 50 51 displayTagListOrder(); 13 52 14 53 $("#iListTags").html( … … 23 62 "{/literal}{'g003_number_of_filtered_metadata'|@translate}{literal} "+$("#iListTags table tr").length 24 63 ); 64 65 //onclick="updateTagSelect('iNumId{$data.numId}', '')" 66 $("input.cbiListTags") 67 .bind('click', 68 function(event) 69 { 70 event.stopPropagation(); 71 updateTagSelect($(this).get(0).id, ''); 72 } 73 ); 74 75 $("a.cbiListTags") 76 .bind('click', 77 function(event) 78 { 79 event.stopPropagation(); 80 loadTagDetail($(this).get(0).id.substr(7)); 81 } 82 ); 83 84 85 86 25 87 $("body").css("cursor", "default"); 26 88 } … … 28 90 function loadTagDetail(tag) 29 91 { 92 $("#dialogViewDetail").dialog('open'); 93 30 94 globalTagId=tag; 31 95 order=$('#iSelectOrderImageList').val(); … … 51 115 } 52 116 53 function updateTagSelect(numId )117 function updateTagSelect(numId, mode) 54 118 { 55 119 $("body").css("cursor", "wait"); 120 121 if(mode=='switch') 122 { 123 $("#"+numId).get(0).checked=!$("#"+numId).get(0).checked; 124 } 125 56 126 selected=($("#"+numId).get(0).checked)?"y":"n"; 57 127 … … 67 137 } 68 138 139 function sortTagList(by) 140 { 141 $("#iSelectOrderTagList").val(by); 142 displayTagListOrder(); 143 loadTagList(); 144 } 145 146 function sortTagDetail(by, tag) 147 { 148 $("#iSelectOrderImageList").val(by); 149 displayTagDetailOrder(); 150 loadTagDetail(tag); 151 } 152 153 function displayTagListOrder() 154 { 155 if($("#iSelectOrderTagList").val()=="tag") 156 { 157 $("#iHLTOrderTag").html("↑"); 158 $("#iHLTOrderNum").html(""); 159 } 160 else 161 { 162 $("#iHLTOrderTag").html(""); 163 $("#iHLTOrderNum").html("↑"); 164 } 165 } 166 167 function displayTagDetailOrder() 168 { 169 if($("#iSelectOrderImageList").val()=="value") 170 { 171 $("#iHLIOrderValue").html("↑"); 172 $("#iHLIOrderNum").html(""); 173 } 174 else 175 { 176 $("#iHLIOrderValue").html(""); 177 $("#iHLIOrderNum").html("↑"); 178 } 179 } 180 69 181 70 182 </script> … … 75 187 76 188 <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> 189 <input type="hidden" id="iSelectOrderTagList" value="{$datas.config_GetListTags_OrderType}"/> 83 190 84 191 <label>{'g003_filter'|@translate} … … 104 211 <table id='iHeaderListTags' class="littlefont"> 105 212 <tr> 106 <th style="width:35%;min-width:340px;"> {'g003_TagId'|@translate}</th>213 <th style="width:35%;min-width:340px;"><span id="iHLTOrderTag"></span><a onclick="sortTagList('tag');">{'g003_TagId'|@translate}</a></th> 107 214 <th>{'g003_TagLabel'|@translate}</th> 108 <th width="80px"> {'g003_NumOfImage'|@translate}</th>215 <th width="80px"><span id="iHLTOrderNum"></span><a onclick="sortTagList('num');">{'g003_NumOfImage'|@translate}</a></th> 109 216 <th width="40px">{'g003_Pct'|@translate}</th> 110 217 <th width="110px"> </th> … … 116 223 117 224 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> 225 <div id="dialogViewDetail"> 226 <form> 227 <input type="hidden" id="iSelectOrderImageList" value="{$datas.config_GetListImages_OrderType}"/> 228 </form> 229 230 <table id='iHeaderListImages' class="littlefont"> 231 <tr> 232 <th><span id="iHLIOrderValue"></span><a onclick="sortTagDetail('value', globalTagId);">{'g003_Value'|@translate}</a> <span id="iHeaderListImagesTagName"></span></th> 233 <th width="80px"><span id="iHLIOrderNum"></span><a onclick="sortTagDetail('num', globalTagId);">{'g003_NumOfImage'|@translate}</a></th> 234 <th width="40px">{'g003_Pct'|@translate}</th> 235 <th width="110px"> </th> 236 </tr> 237 </table> 238 239 <div id='iListImages'> 240 <div style="width:100%;text-align:center;padding-top:20px;">{'g003_no_items_selected'|@translate}</div> 241 </div> 242 <div id="iListImagesNb"></div> 138 243 </div> 139 <div id="iListImagesNb"></div>140 244 141 245 142 246 <script type="text/javascript"> 247 init(); 143 248 loadTagList(); 249 displayTagDetailOrder(); 144 250 </script>
Note: See TracChangeset
for help on using the changeset viewer.