Changeset 6107 for extensions/ColorStat/admin
- Timestamp:
- May 7, 2010, 10:23:47 PM (14 years ago)
- Location:
- extensions/ColorStat/admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ColorStat/admin/cstat_config.tpl
r5961 r6107 1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 2 {known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.slider.packed.js"} 3 4 5 {literal} 6 <style> 7 .ui-slider { 8 width:600px; 9 height:10px; 10 border-width:1px; 11 border-style:solid; 12 margin-right:5px; 13 padding-right:14px; 14 } 15 .ui-slider-handle { 16 width:12px; 17 height:12px; 18 position:relative; 19 top:-2px; 20 border-width:1px; 21 border-style:solid; 22 display:block; 23 } 24 </style> 25 <script type="text/javascript"> 26 27 28 function init() 29 { 30 formatPct({/literal}{$datas.minPct}{literal}); 31 $("#icstat_stat_minPct_slider").slider( 32 { 33 min:0.5, 34 max:60, 35 step:0.25, 36 value:{/literal}{$datas.minPct}{literal}, 37 slide: function(event, ui) { formatPct(ui.value); } 38 }); 39 $("#icstat_stat_minPct_slider a").addClass('gcBgInput'); 40 } 41 42 function formatPct(pct) 43 { 44 $("#icstat_stat_minPct").val(pct); 45 $("#icstat_stat_minPct_display").html(pct.toFixed(2)+"%"); 46 } 47 </script> 48 {/literal} 49 50 51 1 52 <h2>{'cstat_config_plugin'|@translate}</h2> 53 54 <form id="iConfig" method="post" action="" class="general"> 55 56 <fieldset> 57 <legend>{'cstat_stat_and_search'|@translate}</legend> 58 59 <table class="formtable"> 60 <tr> 61 <td colspan="2">{'cstat_percent_min_significant'|@translate}</td> 62 </tr> 63 <tr> 64 <td> 65 <input type="hidden" name="f_stat_minPct" id="icstat_stat_minPct" value="{$datas.minPct}"> 66 <div id="icstat_stat_minPct_slider" class="gcBgInput gcBorderInput"></div> 67 </td> 68 <td width="90px"> 69 <div id="icstat_stat_minPct_display"></div> 70 </td> 71 </tr> 72 </table> 73 74 </fieldset> 75 76 77 <fieldset> 78 <legend>{'cstat_gallery_integration'|@translate}</legend> 79 80 <label> 81 <input type="checkbox" id='idisplay_gallery_showColorsCBox' onclick="$('#idisplay_gallery_showColors').val(($('#idisplay_gallery_showColorsCBox').get(0).checked=='on')?'y':'n');" {if $datas.showColors=='y'}checked{/if} > 82 {'cstat_display_colors_on_image'|@translate} 83 <input type="hidden" id='idisplay_gallery_showColors' name='f_display_gallery_showColors' value='{$datas.showColors}'> 84 </label> 85 86 </fieldset> 87 88 89 90 <input type="submit" value="{'cstat_apply'|@translate}" name="submit_save_config" style="margin-left:1em;" > 91 92 </form> 93 94 95 <script type="text/javascript"> 96 init(); 97 </script> -
extensions/ColorStat/admin/cstat_database.tpl
r5961 r6107 1 1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 2 2 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"} 3 4 3 5 4 {literal} … … 60 59 61 60 62 doAnalyze ="<br><form id='iDialogProgress' class='formtable'>"+61 doAnalyzeDialog="<br><form id='iDialogProgress' class='formtable'>"+ 63 62 "<div id='iprogressbar_contener' class='gcBorderInput'>"+ 64 63 "<span id='iprogressbar_bg' class='gcBgInput' style='width:0%;'> </span>"+ … … 81 80 title: '{/literal}{"cstat_updating_database"|@translate}{literal} ('+modeLabel+')', 82 81 } 83 ).html(doAnalyze );82 ).html(doAnalyzeDialog); 84 83 85 84 NumberOfItemsPerRequest=$("#iNumberOfItemsPerRequest").val(); -
extensions/ColorStat/admin/cstat_install_page.tpl
r5961 r6107 1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 2 {known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" } 3 1 4 {literal} 2 5 <script type="text/javascript"> 3 6 var tableSize='small'; 7 8 function init() 9 { 10 $('.tiptip').tipTip( 11 { 12 'delay' : 0, 13 'fadeIn' : 0, 14 'fadeOut' : 0, 15 'edgeOffset' : 5, 16 } 17 ); 18 } 4 19 5 20 function displayTable(size) … … 52 67 <table> 53 68 <tr> 54 <td style="min-width: 450px;">{$smallTableColor}</td>69 <td style="min-width:350px;">{$smallTableColor}</td> 55 70 56 71 <td style='padding-left:30px;vertical-align:top;'> … … 85 100 <table> 86 101 <tr> 87 <td style="min-width: 450px;">{$largeTableColor}</td>102 <td style="min-width:350px;">{$largeTableColor}</td> 88 103 89 104 <td style='padding-left:30px;vertical-align:top;'> … … 121 136 </form> 122 137 138 <script type="text/javascript"> 139 init(); 140 </script> 123 141 124 -
extensions/ColorStat/admin/cstat_search.tpl
r5961 r6107 1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 2 {known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"} 3 {known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js"} 4 5 {known_script id="gpc.pagesNavigator" src=$ROOT_URL|@cat:"plugins/GrumPluginClasses/js/pagesNavigator.js"} 6 7 8 {literal} 9 <script type="text/javascript"> 10 var cb=null; 11 12 interfaceManager = function(optionsToSet) 13 { 14 var pn=null; 15 var requestNumber=0; 16 17 options = 18 { 19 requestCriterionsVisible:'', 20 requestCriterionsHidden:'', 21 requestResult:'', 22 requestResultContent:'', 23 requestResultNfo:'', 24 requestResultPagesNavigator:'', 25 requestResultRequestNumber:0, 26 onPageChange:null, 27 numberPerPage:30, 28 }; 29 30 /** 31 * 32 */ 33 this.doAction = function(fct) 34 { 35 switch(fct) 36 { 37 case 'queryResult': 38 /* function 'queryResult' : when query is executed, prepare the interface 39 */ 40 if(arguments.length==3) 41 { 42 displayQueryResult(arguments[1], arguments[2]); 43 } 44 break; 45 case 'queryPage': 46 /* function 'queryPage' : display returned page 47 */ 48 if(arguments.length==3) 49 { 50 displayQueryPage(arguments[1], arguments[2]); 51 } 52 break; 53 case 'show': 54 /* function 'show' : show/hide the query/result 55 */ 56 if(arguments.length==2) 57 { 58 show(arguments[1]); 59 } 60 break; 61 case 'setOptions': 62 /* function 'setOptions' : allows to set options after the object was 63 * created 64 */ 65 if(arguments.length==2) 66 { 67 setOptions(arguments[1]); 68 } 69 break; 70 } 71 } 72 73 /** 74 * returns the current request number 75 */ 76 this.getRequestNumber = function () 77 { 78 return(requestNumber); 79 } 80 81 /** 82 * returns the number of items per page 83 */ 84 this.getNumberPerPage = function () 85 { 86 return(options.numberPerPage); 87 } 88 89 /** 90 * this function show/hide the different panels 91 * 'buildQuery' : hide the result panel and display the panel to build query 92 * 'resultQuery' : hide the panel to build query and display the result panel 93 */ 94 var show = function(mode) 95 { 96 switch(mode) 97 { 98 case 'buildQuery': 99 $('.'+options.requestCriterionsVisible).css('display', 'block'); 100 $('.'+options.requestCriterionsHidden).css('display', 'none'); 101 $('.'+options.requestResult).css('display', 'none'); 102 break; 103 case 'resultQuery': 104 $('#iResultQueryContent').html("<br><img src='./plugins/GrumPluginClasses/icons/processing.gif'>"); 105 $('.'+options.requestCriterionsVisible).css('display', 'none'); 106 $('.'+options.requestCriterionsHidden).css('display', 'block'); 107 $('.'+options.requestResult).css('display', 'block'); 108 break; 109 } 110 } 111 112 /** 113 * this function display the number of items found and prepare the page 114 * navigator 115 * 116 * @param String nfo : 2 information separated with a semi-colon ';' 117 * requestNumber;numberOfItems 118 */ 119 var displayQueryResult = function (isSuccess, nfo) 120 { 121 if(isSuccess) 122 { 123 nfo=nfo.split(';'); 124 125 requestNumber=nfo[0]; 126 $('#iResultQueryNfo').html(nfo[1]); 127 pn.doAction('setOptions', { numberItem:nfo[1], defaultPage:1 } ); 128 show('resultQuery'); 129 } 130 else 131 { 132 //$('#'+options.requestResultContent).html(""); 133 show('buildQuery'); 134 alert('Something is wrong on the server-side !'); 135 } 136 } 137 138 139 /** 140 * this function display the number of items found and prepare the page 141 * navigator 142 * 143 * @param String nfo : 2 information separated with a semi-colon ';' 144 * requestNumber;numberOfItems 145 */ 146 var displayQueryPage = function (isSuccess, nfo) 147 { 148 if(isSuccess) 149 { 150 $('#iResultQueryContent').html(nfo); 151 } 152 else 153 { 154 alert('Something is wrong on the server-side !'); 155 } 156 } 157 158 159 /** 160 * 161 * @param Object optionsToSet : set the given options 162 */ 163 var setOptions = function(optionsToSet) 164 { 165 if(typeof optionsToSet=='object') 166 { 167 options = jQuery.extend(options, optionsToSet); 168 } 169 } 170 171 /** 172 * initialize the object 173 */ 174 var init = function (optionsToSet) 175 { 176 setOptions(optionsToSet); 177 178 pn = new pagesNavigator(options.requestResultPagesNavigator, 179 { 180 itemPerPage:options.numberPerPage, 181 displayNumPage:9, 182 classActive:'pnActive{/literal}{$datas.themeName}{literal}', 183 classInactive:'pnInactive{/literal}{$datas.themeName}{literal}', 184 onPageChange: function (page) 185 { 186 if(options.onPageChange!=null && jQuery.isFunction(options.onPageChange)) 187 { 188 options.onPageChange(requestNumber, page, options.numberPerPage); 189 } 190 }, 191 } 192 ); 193 194 requestNumber=options.requestResultRequestNumber; 195 } 196 197 init(optionsToSet); 198 } 199 200 201 function init() 202 { 203 im = new interfaceManager( 204 { 205 requestCriterionsVisible:'cRequestCriterions', 206 requestCriterionsHidden:'cModifyRequest', 207 requestResult:'cResultQuery', 208 requestResultContent:'iResultQueryContent', 209 requestResultNfo:'iResultQueryNfo', 210 requestResultPagesNavigator:'iPagesNavigator', 211 } 212 ); 213 214 requestBuilderOptions.imgEditUrl='{/literal}{$ROOT_URL}{$themeconf.admin_icon_dir}{literal}/edit_s.png'; 215 requestBuilderOptions.imgDeleteUrl='{/literal}{$ROOT_URL}{$themeconf.admin_icon_dir}{literal}/delete.png'; 216 requestBuilderOptions.classGroup='gcBorderInput gcTextInput'; 217 requestBuilderOptions.classItem='gcBgInput gcTextInput'; 218 requestBuilderOptions.classOperator='cbOperator cbOperatorBg{/literal}{$datas.themeName}{literal} gcLinkHover'; 219 requestBuilderOptions.onRequestSuccess = function (msg) { im.doAction('queryResult', true, msg); cb.doAction('getPage', im.getRequestNumber(), 1, im.getNumberPerPage()); }; 220 requestBuilderOptions.onRequestError = function (msg) { im.doAction('queryResult', false, msg); }; 221 requestBuilderOptions.onGetPageSuccess = function (msg) { im.doAction('queryPage', true, msg); }; 222 requestBuilderOptions.onGetPageError = function (msg) { im.doAction('queryPage', false, msg); }; 223 224 cb = new criteriaBuilder('iListColorsChoosen', requestBuilderOptions); 225 226 im.doAction('setOptions', 227 { onPageChange: 228 function (requestNumber, page, numberPerPage) 229 { 230 $('#iResultQueryContent').html("<br><img src='./plugins/GrumPluginClasses/icons/processing.gif'>"); 231 cb.doAction('getPage', requestNumber, page, numberPerPage); 232 } 233 } 234 ); 235 236 } 237 238 239 240 </script> 241 {/literal} 242 243 {$datas.dialogBox} 244 1 245 <h2>{'cstat_search_by_color'|@translate}</h2> 246 247 <form> 248 <fieldset> 249 <legend>{'cstat_search_criterion'|@translate}</legend> 250 251 <div id='iRequestCriterions' class='cRequestCriterions'> 252 <div style='width:100%;min-height:250px;margin-bottom:8px;'> 253 <ul id='iListColorsChoosen'> 254 </ul> 255 </div> 256 257 <div class='gcBgInput cbButtons'>{literal}<a onclick="colorBox.show({cBuilder:cb});">{/literal}{'cstat_add_colors'|@translate}</a></div> 258 <div class='gcBgInput cbButtons'>{literal}<a onclick="cb.doAction('clear');">{/literal}{'cstat_clear_colors'|@translate}</a></div> 259 </div> 260 <div class='cModifyRequest' style='display:none;'> 261 <div class='gcBgInput cbButtons'>{literal}<a onclick="im.doAction('show', 'buildQuery');">{/literal}{'cstat_do_modify_request'|@translate}</a></div> 262 </div> 263 264 </fieldset> 265 266 <input type="button" class='cRequestCriterions' style="margin-left:1em;" onclick="cb.doAction('send');" value="{'cstat_search'|@translate}"> 267 </form> 268 269 <fieldset id='iResultQuery' style='display:none;' class='cResultQuery'> 270 <legend>{'cstat_result_query'|@translate}</legend> 271 272 <div id='iResultQueryContent' style='width:100%;min-height:250px;max-height:450px;overflow:auto;margin-bottom:8px;'></div> 273 274 <div class='gcBgInput gcTextInput'> 275 <div id='iPagesNavigator' style='float:right;'></div> 276 <div style='text-align:left;padding:4px;'>{'cstat_number_of_item_found'|@translate} : <span id='iResultQueryNfo'></span></div> 277 </div> 278 279 </fieldset> 280 281 282 <script type="text/javascript"> 283 init(); 284 </script> -
extensions/ColorStat/admin/cstat_stat.tpl
r5961 r6107 1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 2 {known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" } 1 3 2 4 {literal} … … 7 9 loadColorList(); 8 10 displayColorListOrder(); 11 $('.tiptip').tipTip( 12 { 13 'delay' : 0, 14 'fadeIn' : 0, 15 'fadeOut' : 0, 16 'edgeOffset' : 5, 17 } 18 ); 9 19 } 10 20 … … 87 97 <th style="min-width:180px;" colspan="2"><span id="iHLTOrderColor"></span><a onclick="sortColorList('color');">{'cstat_colors'|@translate}</a></th> 88 98 89 <th width="60px"><span id="iHLTOrderNumImages"></span><a onclick="sortColorList('img');" title="{'cstat_NumOfImages_help'|@translate}">{'cstat_NumOfImages'|@translate}</a></th>99 <th width="60px"><span id="iHLTOrderNumImages"></span><a class="tiptip" onclick="sortColorList('img');" title="{'cstat_NumOfImages_help'|@translate}">{'cstat_NumOfImages'|@translate}</a></th> 90 100 <th width="40px">{'cstat_Pct'|@translate}</th> 91 101 <th width="115px"> </th> 92 102 93 <th width="80px"><span id="iHLTOrderNumPixels"></span><a onclick="sortColorList('pixels');" title="{'cstat_NumOfPixels_help'|@translate}">{'cstat_NumOfPixels'|@translate}</a></th>103 <th width="80px"><span id="iHLTOrderNumPixels"></span><a class="tiptip" onclick="sortColorList('pixels');" title="{'cstat_NumOfPixels_help'|@translate}">{'cstat_NumOfPixels'|@translate}</a></th> 94 104 <th width="40px">{'cstat_Pct'|@translate}</th> 95 105 <th width="130px"> </th>
Note: See TracChangeset
for help on using the changeset viewer.