Commit 7464051fdfcec4942804e40f8299f71725851541
1 parent
7487ff51
not contains
Showing
3 changed files
with
11 additions
and
2 deletions
controllets/filters-controllet/filters-controllet.html
... | ... | @@ -132,7 +132,8 @@ |
132 | 132 | </paper-dropdown-menu> |
133 | 133 | </th> |
134 | 134 | <th> |
135 | - <paper-input id="filter_value" label="Value" class="base_input" maxlength="16" auto-validate pattern="^[_a-zA-Z0-9]*" error-message="Invalid value!"></paper-input> | |
135 | + <paper-input id="filter_value" label="Value" class="base_input" maxlength="32" auto-validate pattern="^[.:,;+-_ a-zA-Z0-9]*" error-message="Invalid value!"></paper-input> | |
136 | + <!--"^[_a-zA-Z0-9]*"--> | |
136 | 137 | </th> |
137 | 138 | <th class="filters_cell_button"> |
138 | 139 | <paper-icon-button on-click="_addFilter" icon="add-circle" class="add"></paper-icon-button> |
... | ... | @@ -169,7 +170,7 @@ |
169 | 170 | |
170 | 171 | operations : { |
171 | 172 | type : Array, |
172 | - value : ["=", "!=", ">", ">=", "<", "<=", "contains", "start", "ends"] | |
173 | + value : ["=", "!=", ">", ">=", "<", "<=", "contains", "not contains", "start", "ends"] | |
173 | 174 | }, |
174 | 175 | |
175 | 176 | filters : { |
... | ... | @@ -257,6 +258,8 @@ |
257 | 258 | }, |
258 | 259 | |
259 | 260 | _getOperationlName: function(operation) { |
261 | + if(operation.indexOf("not") > -1) | |
262 | + return ln["notContains_" + ln["localization"]]; | |
260 | 263 | if(operation.indexOf("contains") > -1) |
261 | 264 | return ln["contains_" + ln["localization"]]; |
262 | 265 | if(operation.indexOf("start") > -1) | ... | ... |
datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js
... | ... | @@ -119,6 +119,8 @@ var AjaxJsonAlasqlBehavior = { |
119 | 119 | for (var i=0; i < filters.length; i++) { |
120 | 120 | if(filters[i]["operation"] == "contains") |
121 | 121 | where += filters[i]["field"] + " like '%" + filters[i]["value"] + "%' AND "; |
122 | + else if(filters[i]["operation"] == "not contains") | |
123 | + where += filters[i]["field"] + " not like '%" + filters[i]["value"] + "%' AND "; | |
122 | 124 | else if(filters[i]["operation"] == "start") |
123 | 125 | where += filters[i]["field"] + " like '" + filters[i]["value"] + "%' AND "; |
124 | 126 | else if(filters[i]["operation"] == "ends") | ... | ... |
locales/controllet_ln.js
... | ... | @@ -34,6 +34,7 @@ ln["filterField_en"] = "Field"; |
34 | 34 | ln["filterOperation_en"] = "Operation"; |
35 | 35 | ln["filterValue_en"] = "Value"; |
36 | 36 | ln["contains_en"] = "contains"; |
37 | +ln["notContains_en"] = "not contains"; | |
37 | 38 | ln["start_en"] = "start with"; |
38 | 39 | ln["ends_en"] = "ends with"; |
39 | 40 | |
... | ... | @@ -148,6 +149,7 @@ ln["filterField_it"] = "Campo"; |
148 | 149 | ln["filterOperation_it"] = "Operazione"; |
149 | 150 | ln["filterValue_it"] = "Valore"; |
150 | 151 | ln["contains_it"] = "contiene"; |
152 | +ln["notContains_it"] = "non contiene"; | |
151 | 153 | ln["start_it"] = "inizia con"; |
152 | 154 | ln["ends_it"] = "finisce con"; |
153 | 155 | |
... | ... | @@ -262,6 +264,7 @@ ln["filterField_fr"] = "Field"; |
262 | 264 | ln["filterOperation_fr"] = "Operation"; |
263 | 265 | ln["filterValue_fr"] = "Value"; |
264 | 266 | ln["contains_fr"] = "contains"; |
267 | +ln["notContains_fr"] = "not contains"; | |
265 | 268 | ln["start_fr"] = "start with"; |
266 | 269 | ln["ends_fr"] = "ends with"; |
267 | 270 | |
... | ... | @@ -376,6 +379,7 @@ ln["filterField_nl"] = "Field"; |
376 | 379 | ln["filterOperation_nl"] = "Operation"; |
377 | 380 | ln["filterValue_nl"] = "Value"; |
378 | 381 | ln["contains_nl"] = "contains"; |
382 | +ln["notContains_nl"] = "not contains"; | |
379 | 383 | ln["start_nl"] = "start with"; |
380 | 384 | ln["ends_nl"] = "ends with"; |
381 | 385 | ... | ... |