summaryrefslogtreecommitdiff
path: root/framework/Web
diff options
context:
space:
mode:
authorxue <>2006-04-14 12:55:01 +0000
committerxue <>2006-04-14 12:55:01 +0000
commita66e3a8afb63d472b3ec92a406538dfc0a492efb (patch)
treea7b78fef549ee487027133f3db7095aabbe97dba /framework/Web
parentf6a5e7589396854e10e023c25237b47e512ff047 (diff)
merge from branch 3.0 till 908.
Diffstat (limited to 'framework/Web')
-rw-r--r--framework/Web/Javascripts/js/colorpicker.js2
-rw-r--r--framework/Web/Javascripts/js/prado.js1294
-rw-r--r--framework/Web/Javascripts/js/validator.js2
-rw-r--r--framework/Web/Javascripts/prado/controls.js48
-rw-r--r--framework/Web/Javascripts/prado/form.js13
-rw-r--r--framework/Web/Javascripts/prado/validation.js3
-rw-r--r--framework/Web/Javascripts/prototype/array.js7
-rw-r--r--framework/Web/UI/WebControls/TImageButton.php1
-rw-r--r--framework/Web/UI/WebControls/TMultiView.php10
-rw-r--r--framework/Web/UI/WebControls/TWizard.php10
10 files changed, 731 insertions, 659 deletions
diff --git a/framework/Web/Javascripts/js/colorpicker.js b/framework/Web/Javascripts/js/colorpicker.js
index 5668be98..3dde7692 100644
--- a/framework/Web/Javascripts/js/colorpicker.js
+++ b/framework/Web/Javascripts/js/colorpicker.js
@@ -320,7 +320,7 @@ this.inputs=_65;
var _67=Prado.WebUI.TColorPicker.UIImages;
this.inputs["currentColor"]=SPAN({className:"currentColor"});
this.inputs["oldColor"]=SPAN({className:"oldColor"});
-var _68=TABLE({className:"inputs"},TBODY(null,TR(null,TD({className:"currentcolor",colSpan:2},this.inputs["currentColor"],this.inputs["oldColor"])),TR(null,TD(null,"H:"),TD(null,this.inputs["H"],"\u63b3")),TR(null,TD(null,"S:"),TD(null,this.inputs["S"],"%")),TR(null,TD(null,"V:"),TD(null,this.inputs["V"],"%")),TR(null,TD({className:"gap"},"R:"),TD({className:"gap"},this.inputs["R"])),TR(null,TD(null,"G:"),TD(null,this.inputs["G"])),TR(null,TD(null,"B:"),TD(null,this.inputs["B"])),TR(null,TD({className:"gap"},"#"),TD({className:"gap"},this.inputs["HEX"]))));
+var _68=TABLE({className:"inputs"},TBODY(null,TR(null,TD({className:"currentcolor",colSpan:2},this.inputs["currentColor"],this.inputs["oldColor"])),TR(null,TD(null,"H:"),TD(null,this.inputs["H"],"\xc2\xb0")),TR(null,TD(null,"S:"),TD(null,this.inputs["S"],"%")),TR(null,TD(null,"V:"),TD(null,this.inputs["V"],"%")),TR(null,TD({className:"gap"},"R:"),TD({className:"gap"},this.inputs["R"])),TR(null,TD(null,"G:"),TD(null,this.inputs["G"])),TR(null,TD(null,"B:"),TD(null,this.inputs["B"])),TR(null,TD({className:"gap"},"#"),TD({className:"gap"},this.inputs["HEX"]))));
var _69={selector:SPAN({className:"selector"}),background:SPAN({className:"colorpanel"}),slider:SPAN({className:"slider"}),hue:SPAN({className:"strip"})};
if(Prado.Browser().ie){
var _70="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader";
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js
index d142a070..36c1f658 100644
--- a/framework/Web/Javascripts/js/prado.js
+++ b/framework/Web/Javascripts/js/prado.js
@@ -471,7 +471,6 @@ return _126;
}
};
Object.extend(Array.prototype,Enumerable);
-Array.prototype._reverse=Array.prototype.reverse;
Object.extend(Array.prototype,{_each:function(_127){
for(var i=0;i<this.length;i++){
_127(this[i]);
@@ -503,37 +502,35 @@ return i;
}
}
return -1;
-},reverse:function(_134){
-return (_134!==false?this:this.toArray())._reverse();
},shift:function(){
-var _135=this[0];
+var _134=this[0];
for(var i=0;i<this.length-1;i++){
this[i]=this[i+1];
}
this.length--;
-return _135;
+return _134;
},inspect:function(){
return "["+this.map(Object.inspect).join(", ")+"]";
}});
-var Hash={_each:function(_136){
+var Hash={_each:function(_135){
for(key in this){
-var _137=this[key];
-if(typeof _137=="function"){
+var _136=this[key];
+if(typeof _136=="function"){
continue;
}
-var pair=[key,_137];
+var pair=[key,_136];
pair.key=key;
-pair.value=_137;
-_136(pair);
+pair.value=_136;
+_135(pair);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(hash){
-return $H(hash).inject($H(this),function(_140,pair){
-_140[pair.key]=pair.value;
-return _140;
+return $H(hash).inject($H(this),function(_139,pair){
+_139[pair.key]=pair.value;
+return _139;
});
},toQueryString:function(){
return this.map(function(pair){
@@ -544,190 +541,190 @@ return "#<Hash:{"+this.map(function(pair){
return pair.map(Object.inspect).join(": ");
}).join(", ")+"}>";
}};
-function $H(_141){
-var hash=Object.extend({},_141||{});
+function $H(_140){
+var hash=Object.extend({},_140||{});
Object.extend(hash,Enumerable);
Object.extend(hash,Hash);
return hash;
}
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
-Object.extend(ObjectRange.prototype,{initialize:function(_142,end,_144){
-this.start=_142;
+Object.extend(ObjectRange.prototype,{initialize:function(_141,end,_143){
+this.start=_141;
this.end=end;
-this.exclusive=_144;
-},_each:function(_145){
-var _146=this.start;
+this.exclusive=_143;
+},_each:function(_144){
+var _145=this.start;
do{
-_145(_146);
-_146=_146.succ();
-}while(this.include(_146));
-},include:function(_147){
-if(_147<this.start){
+_144(_145);
+_145=_145.succ();
+}while(this.include(_145));
+},include:function(_146){
+if(_146<this.start){
return false;
}
if(this.exclusive){
-return _147<this.end;
+return _146<this.end;
}
-return _147<=this.end;
+return _146<=this.end;
}});
-var $R=function(_148,end,_149){
-return new ObjectRange(_148,end,_149);
+var $R=function(_147,end,_148){
+return new ObjectRange(_147,end,_148);
};
-document.getElementsByClassName=function(_150,_151){
-var _152=($(_151)||document.body).getElementsByTagName("*");
-return $A(_152).inject([],function(_153,_154){
-if(_154.className.match(new RegExp("(^|\\s)"+_150+"(\\s|$)"))){
-_153.push(_154);
+document.getElementsByClassName=function(_149,_150){
+var _151=($(_150)||document.body).getElementsByTagName("*");
+return $A(_151).inject([],function(_152,_153){
+if(_153.className.match(new RegExp("(^|\\s)"+_149+"(\\s|$)"))){
+_152.push(_153);
}
-return _153;
+return _152;
});
};
if(!window.Element){
var Element=new Object();
}
-Object.extend(Element,{visible:function(_155){
-return $(_155).style.display!="none";
+Object.extend(Element,{visible:function(_154){
+return $(_154).style.display!="none";
},toggle:function(){
for(var i=0;i<arguments.length;i++){
-var _156=$(arguments[i]);
-Element[Element.visible(_156)?"hide":"show"](_156);
+var _155=$(arguments[i]);
+Element[Element.visible(_155)?"hide":"show"](_155);
}
},hide:function(){
for(var i=0;i<arguments.length;i++){
-var _157=$(arguments[i]);
-_157.style.display="none";
+var _156=$(arguments[i]);
+_156.style.display="none";
}
},show:function(){
for(var i=0;i<arguments.length;i++){
-var _158=$(arguments[i]);
-_158.style.display="";
-}
-},remove:function(_159){
-_159=$(_159);
-_159.parentNode.removeChild(_159);
-},update:function(_160,html){
-$(_160).innerHTML=html.stripScripts();
+var _157=$(arguments[i]);
+_157.style.display="";
+}
+},remove:function(_158){
+_158=$(_158);
+_158.parentNode.removeChild(_158);
+},update:function(_159,html){
+$(_159).innerHTML=html.stripScripts();
setTimeout(function(){
html.evalScripts();
},10);
-},getHeight:function(_162){
-_162=$(_162);
-return _162.offsetHeight;
-},classNames:function(_163){
-return new Element.ClassNames(_163);
-},hasClassName:function(_164,_165){
-if(!(_164=$(_164))){
+},getHeight:function(_161){
+_161=$(_161);
+return _161.offsetHeight;
+},classNames:function(_162){
+return new Element.ClassNames(_162);
+},hasClassName:function(_163,_164){
+if(!(_163=$(_163))){
return;
}
-return Element.classNames(_164).include(_165);
-},addClassName:function(_166,_167){
-if(!(_166=$(_166))){
+return Element.classNames(_163).include(_164);
+},addClassName:function(_165,_166){
+if(!(_165=$(_165))){
return;
}
-return Element.classNames(_166).add(_167);
-},removeClassName:function(_168,_169){
-if(!(_168=$(_168))){
+return Element.classNames(_165).add(_166);
+},removeClassName:function(_167,_168){
+if(!(_167=$(_167))){
return;
}
-return Element.classNames(_168).remove(_169);
-},cleanWhitespace:function(_170){
-_170=$(_170);
-for(var i=0;i<_170.childNodes.length;i++){
-var node=_170.childNodes[i];
+return Element.classNames(_167).remove(_168);
+},cleanWhitespace:function(_169){
+_169=$(_169);
+for(var i=0;i<_169.childNodes.length;i++){
+var node=_169.childNodes[i];
if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
Element.remove(node);
}
}
-},empty:function(_172){
-return $(_172).innerHTML.match(/^\s*$/);
-},scrollTo:function(_173){
-_173=$(_173);
-var x=_173.x?_173.x:_173.offsetLeft,y=_173.y?_173.y:_173.offsetTop;
+},empty:function(_171){
+return $(_171).innerHTML.match(/^\s*$/);
+},scrollTo:function(_172){
+_172=$(_172);
+var x=_172.x?_172.x:_172.offsetLeft,y=_172.y?_172.y:_172.offsetTop;
window.scrollTo(x,y);
-},getStyle:function(_174,_175){
-_174=$(_174);
-var _176=_174.style[_175.camelize()];
-if(!_176){
+},getStyle:function(_173,_174){
+_173=$(_173);
+var _175=_173.style[_174.camelize()];
+if(!_175){
if(document.defaultView&&document.defaultView.getComputedStyle){
-var css=document.defaultView.getComputedStyle(_174,null);
-_176=css?css.getPropertyValue(_175):null;
+var css=document.defaultView.getComputedStyle(_173,null);
+_175=css?css.getPropertyValue(_174):null;
}else{
-if(_174.currentStyle){
-_176=_174.currentStyle[_175.camelize()];
+if(_173.currentStyle){
+_175=_173.currentStyle[_174.camelize()];
}
}
}
-if(window.opera&&["left","top","right","bottom"].include(_175)){
-if(Element.getStyle(_174,"position")=="static"){
-_176="auto";
+if(window.opera&&["left","top","right","bottom"].include(_174)){
+if(Element.getStyle(_173,"position")=="static"){
+_175="auto";
}
}
-return _176=="auto"?null:_176;
-},setStyle:function(_178,_179){
-_178=$(_178);
-for(name in _179){
-_178.style[name.camelize()]=_179[name];
+return _175=="auto"?null:_175;
+},setStyle:function(_177,_178){
+_177=$(_177);
+for(name in _178){
+_177.style[name.camelize()]=_178[name];
}
-},getDimensions:function(_180){
-_180=$(_180);
-if(Element.getStyle(_180,"display")!="none"){
-return {width:_180.offsetWidth,height:_180.offsetHeight};
+},getDimensions:function(_179){
+_179=$(_179);
+if(Element.getStyle(_179,"display")!="none"){
+return {width:_179.offsetWidth,height:_179.offsetHeight};
}
-var els=_180.style;
-var _182=els.visibility;
-var _183=els.position;
+var els=_179.style;
+var _181=els.visibility;
+var _182=els.position;
els.visibility="hidden";
els.position="absolute";
els.display="";
-var _184=_180.clientWidth;
-var _185=_180.clientHeight;
+var _183=_179.clientWidth;
+var _184=_179.clientHeight;
els.display="none";
-els.position=_183;
-els.visibility=_182;
-return {width:_184,height:_185};
-},makePositioned:function(_186){
-_186=$(_186);
-var pos=Element.getStyle(_186,"position");
+els.position=_182;
+els.visibility=_181;
+return {width:_183,height:_184};
+},makePositioned:function(_185){
+_185=$(_185);
+var pos=Element.getStyle(_185,"position");
if(pos=="static"||!pos){
-_186._madePositioned=true;
-_186.style.position="relative";
+_185._madePositioned=true;
+_185.style.position="relative";
if(window.opera){
-_186.style.top=0;
-_186.style.left=0;
+_185.style.top=0;
+_185.style.left=0;
}
}
-},undoPositioned:function(_188){
-_188=$(_188);
-if(_188._madePositioned){
-_188._madePositioned=undefined;
-_188.style.position=_188.style.top=_188.style.left=_188.style.bottom=_188.style.right="";
+},undoPositioned:function(_187){
+_187=$(_187);
+if(_187._madePositioned){
+_187._madePositioned=undefined;
+_187.style.position=_187.style.top=_187.style.left=_187.style.bottom=_187.style.right="";
}
-},makeClipping:function(_189){
-_189=$(_189);
-if(_189._overflow){
+},makeClipping:function(_188){
+_188=$(_188);
+if(_188._overflow){
return;
}
-_189._overflow=_189.style.overflow;
-if((Element.getStyle(_189,"overflow")||"visible")!="hidden"){
-_189.style.overflow="hidden";
+_188._overflow=_188.style.overflow;
+if((Element.getStyle(_188,"overflow")||"visible")!="hidden"){
+_188.style.overflow="hidden";
}
-},undoClipping:function(_190){
-_190=$(_190);
-if(_190._overflow){
+},undoClipping:function(_189){
+_189=$(_189);
+if(_189._overflow){
return;
}
-_190.style.overflow=_190._overflow;
-_190._overflow=undefined;
+_189.style.overflow=_189._overflow;
+_189._overflow=undefined;
}});
var Toggle=new Object();
Toggle.display=Element.toggle;
-Abstract.Insertion=function(_191){
-this.adjacency=_191;
+Abstract.Insertion=function(_190){
+this.adjacency=_190;
};
-Abstract.Insertion.prototype={initialize:function(_192,_193){
-this.element=$(_192);
-this.content=_193.stripScripts();
+Abstract.Insertion.prototype={initialize:function(_191,_192){
+this.element=$(_191);
+this.content=_192.stripScripts();
if(this.adjacency&&this.element.insertAdjacentHTML){
try{
this.element.insertAdjacentHTML(this.adjacency,this.content);
@@ -747,7 +744,7 @@ this.initializeRange();
this.insertContent([this.range.createContextualFragment(this.content)]);
}
setTimeout(function(){
-_193.evalScripts();
+_192.evalScripts();
},10);
},contentFromAnonymousTable:function(){
var div=document.createElement("div");
@@ -758,71 +755,71 @@ var Insertion=new Object();
Insertion.Before=Class.create();
Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){
this.range.setStartBefore(this.element);
-},insertContent:function(_194){
-_194.each((function(_195){
-this.element.parentNode.insertBefore(_195,this.element);
+},insertContent:function(_193){
+_193.each((function(_194){
+this.element.parentNode.insertBefore(_194,this.element);
}).bind(this));
}});
Insertion.Top=Class.create();
Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(true);
-},insertContent:function(_196){
-_196.reverse(false).each((function(_197){
-this.element.insertBefore(_197,this.element.firstChild);
+},insertContent:function(_195){
+_195.reverse(false).each((function(_196){
+this.element.insertBefore(_196,this.element.firstChild);
}).bind(this));
}});
Insertion.Bottom=Class.create();
Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(this.element);
-},insertContent:function(_198){
-_198.each((function(_199){
-this.element.appendChild(_199);
+},insertContent:function(_197){
+_197.each((function(_198){
+this.element.appendChild(_198);
}).bind(this));
}});
Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){
this.range.setStartAfter(this.element);
-},insertContent:function(_200){
-_200.each((function(_201){
-this.element.parentNode.insertBefore(_201,this.element.nextSibling);
+},insertContent:function(_199){
+_199.each((function(_200){
+this.element.parentNode.insertBefore(_200,this.element.nextSibling);
}).bind(this));
}});
Element.ClassNames=Class.create();
-Element.ClassNames.prototype={initialize:function(_202){
-this.element=$(_202);
-},_each:function(_203){
+Element.ClassNames.prototype={initialize:function(_201){
+this.element=$(_201);
+},_each:function(_202){
this.element.className.split(/\s+/).select(function(name){
return name.length>0;
-})._each(_203);
-},set:function(_205){
-this.element.className=_205;
-},add:function(_206){
-if(this.include(_206)){
+})._each(_202);
+},set:function(_204){
+this.element.className=_204;
+},add:function(_205){
+if(this.include(_205)){
return;
}
-this.set(this.toArray().concat(_206).join(" "));
-},remove:function(_207){
-if(!this.include(_207)){
+this.set(this.toArray().concat(_205).join(" "));
+},remove:function(_206){
+if(!this.include(_206)){
return;
}
-this.set(this.select(function(_208){
-return _208!=_207;
+this.set(this.select(function(_207){
+return _207!=_206;
}).join(" "));
},toString:function(){
return this.toArray().join(" ");
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
-Object.extend(Element,{condClassName:function(_209,_210,cond){
-(cond?Element.addClassName:Element.removeClassName)(_209,_210);
+Object.extend(Element,{condClassName:function(_208,_209,cond){
+(cond?Element.addClassName:Element.removeClassName)(_208,_209);
}});
var Field={clear:function(){
for(var i=0;i<arguments.length;i++){
$(arguments[i]).value="";
}
-},focus:function(_212){
-$(_212).focus();
+},focus:function(_211){
+$(_211).focus();
},present:function(){
for(var i=0;i<arguments.length;i++){
if($(arguments[i]).value==""){
@@ -830,156 +827,156 @@ return false;
}
}
return true;
-},select:function(_213){
-$(_213).select();
-},activate:function(_214){
-_214=$(_214);
-_214.focus();
-if(_214.select){
-_214.select();
+},select:function(_212){
+$(_212).select();
+},activate:function(_213){
+_213=$(_213);
+_213.focus();
+if(_213.select){
+_213.select();
}
}};
var Form={serialize:function(form){
-var _216=Form.getElements($(form));
-var _217=new Array();
-for(var i=0;i<_216.length;i++){
-var _218=Form.Element.serialize(_216[i]);
-if(_218){
-_217.push(_218);
+var _215=Form.getElements($(form));
+var _216=new Array();
+for(var i=0;i<_215.length;i++){
+var _217=Form.Element.serialize(_215[i]);
+if(_217){
+_216.push(_217);
}
}
-return _217.join("&");
+return _216.join("&");
},getElements:function(form){
form=$(form);
-var _219=new Array();
+var _218=new Array();
for(tagName in Form.Element.Serializers){
-var _220=form.getElementsByTagName(tagName);
-for(var j=0;j<_220.length;j++){
-_219.push(_220[j]);
+var _219=form.getElementsByTagName(tagName);
+for(var j=0;j<_219.length;j++){
+_218.push(_219[j]);
}
}
-return _219;
-},getInputs:function(form,_222,name){
+return _218;
+},getInputs:function(form,_221,name){
form=$(form);
-var _223=form.getElementsByTagName("input");
-if(!_222&&!name){
-return _223;
-}
-var _224=new Array();
-for(var i=0;i<_223.length;i++){
-var _225=_223[i];
-if((_222&&_225.type!=_222)||(name&&_225.name!=name)){
+var _222=form.getElementsByTagName("input");
+if(!_221&&!name){
+return _222;
+}
+var _223=new Array();
+for(var i=0;i<_222.length;i++){
+var _224=_222[i];
+if((_221&&_224.type!=_221)||(name&&_224.name!=name)){
continue;
}
-_224.push(_225);
+_223.push(_224);
}
-return _224;
+return _223;
},disable:function(form){
-var _226=Form.getElements(form);
-for(var i=0;i<_226.length;i++){
-var _227=_226[i];
-_227.blur();
-_227.disabled="true";
+var _225=Form.getElements(form);
+for(var i=0;i<_225.length;i++){
+var _226=_225[i];
+_226.blur();
+_226.disabled="true";
}
},enable:function(form){
-var _228=Form.getElements(form);
-for(var i=0;i<_228.length;i++){
-var _229=_228[i];
-_229.disabled="";
+var _227=Form.getElements(form);
+for(var i=0;i<_227.length;i++){
+var _228=_227[i];
+_228.disabled="";
}
},findFirstElement:function(form){
-return Form.getElements(form).find(function(_230){
-return _230.type!="hidden"&&!_230.disabled&&["input","select","textarea"].include(_230.tagName.toLowerCase());
+return Form.getElements(form).find(function(_229){
+return _229.type!="hidden"&&!_229.disabled&&["input","select","textarea"].include(_229.tagName.toLowerCase());
});
},focusFirstElement:function(form){
Field.activate(Form.findFirstElement(form));
},reset:function(form){
$(form).reset();
}};
-Form.Element={serialize:function(_231){
-_231=$(_231);
-var _232=_231.tagName.toLowerCase();
-var _233=Form.Element.Serializers[_232](_231);
-if(_233){
-var key=encodeURIComponent(_233[0]);
+Form.Element={serialize:function(_230){
+_230=$(_230);
+var _231=_230.tagName.toLowerCase();
+var _232=Form.Element.Serializers[_231](_230);
+if(_232){
+var key=encodeURIComponent(_232[0]);
if(key.length==0){
return;
}
-if(_233[1].constructor!=Array){
-_233[1]=[_233[1]];
+if(_232[1].constructor!=Array){
+_232[1]=[_232[1]];
}
-return _233[1].map(function(_235){
-return key+"="+encodeURIComponent(_235);
+return _232[1].map(function(_234){
+return key+"="+encodeURIComponent(_234);
}).join("&");
}
-},getValue:function(_236){
-_236=$(_236);
-var _237=_236.tagName.toLowerCase();
-var _238=Form.Element.Serializers[_237](_236);
-if(_238){
-return _238[1];
+},getValue:function(_235){
+_235=$(_235);
+var _236=_235.tagName.toLowerCase();
+var _237=Form.Element.Serializers[_236](_235);
+if(_237){
+return _237[1];
}
}};
-Form.Element.Serializers={input:function(_239){
-switch(_239.type.toLowerCase()){
+Form.Element.Serializers={input:function(_238){
+switch(_238.type.toLowerCase()){
case "submit":
case "hidden":
case "password":
case "text":
-return Form.Element.Serializers.textarea(_239);
+return Form.Element.Serializers.textarea(_238);
case "checkbox":
case "radio":
-return Form.Element.Serializers.inputSelector(_239);
+return Form.Element.Serializers.inputSelector(_238);
}
return false;
-},inputSelector:function(_240){
-if(_240.checked){
-return [_240.name,_240.value];
+},inputSelector:function(_239){
+if(_239.checked){
+return [_239.name,_239.value];
}
-},textarea:function(_241){
-return [_241.name,_241.value];
-},select:function(_242){
-return Form.Element.Serializers[_242.type=="select-one"?"selectOne":"selectMany"](_242);
-},selectOne:function(_243){
-var _244="",opt,index=_243.selectedIndex;
+},textarea:function(_240){
+return [_240.name,_240.value];
+},select:function(_241){
+return Form.Element.Serializers[_241.type=="select-one"?"selectOne":"selectMany"](_241);
+},selectOne:function(_242){
+var _243="",opt,index=_242.selectedIndex;
if(index>=0){
-opt=_243.options[index];
-_244=opt.value;
-if(!_244&&!("value" in opt)){
-_244=opt.text;
+opt=_242.options[index];
+_243=opt.value;
+if(!_243&&!("value" in opt)){
+_243=opt.text;
}
}
-return [_243.name,_244];
-},selectMany:function(_245){
-var _246=new Array();
-for(var i=0;i<_245.length;i++){
-var opt=_245.options[i];
+return [_242.name,_243];
+},selectMany:function(_244){
+var _245=new Array();
+for(var i=0;i<_244.length;i++){
+var opt=_244.options[i];
if(opt.selected){
-var _248=opt.value;
-if(!_248&&!("value" in opt)){
-_248=opt.text;
+var _247=opt.value;
+if(!_247&&!("value" in opt)){
+_247=opt.text;
}
-_246.push(_248);
+_245.push(_247);
}
}
-return [_245.name,_246];
+return [_244.name,_245];
}};
var $F=Form.Element.getValue;
Abstract.TimedObserver=function(){
};
-Abstract.TimedObserver.prototype={initialize:function(_249,_250,_251){
-this.frequency=_250;
-this.element=$(_249);
-this.callback=_251;
+Abstract.TimedObserver.prototype={initialize:function(_248,_249,_250){
+this.frequency=_249;
+this.element=$(_248);
+this.callback=_250;
this.lastValue=this.getValue();
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
-var _252=this.getValue();
-if(this.lastValue!=_252){
-this.callback(this.element,_252);
-this.lastValue=_252;
+var _251=this.getValue();
+if(this.lastValue!=_251){
+this.callback(this.element,_251);
+this.lastValue=_251;
}
}};
Form.Element.Observer=Class.create();
@@ -992,9 +989,9 @@ return Form.serialize(this.element);
}});
Abstract.EventObserver=function(){
};
-Abstract.EventObserver.prototype={initialize:function(_253,_254){
-this.element=$(_253);
-this.callback=_254;
+Abstract.EventObserver.prototype={initialize:function(_252,_253){
+this.element=$(_252);
+this.callback=_253;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){
this.registerFormCallbacks();
@@ -1002,29 +999,29 @@ this.registerFormCallbacks();
this.registerCallback(this.element);
}
},onElementEvent:function(){
-var _255=this.getValue();
-if(this.lastValue!=_255){
-this.callback(this.element,_255);
-this.lastValue=_255;
+var _254=this.getValue();
+if(this.lastValue!=_254){
+this.callback(this.element,_254);
+this.lastValue=_254;
}
},registerFormCallbacks:function(){
-var _256=Form.getElements(this.element);
-for(var i=0;i<_256.length;i++){
-this.registerCallback(_256[i]);
+var _255=Form.getElements(this.element);
+for(var i=0;i<_255.length;i++){
+this.registerCallback(_255[i]);
}
-},registerCallback:function(_257){
-if(_257.type){
-switch(_257.type.toLowerCase()){
+},registerCallback:function(_256){
+if(_256.type){
+switch(_256.type.toLowerCase()){
case "checkbox":
case "radio":
-Event.observe(_257,"click",this.onElementEvent.bind(this));
+Event.observe(_256,"click",this.onElementEvent.bind(this));
break;
case "password":
case "text":
case "textarea":
case "select-one":
case "select-multiple":
-Event.observe(_257,"change",this.onElementEvent.bind(this));
+Event.observe(_256,"change",this.onElementEvent.bind(this));
break;
}
}
@@ -1040,39 +1037,39 @@ return Form.serialize(this.element);
if(!window.Event){
var Event=new Object();
}
-Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(_258){
-return _258.target||_258.srcElement;
-},isLeftClick:function(_259){
-return (((_259.which)&&(_259.which==1))||((_259.button)&&(_259.button==1)));
-},pointerX:function(_260){
-return _260.pageX||(_260.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
-},pointerY:function(_261){
-return _261.pageY||(_261.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
-},stop:function(_262){
-if(_262.preventDefault){
-_262.preventDefault();
-_262.stopPropagation();
+Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(_257){
+return _257.target||_257.srcElement;
+},isLeftClick:function(_258){
+return (((_258.which)&&(_258.which==1))||((_258.button)&&(_258.button==1)));
+},pointerX:function(_259){
+return _259.pageX||(_259.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
+},pointerY:function(_260){
+return _260.pageY||(_260.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
+},stop:function(_261){
+if(_261.preventDefault){
+_261.preventDefault();
+_261.stopPropagation();
}else{
-_262.returnValue=false;
-_262.cancelBubble=true;
+_261.returnValue=false;
+_261.cancelBubble=true;
}
-},findElement:function(_263,_264){
-var _265=Event.element(_263);
-while(_265.parentNode&&(!_265.tagName||(_265.tagName.toUpperCase()!=_264.toUpperCase()))){
-_265=_265.parentNode;
+},findElement:function(_262,_263){
+var _264=Event.element(_262);
+while(_264.parentNode&&(!_264.tagName||(_264.tagName.toUpperCase()!=_263.toUpperCase()))){
+_264=_264.parentNode;
}
-return _265;
-},observers:false,_observeAndCache:function(_266,name,_267,_268){
+return _264;
+},observers:false,_observeAndCache:function(_265,name,_266,_267){
if(!this.observers){
this.observers=[];
}
-if(_266.addEventListener){
-this.observers.push([_266,name,_267,_268]);
-_266.addEventListener(name,_267,_268);
+if(_265.addEventListener){
+this.observers.push([_265,name,_266,_267]);
+_265.addEventListener(name,_266,_267);
}else{
-if(_266.attachEvent){
-this.observers.push([_266,name,_267,_268]);
-_266.attachEvent("on"+name,_267);
+if(_265.attachEvent){
+this.observers.push([_265,name,_266,_267]);
+_265.attachEvent("on"+name,_266);
}
}
},unloadCache:function(){
@@ -1084,24 +1081,24 @@ Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
-},observe:function(_269,name,_270,_271){
-var _269=$(_269);
-_271=_271||false;
-if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_269.attachEvent)){
+},observe:function(_268,name,_269,_270){
+var _268=$(_268);
+_270=_270||false;
+if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_268.attachEvent)){
name="keydown";
}
-this._observeAndCache(_269,name,_270,_271);
-},stopObserving:function(_272,name,_273,_274){
-var _272=$(_272);
-_274=_274||false;
-if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_272.detachEvent)){
+this._observeAndCache(_268,name,_269,_270);
+},stopObserving:function(_271,name,_272,_273){
+var _271=$(_271);
+_273=_273||false;
+if(name=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||_271.detachEvent)){
name="keydown";
}
-if(_272.removeEventListener){
-_272.removeEventListener(name,_273,_274);
+if(_271.removeEventListener){
+_271.removeEventListener(name,_272,_273);
}else{
-if(_272.detachEvent){
-_272.detachEvent("on"+name,_273);
+if(_271.detachEvent){
+_271.detachEvent("on"+name,_272);
}
}
}});
@@ -1109,38 +1106,38 @@ Event.observe(window,"unload",Event.unloadCache,false);
Object.extend(Event,{OnLoad:function(fn){
var w=document.addEventListener&&!window.addEventListener?document:window;
Event.__observe(w,"load",fn);
-},observe:function(_277,name,_278,_279){
-if(!isList(_277)){
-return this.__observe(_277,name,_278,_279);
+},observe:function(_276,name,_277,_278){
+if(!isList(_276)){
+return this.__observe(_276,name,_277,_278);
}
-for(var i=0;i<_277.length;i++){
-this.__observe(_277[i],name,_278,_279);
+for(var i=0;i<_276.length;i++){
+this.__observe(_276[i],name,_277,_278);
}
-},__observe:function(_280,name,_281,_282){
-var _280=$(_280);
-_282=_282||false;
-if(name=="keypress"&&((navigator.appVersion.indexOf("AppleWebKit")>0)||_280.attachEvent)){
+},__observe:function(_279,name,_280,_281){
+var _279=$(_279);
+_281=_281||false;
+if(name=="keypress"&&((navigator.appVersion.indexOf("AppleWebKit")>0)||_279.attachEvent)){
name="keydown";
}
-this._observeAndCache(_280,name,_281,_282);
+this._observeAndCache(_279,name,_280,_281);
},keyCode:function(e){
return e.keyCode!=null?e.keyCode:e.charCode;
},isHTMLEvent:function(type){
-var _285=["abort","blur","change","error","focus","load","reset","resize","scroll","select","submit","unload"];
-return _285.include(type);
+var _284=["abort","blur","change","error","focus","load","reset","resize","scroll","select","submit","unload"];
+return _284.include(type);
},isMouseEvent:function(type){
-var _286=["click","mousedown","mousemove","mouseout","mouseover","mouseup"];
-return _286.include(type);
-},fireEvent:function(_287,type){
-_287=$(_287);
+var _285=["click","mousedown","mousemove","mouseout","mouseover","mouseup"];
+return _285.include(type);
+},fireEvent:function(_286,type){
+_286=$(_286);
if(document.createEvent){
if(Event.isHTMLEvent(type)){
-var _288=document.createEvent("HTMLEvents");
-_288.initEvent(type,true,true);
+var _287=document.createEvent("HTMLEvents");
+_287.initEvent(type,true,true);
}else{
if(Event.isMouseEvent(type)){
-var _288=document.createEvent("MouseEvents");
-_288.initMouseEvent(type,true,true,document.defaultView,1,0,0,0,0,false,false,false,false,0,null);
+var _287=document.createEvent("MouseEvents");
+_287.initMouseEvent(type,true,true,document.defaultView,1,0,0,0,0,false,false,false,false,0,null);
}else{
if(Logger){
Logger.error("undefined event",type);
@@ -1148,263 +1145,263 @@ Logger.error("undefined event",type);
return;
}
}
-_287.dispatchEvent(_288);
+_286.dispatchEvent(_287);
}else{
-if(_287.fireEvent){
-_287.fireEvent("on"+type);
-_287[type]();
+if(_286.fireEvent){
+_286.fireEvent("on"+type);
+_286[type]();
}else{
-_287[type]();
+_286[type]();
}
}
}});
var Position={includeScrollOffsets:false,prepare:function(){
this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;
this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;
-},realOffset:function(_289){
-var _290=0,valueL=0;
+},realOffset:function(_288){
+var _289=0,valueL=0;
do{
-_290+=_289.scrollTop||0;
-valueL+=_289.scrollLeft||0;
-_289=_289.parentNode;
-}while(_289);
-return [valueL,_290];
-},cumulativeOffset:function(_291){
-var _292=0,valueL=0;
+_289+=_288.scrollTop||0;
+valueL+=_288.scrollLeft||0;
+_288=_288.parentNode;
+}while(_288);
+return [valueL,_289];
+},cumulativeOffset:function(_290){
+var _291=0,valueL=0;
do{
-_292+=_291.offsetTop||0;
-valueL+=_291.offsetLeft||0;
-_291=_291.offsetParent;
-}while(_291);
-return [valueL,_292];
-},positionedOffset:function(_293){
-var _294=0,valueL=0;
+_291+=_290.offsetTop||0;
+valueL+=_290.offsetLeft||0;
+_290=_290.offsetParent;
+}while(_290);
+return [valueL,_291];
+},positionedOffset:function(_292){
+var _293=0,valueL=0;
do{
-_294+=_293.offsetTop||0;
-valueL+=_293.offsetLeft||0;
-_293=_293.offsetParent;
-if(_293){
-p=Element.getStyle(_293,"position");
+_293+=_292.offsetTop||0;
+valueL+=_292.offsetLeft||0;
+_292=_292.offsetParent;
+if(_292){
+p=Element.getStyle(_292,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
-}while(_293);
-return [valueL,_294];
-},offsetParent:function(_295){
-if(_295.offsetParent){
-return _295.offsetParent;
+}while(_292);
+return [valueL,_293];
+},offsetParent:function(_294){
+if(_294.offsetParent){
+return _294.offsetParent;
}
-if(_295==document.body){
-return _295;
+if(_294==document.body){
+return _294;
}
-while((_295=_295.parentNode)&&_295!=document.body){
-if(Element.getStyle(_295,"position")!="static"){
-return _295;
+while((_294=_294.parentNode)&&_294!=document.body){
+if(Element.getStyle(_294,"position")!="static"){
+return _294;
}
}
return document.body;
-},within:function(_296,x,y){
+},within:function(_295,x,y){
if(this.includeScrollOffsets){
-return this.withinIncludingScrolloffsets(_296,x,y);
+return this.withinIncludingScrolloffsets(_295,x,y);
}
this.xcomp=x;
this.ycomp=y;
-this.offset=this.cumulativeOffset(_296);
-return (y>=this.offset[1]&&y<this.offset[1]+_296.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_296.offsetWidth);
-},withinIncludingScrolloffsets:function(_298,x,y){
-var _299=this.realOffset(_298);
-this.xcomp=x+_299[0]-this.deltaX;
-this.ycomp=y+_299[1]-this.deltaY;
-this.offset=this.cumulativeOffset(_298);
-return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_298.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_298.offsetWidth);
-},overlap:function(mode,_301){
+this.offset=this.cumulativeOffset(_295);
+return (y>=this.offset[1]&&y<this.offset[1]+_295.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_295.offsetWidth);
+},withinIncludingScrolloffsets:function(_297,x,y){
+var _298=this.realOffset(_297);
+this.xcomp=x+_298[0]-this.deltaX;
+this.ycomp=y+_298[1]-this.deltaY;
+this.offset=this.cumulativeOffset(_297);
+return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_297.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_297.offsetWidth);
+},overlap:function(mode,_300){
if(!mode){
return 0;
}
if(mode=="vertical"){
-return ((this.offset[1]+_301.offsetHeight)-this.ycomp)/_301.offsetHeight;
+return ((this.offset[1]+_300.offsetHeight)-this.ycomp)/_300.offsetHeight;
}
if(mode=="horizontal"){
-return ((this.offset[0]+_301.offsetWidth)-this.xcomp)/_301.offsetWidth;
+return ((this.offset[0]+_300.offsetWidth)-this.xcomp)/_300.offsetWidth;
}
-},clone:function(_302,_303){
+},clone:function(_301,_302){
+_301=$(_301);
_302=$(_302);
-_303=$(_303);
-_303.style.position="absolute";
-var _304=this.cumulativeOffset(_302);
-_303.style.top=_304[1]+"px";
-_303.style.left=_304[0]+"px";
-_303.style.width=_302.offsetWidth+"px";
-_303.style.height=_302.offsetHeight+"px";
-},page:function(_305){
-var _306=0,valueL=0;
-var _307=_305;
+_302.style.position="absolute";
+var _303=this.cumulativeOffset(_301);
+_302.style.top=_303[1]+"px";
+_302.style.left=_303[0]+"px";
+_302.style.width=_301.offsetWidth+"px";
+_302.style.height=_301.offsetHeight+"px";
+},page:function(_304){
+var _305=0,valueL=0;
+var _306=_304;
do{
-_306+=_307.offsetTop||0;
-valueL+=_307.offsetLeft||0;
-if(_307.offsetParent==document.body){
-if(Element.getStyle(_307,"position")=="absolute"){
+_305+=_306.offsetTop||0;
+valueL+=_306.offsetLeft||0;
+if(_306.offsetParent==document.body){
+if(Element.getStyle(_306,"position")=="absolute"){
break;
}
}
-}while(_307=_307.offsetParent);
-_307=_305;
+}while(_306=_306.offsetParent);
+_306=_304;
do{
-_306-=_307.scrollTop||0;
-valueL-=_307.scrollLeft||0;
-}while(_307=_307.parentNode);
-return [valueL,_306];
-},clone:function(_308,_309){
-var _310=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
+_305-=_306.scrollTop||0;
+valueL-=_306.scrollLeft||0;
+}while(_306=_306.parentNode);
+return [valueL,_305];
+},clone:function(_307,_308){
+var _309=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
+_307=$(_307);
+var p=Position.page(_307);
_308=$(_308);
-var p=Position.page(_308);
-_309=$(_309);
-var _311=[0,0];
-var _312=null;
-if(Element.getStyle(_309,"position")=="absolute"){
-_312=Position.offsetParent(_309);
-_311=Position.page(_312);
+var _310=[0,0];
+var _311=null;
+if(Element.getStyle(_308,"position")=="absolute"){
+_311=Position.offsetParent(_308);
+_310=Position.page(_311);
}
-if(_312==document.body){
-_311[0]-=document.body.offsetLeft;
-_311[1]-=document.body.offsetTop;
+if(_311==document.body){
+_310[0]-=document.body.offsetLeft;
+_310[1]-=document.body.offsetTop;
}
-if(_310.setLeft){
-_309.style.left=(p[0]-_311[0]+_310.offsetLeft)+"px";
+if(_309.setLeft){
+_308.style.left=(p[0]-_310[0]+_309.offsetLeft)+"px";
}
-if(_310.setTop){
-_309.style.top=(p[1]-_311[1]+_310.offsetTop)+"px";
+if(_309.setTop){
+_308.style.top=(p[1]-_310[1]+_309.offsetTop)+"px";
}
-if(_310.setWidth){
-_309.style.width=_308.offsetWidth+"px";
+if(_309.setWidth){
+_308.style.width=_307.offsetWidth+"px";
}
-if(_310.setHeight){
-_309.style.height=_308.offsetHeight+"px";
+if(_309.setHeight){
+_308.style.height=_307.offsetHeight+"px";
}
-},absolutize:function(_313){
-_313=$(_313);
-if(_313.style.position=="absolute"){
+},absolutize:function(_312){
+_312=$(_312);
+if(_312.style.position=="absolute"){
return;
}
Position.prepare();
-var _314=Position.positionedOffset(_313);
-var top=_314[1];
-var left=_314[0];
-var _316=_313.clientWidth;
-var _317=_313.clientHeight;
-_313._originalLeft=left-parseFloat(_313.style.left||0);
-_313._originalTop=top-parseFloat(_313.style.top||0);
-_313._originalWidth=_313.style.width;
-_313._originalHeight=_313.style.height;
-_313.style.position="absolute";
-_313.style.top=top+"px";
-_313.style.left=left+"px";
-_313.style.width=_316+"px";
-_313.style.height=_317+"px";
-},relativize:function(_318){
-_318=$(_318);
-if(_318.style.position=="relative"){
+var _313=Position.positionedOffset(_312);
+var top=_313[1];
+var left=_313[0];
+var _315=_312.clientWidth;
+var _316=_312.clientHeight;
+_312._originalLeft=left-parseFloat(_312.style.left||0);
+_312._originalTop=top-parseFloat(_312.style.top||0);
+_312._originalWidth=_312.style.width;
+_312._originalHeight=_312.style.height;
+_312.style.position="absolute";
+_312.style.top=top+"px";
+_312.style.left=left+"px";
+_312.style.width=_315+"px";
+_312.style.height=_316+"px";
+},relativize:function(_317){
+_317=$(_317);
+if(_317.style.position=="relative"){
return;
}
Position.prepare();
-_318.style.position="relative";
-var top=parseFloat(_318.style.top||0)-(_318._originalTop||0);
-var left=parseFloat(_318.style.left||0)-(_318._originalLeft||0);
-_318.style.top=top+"px";
-_318.style.left=left+"px";
-_318.style.height=_318._originalHeight;
-_318.style.width=_318._originalWidth;
+_317.style.position="relative";
+var top=parseFloat(_317.style.top||0)-(_317._originalTop||0);
+var left=parseFloat(_317.style.left||0)-(_317._originalLeft||0);
+_317.style.top=top+"px";
+_317.style.left=left+"px";
+_317.style.height=_317._originalHeight;
+_317.style.width=_317._originalWidth;
}};
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
-Position.cumulativeOffset=function(_319){
-var _320=0,valueL=0;
+Position.cumulativeOffset=function(_318){
+var _319=0,valueL=0;
do{
-_320+=_319.offsetTop||0;
-valueL+=_319.offsetLeft||0;
-if(_319.offsetParent==document.body){
-if(Element.getStyle(_319,"position")=="absolute"){
+_319+=_318.offsetTop||0;
+valueL+=_318.offsetLeft||0;
+if(_318.offsetParent==document.body){
+if(Element.getStyle(_318,"position")=="absolute"){
break;
}
}
-_319=_319.offsetParent;
-}while(_319);
-return [valueL,_320];
+_318=_318.offsetParent;
+}while(_318);
+return [valueL,_319];
};
}
-var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(_321){
-_321=_321.toUpperCase();
-var _322=this.NODEMAP[_321]||"div";
-var _323=document.createElement(_322);
+var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(_320){
+_320=_320.toUpperCase();
+var _321=this.NODEMAP[_320]||"div";
+var _322=document.createElement(_321);
try{
-_323.innerHTML="<"+_321+"></"+_321+">";
+_322.innerHTML="<"+_320+"></"+_320+">";
}
catch(e){
}
-var _324=_323.firstChild||null;
-if(_324&&(_324.tagName!=_321)){
-_324=_324.getElementsByTagName(_321)[0];
+var _323=_322.firstChild||null;
+if(_323&&(_323.tagName!=_320)){
+_323=_323.getElementsByTagName(_320)[0];
}
-if(!_324){
-_324=document.createElement(_321);
+if(!_323){
+_323=document.createElement(_320);
}
-if(!_324){
+if(!_323){
return;
}
if(arguments[1]){
if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)){
-this._children(_324,arguments[1]);
+this._children(_323,arguments[1]);
}else{
-var _325=this._attributes(arguments[1]);
-if(_325.length){
+var _324=this._attributes(arguments[1]);
+if(_324.length){
try{
-_323.innerHTML="<"+_321+" "+_325+"></"+_321+">";
+_322.innerHTML="<"+_320+" "+_324+"></"+_320+">";
}
catch(e){
}
-_324=_323.firstChild||null;
-if(!_324){
-_324=document.createElement(_321);
+_323=_322.firstChild||null;
+if(!_323){
+_323=document.createElement(_320);
for(attr in arguments[1]){
-_324[attr=="class"?"className":attr]=arguments[1][attr];
+_323[attr=="class"?"className":attr]=arguments[1][attr];
}
}
-if(_324.tagName!=_321){
-_324=_323.getElementsByTagName(_321)[0];
+if(_323.tagName!=_320){
+_323=_322.getElementsByTagName(_320)[0];
}
}
}
}
if(arguments[2]){
-this._children(_324,arguments[2]);
+this._children(_323,arguments[2]);
}
-return _324;
+return _323;
},_text:function(text){
return document.createTextNode(text);
-},_attributes:function(_327){
-var _328=[];
-for(attribute in _327){
-_328.push((attribute=="className"?"class":attribute)+"=\""+_327[attribute].toString().escapeHTML()+"\"");
-}
-return _328.join(" ");
-},_children:function(_329,_330){
-if(typeof _330=="object"){
-_330.flatten().each(function(e){
+},_attributes:function(_326){
+var _327=[];
+for(attribute in _326){
+_327.push((attribute=="className"?"class":attribute)+"=\""+_326[attribute].toString().escapeHTML()+"\"");
+}
+return _327.join(" ");
+},_children:function(_328,_329){
+if(typeof _329=="object"){
+_329.flatten().each(function(e){
if(typeof e=="object"){
-_329.appendChild(e);
+_328.appendChild(e);
}else{
if(Builder._isStringOrNumber(e)){
-_329.appendChild(Builder._text(e));
+_328.appendChild(Builder._text(e));
}
}
});
}else{
-if(Builder._isStringOrNumber(_330)){
-_329.appendChild(Builder._text(_330));
+if(Builder._isStringOrNumber(_329)){
+_328.appendChild(Builder._text(_329));
}
}
-},_isStringOrNumber:function(_331){
-return (typeof _331=="string"||typeof _331=="number");
+},_isStringOrNumber:function(_330){
+return (typeof _330=="string"||typeof _330=="number");
}};
Object.extend(Builder,{exportTags:function(){
var tags=["BUTTON","TT","PRE","H1","H2","H3","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","CAPTION"];
@@ -1424,7 +1421,7 @@ return Builder.node(tag,args.shift(),args);
});
}});
Builder.exportTags();
-Object.extend(Date.prototype,{SimpleFormat:function(_335,data){
+Object.extend(Date.prototype,{SimpleFormat:function(_334,data){
data=data||{};
var bits=new Array();
bits["d"]=this.getDate();
@@ -1437,11 +1434,11 @@ bits["MMM"]=data.AbbreviatedMonthNames[this.getMonth()];
if(data.MonthNames){
bits["MMMM"]=data.MonthNames[this.getMonth()];
}
-var _338=""+this.getFullYear();
-_338=(_338.length==2)?"19"+_338:_338;
-bits["yyyy"]=_338;
+var _337=""+this.getFullYear();
+_337=(_337.length==2)?"19"+_337:_337;
+bits["yyyy"]=_337;
bits["yy"]=bits["yyyy"].toString().substr(2,2);
-var frm=new String(_335);
+var frm=new String(_334);
for(var sect in bits){
var reg=new RegExp("\\b"+sect+"\\b","g");
frm=frm.replace(reg,bits[sect]);
@@ -1453,70 +1450,70 @@ var m=String(this.getMonth()+1).zerofill(2);
var d=String(this.getDate()).zerofill(2);
return String(y)+String(m)+String(d);
}});
-Object.extend(Date,{SimpleParse:function(_342,_343){
-val=String(_342);
-_343=String(_343);
+Object.extend(Date,{SimpleParse:function(_341,_342){
+val=String(_341);
+_342=String(_342);
if(val.length<=0){
return null;
}
-if(_343.length<=0){
-return new Date(_342);
+if(_342.length<=0){
+return new Date(_341);
}
-var _344=function(val){
-var _346="1234567890";
+var _343=function(val){
+var _345="1234567890";
for(var i=0;i<val.length;i++){
-if(_346.indexOf(val.charAt(i))==-1){
+if(_345.indexOf(val.charAt(i))==-1){
return false;
}
}
return true;
};
-var _347=function(str,i,_349,_350){
-for(var x=_350;x>=_349;x--){
-var _351=str.substring(i,i+x);
-if(_351.length<_349){
+var _346=function(str,i,_348,_349){
+for(var x=_349;x>=_348;x--){
+var _350=str.substring(i,i+x);
+if(_350.length<_348){
return null;
}
-if(_344(_351)){
-return _351;
+if(_343(_350)){
+return _350;
}
}
return null;
};
+var _351=0;
var _352=0;
-var _353=0;
var c="";
+var _354="";
var _355="";
-var _356="";
var x,y;
var now=new Date();
var year=now.getFullYear();
-var _359=now.getMonth()+1;
+var _358=now.getMonth()+1;
var date=1;
-while(_353<_343.length){
-c=_343.charAt(_353);
-_355="";
-while((_343.charAt(_353)==c)&&(_353<_343.length)){
-_355+=_343.charAt(_353++);
-}
-if(_355=="yyyy"||_355=="yy"||_355=="y"){
-if(_355=="yyyy"){
+while(_352<_342.length){
+c=_342.charAt(_352);
+_354="";
+while((_342.charAt(_352)==c)&&(_352<_342.length)){
+_354+=_342.charAt(_352++);
+}
+if(_354=="yyyy"||_354=="yy"||_354=="y"){
+if(_354=="yyyy"){
x=4;
y=4;
}
-if(_355=="yy"){
+if(_354=="yy"){
x=2;
y=2;
}
-if(_355=="y"){
+if(_354=="y"){
x=2;
y=4;
}
-year=_347(val,_352,x,y);
+year=_346(val,_351,x,y);
if(year==null){
return null;
}
-_352+=year.length;
+_351+=year.length;
if(year.length==2){
if(year>70){
year=1900+(year-0);
@@ -1525,33 +1522,33 @@ year=2000+(year-0);
}
}
}else{
-if(_355=="MM"||_355=="M"){
-_359=_347(val,_352,_355.length,2);
-if(_359==null||(_359<1)||(_359>12)){
+if(_354=="MM"||_354=="M"){
+_358=_346(val,_351,_354.length,2);
+if(_358==null||(_358<1)||(_358>12)){
return null;
}
-_352+=_359.length;
+_351+=_358.length;
}else{
-if(_355=="dd"||_355=="d"){
-date=_347(val,_352,_355.length,2);
+if(_354=="dd"||_354=="d"){
+date=_346(val,_351,_354.length,2);
if(date==null||(date<1)||(date>31)){
return null;
}
-_352+=date.length;
+_351+=date.length;
}else{
-if(val.substring(_352,_352+_355.length)!=_355){
+if(val.substring(_351,_351+_354.length)!=_354){
return null;
}else{
-_352+=_355.length;
+_351+=_354.length;
}
}
}
}
}
-if(_352!=val.length){
+if(_351!=val.length){
return null;
}
-if(_359==2){
+if(_358==2){
if(((year%4==0)&&(year%100!=0))||(year%400==0)){
if(date>29){
return null;
@@ -1562,18 +1559,18 @@ return null;
}
}
}
-if((_359==4)||(_359==6)||(_359==9)||(_359==11)){
+if((_358==4)||(_358==6)||(_358==9)||(_358==11)){
if(date>30){
return null;
}
}
-var _361=new Date(year,_359-1,date,0,0,0);
-return _361;
+var _360=new Date(year,_358-1,date,0,0,0);
+return _360;
}});
var Prado={Version:"3.0a",Browser:function(){
var info={Version:"1.0"};
-var _363=parseInt(navigator.appVersion);
-info.nver=_363;
+var _362=parseInt(navigator.appVersion);
+info.nver=_362;
info.ver=navigator.appVersion;
info.agent=navigator.userAgent;
info.dom=document.getElementById?1:0;
@@ -1584,7 +1581,7 @@ info.ie4=(document.all&&!info.dom&&!info.opera)?1:0;
info.ie=info.ie4||info.ie5||info.ie6;
info.mac=info.agent.indexOf("Mac")>-1;
info.ns6=(info.dom&&parseInt(info.ver)>=5)?1:0;
-info.ie3=(info.ver.indexOf("MSIE")&&(_363<4));
+info.ie3=(info.ver.indexOf("MSIE")&&(_362<4));
info.hotjava=(info.agent.toLowerCase().indexOf("hotjava")!=-1)?1:0;
info.ns4=(document.layers&&!info.dom&&!info.hotjava)?1:0;
info.bw=(info.ie6||info.ie5||info.ie4||info.ns4||info.ns6||info.opera);
@@ -1592,13 +1589,13 @@ info.ver3=(info.hotjava||info.ie3);
info.opera7=((info.agent.toLowerCase().indexOf("opera 7")>-1)||(info.agent.toLowerCase().indexOf("opera/7")>-1));
info.operaOld=info.opera&&!info.opera7;
return info;
-},ImportCss:function(doc,_365){
+},ImportCss:function(doc,_364){
if(Prado.Browser().ie){
-var _366=doc.createStyleSheet(_365);
+var _365=doc.createStyleSheet(_364);
}else{
var elm=doc.createElement("link");
elm.rel="stylesheet";
-elm.href=_365;
+elm.href=_364;
if(headArr=doc.getElementsByTagName("head")){
headArr[0].appendChild(elm);
}
@@ -1606,50 +1603,50 @@ headArr[0].appendChild(elm);
}};
Prado.Focus=Class.create();
Prado.Focus.setFocus=function(id){
-var _369=document.getElementById?document.getElementById(id):document.all[id];
-if(_369&&!Prado.Focus.canFocusOn(_369)){
-_369=Prado.Focus.findTarget(_369);
+var _368=document.getElementById?document.getElementById(id):document.all[id];
+if(_368&&!Prado.Focus.canFocusOn(_368)){
+_368=Prado.Focus.findTarget(_368);
}
-if(_369){
+if(_368){
try{
-_369.focus();
-_369.scrollIntoView(false);
+_368.focus();
+_368.scrollIntoView(false);
if(window.__smartNav){
-window.__smartNav.ae=_369.id;
+window.__smartNav.ae=_368.id;
}
}
catch(e){
}
}
};
-Prado.Focus.canFocusOn=function(_370){
-if(!_370||!(_370.tagName)){
+Prado.Focus.canFocusOn=function(_369){
+if(!_369||!(_369.tagName)){
return false;
}
-var _371=_370.tagName.toLowerCase();
-return !_370.disabled&&(!_370.type||_370.type.toLowerCase()!="hidden")&&Prado.Focus.isFocusableTag(_371)&&Prado.Focus.isVisible(_370);
+var _370=_369.tagName.toLowerCase();
+return !_369.disabled&&(!_369.type||_369.type.toLowerCase()!="hidden")&&Prado.Focus.isFocusableTag(_370)&&Prado.Focus.isVisible(_369);
};
-Prado.Focus.isFocusableTag=function(_372){
-return (_372=="input"||_372=="textarea"||_372=="select"||_372=="button"||_372=="a");
+Prado.Focus.isFocusableTag=function(_371){
+return (_371=="input"||_371=="textarea"||_371=="select"||_371=="button"||_371=="a");
};
-Prado.Focus.findTarget=function(_373){
-if(!_373||!(_373.tagName)){
+Prado.Focus.findTarget=function(_372){
+if(!_372||!(_372.tagName)){
return null;
}
-var _374=_373.tagName.toLowerCase();
-if(_374=="undefined"){
+var _373=_372.tagName.toLowerCase();
+if(_373=="undefined"){
return null;
}
-var _375=_373.childNodes;
-if(_375){
-for(var i=0;i<_375.length;i++){
+var _374=_372.childNodes;
+if(_374){
+for(var i=0;i<_374.length;i++){
try{
-if(Prado.Focus.canFocusOn(_375[i])){
-return _375[i];
+if(Prado.Focus.canFocusOn(_374[i])){
+return _374[i];
}else{
-var _376=Prado.Focus.findTarget(_375[i]);
-if(_376){
-return _376;
+var _375=Prado.Focus.findTarget(_374[i]);
+if(_375){
+return _375;
}
}
}
@@ -1659,55 +1656,56 @@ catch(e){
}
return null;
};
-Prado.Focus.isVisible=function(_377){
-var _378=_377;
-while((typeof (_378)!="undefined")&&(_378!=null)){
-if(_378.disabled||(typeof (_378.style)!="undefined"&&((typeof (_378.style.display)!="undefined"&&_378.style.display=="none")||(typeof (_378.style.visibility)!="undefined"&&_378.style.visibility=="hidden")))){
+Prado.Focus.isVisible=function(_376){
+var _377=_376;
+while((typeof (_377)!="undefined")&&(_377!=null)){
+if(_377.disabled||(typeof (_377.style)!="undefined"&&((typeof (_377.style.display)!="undefined"&&_377.style.display=="none")||(typeof (_377.style.visibility)!="undefined"&&_377.style.visibility=="hidden")))){
return false;
}
-if(typeof (_378.parentNode)!="undefined"&&_378.parentNode!=null&&_378.parentNode!=_378&&_378.parentNode.tagName.toLowerCase()!="body"){
-_378=_378.parentNode;
+if(typeof (_377.parentNode)!="undefined"&&_377.parentNode!=null&&_377.parentNode!=_377&&_377.parentNode.tagName.toLowerCase()!="body"){
+_377=_377.parentNode;
}else{
return true;
}
}
return true;
};
-Prado.PostBack=function(_379,_380){
-var form=$(_380["FormID"]);
+Prado.PostBack=function(_378,_379){
+var form=$(_379["FormID"]);
+var _380=true;
+if(_379["CausesValidation"]&&Prado.Validation){
var _381=true;
-if(_380["CausesValidation"]&&Prado.Validation){
-if(_380["ValidationGroup"]){
-Prado.Validation.SetActiveGroup(Event.element(_379),_380["ValidationGroup"]);
+if(_379["ValidationGroup"]){
+_381=Prado.Validation.ValidateValidationGroup(_379["ValidationGroup"]);
}else{
-Prado.Validation.SetActiveGroup(null,null);
+_381=Prado.Validation.ValidateNonGroup(form);
}
-if(Prado.Validation.IsValid(form)==false){
-if(_380["StopEvent"]){
-Event.stop(_379);
+if(!_381){
+if(_379["StopEvent"]){
+Event.stop(_378);
}
return;
}
}
-if(_380["PostBackUrl"]&&_380["PostBackUrl"].length>0){
-form.action=_380["PostBackUrl"];
+if(_379["PostBackUrl"]&&_379["PostBackUrl"].length>0){
+form.action=_379["PostBackUrl"];
}
-if(_380["TrackFocus"]){
+if(_379["TrackFocus"]){
var _382=$("PRADO_LASTFOCUS");
if(_382){
var _383=document.activeElement;
if(_383){
_382.value=_383.id;
}else{
-_382.value=_380["EventTarget"];
+_382.value=_379["EventTarget"];
}
}
}
-$("PRADO_POSTBACK_TARGET").value=_380["EventTarget"];
-$("PRADO_POSTBACK_PARAMETER").value=_380["EventParameter"];
+$("PRADO_POSTBACK_TARGET").value=_379["EventTarget"];
+$("PRADO_POSTBACK_PARAMETER").value=_379["EventParameter"];
Event.fireEvent(form,"submit");
-if(_380["StopEvent"]){
-Event.stop(_379);
+if(_379["StopEvent"]){
+Event.stop(_378);
}
};
Prado.Element={setValue:function(_384,_385){
@@ -1882,50 +1880,68 @@ Event.stop(_424);
Prado.PostBack(_429,_430);
}});
Prado.WebUI.TLinkButton=Prado.WebUI.ClickableComponent;
-Prado.WebUI.TImageButton=Prado.WebUI.ClickableComponent;
Prado.WebUI.TCheckBox=Prado.WebUI.ClickableComponent;
Prado.WebUI.TBulletedList=Prado.WebUI.ClickableComponent;
Prado.WebUI.TImageMap=Prado.WebUI.ClickableComponent;
+Prado.WebUI.TImageButton=Class.create();
+Object.extend(Prado.WebUI.TImageButton.prototype,Prado.WebUI.ClickableComponent.prototype);
+Object.extend(Prado.WebUI.TImageButton.prototype,{hasXYInput:false,onPostBack:function(_431,_432){
+if(!this.hasXYInput){
+this.addXYInput(_431,_432);
+this.hasXYInput=true;
+}
+Prado.PostBack(_431,_432);
+},addXYInput:function(_433,_434){
+var _435=Position.cumulativeOffset(this.element);
+var _436=[_433.clientX,_433.clientY];
+var x=_436[0]-_435[0]+1;
+var y=_436[1]-_435[1]+1;
+var id=_434["EventTarget"];
+var _437=INPUT({type:"hidden",name:id+"_x",value:x});
+var _438=INPUT({type:"hidden",name:id+"_y",value:y});
+this.element.parentNode.appendChild(_437);
+this.element.parentNode.appendChild(_438);
+}});
Prado.WebUI.TRadioButton=Prado.WebUI.createPostBackComponent(Prado.WebUI.ClickableComponent.prototype);
Prado.WebUI.TRadioButton.prototype.onRadioButtonInitialize=Prado.WebUI.TRadioButton.prototype.initialize;
-Object.extend(Prado.WebUI.TRadioButton.prototype,{initialize:function(_431){
-this.element=$(_431["ID"]);
+Object.extend(Prado.WebUI.TRadioButton.prototype,{initialize:function(_439){
+this.element=$(_439["ID"]);
if(!this.element.checked){
-this.onRadioButtonInitialize(_431);
+this.onRadioButtonInitialize(_439);
}
}});
-Prado.WebUI.TTextBox=Prado.WebUI.createPostBackComponent({onInit:function(_432){
-if(_432["TextMode"]!="MultiLine"){
+Prado.WebUI.TTextBox=Prado.WebUI.createPostBackComponent({onInit:function(_440){
+if(_440["TextMode"]!="MultiLine"){
Event.observe(this.element,"keydown",this.handleReturnKey.bind(this));
}
-Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,_432));
+Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,_440));
},handleReturnKey:function(e){
if(Event.keyCode(e)==Event.KEY_RETURN){
-var _433=Event.element(e);
-if(_433){
-Event.fireEvent(_433,"change");
+var _441=Event.element(e);
+if(_441){
+Event.fireEvent(_441,"change");
Event.stop(e);
}
}
}});
-Prado.WebUI.TListControl=Prado.WebUI.createPostBackComponent({onInit:function(_434){
-Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,_434));
+Prado.WebUI.TListControl=Prado.WebUI.createPostBackComponent({onInit:function(_442){
+Event.observe(this.element,"change",Prado.PostBack.bindEvent(this,_442));
}});
Prado.WebUI.TListBox=Prado.WebUI.TListControl;
Prado.WebUI.TDropDownList=Prado.WebUI.TListControl;
Prado.WebUI.DefaultButton=Class.create();
-Object.extend(Prado.WebUI.DefaultButton.prototype,{initialize:function(_435){
-this.options=_435;
+Object.extend(Prado.WebUI.DefaultButton.prototype,{initialize:function(_443){
+this.options=_443;
this._event=this.triggerEvent.bindEvent(this);
-Event.observe(_435["Panel"],"keydown",this._event);
-},triggerEvent:function(ev,_437){
-var _438=Event.keyCode(ev)==Event.KEY_RETURN;
-var _439=Event.element(ev).tagName.toLowerCase()=="textarea";
-if(_438&&!_439){
-var _440=$(this.options["Target"]);
-if(_440){
+Event.observe(_443["Panel"],"keydown",this._event);
+},triggerEvent:function(ev,_445){
+var _446=Event.keyCode(ev)==Event.KEY_RETURN;
+var _447=Event.element(ev).tagName.toLowerCase()=="textarea";
+if(_446&&!_447){
+var _448=$(this.options["Target"]);
+if(_448){
this.triggered=true;
-Event.fireEvent(_440,this.options["Event"]);
+Event.fireEvent(_448,this.options["Event"]);
Event.stop(ev);
}
}
@@ -1935,15 +1951,15 @@ Prado.WebUI.TTextHighlighter.prototype={initialize:function(id){
if(!window.clipboardData){
return;
}
-var _441={href:"javascript:;//copy code to clipboard",onclick:"Prado.WebUI.TTextHighlighter.copy(this)",onmouseover:"Prado.WebUI.TTextHighlighter.hover(this)",onmouseout:"Prado.WebUI.TTextHighlighter.out(this)"};
-var div=DIV({className:"copycode"},A(_441,"Copy Code"));
+var _449={href:"javascript:;//copy code to clipboard",onclick:"Prado.WebUI.TTextHighlighter.copy(this)",onmouseover:"Prado.WebUI.TTextHighlighter.hover(this)",onmouseout:"Prado.WebUI.TTextHighlighter.out(this)"};
+var div=DIV({className:"copycode"},A(_449,"Copy Code"));
document.write(DIV(null,div).innerHTML);
}};
Object.extend(Prado.WebUI.TTextHighlighter,{copy:function(obj){
-var _442=obj.parentNode.parentNode.parentNode;
+var _450=obj.parentNode.parentNode.parentNode;
var text="";
-for(var i=0;i<_442.childNodes.length;i++){
-var node=_442.childNodes[i];
+for(var i=0;i<_450.childNodes.length;i++){
+var node=_450.childNodes[i];
if(node.innerText){
text+=node.innerText=="Copy Code"?"":node.innerText;
}else{
@@ -1959,11 +1975,11 @@ obj.parentNode.className="copycode copycode_hover";
obj.parentNode.className="copycode";
}});
Prado.WebUI.TRatingList=Class.create();
-Prado.WebUI.TRatingList.prototype={selectedIndex:-1,initialize:function(_443){
-this.options=_443;
-this.element=$(_443["ID"]);
-Element.addClassName(this.element,_443.cssClass);
-this.radios=document.getElementsByName(_443.field);
+Prado.WebUI.TRatingList.prototype={selectedIndex:-1,initialize:function(_451){
+this.options=_451;
+this.element=$(_451["ID"]);
+Element.addClassName(this.element,_451.cssClass);
+this.radios=document.getElementsByName(_451.field);
for(var i=0;i<this.radios.length;i++){
Event.observe(this.radios[i].parentNode,"mouseover",this.hover.bindEvent(this,i));
Event.observe(this.radios[i].parentNode,"mouseout",this.recover.bindEvent(this,i));
@@ -1971,33 +1987,33 @@ Event.observe(this.radios[i].parentNode,"click",this.click.bindEvent(this,i));
}
this.caption=CAPTION();
this.element.appendChild(this.caption);
-this.selectedIndex=_443.selectedIndex;
+this.selectedIndex=_451.selectedIndex;
this.setRating(this.selectedIndex);
-},hover:function(ev,_444){
+},hover:function(ev,_452){
for(var i=0;i<this.radios.length;i++){
-this.radios[i].parentNode.className=(i<=_444)?"rating_hover":"";
+this.radios[i].parentNode.className=(i<=_452)?"rating_hover":"";
}
-this.setCaption(_444);
-},recover:function(ev,_445){
-for(var i=0;i<=_445;i++){
+this.setCaption(_452);
+},recover:function(ev,_453){
+for(var i=0;i<=_453;i++){
Element.removeClassName(this.radios[i].parentNode,"rating_hover");
}
this.setRating(this.selectedIndex);
-},click:function(ev,_446){
+},click:function(ev,_454){
for(var i=0;i<this.radios.length;i++){
-this.radios[i].checked=(i==_446);
+this.radios[i].checked=(i==_454);
}
-this.selectedIndex=_446;
-this.setRating(_446);
+this.selectedIndex=_454;
+this.setRating(_454);
if(isFunction(this.options.onChange)){
-this.options.onChange(this,_446);
+this.options.onChange(this,_454);
}
-},setRating:function(_447){
-for(var i=0;i<=_447;i++){
+},setRating:function(_455){
+for(var i=0;i<=_455;i++){
this.radios[i].parentNode.className="rating_selected";
}
-this.setCaption(_447);
-},setCaption:function(_448){
-this.caption.innerHTML=_448>-1?this.radios[_448].value:this.options.caption;
+this.setCaption(_455);
+},setCaption:function(_456){
+this.caption.innerHTML=_456>-1?this.radios[_456].value:this.options.caption;
}};
diff --git a/framework/Web/Javascripts/js/validator.js b/framework/Web/Javascripts/js/validator.js
index e1d0806a..b5321743 100644
--- a/framework/Web/Javascripts/js/validator.js
+++ b/framework/Web/Javascripts/js/validator.js
@@ -144,7 +144,7 @@ var _42=Prado.Validation.validators;
for(var i=0;i<_42.length;i++){
_42[i].enabled=!_42[i].control||undef(_42[i].control.form)||_42[i].control.form==_40;
_42[i].visible=Prado.Validation.IsGroupValidation?_42[i].inActiveGroup():true;
-if(Prado.Validation.HasTargetGroup){
+if(Prado.Validation.HasTargetGroup||_42[i].group){
if(_42[i].group!=Prado.Validation.CurrentTargetGroup){
_42[i].enabled=false;
}
diff --git a/framework/Web/Javascripts/prado/controls.js b/framework/Web/Javascripts/prado/controls.js
index 1d274fd8..0f736f91 100644
--- a/framework/Web/Javascripts/prado/controls.js
+++ b/framework/Web/Javascripts/prado/controls.js
@@ -69,12 +69,58 @@ Prado.WebUI.ClickableComponent = Prado.WebUI.createPostBackComponent(
});
Prado.WebUI.TLinkButton = Prado.WebUI.ClickableComponent;
-Prado.WebUI.TImageButton = Prado.WebUI.ClickableComponent;
Prado.WebUI.TCheckBox = Prado.WebUI.ClickableComponent;
Prado.WebUI.TBulletedList = Prado.WebUI.ClickableComponent;
Prado.WebUI.TImageMap = Prado.WebUI.ClickableComponent;
/**
+ * TImageButton client-side behaviour. With validation, Firefox needs
+ * to capture the x,y point of the clicked image in hidden form fields.
+ */
+Prado.WebUI.TImageButton = Class.create();
+Object.extend(Prado.WebUI.TImageButton.prototype,Prado.WebUI.ClickableComponent.prototype);
+Object.extend(Prado.WebUI.TImageButton.prototype,
+{
+ /**
+ * Only add the hidden inputs once.
+ */
+ hasXYInput : false,
+
+ /**
+ * Override parent onPostBack function, tried to add hidden forms
+ * inputs to capture x,y clicked point.
+ */
+ onPostBack : function(event, options)
+ {
+ if(!this.hasXYInput)
+ {
+ this.addXYInput(event,options);
+ this.hasXYInput = true;
+ }
+ Prado.PostBack(event, options);
+ },
+
+ /**
+ * Add hidden inputs to capture the x,y point clicked on the image.
+ * @param event DOM click event.
+ * @param array image button options.
+ */
+ addXYInput : function(event,options)
+ {
+ var imagePos = Position.cumulativeOffset(this.element);
+ var clickedPos = [event.clientX, event.clientY];
+ var x = clickedPos[0]-imagePos[0]+1;
+ var y = clickedPos[1]-imagePos[1]+1;
+ var id = options['EventTarget'];
+ var x_input = INPUT({type:'hidden',name:id+'_x',value:x});
+ var y_input = INPUT({type:'hidden',name:id+'_y',value:y});
+ this.element.parentNode.appendChild(x_input);
+ this.element.parentNode.appendChild(y_input);
+ }
+});
+
+
+/**
* Radio button, only initialize if not already checked.
*/
Prado.WebUI.TRadioButton = Prado.WebUI.createPostBackComponent(Prado.WebUI.ClickableComponent.prototype);
diff --git a/framework/Web/Javascripts/prado/form.js b/framework/Web/Javascripts/prado/form.js
index 059aab5f..d2286b23 100644
--- a/framework/Web/Javascripts/prado/form.js
+++ b/framework/Web/Javascripts/prado/form.js
@@ -104,11 +104,18 @@ Prado.PostBack = function(event,options)
var canSubmit = true;
if(options['CausesValidation'] && Prado.Validation)
{
+ var valid = true;
if(options['ValidationGroup'])
- Prado.Validation.SetActiveGroup(Event.element(event), options['ValidationGroup']);
+ {
+ valid = Prado.Validation.ValidateValidationGroup(options['ValidationGroup']);
+ // Prado.Validation.SetActiveGroup(Event.element(event), options['ValidationGroup']);
+ }
else
- Prado.Validation.SetActiveGroup(null,null);
- if(Prado.Validation.IsValid(form) == false)
+ {
+ valid = Prado.Validation.ValidateNonGroup(form);
+ }
+
+ if(!valid)
{
if(options['StopEvent']) Event.stop(event);
return;
diff --git a/framework/Web/Javascripts/prado/validation.js b/framework/Web/Javascripts/prado/validation.js
index e7e45b2c..ba68becc 100644
--- a/framework/Web/Javascripts/prado/validation.js
+++ b/framework/Web/Javascripts/prado/validation.js
@@ -301,7 +301,7 @@ Prado.Validation.IsValid = function(form)
//when group validation, only validators in the active group are visible.
validators[i].visible = Prado.Validation.IsGroupValidation ? validators[i].inActiveGroup() : true;
- if(Prado.Validation.HasTargetGroup)
+ if(Prado.Validation.HasTargetGroup || validators[i].group)
{
if(validators[i].group != Prado.Validation.CurrentTargetGroup)
validators[i].enabled = false;
@@ -739,6 +739,7 @@ Prado.Validation.ValidateValidationGroup= function(groupId)
return Prado.Validation.IsValid(target.form);
}
}
+
return true;
};
diff --git a/framework/Web/Javascripts/prototype/array.js b/framework/Web/Javascripts/prototype/array.js
index d23596cb..51ad864b 100644
--- a/framework/Web/Javascripts/prototype/array.js
+++ b/framework/Web/Javascripts/prototype/array.js
@@ -12,7 +12,7 @@ var $A = Array.from = function(iterable) {
Object.extend(Array.prototype, Enumerable);
-Array.prototype._reverse = Array.prototype.reverse;
+//Array.prototype._reverse = Array.prototype.reverse;
Object.extend(Array.prototype, {
_each: function(iterator) {
@@ -58,11 +58,12 @@ Object.extend(Array.prototype, {
if (this[i] == object) return i;
return -1;
},
-
+
+/*
reverse: function(inline) {
return (inline !== false ? this : this.toArray())._reverse();
},
-
+*/
shift: function() {
var result = this[0];
for (var i = 0; i < this.length - 1; i++)
diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php
index e5e5f3b9..655b1df0 100644
--- a/framework/Web/UI/WebControls/TImageButton.php
+++ b/framework/Web/UI/WebControls/TImageButton.php
@@ -124,6 +124,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven
$options['ID'] = $this->getClientID();
$options['CausesValidation'] = $this->getCausesValidation();
$options['ValidationGroup'] = $this->getValidationGroup();
+ $options['EventTarget'] = $this->getUniqueID();
return $options;
}
diff --git a/framework/Web/UI/WebControls/TMultiView.php b/framework/Web/UI/WebControls/TMultiView.php
index 5f4f3d84..6dd0d8f1 100644
--- a/framework/Web/UI/WebControls/TMultiView.php
+++ b/framework/Web/UI/WebControls/TMultiView.php
@@ -248,6 +248,16 @@ class TMultiView extends TControl
}
/**
+ * Loads state into the wizard.
+ * This method is invoked by the framework when the control state is being saved.
+ */
+ public function loadState()
+ {
+ // a dummy call to ensure the view is activated
+ $this->getActiveView();
+ }
+
+ /**
* Renders the currently active view.
* @param THtmlWriter the writer for the rendering purpose.
*/
diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php
index 426fd73d..794fb4da 100644
--- a/framework/Web/UI/WebControls/TWizard.php
+++ b/framework/Web/UI/WebControls/TWizard.php
@@ -735,16 +735,6 @@ class TWizard extends TWebControl implements INamingContainer
}
/**
- * Loads state into the wizard.
- * This method is invoked by the framework when the control state is being saved.
- */
- public function loadState()
- {
- // a dummy call to ensure the step is activated
- $this->getActiveStep();
- }
-
- /**
* Indicates the wizard needs to recreate all child controls.
*/
protected function requiresControlsRecreation()