[icinga-checkins] icinga.org: icinga-web/mhein/extlayout: * Moved and cleaned up libs and namespaces 6

git at icinga.org git at icinga.org
Mon Apr 19 17:51:28 CEST 2010


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Apr 19 17:51:09 2010 +0200

* Moved and cleaned up libs and namespaces 6

---

 app/modules/Cronks/lib/js/Cronk.js     |    5 +++++
 app/modules/Cronks/lib/js/CronkUtil.js |   12 ++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk.js b/app/modules/Cronks/lib/js/Cronk.js
index b33cb3e..fec679b 100644
--- a/app/modules/Cronks/lib/js/Cronk.js
+++ b/app/modules/Cronks/lib/js/Cronk.js
@@ -46,6 +46,9 @@
 						}
 					})
 				}
+				else {
+					config.xtype = 'cronk';
+				}
 				
 				return new Cronk.Container(config);
 			}
@@ -67,11 +70,13 @@
 	Ext.extend(Cronk.RegistryClass, Ext.util.MixedCollection, {
 		get : function(key) {
 			var i = Cronk.RegistryClass.superclass.get.call(this, key);
+			if (i) {
 			var cronk = Ext.getCmp(i.id);
 			if (cronk) {
 				Ext.apply(i, cronk.initialCronkConfig());
 				this.replace(key, i);
 			}
+			}
 			return i;
 		}
 	});
diff --git a/app/modules/Cronks/lib/js/CronkUtil.js b/app/modules/Cronks/lib/js/CronkUtil.js
index 7195fbf..ad66432 100644
--- a/app/modules/Cronks/lib/js/CronkUtil.js
+++ b/app/modules/Cronks/lib/js/CronkUtil.js
@@ -36,7 +36,7 @@ Cronk.util.StructUtil = function(){
 Cronk.util.InterGridUtil = function(){
 	
 	var applyParametersToGrid = function(baseParams, c) {
-		if ((c.getXType() == 'grid' || c.getXType() == 'appkit-grid')) {
+		if ((c.getXType() == 'grid' || c.getXType() == 'cronkgrid')) {
 			
 			var store = c.getStore();
 			if (!"originParams" in store || typeof(store.originParams) == "undefined") {
@@ -58,18 +58,22 @@ Cronk.util.InterGridUtil = function(){
 			var tabs = Ext.getCmp('cronk-tabs');
 			var id = config.parentid || null;
 			var panel = Ext.getCmp(id);
-			
+//			console.log(config);
 			// disable grid autoload
 			config.params['storeDisableAutoload'] = 1;
 			
 			if (!panel) {
 				
 				panel = Cronk.factory(config);					
-				tabs.add(panel);
-				
+								
 				panel.on('add', function(p, c, i) {
+//					console.log('ADD', c.getXType());
 					applyParametersToGrid(baseParams, c)
 				});
+				
+//				console.log(baseParams);
+				
+				tabs.add(panel);
 			}
 			else {
 				grids = panel.findByType('appkit-grid');





More information about the icinga-checkins mailing list