Commit f833bd4ecd66852a364296cb7f2c86f15f263b70

Authored by Renato De Donato
1 parent 5a69cfd8

filter ln

alasql-utility/alasql-utility.js
... ... @@ -80,7 +80,7 @@ function _alasql_WHERE (filters) {
80 80 for (var i=0; i < filters.length; i++) {
81 81 if(filters[i]["operation"] == "contains")
82 82 where += filters[i]["field"] + " like '%" + filters[i]["value"] + "%' " + logicalOperator + " ";
83   - else if(filters[i]["operation"] == "not contains")
  83 + else if(filters[i]["operation"] == "notContains")
84 84 where += filters[i]["field"] + " not like '%" + filters[i]["value"] + "%' " + logicalOperator + " ";
85 85 else if(filters[i]["operation"] == "start")
86 86 where += filters[i]["field"] + " like '" + filters[i]["value"] + "%' " + logicalOperator + " ";
... ...
controllets/data-table-controllet/data-table-controllet.html
... ... @@ -43,7 +43,6 @@
43 43 height: 24px;
44 44 width: 24px;
45 45 cursor: pointer;
46   - /*background: green;*/
47 46 }
48 47  
49 48 paper-icon-button.warning {
... ... @@ -51,7 +50,6 @@
51 50 width: 24px;
52 51 color: #FFEB3B;
53 52 cursor: help;
54   - /*background: green;*/
55 53 }
56 54  
57 55 paper-icon-button.order:hover {
... ... @@ -108,7 +106,7 @@
108 106 height: 24px;
109 107 padding: 12px;
110 108 text-align: center;
111   - max-width: 224px;
  109 + max-width: 256px;
112 110 min-width: 156px;
113 111 overflow: hidden;
114 112 white-space: nowrap;
... ... @@ -121,18 +119,21 @@
121 119 color: #FFFFFF;
122 120 font-weight: 700;
123 121 cursor: help;
124   - line-height: 0px;/*?? or49px su spod iron icon and paper icon icon problem*/
  122 + }
  123 +
  124 + #data_table_container th,
  125 + #data_table_container th * {
  126 + line-height: 22px;/**/
125 127 }
126 128  
127 129 #data_table_container th .th_label {
128 130 display: inline-block;
129   - height: 24px;
130 131 max-width: calc(100% - 48px - 8px);
131 132 vertical-align: middle;
132   - /*background: red;*/
133 133 overflow: hidden;
134 134 white-space: nowrap;
135 135 text-overflow: ellipsis;
  136 + line-height: 24px;/**/
136 137 }
137 138  
138 139 #data_table_container td {
... ... @@ -140,13 +141,6 @@
140 141 padding: 4px;
141 142 }
142 143  
143   - #data_table_container tfoot td {
144   - height: 48px;
145   - padding: 0px;
146   - font-size: 16px;
147   - background: #B6B6B6;
148   - }
149   -
150 144 #data_table_container #footer {
151 145 width: 100%;
152 146 height: 48px;
... ...
controllets/filters-controllet/filters-controllet.html
... ... @@ -73,6 +73,7 @@
73 73  
74 74 paper-item {
75 75 min-width: 128px;
  76 + white-space: nowrap;
76 77 }
77 78  
78 79 paper-item.iron-selected {
... ... @@ -208,7 +209,7 @@
208 209 <template is="dom-if" if="{{index}}"><!--excludes logicalOperator-->
209 210 <div class="row2">
210 211 <div class="filter">
211   - {{item.field}}&nbsp;&nbsp;&nbsp;<span class="highlighted">{{item.operation}}</span>&nbsp;&nbsp;&nbsp;"{{item.value}}"&nbsp;&nbsp;&nbsp;<span class="highlighted">{{_getLogicalOperator(index)}}</span>
  212 + {{item.field}}&nbsp;&nbsp;&nbsp;<span class="highlighted">{{_getOperationlName(item.operation)}}</span>&nbsp;&nbsp;&nbsp;"{{item.value}}"&nbsp;&nbsp;&nbsp;<span class="highlighted">{{_getLogicalOperator(index)}}</span>
212 213 </div>
213 214 <div class="remove_container">
214 215 <paper-icon-button on-click="_deleteFilter" icon="cancel" class="cancel"></paper-icon-button>
... ... @@ -238,7 +239,7 @@
238 239  
239 240 operations : {
240 241 type : Array,
241   - value : ["=", "!=", ">", ">=", "<", "<=", "contains", "not contains", "start", "ends"]
  242 + value : ["=", "!=", ">", ">=", "<", "<=", "contains", "notContains", "start", "ends"]
242 243 },
243 244  
244 245 filters : {
... ... @@ -364,15 +365,16 @@
364 365 },
365 366  
366 367 _getOperationlName: function(operation) {
367   - if(operation.indexOf("not") > -1)
368   - return ln["notContains_" + ln["localization"]];
369   - if(operation.indexOf("contains") > -1)
370   - return ln["contains_" + ln["localization"]];
371   - if(operation.indexOf("start") > -1)
372   - return ln["start_" + ln["localization"]];
373   - if(operation.indexOf("ends") > -1)
374   - return ln["ends_" + ln["localization"]];
375   - return operation;
  368 + return ln[operation + "_" + ln["localization"]];
  369 +// if(operation.indexOf("not") > -1)
  370 +// return ln["notContains_" + ln["localization"]];
  371 +// if(operation.indexOf("contains") > -1)
  372 +// return ln["contains_" + ln["localization"]];
  373 +// if(operation.indexOf("start") > -1)
  374 +// return ln["start_" + ln["localization"]];
  375 +// if(operation.indexOf("ends") > -1)
  376 +// return ln["ends_" + ln["localization"]];
  377 +// return operation;
376 378 },
377 379  
378 380 // _changeLogicalOperator : function() {
... ...
locales/controllet_ln.js
... ... @@ -47,6 +47,13 @@ ln[&quot;warning_en&quot;] = &quot;WARNING&quot;;
47 47 ln["filterField_en"] = "Field";
48 48 ln["filterOperation_en"] = "Operation";
49 49 ln["filterValue_en"] = "Value";
  50 +
  51 +ln["=_en"] = "is equal to";
  52 +ln["!=_en"] = "is different from";
  53 +ln[">_en"] = "is greater than";
  54 +ln[">=_en"] = "is greater than or equal to";
  55 +ln["<_en"] = "is less than";
  56 +ln["<=_en"] = "is less than or equal to";
50 57 ln["contains_en"] = "contains";
51 58 ln["notContains_en"] = "not contains";
52 59 ln["start_en"] = "start with";
... ... @@ -173,6 +180,13 @@ ln[&quot;warning_it&quot;] = &quot;ATTENZIONE&quot;;
173 180 ln["filterField_it"] = "Campo";
174 181 ln["filterOperation_it"] = "Operazione";
175 182 ln["filterValue_it"] = "Valore";
  183 +
  184 +ln["=_it"] = "è uguale a";
  185 +ln["!=_it"] = "è diverso da";
  186 +ln[">_it"] = "è maggiore di";
  187 +ln[">=_it"] = "è maggiore uguale di";
  188 +ln["<_it"] = "è minore di";
  189 +ln["<=_it"] = "è minore uguale di";
176 190 ln["contains_it"] = "contiene";
177 191 ln["notContains_it"] = "non contiene";
178 192 ln["start_it"] = "inizia con";
... ... @@ -299,6 +313,13 @@ ln[&quot;warning_fr&quot;] = &quot;WARNING&quot;;
299 313 ln["filterField_fr"] = "Field";
300 314 ln["filterOperation_fr"] = "Operation";
301 315 ln["filterValue_fr"] = "Value";
  316 +
  317 +ln["=_fr"] = "is equal to";
  318 +ln["!=_fr"] = "is different from";
  319 +ln[">_fr"] = "is greater than";
  320 +ln[">=_fr"] = "is greater than or equal to";
  321 +ln["<_fr"] = "is less than";
  322 +ln["<=_fr"] = "is less than or equal to";
302 323 ln["contains_fr"] = "contains";
303 324 ln["notContains_fr"] = "not contains";
304 325 ln["start_fr"] = "start with";
... ... @@ -425,6 +446,13 @@ ln[&quot;warning_nl&quot;] = &quot;WARNING&quot;;
425 446 ln["filterField_nl"] = "Field";
426 447 ln["filterOperation_nl"] = "Operation";
427 448 ln["filterValue_nl"] = "Value";
  449 +
  450 +ln["=_nl"] = "is equal to";
  451 +ln["!=_nl"] = "is different from";
  452 +ln[">_nl"] = "is greater than";
  453 +ln[">=_nl"] = "is greater than or equal to";
  454 +ln["<_nl"] = "is less than";
  455 +ln["<=_nl"] = "is less than or equal to";
428 456 ln["contains_nl"] = "contains";
429 457 ln["notContains_nl"] = "not contains";
430 458 ln["start_nl"] = "start with";
... ...