[icinga-checkins] icinga.org: icinga-web/mhein/default: * CronkBuilder stateful object IE bugfix

git at icinga.org git at icinga.org
Tue Jan 11 17:45:29 CET 2011


Module: icinga-web
Branch: mhein/default
Commit: 25c265dbbadacfe07ebdb3490edbab260acacc2b
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=25c265dbbadacfe07ebdb3490edbab260acacc2b

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Jan 11 17:44:58 2011 +0100

* CronkBuilder stateful object IE bugfix

---

 app/modules/Cronks/lib/js/CronkBuilder.js          |    7 +++++--
 app/modules/Cronks/lib/js/CronkUtil.js             |    9 ++++++---
 .../System/ViewProc/AjaxGridLayoutSuccess.php      |    2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/app/modules/Cronks/lib/js/CronkBuilder.js b/app/modules/Cronks/lib/js/CronkBuilder.js
index 78071fb..ed487df 100644
--- a/app/modules/Cronks/lib/js/CronkBuilder.js
+++ b/app/modules/Cronks/lib/js/CronkBuilder.js
@@ -479,8 +479,11 @@ Ext.extend(Cronk.util.CronkBuilder, Ext.Window, {
 			
 			var cronkFrame = this.cronkCmp.get(0);
 			
-			if (Ext.isDefined(cronk.statefulObject)) {
-				form.findField('state').setValue(Ext.encode(cronk.statefulObject.getState()));
+			if (Ext.isDefined(cronk.statefulObjectId)) {
+				var o = Ext.getCmp(cronk.statefulObjectId);
+				if (o) {
+					form.findField('state').setValue(Ext.encode(o.getState()));	
+				}
 			}
 			if (cronkFrame && cronkFrame.stateful && cronkFrame.getState()) {
 				form.findField('state').setValue(Ext.encode(cronkFrame.getState()));
diff --git a/app/modules/Cronks/lib/js/CronkUtil.js b/app/modules/Cronks/lib/js/CronkUtil.js
index 8bd0f00..146ad49 100755
--- a/app/modules/Cronks/lib/js/CronkUtil.js
+++ b/app/modules/Cronks/lib/js/CronkUtil.js
@@ -102,12 +102,15 @@ Cronk.util.scriptInterface = Ext.extend(Object, function () {
 		},
 		
 		setStatefulObject : function(obj) {
-			this.getRegistryEntry().statefulObject = obj;
+			this.getRegistryEntry().statefulObjectId = obj.getId();
 		},
 		
 		getStatefulObject : function() {
-			if (Ext.isDefined(this.getRegistryEntry().statefulObject)) {
-				return this.getRegistryEntry().statefulObject;
+			if (Ext.isDefined(this.getRegistryEntry().statefulObjectId)) {
+				var o = Ext.getCmp(this.getRegistryEntry().statefulObjectId);
+				if (o) {
+					return o;
+				}
 			}
 		}
 	
diff --git a/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php b/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
index 1367924..c5301b8 100755
--- a/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
+++ b/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
@@ -21,7 +21,7 @@ Cronk.util.initEnvironment(<?php CronksRequestUtil::echoJsonString($rd); ?>, fun
 
 		MetaGrid.setParameters({storeDisableAutoload: true});
 		var grid = MetaGrid.createGrid();
-		
+		CE.setStatefulObject(grid);
 		// Add the window to a toolbar button
 		grid.on('render', function(g) {
 			





More information about the icinga-checkins mailing list