[icinga-checkins] icinga.org: icinga-web/mfriedrich/fixes: * Icinga icon now indicates if XHR Requests are ongoing
git at icinga.org
git at icinga.org
Wed Mar 30 11:14:02 CEST 2011
Module: icinga-web
Branch: mfriedrich/fixes
Commit: 2f88b420da4e60660df9f6d91e5698a1de4762a9
URL: https://git.icinga.org/?p=icinga-web.git;a=commit;h=2f88b420da4e60660df9f6d91e5698a1de4762a9
Author: jmosshammer <jannis.mosshammer at netways.de>
Date: Sun Mar 20 14:52:59 2011 +0100
* Icinga icon now indicates if XHR Requests are ongoing
---
app/modules/AppKit/templates/Ext/HeaderSuccess.php | 27 ++++++++++++++++++-
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/app/modules/AppKit/templates/Ext/HeaderSuccess.php b/app/modules/AppKit/templates/Ext/HeaderSuccess.php
index 49f8966..8ce7cb7 100755
--- a/app/modules/AppKit/templates/Ext/HeaderSuccess.php
+++ b/app/modules/AppKit/templates/Ext/HeaderSuccess.php
@@ -106,11 +106,34 @@ Ext.onReady(function() {
border: false,
autoEl: 'div',
frame: false,
- style: 'background-image: url('+AppKit.c.path + '/images/icinga/idot-small.png);background-repeat:no-repeat;width: 27px;text-align:center; height: 30px; margin-left: 15px;margin-top:0px; display: block;'
+ cls: 'menu-logo-icon',
+ style: 'background-image: url('+AppKit.c.path + '/images/icinga/idot-small.png);background-repeat:no-repeat;width: 27px;text-align:center; height: 30px; margin-left: 15px;margin-top:0px; display: block;'
}
}]
}, null, 'north');
-
+
+ Ext.Ajax.on("beforerequest",function() {
+ try {
+ var icon = Ext.DomQuery.selectNode('.menu-logo-icon');
+ if(!icon)
+ return true;
+ Ext.get(icon).setStyle('background-image','url('+AppKit.c.path+'/images/ajax/icinga-throbber.gif)');
+ } catch(e) {
+ // ignore any errors
+ }
+ });
+ Ext.Ajax.on("requestcomplete",function() {
+ try {
+ var icon = Ext.DomQuery.selectNode('.menu-logo-icon');
+ if(!icon)
+ return true;
+ Ext.get(icon).setStyle('background-image','url('+AppKit.c.path+'/images/icinga/idot-small.png)');
+ } catch(e) {
+ // ignore any errors
+ }
+ });
+
+
earry.items.get(1).on('render', function(c) {
c.getEl().on('click', function() {
AppKit.changeLocation('http://www.icinga.org');
More information about the icinga-checkins
mailing list