source: extensions/ColorStat/admin/cstat_stat.tpl @ 11944

Last change on this file since 11944 was 10630, checked in by grum, 13 years ago

bug:2147 ; Compatibility with Piwigo 2.2

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