From 54d4919e3f1b00b644fa3c107acdf20159a1b154 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 12 Aug 2006 05:34:54 +0000 Subject: Update active controls. --- framework/Web/Javascripts/js/prado.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'framework/Web/Javascripts/js/prado.js') diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index 25a26d70..e3930cfd 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -54,7 +54,12 @@ results.push(iterable[i]);return results;}} Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse) Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0;i';}} +if(this[i]==object)return i;return-1;},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse();},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';}});var Hash={_each:function(iterator){for(var key in this){var value=this[key];if(typeof value=='function')continue;var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}},keys:function(){return this.pluck('key');},values:function(){return this.pluck('value');},merge:function(hash){return $H(hash).inject($H(this),function(mergedHash,pair){mergedHash[pair.key]=pair.value;return mergedHash;});},toQueryString:function(){return this.map(function(pair) +{if(typeof(pair[1])=='object'||typeof(pair[1])=='array') +{return $A(pair[1]).collect(function(value) +{return encodeURIComponent(pair[0])+'='+encodeURIComponent(value);}).join('&');} +else +return pair.map(encodeURIComponent).join('=');}).join('&');},inspect:function(){return'#';}} function $H(object){var hash=Object.extend({},object||{});Object.extend(hash,Enumerable);Object.extend(hash,Hash);return hash;} ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;do{iterator(value);value=value.succ();}while(this.include(value));},include:function(value){if(value=0){opt=element.options[index];value=opt.value||opt.text;} return[element.name,value];},selectMany:function(element){var value=[];for(var i=0;i