[icinga-checkins] icinga.org: icinga-web/cdoebler/default: * fixed Javascript in status summary for IE

git at icinga.org git at icinga.org
Tue Oct 20 14:57:15 CEST 2009


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

Author: Christian Doebler <christian.doebler at netways.de>
Date:   Tue Oct 20 14:55:30 2009 +0200

* fixed Javascript in status summary for IE
* fixed base of status map to work with IE

---

 app/config/icinga.xml                              |    1 +
 .../Cronks/templates/System/StatusMapSuccess.php   |   19 ++++++++++++++-----
 .../templates/System/StatusSummarySuccess.php      |    6 +++---
 .../Cronks/templates/System/js/JitStatusMap.js     |    2 +-
 4 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/app/config/icinga.xml b/app/config/icinga.xml
index c371c81..c66aeb4 100644
--- a/app/config/icinga.xml
+++ b/app/config/icinga.xml
@@ -195,6 +195,7 @@
 	<setting name="appkit.include_dynamic_javascript">
 		<parameter name="AppKit.Ext.grid.IcingaColumnRenderer">%core.module_dir%/Cronks/templates/System/ViewProc/js/IcingaColumnRenderer.js</parameter>
 		<parameter name="Cronks.JitStatusMap">%core.module_dir%/Cronks/templates/System/js/JitStatusMap.js</parameter>
+		<parameter name="Cronks.JitExCanvas">%core.root_dir%/lib/jit/Extras/excanvas.js</parameter>
 	</setting>
 
 	<!--
diff --git a/app/modules/Cronks/templates/System/StatusMapSuccess.php b/app/modules/Cronks/templates/System/StatusMapSuccess.php
index dbdc561..14aae8a 100644
--- a/app/modules/Cronks/templates/System/StatusMapSuccess.php
+++ b/app/modules/Cronks/templates/System/StatusMapSuccess.php
@@ -5,13 +5,22 @@
 	$parentId = $rd->getParameter('parentid');
 ?>
 <script type="text/javascript">
-AppKit.Ext.ScriptDynaLoader.loadScript({
-	url: "<?php echo $ro->gen('appkit.ext.dynamicScriptSource', array('script' => 'Cronks.JitStatusMap')) ?>",
-	callback: function() {
+AppKit.Ext.ScriptDynaLoader.startBulkMode();
+
+AppKit.Ext.ScriptDynaLoader.on(
+	'bulkfinish', function () {
 		var statusMap = new JitStatusMap({
 			url: "<?php echo $ro->gen('icinga.cronks.statusMap.json'); ?>",
 			parentId: "<?php echo $parentId; ?>"
 		});
-	}
-});
+	},
+	this,
+	{ single : true }
+);
+
+if (Ext.isIE) {
+	AppKit.Ext.ScriptDynaLoader.loadScript("<?php echo $ro->gen('appkit.ext.dynamicScriptSource', array('script' => 'Cronks.JitExCanvas')) ?>");
+}
+
+AppKit.Ext.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/StatusSummarySuccess.php b/app/modules/Cronks/templates/System/StatusSummarySuccess.php
index bee7545..fabd894 100644
--- a/app/modules/Cronks/templates/System/StatusSummarySuccess.php
+++ b/app/modules/Cronks/templates/System/StatusSummarySuccess.php
@@ -17,11 +17,11 @@ var dummyCronkDisplayStateSummary = function () {
 		panelDefs : {
 			host : {
 				itemId : AppKit.Ext.genRandomId("cronk"),
-				title : false,
+				title : false
 			},
 			service : {
 				itemId : AppKit.Ext.genRandomId("cronk"),
-				title : false,
+				title : false
 			},
 			chart : {
 				itemId : AppKit.Ext.genRandomId("cronk"),
@@ -234,7 +234,7 @@ var dummyCronkDisplayStateSummary = function () {
 				callback : this.showChartAjaxDefault,
 				scope: this,
 				timeout : 50000,
-				disableCaching : true,
+				disableCaching : true
 			});
 		},
 
diff --git a/app/modules/Cronks/templates/System/js/JitStatusMap.js b/app/modules/Cronks/templates/System/js/JitStatusMap.js
index 1192ab4..1a831d2 100644
--- a/app/modules/Cronks/templates/System/js/JitStatusMap.js
+++ b/app/modules/Cronks/templates/System/js/JitStatusMap.js
@@ -198,7 +198,7 @@ function JitStatusMap (config) {
 			callback : this.getMapDataDefault,
 			scope: this,
 			timeout : this.config.timeout,
-			disableCaching : this.config.disableCaching,
+			disableCaching : this.config.disableCaching
 		});
 	}
 	





More information about the icinga-checkins mailing list