Commit f833bd4ecd66852a364296cb7f2c86f15f263b70
1 parent
5a69cfd8
filter ln
Showing
4 changed files
with
49 additions
and
25 deletions
alasql-utility/alasql-utility.js
| @@ -80,7 +80,7 @@ function _alasql_WHERE (filters) { | @@ -80,7 +80,7 @@ function _alasql_WHERE (filters) { | ||
| 80 | for (var i=0; i < filters.length; i++) { | 80 | for (var i=0; i < filters.length; i++) { |
| 81 | if(filters[i]["operation"] == "contains") | 81 | if(filters[i]["operation"] == "contains") |
| 82 | where += filters[i]["field"] + " like '%" + filters[i]["value"] + "%' " + logicalOperator + " "; | 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 | where += filters[i]["field"] + " not like '%" + filters[i]["value"] + "%' " + logicalOperator + " "; | 84 | where += filters[i]["field"] + " not like '%" + filters[i]["value"] + "%' " + logicalOperator + " "; |
| 85 | else if(filters[i]["operation"] == "start") | 85 | else if(filters[i]["operation"] == "start") |
| 86 | where += filters[i]["field"] + " like '" + filters[i]["value"] + "%' " + logicalOperator + " "; | 86 | where += filters[i]["field"] + " like '" + filters[i]["value"] + "%' " + logicalOperator + " "; |
controllets/data-table-controllet/data-table-controllet.html
| @@ -43,7 +43,6 @@ | @@ -43,7 +43,6 @@ | ||
| 43 | height: 24px; | 43 | height: 24px; |
| 44 | width: 24px; | 44 | width: 24px; |
| 45 | cursor: pointer; | 45 | cursor: pointer; |
| 46 | - /*background: green;*/ | ||
| 47 | } | 46 | } |
| 48 | 47 | ||
| 49 | paper-icon-button.warning { | 48 | paper-icon-button.warning { |
| @@ -51,7 +50,6 @@ | @@ -51,7 +50,6 @@ | ||
| 51 | width: 24px; | 50 | width: 24px; |
| 52 | color: #FFEB3B; | 51 | color: #FFEB3B; |
| 53 | cursor: help; | 52 | cursor: help; |
| 54 | - /*background: green;*/ | ||
| 55 | } | 53 | } |
| 56 | 54 | ||
| 57 | paper-icon-button.order:hover { | 55 | paper-icon-button.order:hover { |
| @@ -108,7 +106,7 @@ | @@ -108,7 +106,7 @@ | ||
| 108 | height: 24px; | 106 | height: 24px; |
| 109 | padding: 12px; | 107 | padding: 12px; |
| 110 | text-align: center; | 108 | text-align: center; |
| 111 | - max-width: 224px; | 109 | + max-width: 256px; |
| 112 | min-width: 156px; | 110 | min-width: 156px; |
| 113 | overflow: hidden; | 111 | overflow: hidden; |
| 114 | white-space: nowrap; | 112 | white-space: nowrap; |
| @@ -121,18 +119,21 @@ | @@ -121,18 +119,21 @@ | ||
| 121 | color: #FFFFFF; | 119 | color: #FFFFFF; |
| 122 | font-weight: 700; | 120 | font-weight: 700; |
| 123 | cursor: help; | 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 | #data_table_container th .th_label { | 129 | #data_table_container th .th_label { |
| 128 | display: inline-block; | 130 | display: inline-block; |
| 129 | - height: 24px; | ||
| 130 | max-width: calc(100% - 48px - 8px); | 131 | max-width: calc(100% - 48px - 8px); |
| 131 | vertical-align: middle; | 132 | vertical-align: middle; |
| 132 | - /*background: red;*/ | ||
| 133 | overflow: hidden; | 133 | overflow: hidden; |
| 134 | white-space: nowrap; | 134 | white-space: nowrap; |
| 135 | text-overflow: ellipsis; | 135 | text-overflow: ellipsis; |
| 136 | + line-height: 24px;/**/ | ||
| 136 | } | 137 | } |
| 137 | 138 | ||
| 138 | #data_table_container td { | 139 | #data_table_container td { |
| @@ -140,13 +141,6 @@ | @@ -140,13 +141,6 @@ | ||
| 140 | padding: 4px; | 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 | #data_table_container #footer { | 144 | #data_table_container #footer { |
| 151 | width: 100%; | 145 | width: 100%; |
| 152 | height: 48px; | 146 | height: 48px; |
controllets/filters-controllet/filters-controllet.html
| @@ -73,6 +73,7 @@ | @@ -73,6 +73,7 @@ | ||
| 73 | 73 | ||
| 74 | paper-item { | 74 | paper-item { |
| 75 | min-width: 128px; | 75 | min-width: 128px; |
| 76 | + white-space: nowrap; | ||
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | paper-item.iron-selected { | 79 | paper-item.iron-selected { |
| @@ -208,7 +209,7 @@ | @@ -208,7 +209,7 @@ | ||
| 208 | <template is="dom-if" if="{{index}}"><!--excludes logicalOperator--> | 209 | <template is="dom-if" if="{{index}}"><!--excludes logicalOperator--> |
| 209 | <div class="row2"> | 210 | <div class="row2"> |
| 210 | <div class="filter"> | 211 | <div class="filter"> |
| 211 | - {{item.field}} <span class="highlighted">{{item.operation}}</span> "{{item.value}}" <span class="highlighted">{{_getLogicalOperator(index)}}</span> | 212 | + {{item.field}} <span class="highlighted">{{_getOperationlName(item.operation)}}</span> "{{item.value}}" <span class="highlighted">{{_getLogicalOperator(index)}}</span> |
| 212 | </div> | 213 | </div> |
| 213 | <div class="remove_container"> | 214 | <div class="remove_container"> |
| 214 | <paper-icon-button on-click="_deleteFilter" icon="cancel" class="cancel"></paper-icon-button> | 215 | <paper-icon-button on-click="_deleteFilter" icon="cancel" class="cancel"></paper-icon-button> |
| @@ -238,7 +239,7 @@ | @@ -238,7 +239,7 @@ | ||
| 238 | 239 | ||
| 239 | operations : { | 240 | operations : { |
| 240 | type : Array, | 241 | type : Array, |
| 241 | - value : ["=", "!=", ">", ">=", "<", "<=", "contains", "not contains", "start", "ends"] | 242 | + value : ["=", "!=", ">", ">=", "<", "<=", "contains", "notContains", "start", "ends"] |
| 242 | }, | 243 | }, |
| 243 | 244 | ||
| 244 | filters : { | 245 | filters : { |
| @@ -364,15 +365,16 @@ | @@ -364,15 +365,16 @@ | ||
| 364 | }, | 365 | }, |
| 365 | 366 | ||
| 366 | _getOperationlName: function(operation) { | 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 | // _changeLogicalOperator : function() { | 380 | // _changeLogicalOperator : function() { |
locales/controllet_ln.js
| @@ -47,6 +47,13 @@ ln["warning_en"] = "WARNING"; | @@ -47,6 +47,13 @@ ln["warning_en"] = "WARNING"; | ||
| 47 | ln["filterField_en"] = "Field"; | 47 | ln["filterField_en"] = "Field"; |
| 48 | ln["filterOperation_en"] = "Operation"; | 48 | ln["filterOperation_en"] = "Operation"; |
| 49 | ln["filterValue_en"] = "Value"; | 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 | ln["contains_en"] = "contains"; | 57 | ln["contains_en"] = "contains"; |
| 51 | ln["notContains_en"] = "not contains"; | 58 | ln["notContains_en"] = "not contains"; |
| 52 | ln["start_en"] = "start with"; | 59 | ln["start_en"] = "start with"; |
| @@ -173,6 +180,13 @@ ln["warning_it"] = "ATTENZIONE"; | @@ -173,6 +180,13 @@ ln["warning_it"] = "ATTENZIONE"; | ||
| 173 | ln["filterField_it"] = "Campo"; | 180 | ln["filterField_it"] = "Campo"; |
| 174 | ln["filterOperation_it"] = "Operazione"; | 181 | ln["filterOperation_it"] = "Operazione"; |
| 175 | ln["filterValue_it"] = "Valore"; | 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 | ln["contains_it"] = "contiene"; | 190 | ln["contains_it"] = "contiene"; |
| 177 | ln["notContains_it"] = "non contiene"; | 191 | ln["notContains_it"] = "non contiene"; |
| 178 | ln["start_it"] = "inizia con"; | 192 | ln["start_it"] = "inizia con"; |
| @@ -299,6 +313,13 @@ ln["warning_fr"] = "WARNING"; | @@ -299,6 +313,13 @@ ln["warning_fr"] = "WARNING"; | ||
| 299 | ln["filterField_fr"] = "Field"; | 313 | ln["filterField_fr"] = "Field"; |
| 300 | ln["filterOperation_fr"] = "Operation"; | 314 | ln["filterOperation_fr"] = "Operation"; |
| 301 | ln["filterValue_fr"] = "Value"; | 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 | ln["contains_fr"] = "contains"; | 323 | ln["contains_fr"] = "contains"; |
| 303 | ln["notContains_fr"] = "not contains"; | 324 | ln["notContains_fr"] = "not contains"; |
| 304 | ln["start_fr"] = "start with"; | 325 | ln["start_fr"] = "start with"; |
| @@ -425,6 +446,13 @@ ln["warning_nl"] = "WARNING"; | @@ -425,6 +446,13 @@ ln["warning_nl"] = "WARNING"; | ||
| 425 | ln["filterField_nl"] = "Field"; | 446 | ln["filterField_nl"] = "Field"; |
| 426 | ln["filterOperation_nl"] = "Operation"; | 447 | ln["filterOperation_nl"] = "Operation"; |
| 427 | ln["filterValue_nl"] = "Value"; | 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 | ln["contains_nl"] = "contains"; | 456 | ln["contains_nl"] = "contains"; |
| 429 | ln["notContains_nl"] = "not contains"; | 457 | ln["notContains_nl"] = "not contains"; |
| 430 | ln["start_nl"] = "start with"; | 458 | ln["start_nl"] = "start with"; |