[icinga-checkins] icinga.org: icinga-web/master: * Fixed TO -> Cronk bug

git at icinga.org git at icinga.org
Tue Sep 14 13:46:24 CEST 2010


Module: icinga-web
Branch: master
Commit: 0dee1e728f54ccf34ff53422901455192983e243
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=0dee1e728f54ccf34ff53422901455192983e243

Author: jmosshammer <jmosshammer at ws-jmosshammer.(none)>
Date:   Tue Sep 14 11:28:34 2010 +0200

* Fixed TO -> Cronk bug

---

 app/modules/Cronks/lib/js/CronkUtil.js |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/app/modules/Cronks/lib/js/CronkUtil.js b/app/modules/Cronks/lib/js/CronkUtil.js
index 2f8fe81..050c6ff 100755
--- a/app/modules/Cronks/lib/js/CronkUtil.js
+++ b/app/modules/Cronks/lib/js/CronkUtil.js
@@ -184,9 +184,13 @@ Cronk.util.InterGridUtil = function(){
 					};
 					
 					Ext.iterate(f, function(k, v) {
-						delete(f[k]);
+						delete(f[k]);				
+						if(k.match(/f\[(.*?)\-operator\]/))
+							return true;
+						k = k.replace(/f\[(.*?)\-value]/,'$1');
 						f['f[' + k + '-value]'] = v;
 						f['f[' + k + '-operator]'] = 50;
+						
 					});
 					
 					Cronk.util.InterGridUtil.gridFilterLink(cronk, f);
@@ -207,13 +211,18 @@ Cronk.util.InterGridUtil = function(){
 					};
 
 					f = Ext.apply({}, f);
-					if(!el.paramSetup) {
-						Ext.iterate(f, function(k,v) {
-							p['f[' + k + '-value]'] = v;
-							p['f[' + k + '-operator]'] = 50;
-						});
-						el.paramSetup = true;
-					}
+					
+					Ext.iterate(f, function(k,v) {
+						if(k.match(/f\[(.*?)\-operator\]/))
+							return true;
+						k = k.replace(/f\[(.*?)\-value]/,'$1');
+
+						p['f[' + k + '-value]'] = v;
+						p['f[' + k + '-operator]'] = 50;
+							
+					});
+					
+					
 					
 					var cronk = {
 						parentid: 'click-to-link-' + id,





More information about the icinga-checkins mailing list