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

Last change on this file since 15350 was 15350, checked in by grum, 12 years ago

feature:2639 - Compatibility with Piwigo 2.4
Fix some problem with user interface display

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