From 93ba71679c91deef6cef2d6c339d5d96e48d354d Mon Sep 17 00:00:00 2001 From: renato Date: Wed, 24 Feb 2016 11:30:38 +0100 Subject: [PATCH] filters bug fix + ln --- controllets/datalet-selection-controllet/datalet-selection-controllet.html | 4 +++- controllets/filters-controllet/filters-controllet.html | 4 +++- controllets/select-data-controllet/demo/index.html | 3 ++- controllets/select-visualization-controllet/select-visualization-controllet.html | 930 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js | 2 +- locales/controllet_ln.js | 3 ++- 6 files changed, 941 insertions(+), 5 deletions(-) create mode 100755 controllets/select-visualization-controllet/select-visualization-controllet.html diff --git a/controllets/datalet-selection-controllet/datalet-selection-controllet.html b/controllets/datalet-selection-controllet/datalet-selection-controllet.html index 90a3ded..fcff05d 100755 --- a/controllets/datalet-selection-controllet/datalet-selection-controllet.html +++ b/controllets/datalet-selection-controllet/datalet-selection-controllet.html @@ -219,7 +219,7 @@ -
GROUP BY
+
@@ -541,6 +541,8 @@ this.$.base_title.label = ln["title_" + ln["localization"]]; this.$.base_description.label = ln["description_" + ln["localization"]]; + this.$.groupBy.innerHTML = ln["groupBy_" + ln["localization"]]; + if(this.modify) this.$.add_button.innerHTML = ln["modifyDatalet_" + ln["localization"]]; }, diff --git a/controllets/filters-controllet/filters-controllet.html b/controllets/filters-controllet/filters-controllet.html index ff291aa..49811bb 100644 --- a/controllets/filters-controllet/filters-controllet.html +++ b/controllets/filters-controllet/filters-controllet.html @@ -229,7 +229,9 @@ _addFilter : function() { if (this.$.filter_field.selectedItem && this.$.filter_operation_menu.selectedItem && this.$.filter_value.value != "" && !this.$.filter_value.invalid) { var field = this.$.filter_field.value; - var operation = this.$.filter_operation.value; + var id = this.$.filter_operation.selectedItem.id; + var operation = this.operations[id]; +// var operation = this.$.filter_operation.value; var value = this.$.filter_value.value; var filters = this.filters; diff --git a/controllets/select-data-controllet/demo/index.html b/controllets/select-data-controllet/demo/index.html index 54a3784..a706ed0 100755 --- a/controllets/select-data-controllet/demo/index.html +++ b/controllets/select-data-controllet/demo/index.html @@ -16,7 +16,8 @@ - + + + + + + + + + + \ No newline at end of file diff --git a/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js b/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js index 67caae2..3ef89c8 100755 --- a/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js +++ b/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js @@ -117,7 +117,7 @@ var AjaxJsonAlasqlBehavior = { else if(filters[i]["operation"] == "ends") where += filters[i]["field"] + " like '%" + filters[i]["value"] + "' AND "; else - where += filters[i]["field"] + " " + filters[i]["operation"] + " " + filters[i]["value"] + " AND "; + where += filters[i]["field"] + " " + filters[i]["operation"] + " '" + filters[i]["value"] + "' AND "; } where = where.slice(0, -5); } diff --git a/locales/controllet_ln.js b/locales/controllet_ln.js index 8030332..9225d48 100755 --- a/locales/controllet_ln.js +++ b/locales/controllet_ln.js @@ -38,7 +38,8 @@ ln["ends_en"] = "ends with"; ln["sortAscending_en"] = "sorted ascending"; ln["sortDescending_en"] = "sorted descending"; ln["unsort_en"] = "unsorted"; -ln["countOf_en"] = "COUNT of"; +//ln["countOf_en"] = "COUNT of"; +ln["groupBy_en"] = "GROUP BY"; ln["datatable_it"] = "tabella"; ln["barchart_it"] = "bar-chart"; -- libgit2 0.21.4