[icinga-checkins] icinga.org: icinga-web/master: * Fix for servertime (ref #1005)

git at icinga.org git at icinga.org
Fri Jan 27 17:24:50 CET 2012


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Jan 27 17:24:35 2012 +0100

* Fix for servertime (ref #1005)

---

 .../AppKit/lib/js/utils/AppKitServertime.js        |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/modules/AppKit/lib/js/utils/AppKitServertime.js b/app/modules/AppKit/lib/js/utils/AppKitServertime.js
index c139b22..c26047a 100644
--- a/app/modules/AppKit/lib/js/utils/AppKitServertime.js
+++ b/app/modules/AppKit/lib/js/utils/AppKitServertime.js
@@ -22,15 +22,15 @@ AppKit.util.Servertime = Ext.extend(Ext.menu.BaseItem, {
    initComponent : function() {
    	    AppKit.util.Servertime.superclass.initComponent.call(this);
    	    
-   	    if (this.getEl()) {
-	        AppKit.getTr().start({
-	            run: this.updateClock,
-	            interval: 60000,
-	            scope:this
-	        });
-	        
-	        cfg.style = {margin : "3px"};
-   	    }
+   	    this.on('afterrender', function() {
+   	    	if (this.getEl()) {
+	            AppKit.getTr().start({
+	                run: this.updateClock,
+	                interval: 60000,
+	                scope:this
+	            });
+   	    	}
+   	    }, this, { single : true  });
    },
    
    // private





More information about the icinga-checkins mailing list