[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * Fixed several portalview issues, changes cronks open from dblclick to click (#fixes 988)

git at icinga.org git at icinga.org
Sun Mar 20 11:26:08 CET 2011


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

Author: jmosshammer <jmosshammer at debian.localhost>
Date:   Thu Feb 10 13:16:42 2011 +0100

* Fixed several portalview issues, changes cronks open from dblclick to click (#fixes 988)

---

 app/modules/Cronks/lib/js/CronkBuilder.js         |    3 +--
 app/modules/Cronks/lib/js/CronkListingPanel.js    |   14 +++++++++-----
 app/modules/Cronks/lib/js/CronkUtil.js            |    2 +-
 app/modules/Cronks/lib/js/Tabhelper.js            |   10 ++++++++--
 app/modules/Cronks/lib/js/grid/MetaGridCreator.js |    2 +-
 5 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/app/modules/Cronks/lib/js/CronkBuilder.js b/app/modules/Cronks/lib/js/CronkBuilder.js
index 3edcaaf..9aaffba 100644
--- a/app/modules/Cronks/lib/js/CronkBuilder.js
+++ b/app/modules/Cronks/lib/js/CronkBuilder.js
@@ -521,8 +521,7 @@ Ext.extend(Cronk.util.CronkBuilder, Ext.Window, {
 			// AppKit.log(this.cronkCmp, this.cronk);
 			
 			form.findField('name').setValue(this.cronkCmp.title);
-			form.findField('cid').setValue(Ext.id(null, 'CUSTOM-' + this.cronk.crname));
-			AppKit.log(this.cronk);
+			form.findField('cid').setValue(Ext.id(null, 'CUSTOM-' + this.cronk.crname));	
 			form.findField('module').setValue(this.cronk.params.module);
 			form.findField('action').setValue(this.cronk.params.action);
 			
diff --git a/app/modules/Cronks/lib/js/CronkListingPanel.js b/app/modules/Cronks/lib/js/CronkListingPanel.js
index 561111b..d963895 100644
--- a/app/modules/Cronks/lib/js/CronkListingPanel.js
+++ b/app/modules/Cronks/lib/js/CronkListingPanel.js
@@ -386,7 +386,7 @@ Cronk.util.CronkListingPanel = function(c) {
 		        // Create the drag zone
 		        listeners: {
 		        	render: CLP.initCronkDragZone.createDelegate(CLP),
-		        	dblclick: CLP.dblClickHandler.createDelegate(CLP),
+		        	click: CLP.dblClickHandler.createDelegate(CLP),
 		        	contextmenu: CLP.handleContextmenu.createDelegate(CLP)
 		        } 
 		    }),
@@ -552,15 +552,19 @@ Ext.extend(Cronk.util.CronkListingPanel, Ext.Panel, {
 		var record = oView.getStore().getAt(index);
 		
 		var tabPanel = Ext.getCmp('cronk-tabs');
-		
+	
 		if (tabPanel) {
 			var panel = tabPanel.add({
 				xtype: 'cronk',
 				iconCls: Cronk.getIconClass(record.data['image_id']),
 				title: record.data['name'],
 				crname: record.data.cronkid,
-				closable: true,
-				params: Ext.apply({}, record.data['ae:parameter'], { module: record.data.module, action: record.data.action })
+				closable: true,	
+				params: Ext.apply({}, record.data['ae:parameter'], { 
+					customState: record.data.state,
+					module: record.data.module, 
+					action: record.data.action 
+				})
 			});
 			
 			tabPanel.setActiveTab(panel);
@@ -733,4 +737,4 @@ Ext.extend(Cronk.util.CronkListingPanel, Ext.Panel, {
 		this.loadData(this.combinedProviderUrl);
 	}
 });
- 
\ No newline at end of file
+ 
diff --git a/app/modules/Cronks/lib/js/CronkUtil.js b/app/modules/Cronks/lib/js/CronkUtil.js
index 4d27767..435a870 100755
--- a/app/modules/Cronks/lib/js/CronkUtil.js
+++ b/app/modules/Cronks/lib/js/CronkUtil.js
@@ -304,7 +304,7 @@ Cronk.util.InterGridUtil = function(){
 			var tabs = Ext.getCmp('cronk-tabs');
 			var id = config.parentid || null;
 			var panel = Ext.getCmp(id);
-
+		
 			if (!panel) {
 				panel = Cronk.factory(config);
 				tabs.add(panel);
diff --git a/app/modules/Cronks/lib/js/Tabhelper.js b/app/modules/Cronks/lib/js/Tabhelper.js
index 6962b9d..c68f087 100755
--- a/app/modules/Cronks/lib/js/Tabhelper.js
+++ b/app/modules/Cronks/lib/js/Tabhelper.js
@@ -81,13 +81,20 @@ Cronk.util.CronkTabHelper = Ext.extend(Object, {
 						
 						notifyDrop: function(dd, e, data){
 							// add them to the tabs
+			
 							var a = tp.add({
 								iconCls: Cronk.getIconClass(data.dragData['image_id']),
 								title: data.dragData['name'],
 								crname: data.dragData.cronkid,
 								closable: true,
+						
 								params: data.dragData.parameter,
-								xtype: 'cronk'
+								xtype: 'cronk',
+								params: Ext.apply({}, data.dragData['ae:parameter'], { 
+									customState: data.dragData.state,
+									module: data.dragData.module, 
+									action: data.dragData.action 
+								})
 							});
 							
 							// Set active
@@ -233,7 +240,6 @@ Cronk.util.CronkTabHelper = Ext.extend(Object, {
 			
 			c.store.load();
 			
-			AppKit.log(c.getState());
 		});
 		
 		return urlCronk;
diff --git a/app/modules/Cronks/lib/js/grid/MetaGridCreator.js b/app/modules/Cronks/lib/js/grid/MetaGridCreator.js
index 46e187f..95493eb 100755
--- a/app/modules/Cronks/lib/js/grid/MetaGridCreator.js
+++ b/app/modules/Cronks/lib/js/grid/MetaGridCreator.js
@@ -545,4 +545,4 @@ Ext.extend(Cronk.grid.MetaGridCreator, Object, {
 	
 });
 
-// ---
\ No newline at end of file
+// ---





More information about the icinga-checkins mailing list