[icinga-checkins] icinga.org: icinga-web/feature/filter-disappears-3926: Filter disappears after safe cronk

git at icinga.org git at icinga.org
Thu Apr 4 18:22:52 CEST 2013


Module: icinga-web
Branch: feature/filter-disappears-3926
Commit: e38258f3b9bff2c9e5590a854b5e46f2b3224442
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=e38258f3b9bff2c9e5590a854b5e46f2b3224442

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Apr  4 18:20:18 2013 +0200

Filter disappears after safe cronk

Problem is not deterministic, components and setters
work correctly. Set the value after rendering reduces
errors but does not fix. Seems that ext component
is gone.

refs #3926

---

 .../Cronks/lib/js/Cronk/grid/filter/Handler.js     |    1 -
 .../Cronks/lib/js/Cronk/grid/filter/Window.js      |   16 ++++++----------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/filter/Handler.js b/app/modules/Cronks/lib/js/Cronk/grid/filter/Handler.js
index 021285d..4c50934 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/filter/Handler.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/filter/Handler.js
@@ -426,7 +426,6 @@ Ext.ns('Cronk.grid.filter');
                 this.getOperatorComponent(meta),
                 this.getFilterComponent(meta),
                 this.getRemoveComponent(meta)]);
-
             }
 
             // All panels there
diff --git a/app/modules/Cronks/lib/js/Cronk/grid/filter/Window.js b/app/modules/Cronks/lib/js/Cronk/grid/filter/Window.js
index dc3937e..54c106f 100755
--- a/app/modules/Cronks/lib/js/Cronk/grid/filter/Window.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/filter/Window.js
@@ -126,7 +126,6 @@ Ext.ns('Cronk.util');
                         render: function (oc) {
 
                             if (oGrid.filter_types) {
-                                AppKit.log(oGrid.filter_types);
                                 var i = 0;
 
                                 Ext.iterate(oGrid.filter_types, function (key, item) {
@@ -150,20 +149,18 @@ Ext.ns('Cronk.util');
 
                             if (oGrid.filter_params && oCoPanel) {
                                 Ext.iterate(oGrid.filter_params, function (key, val) {
-                                    //                              console.log(key + ": " + val);
                                     key = key.replace(/^f\[|\]$/g, "");
                                     var c = oCoPanel.findBy(function (ti) {
-
-                                        if (ti.hiddenName === key || ti.name === key) {
-                                            return true;
-                                        }
-
-                                        return false;
+                                        return ti.hiddenName === key || ti.name === key;
                                     });
 
                                     if (c[0]) {
-                                        c[0].setValue(val);
+                                        c[0].on('afterrender', function() {
+                                            c[0].setValue(String(val));
+                                        }, c[0], {single:true});
                                     }
+
+                                    console.log("DONE");
                                 });
                             }
 
@@ -500,7 +497,6 @@ Ext.ns('Cronk.util');
              */
             applyFilters: function (owd) {
                 var data = owd || getFormValues();
-
                 oGrid.getStore().baseParams = {};
                 Ext.apply(oGrid.getStore().baseParams, oOrgBaseParams);
                 Ext.apply(oGrid.getStore().baseParams, data);





More information about the icinga-checkins mailing list