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 | function displayConfig(tabsheet) |
---|
28 | { |
---|
29 | switch(tabsheet) |
---|
30 | { |
---|
31 | case 'database': |
---|
32 | $('#iDisplayConfigDatabase').css('display', 'block'); |
---|
33 | $('#iDisplayConfigStatSearch').css('display', 'none'); |
---|
34 | $('#iDisplayConfigDisplay').css('display', 'none'); |
---|
35 | break; |
---|
36 | case 'statsearch': |
---|
37 | $('#iDisplayConfigDatabase').css('display', 'none'); |
---|
38 | $('#iDisplayConfigStatSearch').css('display', 'block'); |
---|
39 | $('#iDisplayConfigDisplay').css('display', 'none'); |
---|
40 | break; |
---|
41 | case 'display': |
---|
42 | $('#iDisplayConfigDatabase').css('display', 'none'); |
---|
43 | $('#iDisplayConfigStatSearch').css('display', 'none'); |
---|
44 | $('#iDisplayConfigDisplay').css('display', 'block'); |
---|
45 | break; |
---|
46 | } |
---|
47 | |
---|
48 | } |
---|
49 | |
---|
50 | function init() |
---|
51 | { |
---|
52 | formatPct({/literal}{$datas.minPct}{literal}); |
---|
53 | $("#icstat_stat_minPct_slider").slider( |
---|
54 | { |
---|
55 | min:0.5, |
---|
56 | max:60, |
---|
57 | step:0.25, |
---|
58 | value:{/literal}{$datas.minPct}{literal}, |
---|
59 | slide: function(event, ui) { formatPct(ui.value); } |
---|
60 | }); |
---|
61 | $("#icstat_stat_minPct_slider a").addClass('gcBgInput'); |
---|
62 | displayConfig('database'); |
---|
63 | } |
---|
64 | |
---|
65 | function formatPct(pct) |
---|
66 | { |
---|
67 | $("#icstat_stat_minPct").val(pct); |
---|
68 | $("#icstat_stat_minPct_display").html(pct.toFixed(2)+"%"); |
---|
69 | } |
---|
70 | </script> |
---|
71 | {/literal} |
---|
72 | |
---|
73 | {$configTabsheet} |
---|
74 | |
---|
75 | <h2>{'cstat_config_plugin'|@translate}</h2> |
---|
76 | |
---|
77 | <form id="iConfig" method="post" action="" class="general"> |
---|
78 | |
---|
79 | <div id='iDisplayConfigDatabase' style='display:none;'> |
---|
80 | |
---|
81 | </div> |
---|
82 | |
---|
83 | <div id='iDisplayConfigStatSearch' style='display:none;'> |
---|
84 | <fieldset> |
---|
85 | <legend>{'cstat_stat_and_search'|@translate}</legend> |
---|
86 | |
---|
87 | <table class="formtable"> |
---|
88 | <tr> |
---|
89 | <td colspan="2">{'cstat_percent_min_significant'|@translate}</td> |
---|
90 | </tr> |
---|
91 | <tr> |
---|
92 | <td> |
---|
93 | <input type="hidden" name="f_stat_minPct" id="icstat_stat_minPct" value="{$datas.minPct}"> |
---|
94 | <div id="icstat_stat_minPct_slider" class="gcBgInput gcBorderInput"></div> |
---|
95 | </td> |
---|
96 | <td width="90px"> |
---|
97 | <div id="icstat_stat_minPct_display"></div> |
---|
98 | </td> |
---|
99 | </tr> |
---|
100 | </table> |
---|
101 | </fieldset> |
---|
102 | </div> |
---|
103 | |
---|
104 | <div id='iDisplayConfigDisplay' style='display:none;'> |
---|
105 | <fieldset> |
---|
106 | <legend>{'cstat_gallery_integration'|@translate}</legend> |
---|
107 | |
---|
108 | <label> |
---|
109 | <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} > |
---|
110 | {'cstat_display_colors_on_image'|@translate} |
---|
111 | <input type="hidden" id='idisplay_gallery_showColors' name='f_display_gallery_showColors' value='{$datas.showColors}'> |
---|
112 | </label> |
---|
113 | |
---|
114 | </fieldset> |
---|
115 | </div> |
---|
116 | |
---|
117 | <input type="submit" value="{'cstat_apply'|@translate}" name="submit_save_config" style="margin-left:1em;" > |
---|
118 | |
---|
119 | </form> |
---|
120 | |
---|
121 | |
---|
122 | <script type="text/javascript"> |
---|
123 | init(); |
---|
124 | </script> |
---|