[icinga-checkins] icinga.org: icinga-web/mhein/default: * Changes CronkInterface and CronkBuilder

git at icinga.org git at icinga.org
Mon Jan 3 10:54:45 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Jan  3 10:47:35 2011 +0100

* Changes CronkInterface and CronkBuilder

---

 app/modules/Cronks/lib/js/CronkBuilder.js |    4 +++-
 app/modules/Cronks/lib/js/CronkUtil.js    |   10 ++++++++++
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/app/modules/Cronks/lib/js/CronkBuilder.js b/app/modules/Cronks/lib/js/CronkBuilder.js
index 6103107..20851e8 100644
--- a/app/modules/Cronks/lib/js/CronkBuilder.js
+++ b/app/modules/Cronks/lib/js/CronkBuilder.js
@@ -450,10 +450,12 @@ 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 (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 247479e..8bd0f00 100755
--- a/app/modules/Cronks/lib/js/CronkUtil.js
+++ b/app/modules/Cronks/lib/js/CronkUtil.js
@@ -99,6 +99,16 @@ Cronk.util.scriptInterface = Ext.extend(Object, function () {
 		
 		hasParameter : function(pname) {
 			return Ext.isDefined(this.params[pname]); 
+		},
+		
+		setStatefulObject : function(obj) {
+			this.getRegistryEntry().statefulObject = obj;
+		},
+		
+		getStatefulObject : function() {
+			if (Ext.isDefined(this.getRegistryEntry().statefulObject)) {
+				return this.getRegistryEntry().statefulObject;
+			}
 		}
 	
 	}





More information about the icinga-checkins mailing list