[icinga-checkins] icinga.org: icinga-web/master: Fixes #3064 EXTUTIL.Event chaining problem

git at icinga.org git at icinga.org
Thu Oct 11 14:38:14 CEST 2012


Module: icinga-web
Branch: master
Commit: f7268eb4a30a7db8470f1cdb5af9c7d4e60cdb39
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=f7268eb4a30a7db8470f1cdb5af9c7d4e60cdb39

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Oct 11 14:35:29 2012 +0200

Fixes #3064 EXTUTIL.Event chaining problem

---

 .../Cronks/lib/js/Cronk/grid/events/EventMixin.js  |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js b/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js
index e1a604c..6684a06 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/events/EventMixin.js
@@ -340,7 +340,9 @@ Ext.ns("Cronk.grid.events");
             
             this.on("afterrender", this.registerHandler, this);
             
-            this.registerConditions();
+            // Works only after component is rendered. Chaining
+            // problem
+            this.on("afterrender", this.registerConditions, this);
             
             this.templateCache = {};
         },
@@ -352,13 +354,13 @@ Ext.ns("Cronk.grid.events");
          */
         registerConditions: function() {
             this.addEvents(this.conditionEvents);
-            
             this.internalConditionMethods = {};
             
             if (this.conditions) {
                 Ext.iterate(this.conditions, function(c) {
                     var name = c.condition + "condition";
                     var internalName = "test" + Ext.util.Format.capitalize(name);
+                    
                     var fn = Ext.decode(c.fn);
                     
                     if (Ext.isFunction(this[internalName])) {
@@ -485,4 +487,4 @@ Ext.ns("Cronk.grid.events");
             }
         }
     };
-})();
\ No newline at end of file
+})();





More information about the icinga-checkins mailing list