[icinga-checkins] icinga.org: icinga-web/jmosshammer/default: * Added extra check that prevents harmless js errors on tab close

git at icinga.org git at icinga.org
Tue Nov 9 11:32:27 CET 2010


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

Author: jmosshammer <jannis.mosshammer at netways.com>
Date:   Thu Oct 21 16:29:00 2010 +0200

* Added extra check that prevents harmless js errors on tab close

---

 app/modules/Cronks/lib/js/grid/GridPanel.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/modules/Cronks/lib/js/grid/GridPanel.js b/app/modules/Cronks/lib/js/grid/GridPanel.js
index f7b6b61..08af7c5 100755
--- a/app/modules/Cronks/lib/js/grid/GridPanel.js
+++ b/app/modules/Cronks/lib/js/grid/GridPanel.js
@@ -35,7 +35,8 @@ Cronk.grid.GridPanel = Ext.extend(Ext.grid.GridPanel, {
 							if (checked == true) {
 								this.trefresh = AppKit.getTr().start({
 									run: function() {
-										this.getStore().reload();
+										if(this.getStore())
+											this.getStore().reload();
 									},
 									interval: (autoRefresh*1000),
 									scope: this
@@ -80,7 +81,8 @@ Cronk.grid.GridPanel = Ext.extend(Ext.grid.GridPanel, {
 					if(autoRefreshDefault) {
 						this.trefresh = AppKit.getTr().start({
 							run: function() {
-								this.getStore().reload();
+								if(this.getStore())
+									this.getStore().reload();
 							},
 							interval: (autoRefresh*1000),
 							scope: this





More information about the icinga-checkins mailing list