From 02a1ca4b701496ba35b8dbb23742a0d889d94928 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 22 Apr 2013 13:18:26 +0530 Subject: [PATCH 1/2] added qet_query option on report filters --- public/js/wn/views/query_report.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/public/js/wn/views/query_report.js b/public/js/wn/views/query_report.js index e90b5d859b..fd17d90cf0 100644 --- a/public/js/wn/views/query_report.js +++ b/public/js/wn/views/query_report.js @@ -75,7 +75,7 @@ wn.views.QueryReport = Class.extend({ var export_btn = this.appframe.add_button("", function() { - me.export(); + me.export_report(); }); wn.utils.disable_export_btn(export_btn); }, @@ -141,12 +141,23 @@ wn.views.QueryReport = Class.extend({ $(f.wrapper).find("input, button").css({"margin-top":"-4px"}); else if(f.df.fieldtype == "Date") $(f.wrapper).css({"margin-right":"-15px"}); + + if(df.get_query) f.get_query = df.get_query; }); + + this.set_filters_by_name(); }, clear_filters: function() { this.filters = []; this.appframe.toolbar.find(".filters").remove(); }, + set_filters_by_name: function() { + this.filters_by_name = {}; + + for(var i in this.filters) { + this.filters_by_name[this.filters[i].df.fieldname] = this.filters[i]; + } + }, refresh: function() { // Run var me =this; @@ -379,7 +390,7 @@ wn.views.QueryReport = Class.extend({ me.dataView.refresh(); }); }, - export: function() { + export_report: function() { var result = $.map(wn.slickgrid_tools.get_view_data(this.columns, this.dataView), function(row) { return [row.splice(1)]; From d7a1532b8fdb7e9f078dd35635cfc1dd9a0f5388 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 23 Apr 2013 11:56:33 +0530 Subject: [PATCH 2/2] fixes in listview bar-graph --- public/js/wn/views/listview.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/js/wn/views/listview.js b/public/js/wn/views/listview.js index 23ffd1548f..e68d134700 100644 --- a/public/js/wn/views/listview.js +++ b/public/js/wn/views/listview.js @@ -348,11 +348,10 @@ wn.views.ListView = Class.extend({ fully_delivered: (data[field] > 99 ? 'bar-complete' : ''), label: label } - $(parent).append(repl(' \ + \ ', args)); - $(parent).attr("title", repl("%(percent)s% %(label)s", args)); }, render_icon: function(parent, icon_class, label) { var icon_html = "";