[icinga-checkins] icinga.org: icinga-web/jmosshammer/principal: * ved and cleaned up libs and namespaces 4

git at icinga.org git at icinga.org
Thu Apr 29 13:03:27 CEST 2010


Module: icinga-web
Branch: jmosshammer/principal
Commit: 5c8aed1a087df8ed249156167d1a1c2fb0329112
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=5c8aed1a087df8ed249156167d1a1c2fb0329112

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Apr 19 12:16:33 2010 +0200

* ved and cleaned up libs and namespaces 4

---

 app/modules/AppKit/lib/js/AppKit.js                |    7 +++----
 app/modules/AppKit/templates/AjaxLoginSuccess.php  |    2 +-
 app/modules/Cronks/lib/js/Tabhelper.js             |    2 +-
 .../templates/System/CronkListingSuccess.php       |    2 +-
 .../templates/System/ObjectSearchSuccess.php       |    2 +-
 .../Cronks/templates/System/StatusMapSuccess.php   |    8 ++++----
 .../System/ViewProc/AjaxGridLayoutSuccess.php      |    2 +-
 .../System/ViewProc/js/IcingaCommandHandler.js     |    6 +++---
 pub/styles/Icinga.css                              |    7 ++++++-
 9 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/app/modules/AppKit/lib/js/AppKit.js b/app/modules/AppKit/lib/js/AppKit.js
index af0c5a3..8746e7e 100644
--- a/app/modules/AppKit/lib/js/AppKit.js
+++ b/app/modules/AppKit/lib/js/AppKit.js
@@ -11,7 +11,7 @@ Ext.ns('AppKit', 'APPKIT.lib');
 		var growlStackElement = null;
 		var growlTemplate = new Ext.Template([
 			'<div class="growl-msg-message">',
-				'<div>{header}</div>',
+				'<div class="head">{header}</div>',
 				'<div>{message}</div>',
 			'</div>'
 		]);
@@ -148,19 +148,18 @@ Ext.ns('AppKit', 'APPKIT.lib');
 	        	var title = la.shift();
 	        	
 	        	var c = {
-	        		time: 2
+	        		waitTime: 2
 	        	};
 	        	
 	        	if (Ext.isObject(la[ la.length -1 ])) {
 	        		Ext.apply(c, la.pop());
-	        		console.log(c);
 	        	}
 	        	
 	        	var nm = String.format.apply(this, la);
 	        	
 	        	var ele = this.growlPopupBox(nm, title);
 	        	
-	        	ele.slideIn('r').pause(c.time).ghost('r', {remove:true});
+	        	ele.slideIn('r').pause(c.waitTime).ghost('r', {remove:true});
 	        }
 			
 		});
diff --git a/app/modules/AppKit/templates/AjaxLoginSuccess.php b/app/modules/AppKit/templates/AjaxLoginSuccess.php
index 470dd2f..58ab4ff 100644
--- a/app/modules/AppKit/templates/AjaxLoginSuccess.php
+++ b/app/modules/AppKit/templates/AjaxLoginSuccess.php
@@ -89,7 +89,7 @@ Ext.onReady(function() {
 						waitTime: 5
 					};
 					
-					AppKit.Ext.notifyMessage('<?php echo $tm->_("Login failed"); ?>', '<?php echo $tm->_("Please verify your input and try again!"); ?>', null, c);
+					AppKit.notifyMessage('<?php echo $tm->_("Login failed"); ?>', '<?php echo $tm->_("Please verify your input and try again!"); ?>', null, c);
 				}
 				
 				/* oContainer.highlight("cc0000", {
diff --git a/app/modules/Cronks/lib/js/Tabhelper.js b/app/modules/Cronks/lib/js/Tabhelper.js
index 0680832..7589430 100644
--- a/app/modules/Cronks/lib/js/Tabhelper.js
+++ b/app/modules/Cronks/lib/js/Tabhelper.js
@@ -96,7 +96,7 @@ Cronk.util.CronkTabHelper = Ext.extend(Object, {
 	itemRemoveActiveHandler : function (tabPanel, ri) {
 		
 		if (tabPanel.items.getCount() <= 1) {
-			AppKit.Ext.notifyMessage(_('Sorry'), _('Could not remove the last tab!'));
+			AppKit.notifyMessage(_('Sorry'), _('Could not remove the last tab!'));
 			return false;
 		}
 		else {
diff --git a/app/modules/Cronks/templates/System/CronkListingSuccess.php b/app/modules/Cronks/templates/System/CronkListingSuccess.php
index a1b6522..34787b8 100644
--- a/app/modules/Cronks/templates/System/CronkListingSuccess.php
+++ b/app/modules/Cronks/templates/System/CronkListingSuccess.php
@@ -256,7 +256,7 @@
 			
 		},
 		failure: function (r, o) {
-			AppKit.Ext.notifyMessage('Ajax Error', 'Could not load the categories (CronkList)');
+			AppKit.notifyMessage('Ajax Error', 'Could not load the categories (CronkList)');
 		}
 	});
 		
diff --git a/app/modules/Cronks/templates/System/ObjectSearchSuccess.php b/app/modules/Cronks/templates/System/ObjectSearchSuccess.php
index 8749060..5df08ed 100644
--- a/app/modules/Cronks/templates/System/ObjectSearchSuccess.php
+++ b/app/modules/Cronks/templates/System/ObjectSearchSuccess.php
@@ -316,7 +316,7 @@
 				
 				if (noresult == false && test == 0) {
 					noresult = true;
-					AppKit.Ext.notifyMessage('Search', 'No results!');
+					AppKit.notifyMessage('Search', 'No results!');
 				}
 			},
 			
diff --git a/app/modules/Cronks/templates/System/StatusMapSuccess.php b/app/modules/Cronks/templates/System/StatusMapSuccess.php
index 94239b9..fff8627 100644
--- a/app/modules/Cronks/templates/System/StatusMapSuccess.php
+++ b/app/modules/Cronks/templates/System/StatusMapSuccess.php
@@ -5,9 +5,9 @@
 	$parentId = $rd->getParameter('parentid');
 ?>
 <script type="text/javascript">
-AppKit.Ext.ScriptDynaLoader.startBulkMode();
+AppKit.ScriptDynaLoader.startBulkMode();
 
-AppKit.Ext.ScriptDynaLoader.on(
+AppKit.ScriptDynaLoader.on(
 	'bulkfinish', function () {
 		var statusMap = new JitStatusMap({
 			url: "<?php echo $ro->gen('icinga.cronks.statusMap.json'); ?>",
@@ -23,6 +23,6 @@ AppKit.Ext.ScriptDynaLoader.on(
 //}
 
 //AppKit.Ext.ScriptDynaLoader.loadScript("<?php echo $ro->gen('appkit.ext.dynamicScriptSource', array('script' => 'Cronks.JitLib')) ?>");
-AppKit.Ext.ScriptDynaLoader.loadScript("<?php echo $ro->gen('appkit.ext.dynamicScriptSource', array('script' => 'Cronks.CronkTrigger')) ?>");
-AppKit.Ext.ScriptDynaLoader.loadScript("<?php echo $ro->gen('appkit.ext.dynamicScriptSource', array('script' => 'Cronks.JitStatusMap')) ?>");
+AppKit.ScriptDynaLoader.loadScript("<?php echo $ro->gen('appkit.ext.dynamicScriptSource', array('script' => 'Cronks.CronkTrigger')) ?>");
+AppKit.ScriptDynaLoader.loadScript("<?php echo $ro->gen('appkit.ext.dynamicScriptSource', array('script' => 'Cronks.JitStatusMap')) ?>");
 </script>
\ No newline at end of file
diff --git a/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php b/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
index 57fc2e4..f50f91a 100644
--- a/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
+++ b/app/modules/Cronks/templates/System/ViewProc/AjaxGridLayoutSuccess.php
@@ -172,7 +172,7 @@
 				   },
 				   
 				   failure: function(response, opts) {
-						AppKit.Ext.notifyMessage(
+						AppKit.notifyMessage(
 							"Ext.Ajax.request: request failed!",
 							String.format("{0} ({1})", response.statusText, response.status)
 						);
diff --git a/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js b/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js
index 656d365..f969958 100644
--- a/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js
+++ b/app/modules/Cronks/templates/System/ViewProc/js/IcingaCommandHandler.js
@@ -218,7 +218,7 @@ IcingaCommandHandler.prototype = {
 	showCommandWindow : function(command, title) {
 		
 		if (this.validSelection() !== true) {
-			AppKit.Ext.notifyMessage(_('Command'), _('Selection is missing'));
+			AppKit.notifyMessage(_('Command'), _('Selection is missing'));
 			return;
 		}
 		
@@ -307,13 +307,13 @@ IcingaCommandHandler.prototype = {
 							var e = Ext.util.JSON.decode(a.response.responseText);
 							var error = e.errors['default'];
 							
-							AppKit.Ext.notifyMessage(_('Error sending command'), error);
+							AppKit.notifyMessage(_('Error sending command'), error);
 						}
 					},
 					
 					success: function(f, a) {
 						oWin.close();
-						AppKit.Ext.notifyMessage(_('Command sent'), String.format(_('{0} command was sent successfully!'), command));
+						AppKit.notifyMessage(_('Command sent'), String.format(_('{0} command was sent successfully!'), command));
 					}
 				});
 				
diff --git a/pub/styles/Icinga.css b/pub/styles/Icinga.css
index 4161c54..61c0a16 100644
--- a/pub/styles/Icinga.css
+++ b/pub/styles/Icinga.css
@@ -135,12 +135,17 @@ div.growl-msg-message {
 	z-index: 999;	
 }
 
+div.growl-msg-message .head {
+	font-size: 10pt;
+	font-weight: bolder;
+}
+
 div#growl-msg-stack {
 	position:absolute;
     /* left: 35%;
     top: 10px; */
     top: 35%;
-    width: 250px;
+    width: 300px;
     z-index: 20000;
 }
 	





More information about the icinga-checkins mailing list