1 | {combine_script id="jquery.ui" path="themes/default/js/ui/jquery.ui.core.js"} |
---|
2 | {combine_script id="jquery.ui.widget" path="themes/default/js/ui/jquery.ui.widget.js"} |
---|
3 | {combine_script id="jquery.ui.mouse" path="themes/default/js/ui/jquery.ui.mouse.js"} |
---|
4 | {combine_script id="jquery.tipTip" path="themes/default/js/plugins/jquery.tipTip.minified.js" } |
---|
5 | |
---|
6 | {literal} |
---|
7 | <script type="text/javascript"> |
---|
8 | |
---|
9 | function init() |
---|
10 | { |
---|
11 | loadColorList(); |
---|
12 | displayColorListOrder(); |
---|
13 | $('.tiptip').tipTip( |
---|
14 | { |
---|
15 | 'delay' : 0, |
---|
16 | 'fadeIn' : 0, |
---|
17 | 'fadeOut' : 0, |
---|
18 | 'edgeOffset' : 5, |
---|
19 | } |
---|
20 | ); |
---|
21 | } |
---|
22 | |
---|
23 | function loadColorList() |
---|
24 | { |
---|
25 | order=$('#iSelectOrderColorList').val(); |
---|
26 | |
---|
27 | $("#iListColors").html("<br>{/literal}{'cstat_loading'|@translate}{literal}<br><img src='./plugins/GrumPluginClasses/icons/processing.gif'>"); |
---|
28 | |
---|
29 | $.ajax( |
---|
30 | { |
---|
31 | type: "POST", |
---|
32 | url: "{/literal}{$datas.urlRequest}{literal}", |
---|
33 | async: true, |
---|
34 | data: { ajaxfct:"showStatsGetListColors", orderType:order }, |
---|
35 | success: |
---|
36 | function(msg) |
---|
37 | { |
---|
38 | $("#iListColors").html(msg); |
---|
39 | |
---|
40 | $("#iListColorsNb").html( |
---|
41 | "{/literal}{'cstat_number_of_colors_used'|@translate}{literal} "+$("#iListColors table tr").length |
---|
42 | ); |
---|
43 | } |
---|
44 | } |
---|
45 | ); |
---|
46 | } |
---|
47 | |
---|
48 | function sortColorList(by) |
---|
49 | { |
---|
50 | $("#iSelectOrderColorList").val(by); |
---|
51 | displayColorListOrder(); |
---|
52 | loadColorList(); |
---|
53 | } |
---|
54 | |
---|
55 | function displayColorListOrder() |
---|
56 | { |
---|
57 | if($("#iSelectOrderColorList").val()=="color") |
---|
58 | { |
---|
59 | $("#iHLTOrderColor").html("↑"); |
---|
60 | $("#iHLTOrderNumImages").html(""); |
---|
61 | $("#iHLTOrderNumPixels").html(""); |
---|
62 | } |
---|
63 | else if($("#iSelectOrderColorList").val()=="img") |
---|
64 | { |
---|
65 | $("#iHLTOrderColor").html(""); |
---|
66 | $("#iHLTOrderNumImages").html("↑"); |
---|
67 | $("#iHLTOrderNumPixels").html(""); |
---|
68 | } |
---|
69 | else if($("#iSelectOrderColorList").val()=="pixel") |
---|
70 | { |
---|
71 | $("#iHLTOrderColor").html(""); |
---|
72 | $("#iHLTOrderNumImages").html(""); |
---|
73 | $("#iHLTOrderNumPixels").html("↑"); |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | |
---|
78 | </script> |
---|
79 | {/literal} |
---|
80 | |
---|
81 | <h2>{'cstat_statistics'|@translate}</h2> |
---|
82 | |
---|
83 | <form> |
---|
84 | <input type="hidden" id="iSelectOrderColorList" value="{$datas.config_GetListColors_OrderType}"/> |
---|
85 | </form> |
---|
86 | |
---|
87 | <table style="width:100%;"> |
---|
88 | <tr> |
---|
89 | <td style="min-width:300px;"> |
---|
90 | {$datas.colorTable} |
---|
91 | </td> |
---|
92 | |
---|
93 | <td style="width:8px;"></td> |
---|
94 | |
---|
95 | <td> |
---|
96 | |
---|
97 | <table id='iHeaderListColors' class="littlefont"> |
---|
98 | <tr> |
---|
99 | <th style="min-width:180px;" colspan="2"><span id="iHLTOrderColor"></span><a onclick="sortColorList('color');">{'cstat_colors'|@translate}</a></th> |
---|
100 | |
---|
101 | <th width="60px"><span id="iHLTOrderNumImages"></span><a class="tiptip" onclick="sortColorList('img');" title="{'cstat_NumOfImages_help'|@translate}">{'cstat_NumOfImages'|@translate}</a></th> |
---|
102 | <th width="40px">{'cstat_Pct'|@translate}</th> |
---|
103 | <th width="115px"> </th> |
---|
104 | |
---|
105 | <th width="80px"><span id="iHLTOrderNumPixels"></span><a class="tiptip" onclick="sortColorList('pixels');" title="{'cstat_NumOfPixels_help'|@translate}">{'cstat_NumOfPixels'|@translate}</a></th> |
---|
106 | <th width="40px">{'cstat_Pct'|@translate}</th> |
---|
107 | <th width="130px"> </th> |
---|
108 | </tr> |
---|
109 | </table> |
---|
110 | <div id='iListColors' class="{$themeconf.name}"> |
---|
111 | </div> |
---|
112 | <div id="iListColorsNb"></div> |
---|
113 | </td> |
---|
114 | </tr> |
---|
115 | |
---|
116 | </table> |
---|
117 | |
---|
118 | |
---|
119 | |
---|
120 | |
---|
121 | |
---|
122 | <script type="text/javascript"> |
---|
123 | init(); |
---|
124 | </script> |
---|