Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

filterable

  • Loading branch information...
commit 61524a4fc9bd3a14251848a4499bce3919e7c41e 1 parent 4c84528
copyliu authored

Showing 1 changed file with 131 additions and 95 deletions. Show diff stats Hide diff stats

  1. +131 95 templates/viewleague.html
226 templates/viewleague.html
@@ -12,91 +12,127 @@
12 12 <link href="/static/kendoui/style/kendo.common.min.css" rel="stylesheet" type="text/css"/>
13 13 <link href="/static/kendoui/style/kendo.default.min.css" rel="stylesheet" type="text/css"/>
14 14 <style type="text/css">
15   - .content {font-size: 11px}
  15 + .content {
  16 + font-size: 11px
  17 + }
16 18
17 19 </style>
18 20 <script type="text/javascript">
19 21 function rate(value1, all) {
20 22 return value1 / all;
21 23 }
22   - var col1=[
23   - {field:"jrm_id",
24   - title:"雀龍門ID",
25   - width:"120px"},
26   - {field:"game",
27   - title:"配牌數"},
28   - {field:"win",
29   - title:"和了數"
30   - },
31   - {field:"lose",
32   - title:"放銃數"},
33   - {field:"reach",
34   - title:"立直數"},
35   - {field:"hulo",
36   - title:"副露數"},
37   - {field:"win_max",
38   - title:"最大和了點"},
39   - {field:"lose_max",
40   - title:"最大放銃點"},{field:"end_point",
41   - title:"平均終了點"},
  24 + var col1 = [
  25 + {field:"jrm_id",
  26 + title:"雀龍門ID",
  27 + width:"120px",
  28 + filterable:true},
  29 + {field:"game",
  30 + title:"配牌數",
  31 + filterable:false},
  32 + {field:"win",
  33 + title:"和了數",
  34 + filterable:false
  35 + },
  36 + {field:"lose",
  37 + title:"放銃數",
  38 + filterable:false},
  39 + {field:"reach",
  40 + title:"立直數",
  41 + filterable:false},
  42 + {field:"hulo",
  43 + title:"副露數",
  44 + filterable:false},
  45 + {field:"win_max",
  46 + title:"最大和了點",
  47 + filterable:false},
  48 + {field:"lose_max",
  49 + title:"最大放銃點",
  50 + filterable:false},
  51 + {field:"end_point",
  52 + title:"平均終了點",
  53 + filterable:false},
42 54 {field:"end_point_max",
43   - title:"最大終了點"},
44   - {field:"rank",
45   - title:"平均順位"},
46   - {field:"rank1",
47   - title:"一位"},
48   - {field:"rank2",
49   - title:"二位"},
50   - {field:"rank3",
51   - title:"三位"},
52   - {field:"rank4",
53   - title:"四位"},
  55 + title:"最大終了點",
  56 + filterable:false},
  57 + {field:"rank",
  58 + title:"平均順位",
  59 + filterable:false},
  60 + {field:"rank1",
  61 + title:"一位",
  62 + filterable:false},
  63 + {field:"rank2",
  64 + title:"二位",
  65 + filterable:false},
  66 + {field:"rank3",
  67 + title:"三位",
  68 + filterable:false},
  69 + {field:"rank4",
  70 + title:"四位",
  71 + filterable:false},
54 72 {field:"bu",
55   - title:"飛"}
56   -
57   -
58   - ];
59   -
60   -
61   - var col2=[
62   - {field:"jrm_id",
63   - title:"雀龍門ID",
64   - width:"120px"},
65   - {field:"game",
66   - title:"配牌數"},
67   - {field:"win_rate",
68   - title:"和了率",
69   - template:"#= kendo.toString(win_rate,'p') #"},
70   - {field:"lose_rate",
71   - title:"放銃率",
72   - template:"#= kendo.toString(lose_rate,'p') #"},
73   - {field:"reach_rate",
74   - title:"立直率",
75   - template:"#= kendo.toString(reach_rate,'p') #"},
76   - {field:"hulo_rate",
77   - title:"副露率",
78   - template:"#= kendo.toString(hulo_rate,'p') #"},
79   - {field:"win_max",
80   - title:"最大和了點"},
81   - {field:"lose_max",
82   - title:"最大放銃點"},
  73 + title:"飛",
  74 + filterable:false}
  75 +
  76 +
  77 + ];
  78 +
  79 +
  80 + var col2 = [
  81 + {field:"jrm_id",
  82 + title:"雀龍門ID",
  83 + width:"120px",
  84 + filterable:true},
  85 + {field:"game",
  86 + title:"配牌數",
  87 + filterable:false},
  88 + {field:"win_rate",
  89 + title:"和了率",
  90 + filterable:false,
  91 + template:"#= kendo.toString(win_rate,'p') #"},
  92 + {field:"lose_rate",
  93 + title:"放銃率",
  94 + filterable:false,
  95 + template:"#= kendo.toString(lose_rate,'p') #"},
  96 + {field:"reach_rate",
  97 + title:"立直率",
  98 + filterable:false,
  99 + template:"#= kendo.toString(reach_rate,'p') #"},
  100 + {field:"hulo_rate",
  101 + title:"副露率",
  102 + filterable:false,
  103 + template:"#= kendo.toString(hulo_rate,'p') #"},
  104 + {field:"win_max",
  105 + title:"最大和了點",
  106 + filterable:false},
  107 + {field:"lose_max",
  108 + title:"最大放銃點",
  109 + filterable:false},
83 110 {field:"end_point",
84   - title:"平均終了點"},{field:"end_point_max",
85   - title:"最大終了點"},
86   - {field:"rank",
87   - title:"平均順位"},
88   - {field:"rank1_rate",template:"#= kendo.toString(rank1_rate,'p') #",
89   - title:"一位"},
90   - {field:"rank2_rate",template:"#= kendo.toString(rank2_rate,'p') #",
91   - title:"二位"},
92   - {field:"rank3_rate",template:"#= kendo.toString(rank3_rate,'p') #",
93   - title:"三位"},
94   - {field:"rank4_rate",template:"#= kendo.toString(rank4_rate,'p') #",
95   - title:"四位"},
96   - {field:"bu_rate",template:"#= kendo.toString(bu_rate,'p') #",
97   - title:"飛翔率"}
98   -
99   - ];
  111 + title:"平均終了點",
  112 + filterable:false},
  113 + {field:"end_point_max",
  114 + title:"最大終了點",
  115 + filterable:false},
  116 + {field:"rank",
  117 + title:"平均順位",
  118 + filterable:false},
  119 + {field:"rank1_rate", template:"#= kendo.toString(rank1_rate,'p') #",
  120 + title:"一位",
  121 + filterable:false},
  122 + {field:"rank2_rate", template:"#= kendo.toString(rank2_rate,'p') #",
  123 + title:"二位",
  124 + filterable:false},
  125 + {field:"rank3_rate", template:"#= kendo.toString(rank3_rate,'p') #",
  126 + title:"三位",
  127 + filterable:false},
  128 + {field:"rank4_rate", template:"#= kendo.toString(rank4_rate,'p') #",
  129 + title:"四位",
  130 + filterable:false},
  131 + {field:"bu_rate", template:"#= kendo.toString(bu_rate,'p') #",
  132 + title:"飛翔率",
  133 + filterable:false}
  134 +
  135 + ];
100 136 var dataSource = new kendo.data.DataSource({
101 137
102 138 type:"jsonp",
@@ -119,43 +155,43 @@
119 155 $(document).ready(function () {
120 156 $("#grid").kendoGrid({
121 157 dataSource:dataSource,
122   - filterable:false,
  158 + filterable:true,
123 159 sortable:true,
124 160 scrollable:true,
125 161 columns:col1
126 162
127 163
128 164 });
129   - $("#showval").click(function(){
  165 + $("#showval").click(function () {
130 166 $("#grid").empty();
131 167 $("#grid").kendoGrid({
132   - dataSource:dataSource,
133   - filterable:false,
134   - sortable:true,
135   - scrollable:true,
136   - columns:col1
  168 + dataSource:dataSource,
  169 + filterable:false,
  170 + sortable:true,
  171 + scrollable:true,
  172 + columns:col1
137 173
138 174
139   - });
140   - var grid=$("#grid").data("kendoGrid");
  175 + });
  176 + var grid = $("#grid").data("kendoGrid");
141 177 grid.refresh();
142 178 return false;
143 179 });
144   - $("#showrate").click(function(){
  180 + $("#showrate").click(function () {
145 181 $("#grid").empty();
146 182 $("#grid").kendoGrid({
147   - dataSource:dataSource,
148   - filterable:false,
149   - sortable:true,
150   - scrollable:true,
151   - columns:col2
  183 + dataSource:dataSource,
  184 + filterable:false,
  185 + sortable:true,
  186 + scrollable:true,
  187 + columns:col2
152 188
153 189
154   - });
155   - var grid=$("#grid").data("kendoGrid");
  190 + });
  191 + var grid = $("#grid").data("kendoGrid");
156 192 grid.refresh();
157   - return false;
158   - });
  193 + return false;
  194 + });
159 195
160 196 });
161 197

0 comments on commit 61524a4

Please sign in to comment.
Something went wrong with that request. Please try again.