[icinga-checkins] icinga.org: icinga-web/mhein/default: * Fixed url persistent views

git at icinga.org git at icinga.org
Tue Jan 18 15:03:48 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Jan 18 15:03:05 2011 +0100

* Fixed url persistent views

---

 app/config/routing.xml                      |    5 ++++-
 app/modules/Cronks/lib/js/Tabhelper.js      |    9 +++++++--
 app/modules/Cronks/lib/js/grid/GridPanel.js |   17 +++++++++++++----
 3 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/app/config/routing.xml b/app/config/routing.xml
index e9d756a..713c88c 100755
--- a/app/config/routing.xml
+++ b/app/config/routing.xml
@@ -93,15 +93,18 @@
 
 				<!-- The main view -->
 				<route name=".portalView" pattern="^/portal$" action="Icinga.PortalView"/>
+				
 				<route name=".customPortal" pattern="^/customPortal" action="Icinga.PortalView" stop="true">
+				
 					<route name=".crbase" pattern="/cr_base=(cr_base:[^/]*)" stop="false"/>
 					<route name=".groupDir" pattern="/groupDir=(groupDir:(ASC|DESC))" stop="false"/>
 					<route name=".groupField" pattern="/groupField=(groupField:[^/]*)" stop="false"/>
 					<route name=".template" pattern="/template=(template:[^/]*)" stop="false"/>
 					<route name=".crname" pattern="/crname=(crname:[^/]*)" stop="false"/>
 					<route name=".title" pattern="/title=(title:[^/]*)" stop="false"/>
-				
+					
 				</route>
+				
 				<!-- TestPage -->
 				<route name=".testPage" pattern="^/testpage$" action="Icinga.TestPage"/>
 
diff --git a/app/modules/Cronks/lib/js/Tabhelper.js b/app/modules/Cronks/lib/js/Tabhelper.js
index 2c0c84e..de12f9e 100755
--- a/app/modules/Cronks/lib/js/Tabhelper.js
+++ b/app/modules/Cronks/lib/js/Tabhelper.js
@@ -196,12 +196,17 @@ Cronk.util.CronkTabHelper = Ext.extend(Object, {
 	},
 	
 	createURLCronk: function(data) {
-
+		console.log(data);
 		var urlCronk =  Cronk.factory({
 			title: data.title,
 			crname: data.crname,
-			closable: true
+			closable: true,
+			
+			params: {
+				'template': data.template
+			}
 		});
+		
 		urlCronk.on("add",function(p, c, i) {
 			if(!c.store)
 				return null; 
diff --git a/app/modules/Cronks/lib/js/grid/GridPanel.js b/app/modules/Cronks/lib/js/grid/GridPanel.js
index 8976e2f..f4d8c11 100755
--- a/app/modules/Cronks/lib/js/grid/GridPanel.js
+++ b/app/modules/Cronks/lib/js/grid/GridPanel.js
@@ -69,7 +69,8 @@ Cronk.grid.GridPanel = Ext.extend(Ext.grid.GridPanel, {
 						iconCls: 'icinga-icon-anchor',
 						handler: function(oBtn,e) {
 							var urlParams = this.extractGridParams();
-							new Ext.Window({
+							
+							var win = new Ext.Window({
 								renderTo:Ext.getBody(),
 								modal:true,
 								initHidden:false,
@@ -83,8 +84,15 @@ Cronk.grid.GridPanel = Ext.extend(Ext.grid.GridPanel, {
 									xtype:'textfield',
 									fieldLabel: _('Link'),
 									width:350,
-									value: this.initialConfig.meta.baseURL+"/customPortal/"+urlParams
-								}
+									value: AppKit.c.path + "/web/customPortal/"+urlParams
+								},
+								bbar: [{
+									text: _('Close'),
+									iconCls: 'icinga-icon-close',
+									handler: function(b, e) {
+										win.close();
+									}
+								}]
 						
 							});
 						},
@@ -111,7 +119,7 @@ Cronk.grid.GridPanel = Ext.extend(Ext.grid.GridPanel, {
 	},
 	
 	extractGridParams: function() {
-		AppKit.log(this);
+		
 		var store = this.store;
 		var cronk = this.ownerCt.CronkPlugin.cmpConfig;
 		var urlParams = "cr_base=";
@@ -133,6 +141,7 @@ Cronk.grid.GridPanel = Ext.extend(Ext.grid.GridPanel, {
 				"/groupDir=ASC/"+
 				"groupField=instance/";
 		}
+		
 		urlParams +=
 			"template="+this.initialConfig.meta.params.template+"/"+
 			"crname="+cronk.crname+"/"+





More information about the icinga-checkins mailing list