[icinga-checkins] icinga.org: icinga-web/mhein/default: * Style changes

git at icinga.org git at icinga.org
Wed Jan 5 17:15:50 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Jan  5 17:15:21 2011 +0100

* Style changes
* Position of tab slider
* icon things
* cronk tab panel methods

---

 app/config/icinga.xml.in                           |    2 +-
 app/modules/AppKit/config/module.xml               |    1 +
 app/modules/Cronks/lib/js/CronkListingPanel.js     |   43 ++++++++++++++++-
 app/modules/Cronks/lib/js/CronkTabpanel.js         |   16 ++++++
 app/modules/Cronks/lib/js/Tabhelper.js             |   50 +-------------------
 .../Cronks/templates/System/CronkPortalSuccess.php |    2 +-
 pub/styles/icinga.css                              |    2 +-
 7 files changed, 64 insertions(+), 52 deletions(-)

diff --git a/app/config/icinga.xml.in b/app/config/icinga.xml.in
index d3f36c4..1d25cff 100755
--- a/app/config/icinga.xml.in
+++ b/app/config/icinga.xml.in
@@ -56,7 +56,7 @@
 		
 		<setting name="version.release"/>
 	-->
-	<setting name="version.copyright"><![CDATA[© 2009-2010 Icinga Developer Team]]></setting>
+	<setting name="version.copyright"><![CDATA[© 2009-2011 Icinga Developer Team]]></setting>
 	<setting name="version.homeref"><![CDATA[<a href="http://www.icinga.org/">www.icinga.org</a>]]></setting>
 	<setting name="version.major">@VERSION_MAJOR@</setting>
 	<setting name="version.minor">@VERSION_MINOR@</setting>
diff --git a/app/modules/AppKit/config/module.xml b/app/modules/AppKit/config/module.xml
index 3b1bc19..aabf8fe 100755
--- a/app/modules/AppKit/config/module.xml
+++ b/app/modules/AppKit/config/module.xml
@@ -49,6 +49,7 @@
 				<setting name="user_preferences_default">
 					<ae:parameter name="org.icinga.grid.pagerMaxItems">25</ae:parameter>
 					<ae:parameter name="org.icinga.grid.refreshTime">300</ae:parameter>
+					<ae:parameter name="org.icinga.tabslider.changeTime">10</ae:parameter>
 					<ae:parameter name="org.icinga.cronk.default">portalHello</ae:parameter>
 					<ae:parameter name="org.icinga.bugTrackerEnabled">true</ae:parameter>
 					<ae:parameter name="org.icinga.errorNotificationsEnabled">true</ae:parameter>
diff --git a/app/modules/Cronks/lib/js/CronkListingPanel.js b/app/modules/Cronks/lib/js/CronkListingPanel.js
index f820536..561111b 100644
--- a/app/modules/Cronks/lib/js/CronkListingPanel.js
+++ b/app/modules/Cronks/lib/js/CronkListingPanel.js
@@ -439,6 +439,47 @@ Ext.extend(Cronk.util.CronkListingPanel, Ext.Panel, {
 			var p = Ext.getCmp('cronk-listing-panel');
 			p.reloadAll();
 		}
+	}, {
+		text: _('Settings'),
+		iconCls: 'icinga-icon-cog',
+		menu: [{
+			text: _("Tab slider"),
+			checked: false,
+			checkHandler: function(checkItem, checked) {
+				
+				var refresh = AppKit.getPrefVal('org.icinga.tabslider.changeTime') || 60;
+				
+				var tp = Ext.getCmp('cronk-tabs');
+				
+				if (checked == true) {
+					if (Ext.isDefined(this.sliderTask)) {
+						AppKit.getTr().stop(this.sliderTask);
+					}
+					
+					this.sliding_tab = tp.getActiveTabIndex();
+					
+					this.sliderTask = {
+						run: function() {
+							this.sliding_tab++;		
+							if (this.sliding_tab >= tp.items.getCount()) {
+								this.sliding_tab = 0;
+							}
+							
+							tp.setActiveTab(this.sliding_tab);
+						},
+						interval: (refresh * 1000),
+						scope: this
+					}
+					
+					AppKit.getTr().start(this.sliderTask);
+				}
+				else {
+					AppKit.getTr().stop(this.sliderTask);
+				}
+				
+			},
+			scope: this
+		}]	
 	}],
 	
 	applyState: function(state) {
@@ -470,7 +511,7 @@ Ext.extend(Cronk.util.CronkListingPanel, Ext.Panel, {
 		}
 		
 		if (this.isCategoryAdmin == true) {
-			this.getTopToolbar().add({
+			this.getTopToolbar().insert(1, {
 				text: _('Categories'),
 				iconCls: 'icinga-icon-category',
 				handler: function(b, e) {
diff --git a/app/modules/Cronks/lib/js/CronkTabpanel.js b/app/modules/Cronks/lib/js/CronkTabpanel.js
index 88aaacc..3753526 100755
--- a/app/modules/Cronks/lib/js/CronkTabpanel.js
+++ b/app/modules/Cronks/lib/js/CronkTabpanel.js
@@ -18,6 +18,21 @@ Ext.extend(Cronk.util.Tabpanel, Ext.ux.SlidingTabPanel, {
 		
 	},
 	
+	getTabIndex: function(tab) {
+		var i = -1;
+		this.items.each(function(item, index, a) {
+			i++;
+			if (item == tab) {
+				return false;
+			}
+		});
+		return i;
+	},
+	
+	getActiveTabIndex: function() {
+		return this.getTabIndex(this.getActiveTab());
+	},
+	
 	getState: function() {
 		
 		var cout = {};
@@ -62,6 +77,7 @@ Ext.extend(Cronk.util.Tabpanel, Ext.ux.SlidingTabPanel, {
 				
 		return true;
 	},
+	
 	listeners: {
 		tabchange: function(tab) {
 			var aTab = tab.getActiveTab();
diff --git a/app/modules/Cronks/lib/js/Tabhelper.js b/app/modules/Cronks/lib/js/Tabhelper.js
index 48e33ef..2c0c84e 100755
--- a/app/modules/Cronks/lib/js/Tabhelper.js
+++ b/app/modules/Cronks/lib/js/Tabhelper.js
@@ -44,7 +44,8 @@ Cronk.util.CronkTabHelper = Ext.extend(Object, {
 		return Cronk.factory({
 			title: _("Welcome"),
 			crname: ( AppKit.getPrefVal('org.icinga.cronk.default') || 'portalHello' ),
-			closable: true
+			closable: true,
+			iconCls: 'icinga-cronk-icon-start'
 		});
 	},
 	
@@ -168,42 +169,6 @@ Cronk.util.CronkTabHelper = Ext.extend(Object, {
 							cb.show(this.getEl());
 							cb.setCurrentCronkId(ctxItem.getId());
 						}
-					}, {
-						text: _("Tab slider"),
-						checked: false,
-						checkHandler: function(checkItem, checked) {
-							
-							var refresh = AppKit.getPrefVal('org.icinga.grid.refreshTime') || 300;
-							
-							if (checked == true) {
-								
-								if (Ext.isDefined(this.sliderTask)) {
-									AppKit.getTr().stop(this.sliderTask);
-								}
-								
-								this.sliding_tab = this.getTabIndex(ctxItem);
-								
-								this.sliderTask = {
-									run: function() {
-										this.sliding_tab++;		
-										if (this.sliding_tab >= tp.items.getCount()) {
-											this.sliding_tab = 0;
-										}
-										
-										tp.setActiveTab(this.sliding_tab);
-									},
-									interval: (refresh * 1000),
-									scope: this
-								}
-								
-								AppKit.getTr().start(this.sliderTask);
-							}
-							else {
-								AppKit.getTr().stop(this.sliderTask);
-							}
-							
-						},
-						scope: this
 					}]
 				}]
 			});
@@ -217,17 +182,6 @@ Cronk.util.CronkTabHelper = Ext.extend(Object, {
 		this.contextmenu.showAt(e.getPoint());
 	},
 	
-	getTabIndex: function(tab) {
-		var i = -1;
-		tp.items.each(function(item, index, a) {
-			i++;
-			if (item == tab) {
-				return false;
-			}
-		});
-		return i;
-	},
-	
 	enameTab : function() {
 		var msg = Ext.Msg.prompt(_("Enter title"), _("Change title for this tab"), function(btn, text) {
 			
diff --git a/app/modules/Cronks/templates/System/CronkPortalSuccess.php b/app/modules/Cronks/templates/System/CronkPortalSuccess.php
index 3059f9d..be0928b 100755
--- a/app/modules/Cronks/templates/System/CronkPortalSuccess.php
+++ b/app/modules/Cronks/templates/System/CronkPortalSuccess.php
@@ -81,7 +81,7 @@ Cronk.util.initEnvironment('viewport-center', function() {
 	        split: true,
 	        minSize: 200,
 	        maxSize: 400,
-	        width: 200,
+	        width: 280,
 	        collapsible: true,
 	        stateful: true,
 	        border: true,
diff --git a/pub/styles/icinga.css b/pub/styles/icinga.css
index fa44c35..1a5b607 100644
--- a/pub/styles/icinga.css
+++ b/pub/styles/icinga.css
@@ -209,7 +209,7 @@ div.cronk-data-view .x-view-selected .thumb{
 
 /* div.x-portlet div.x-panel-body { */
 #west-frame .x-panel-body-noborder {
-	background: white url(../images/background/icinga_logo_cronk_left_bg.png) no-repeat bottom right;
+	background: white url(../images/background/icinga_logo_cronk_left_bg.png) no-repeat bottom left;
 }
 
 #center-frame .x-panel-body-noborder {





More information about the icinga-checkins mailing list