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

Last change on this file since 5961 was 5961, checked in by grum, 14 years ago

Add plugin files

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