jay@moduscreate.com
5 Jun 2009, 10:42 AM
the following seems pretty rigid.
182 getParams: function(node){
183 var buf = [], bp = this.baseParams;
184 if(this.directFn){
185 buf.push(node.id);
186 if(bp){
187 if(this.paramOrder){
188 for(var i = 0, len = this.paramOrder.length; i < len; i++){
189 buf.push(bp[this.paramOrder[i]]);
190 }
191 }else if(this.paramsAsHash){
192 buf.push(bp);
193 }
194 }
195 return buf;
196 }else{
197 for(var key in bp){
198 if(!Ext.isFunction(bp[key])){
199 buf.push(encodeURIComponent(key), "=", encodeURIComponent(bp[key]), "&");
200 }
201 }
202 buf.push("node=", encodeURIComponent(node.id));
203 return buf.join("");
204 }
205 },
could probably be better as
buf.push(this.queryParam+'=', encodeURIComponent(node.id)); where this.queryParam = "node"
182 getParams: function(node){
183 var buf = [], bp = this.baseParams;
184 if(this.directFn){
185 buf.push(node.id);
186 if(bp){
187 if(this.paramOrder){
188 for(var i = 0, len = this.paramOrder.length; i < len; i++){
189 buf.push(bp[this.paramOrder[i]]);
190 }
191 }else if(this.paramsAsHash){
192 buf.push(bp);
193 }
194 }
195 return buf;
196 }else{
197 for(var key in bp){
198 if(!Ext.isFunction(bp[key])){
199 buf.push(encodeURIComponent(key), "=", encodeURIComponent(bp[key]), "&");
200 }
201 }
202 buf.push("node=", encodeURIComponent(node.id));
203 return buf.join("");
204 }
205 },
could probably be better as
buf.push(this.queryParam+'=', encodeURIComponent(node.id)); where this.queryParam = "node"