You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2007/05/27 00:48:09 UTC

svn commit: r541946 [32/41] - in /tapestry/tapestry4/trunk: tapestry-examples/TimeTracker/ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-examples/Workbench/ tapestry-framework/ tapestry-framework/src/java/org/apache/tapestry/ tapestry-fra...

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/PopupContainer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/PopupContainer.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/PopupContainer.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/PopupContainer.js Sat May 26 15:47:41 2007
@@ -0,0 +1,284 @@
+dojo.provide("dojo.widget.PopupContainer");
+dojo.require("dojo.html.style");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.html.iframe");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.declare("dojo.widget.PopupContainerBase",null,function(){
+this.queueOnAnimationFinish=[];
+},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(_1){
+return false;
+},applyPopupBasicStyle:function(){
+with(this.domNode.style){
+display="none";
+position="absolute";
+}
+},aboutToShow:function(){
+},open:function(x,y,_4,_5,_6,_7){
+if(this.isShowingNow){
+return;
+}
+if(this.animationInProgress){
+this.queueOnAnimationFinish.push(this.open,arguments);
+return;
+}
+this.aboutToShow();
+var _8=false,_9,_a;
+if(typeof x=="object"){
+_9=x;
+_a=_5;
+_5=_4;
+_4=y;
+_8=true;
+}
+this.parent=_4;
+dojo.body().appendChild(this.domNode);
+_5=_5||_4["domNode"]||[];
+var _b=null;
+this.isTopLevel=true;
+while(_4){
+if(_4!==this&&(_4.setOpenedSubpopup!=undefined&&_4.applyPopupBasicStyle!=undefined)){
+_b=_4;
+this.isTopLevel=false;
+_b.setOpenedSubpopup(this);
+break;
+}
+_4=_4.parent;
+}
+this.parentPopup=_b;
+this.popupIndex=_b?_b.popupIndex+1:1;
+if(this.isTopLevel){
+var _c=dojo.html.isNode(_5)?_5:null;
+dojo.widget.PopupManager.opened(this,_c);
+}
+if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
+this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark);
+}else{
+this._bookmark=null;
+}
+if(_5 instanceof Array){
+_5={left:_5[0],top:_5[1],width:0,height:0};
+}
+with(this.domNode.style){
+display="";
+zIndex=this.beginZIndex+this.popupIndex;
+}
+if(_8){
+this.move(_9,_7,_a);
+}else{
+this.move(x,y,_7,_6);
+}
+this.domNode.style.display="none";
+this.explodeSrc=_5;
+this.show();
+this.isShowingNow=true;
+},move:function(x,y,_f,_10){
+var _11=(typeof x=="object");
+if(_11){
+var _12=_f;
+var _13=x;
+_f=y;
+if(!_12){
+_12={"BL":"TL","TL":"BL"};
+}
+dojo.html.placeOnScreenAroundElement(this.domNode,_13,_f,this.aroundBox,_12);
+}else{
+if(!_10){
+_10="TL,TR,BL,BR";
+}
+dojo.html.placeOnScreen(this.domNode,x,y,_f,true,_10);
+}
+},close:function(_14){
+if(_14){
+this.domNode.style.display="none";
+}
+if(this.animationInProgress){
+this.queueOnAnimationFinish.push(this.close,[]);
+return;
+}
+this.closeSubpopup(_14);
+this.hide();
+if(this.bgIframe){
+this.bgIframe.hide();
+this.bgIframe.size({left:0,top:0,width:0,height:0});
+}
+if(this.isTopLevel){
+dojo.widget.PopupManager.closed(this);
+}
+this.isShowingNow=false;
+if(this.parent){
+setTimeout(dojo.lang.hitch(this,function(){
+try{
+if(this.parent["focus"]){
+this.parent.focus();
+}else{
+this.parent.domNode.focus();
+}
+}
+catch(e){
+dojo.debug("No idea how to focus to parent",e);
+}
+}),10);
+}
+if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
+if(this.openedForWindow){
+this.openedForWindow.focus();
+}
+try{
+dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
+}
+catch(e){
+}
+}
+this._bookmark=null;
+},closeAll:function(_15){
+if(this.parentPopup){
+this.parentPopup.closeAll(_15);
+}else{
+this.close(_15);
+}
+},setOpenedSubpopup:function(_16){
+this.currentSubpopup=_16;
+},closeSubpopup:function(_17){
+if(this.currentSubpopup==null){
+return;
+}
+this.currentSubpopup.close(_17);
+this.currentSubpopup=null;
+},onShow:function(){
+dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
+this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
+if(dojo.render.html.ie){
+if(!this.bgIframe){
+this.bgIframe=new dojo.html.BackgroundIframe();
+this.bgIframe.setZIndex(this.domNode);
+}
+this.bgIframe.size(this.domNode);
+this.bgIframe.show();
+}
+this.processQueue();
+},processQueue:function(){
+if(!this.queueOnAnimationFinish.length){
+return;
+}
+var _18=this.queueOnAnimationFinish.shift();
+var _19=this.queueOnAnimationFinish.shift();
+_18.apply(this,_19);
+},onHide:function(){
+dojo.widget.HtmlWidget.prototype.onHide.call(this);
+if(this.openedSize){
+with(this.domNode.style){
+width=this.openedSize.w;
+height=this.openedSize.h;
+}
+}
+this.processQueue();
+}});
+dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{isContainer:true,fillInTemplate:function(){
+this.applyPopupBasicStyle();
+dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments);
+}});
+dojo.widget.PopupManager=new function(){
+this.currentMenu=null;
+this.currentButton=null;
+this.currentFocusMenu=null;
+this.focusNode=null;
+this.registeredWindows=[];
+this.registerWin=function(win){
+if(!win.__PopupManagerRegistered){
+dojo.event.connect(win.document,"onmousedown",this,"onClick");
+dojo.event.connect(win,"onscroll",this,"onClick");
+dojo.event.connect(win.document,"onkey",this,"onKey");
+win.__PopupManagerRegistered=true;
+this.registeredWindows.push(win);
+}
+};
+this.registerAllWindows=function(_1b){
+if(!_1b){
+_1b=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
+}
+this.registerWin(_1b);
+for(var i=0;i<_1b.frames.length;i++){
+try{
+var win=dojo.html.getDocumentWindow(_1b.frames[i].document);
+if(win){
+this.registerAllWindows(win);
+}
+}
+catch(e){
+}
+}
+};
+this.unRegisterWin=function(win){
+if(win.__PopupManagerRegistered){
+dojo.event.disconnect(win.document,"onmousedown",this,"onClick");
+dojo.event.disconnect(win,"onscroll",this,"onClick");
+dojo.event.disconnect(win.document,"onkey",this,"onKey");
+win.__PopupManagerRegistered=false;
+}
+};
+this.unRegisterAllWindows=function(){
+for(var i=0;i<this.registeredWindows.length;++i){
+this.unRegisterWin(this.registeredWindows[i]);
+}
+this.registeredWindows=[];
+};
+dojo.addOnLoad(this,"registerAllWindows");
+dojo.addOnUnload(this,"unRegisterAllWindows");
+this.closed=function(_20){
+if(this.currentMenu==_20){
+this.currentMenu=null;
+this.currentButton=null;
+this.currentFocusMenu=null;
+}
+};
+this.opened=function(_21,_22){
+if(_21==this.currentMenu){
+return;
+}
+if(this.currentMenu){
+this.currentMenu.close();
+}
+this.currentMenu=_21;
+this.currentFocusMenu=_21;
+this.currentButton=_22;
+};
+this.setFocusedMenu=function(_23){
+this.currentFocusMenu=_23;
+};
+this.onKey=function(e){
+if(!e.key){
+return;
+}
+if(!this.currentMenu||!this.currentMenu.isShowingNow){
+return;
+}
+var m=this.currentFocusMenu;
+while(m){
+if(m.processKey(e)){
+e.preventDefault();
+e.stopPropagation();
+break;
+}
+m=m.parentPopup||m.parentMenu;
+}
+},this.onClick=function(e){
+if(!this.currentMenu){
+return;
+}
+var _27=dojo.html.getScroll().offset;
+var m=this.currentMenu;
+while(m){
+if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){
+return;
+}
+m=m.currentSubpopup;
+}
+if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){
+return;
+}
+this.currentMenu.closeAll(true);
+};
+};

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/PopupContainer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/PopupContainer.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/PopupContainer.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ProgressBar.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ProgressBar.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ProgressBar.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ProgressBar.js Sat May 26 15:47:41 2007
@@ -0,0 +1,174 @@
+dojo.provide("dojo.widget.ProgressBar");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.event");
+dojo.require("dojo.dom");
+dojo.require("dojo.html.style");
+dojo.require("dojo.string.*");
+dojo.require("dojo.lfx.*");
+dojo.widget.defineWidget("dojo.widget.ProgressBar",dojo.widget.HtmlWidget,{progressValue:0,maxProgressValue:100,width:300,height:30,frontPercentClass:"frontPercent",backPercentClass:"backPercent",frontBarClass:"frontBar",backBarClass:"backBar",hasText:false,isVertical:false,showOnlyIntegers:false,dataSource:"",pollInterval:3000,duration:1000,templateString:"<div dojoAttachPoint=\"containerNode\" style=\"position:relative;overflow:hidden\">\n\t<div style=\"position:absolute;display:none;width:100%;text-align:center\" dojoAttachPoint=\"backPercentLabel\" class=\"dojoBackPercentLabel\"></div>\n\t<div style=\"position:absolute;overflow:hidden;width:100%;height:100%\" dojoAttachPoint=\"internalProgress\">\n\t<div style=\"position:absolute;display:none;width:100%;text-align:center\" dojoAttachPoint=\"frontPercentLabel\" class=\"dojoFrontPercentLabel\"></div></div>\n</div>\n",templateCssString:".backBar{\n\tborder:1px solid #84a3d1;\n}\n.frontBar{\n\tbackground:url(\"images/bar.gif
 \") repeat bottom left;\n\tbackground-attachment: fixed;\n}\n.h-frontBar{\n\tbackground:url(\"images/h-bar.gif\") repeat bottom left;\n\tbackground-attachment: fixed;\n}\n.simpleFrontBar{\n\tbackground: red;\n}\n.frontPercent,.backPercent{\n\tfont:bold 13px helvetica;\n}\n.backPercent{\n\tcolor:#293a4b;\n}\n.frontPercent{\n\tcolor:#fff;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ProgressBar.css"),containerNode:null,internalProgress:null,_pixelUnitRatio:0,_pixelPercentRatio:0,_unitPercentRatio:0,_unitPixelRatio:0,_floatDimension:0,_intDimension:0,_progressPercentValue:"0%",_floatMaxProgressValue:0,_dimension:"width",_pixelValue:0,_oInterval:null,_animation:null,_animationStopped:true,_progressValueBak:false,_hasTextBak:false,fillInTemplate:function(_1,_2){
+this.internalProgress.className=this.frontBarClass;
+this.containerNode.className=this.backBarClass;
+if(this.isVertical){
+this.internalProgress.style.bottom="0px";
+this.internalProgress.style.left="0px";
+this._dimension="height";
+}else{
+this.internalProgress.style.top="0px";
+this.internalProgress.style.left="0px";
+this._dimension="width";
+}
+this.frontPercentLabel.className=this.frontPercentClass;
+this.backPercentLabel.className=this.backPercentClass;
+this.progressValue=""+this.progressValue;
+this.domNode.style.height=this.height+"px";
+this.domNode.style.width=this.width+"px";
+this._intDimension=parseInt("0"+eval("this."+this._dimension));
+this._floatDimension=parseFloat("0"+eval("this."+this._dimension));
+this._pixelPercentRatio=this._floatDimension/100;
+this.setMaxProgressValue(this.maxProgressValue,true);
+this.setProgressValue(dojo.string.trim(this.progressValue),true);
+dojo.debug("float dimension: "+this._floatDimension);
+dojo.debug("this._unitPixelRatio: "+this._unitPixelRatio);
+this.showText(this.hasText);
+},showText:function(_3){
+if(_3){
+this.backPercentLabel.style.display="block";
+this.frontPercentLabel.style.display="block";
+}else{
+this.backPercentLabel.style.display="none";
+this.frontPercentLabel.style.display="none";
+}
+this.hasText=_3;
+},postCreate:function(_4,_5){
+this.render();
+},_backupValues:function(){
+this._progressValueBak=this.progressValue;
+this._hasTextBak=this.hasText;
+},_restoreValues:function(){
+this.setProgressValue(this._progressValueBak);
+this.showText(this._hasTextBak);
+},_setupAnimation:function(){
+var _6=this;
+dojo.debug("internalProgress width: "+this.internalProgress.style.width);
+this._animation=dojo.lfx.html.slideTo(this.internalProgress,{top:0,left:parseInt(this.width)-parseInt(this.internalProgress.style.width)},parseInt(this.duration),null,function(){
+var _7=dojo.lfx.html.slideTo(_6.internalProgress,{top:0,left:0},parseInt(_6.duration));
+dojo.event.connect(_7,"onEnd",function(){
+if(!_6._animationStopped){
+_6._animation.play();
+}
+});
+if(!_6._animationStopped){
+_7.play();
+}
+_7=null;
+});
+},getMaxProgressValue:function(){
+return this.maxProgressValue;
+},setMaxProgressValue:function(_8,_9){
+if(!this._animationStopped){
+return;
+}
+this.maxProgressValue=_8;
+this._floatMaxProgressValue=parseFloat("0"+this.maxProgressValue);
+this._pixelUnitRatio=this._floatDimension/this.maxProgressValue;
+this._unitPercentRatio=this._floatMaxProgressValue/100;
+this._unitPixelRatio=this._floatMaxProgressValue/this._floatDimension;
+this.setProgressValue(this.progressValue,true);
+if(!_9){
+this.render();
+}
+},setProgressValue:function(_a,_b){
+if(!this._animationStopped){
+return;
+}
+this._progressPercentValue="0%";
+var _c=dojo.string.trim(""+_a);
+var _d=parseFloat("0"+_c);
+var _e=parseInt("0"+_c);
+var _f=0;
+if(dojo.string.endsWith(_c,"%",false)){
+this._progressPercentValue=Math.min(_d.toFixed(1),100)+"%";
+_c=Math.min((_d)*this._unitPercentRatio,this.maxProgressValue);
+_f=Math.min((_d)*this._pixelPercentRatio,eval("this."+this._dimension));
+}else{
+this.progressValue=Math.min(_d,this.maxProgressValue);
+this._progressPercentValue=Math.min((_d/this._unitPercentRatio).toFixed(1),100)+"%";
+_f=Math.min(_d/this._unitPixelRatio,eval("this."+this._dimension));
+}
+this.progressValue=dojo.string.trim(_c);
+this._pixelValue=_f;
+if(!_b){
+this.render();
+}
+},getProgressValue:function(){
+return this.progressValue;
+},getProgressPercentValue:function(){
+return this._progressPercentValue;
+},setDataSource:function(_10){
+this.dataSource=_10;
+},setPollInterval:function(_11){
+this.pollInterval=_11;
+},start:function(){
+var _12=dojo.lang.hitch(this,this._showRemoteProgress);
+this._oInterval=setInterval(_12,this.pollInterval);
+},startAnimation:function(){
+if(this._animationStopped){
+this._backupValues();
+this.setProgressValue("10%");
+this._animationStopped=false;
+this._setupAnimation();
+this.showText(false);
+this.internalProgress.style.height="105%";
+this._animation.play();
+}
+},stopAnimation:function(){
+if(this._animation){
+this._animationStopped=true;
+this._animation.stop();
+this.internalProgress.style.height="100%";
+this.internalProgress.style.left="0px";
+this._restoreValues();
+this._setLabelPosition();
+}
+},_showRemoteProgress:function(){
+var _13=this;
+if((this.getMaxProgressValue()==this.getProgressValue())&&this._oInterval){
+clearInterval(this._oInterval);
+this._oInterval=null;
+this.setProgressValue("100%");
+return;
+}
+var _14={url:_13.dataSource,method:"POST",mimetype:"text/json",error:function(_15,_16){
+dojo.debug("[ProgressBar] showRemoteProgress error");
+},load:function(_17,_18,evt){
+_13.setProgressValue((_13._oInterval?_18["progress"]:"100%"));
+}};
+dojo.io.bind(_14);
+},render:function(){
+this._setPercentLabel(dojo.string.trim(this._progressPercentValue));
+this._setPixelValue(this._pixelValue);
+this._setLabelPosition();
+},_setLabelPosition:function(){
+var _1a=dojo.html.getContentBox(this.frontPercentLabel).width;
+var _1b=dojo.html.getContentBox(this.frontPercentLabel).height;
+var _1c=dojo.html.getContentBox(this.backPercentLabel).width;
+var _1d=dojo.html.getContentBox(this.backPercentLabel).height;
+var _1e=(parseInt(this.width)-_1a)/2+"px";
+var _1f=(parseInt(this.height)-parseInt(_1b))/2+"px";
+var _20=(parseInt(this.width)-_1c)/2+"px";
+var _21=(parseInt(this.height)-parseInt(_1d))/2+"px";
+this.frontPercentLabel.style.left=_1e;
+this.backPercentLabel.style.left=_20;
+this.frontPercentLabel.style.bottom=_1f;
+this.backPercentLabel.style.bottom=_21;
+},_setPercentLabel:function(_22){
+dojo.dom.removeChildren(this.frontPercentLabel);
+dojo.dom.removeChildren(this.backPercentLabel);
+var _23=this.showOnlyIntegers==false?_22:parseInt(_22)+"%";
+this.frontPercentLabel.appendChild(document.createTextNode(_23));
+this.backPercentLabel.appendChild(document.createTextNode(_23));
+},_setPixelValue:function(_24){
+eval("this.internalProgress.style."+this._dimension+" = "+_24+" + 'px'");
+this.onChange();
+},onChange:function(){
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ProgressBar.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ProgressBar.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ProgressBar.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RadioGroup.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RadioGroup.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RadioGroup.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RadioGroup.js Sat May 26 15:47:41 2007
@@ -0,0 +1,109 @@
+dojo.provide("dojo.widget.RadioGroup");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.event.browser");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.widget.defineWidget("dojo.widget.RadioGroup",dojo.widget.HtmlWidget,function(){
+this.selectedItem=null;
+this.items=[];
+this.selected=[];
+this.groupCssClass="radioGroup";
+this.selectedCssClass="selected";
+this.itemContentCssClass="itemContent";
+},{isContainer:false,templatePath:null,templateCssPath:null,postCreate:function(){
+this._parseStructure();
+dojo.html.addClass(this.domNode,this.groupCssClass);
+this._setupChildren();
+dojo.event.browser.addListener(this.domNode,"onclick",dojo.lang.hitch(this,"onSelect"));
+if(this.selectedItem){
+this._selectItem(this.selectedItem);
+}
+},_parseStructure:function(){
+if(this.domNode.tagName.toLowerCase()!="ul"&&this.domNode.tagName.toLowerCase()!="ol"){
+dojo.raise("RadioGroup: Expected ul or ol content.");
+return;
+}
+this.items=[];
+var nl=this.domNode.getElementsByTagName("li");
+for(var i=0;i<nl.length;i++){
+if(nl[i].parentNode==this.domNode){
+this.items.push(nl[i]);
+}
+}
+},add:function(_3){
+if(_3.parentNode!=this.domNode){
+this.domNode.appendChild(_3);
+}
+this.items.push(_3);
+this._setup(_3);
+},remove:function(_4){
+var _5=-1;
+for(var i=0;i<this.items.length;i++){
+if(this.items[i]==_4){
+_5=i;
+break;
+}
+}
+if(_5<0){
+return;
+}
+this.items.splice(_5,1);
+_4.parentNode.removeChild(_4);
+},clear:function(){
+for(var i=0;i<this.items.length;i++){
+this.domNode.removeChild(this.items[i]);
+}
+this.items=[];
+},clearSelections:function(){
+for(var i=0;i<this.items.length;i++){
+dojo.html.removeClass(this.items[i],this.selectedCssClass);
+}
+this.selectedItem=null;
+},_setup:function(_9){
+var _a=document.createElement("span");
+dojo.html.disableSelection(_a);
+dojo.html.addClass(_a,this.itemContentCssClass);
+dojo.dom.moveChildren(_9,_a);
+_9.appendChild(_a);
+if(this.selected.length>0){
+var _b=dojo.html.getAttribute(_9,"id");
+if(_b&&_b==this.selected){
+this.selectedItem=_9;
+}
+}
+dojo.event.browser.addListener(_9,"onclick",dojo.lang.hitch(this,"onItemSelect"));
+if(dojo.html.hasAttribute(_9,"onitemselect")){
+var tn=dojo.lang.nameAnonFunc(new Function(dojo.html.getAttribute(_9,"onitemselect")),this);
+dojo.event.browser.addListener(_9,"onclick",dojo.lang.hitch(this,tn));
+}
+},_setupChildren:function(){
+for(var i=0;i<this.items.length;i++){
+this._setup(this.items[i]);
+}
+},_selectItem:function(_e,_f,_10){
+if(this.selectedItem){
+dojo.html.removeClass(this.selectedItem,this.selectedCssClass);
+}
+this.selectedItem=_e;
+dojo.html.addClass(this.selectedItem,this.selectedCssClass);
+if(!dj_undef("currentTarget",_f)){
+return;
+}
+if(!_10){
+if(dojo.render.html.ie){
+this.selectedItem.fireEvent("onclick");
+}else{
+var e=document.createEvent("MouseEvents");
+e.initEvent("click",true,false);
+this.selectedItem.dispatchEvent(e);
+}
+}
+},getValue:function(){
+return this.selectedItem;
+},onSelect:function(e){
+},onItemSelect:function(e){
+if(!dj_undef("currentTarget",e)){
+this._selectItem(e.currentTarget,e);
+}
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RadioGroup.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RadioGroup.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RadioGroup.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RealNumberTextbox.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RealNumberTextbox.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RealNumberTextbox.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RealNumberTextbox.js Sat May 26 15:47:41 2007
@@ -0,0 +1,37 @@
+dojo.provide("dojo.widget.RealNumberTextbox");
+dojo.require("dojo.widget.IntegerTextbox");
+dojo.require("dojo.validate.common");
+dojo.widget.defineWidget("dojo.widget.RealNumberTextbox",dojo.widget.IntegerTextbox,{mixInProperties:function(_1,_2){
+dojo.widget.RealNumberTextbox.superclass.mixInProperties.apply(this,arguments);
+if(_1.places){
+this.flags.places=Number(_1.places);
+}
+if((_1.exponent=="true")||(_1.exponent=="always")){
+this.flags.exponent=true;
+}else{
+if((_1.exponent=="false")||(_1.exponent=="never")){
+this.flags.exponent=false;
+}else{
+this.flags.exponent=[true,false];
+}
+}
+if((_1.esigned=="true")||(_1.esigned=="always")){
+this.flags.eSigned=true;
+}else{
+if((_1.esigned=="false")||(_1.esigned=="never")){
+this.flags.eSigned=false;
+}else{
+this.flags.eSigned=[true,false];
+}
+}
+if(_1.min){
+this.flags.min=parseFloat(_1.min);
+}
+if(_1.max){
+this.flags.max=parseFloat(_1.max);
+}
+},isValid:function(){
+return dojo.validate.isRealNumber(this.textbox.value,this.flags);
+},isInRange:function(){
+return dojo.validate.isInRange(this.textbox.value,this.flags);
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RealNumberTextbox.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RealNumberTextbox.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RealNumberTextbox.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RegexpTextbox.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RegexpTextbox.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RegexpTextbox.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RegexpTextbox.js Sat May 26 15:47:41 2007
@@ -0,0 +1,14 @@
+dojo.provide("dojo.widget.RegexpTextbox");
+dojo.require("dojo.widget.ValidationTextbox");
+dojo.widget.defineWidget("dojo.widget.RegexpTextbox",dojo.widget.ValidationTextbox,{mixInProperties:function(_1,_2){
+dojo.widget.RegexpTextbox.superclass.mixInProperties.apply(this,arguments);
+if(_1.regexp){
+this.flags.regexp=_1.regexp;
+}
+if(_1.flags){
+this.flags.flags=_1.flags;
+}
+},isValid:function(){
+var _3=new RegExp(this.flags.regexp,this.flags.flags);
+return _3.test(this.textbox.value);
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RegexpTextbox.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RegexpTextbox.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RegexpTextbox.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RemoteTabController.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RemoteTabController.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RemoteTabController.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RemoteTabController.js Sat May 26 15:47:41 2007
@@ -0,0 +1,15 @@
+dojo.provide("dojo.widget.RemoteTabController");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.TabContainer");
+dojo.require("dojo.event.*");
+dojo.deprecated("dojo.widget.RemoteTabController is slated for removal in 0.5; use PageController or TabController instead.","0.5");
+dojo.widget.defineWidget("dojo.widget.RemoteTabController",dojo.widget.TabController,{templateCssString:".dojoRemoteTabController {\n\tposition: relative;\n}\n\n.dojoRemoteTab {\n\tposition : relative;\n\tfloat : left;\n\tpadding-left : 9px;\n\tborder-bottom : 1px solid #6290d2;\n\tbackground : url(images/tab_left.gif) no-repeat left top;\n\tcursor: pointer;\n\twhite-space: nowrap;\n\tz-index: 3;\n}\n\n.dojoRemoteTab div {\n\tdisplay : block;\n\tpadding : 4px 15px 4px 6px;\n\tbackground : url(images/tab_top_right.gif) no-repeat right top;\n\tcolor : #333;\n\tfont-size : 90%;\n}\n\n.dojoRemoteTabPaneClose {\n\tposition : absolute;\n\tbottom : 0px;\n\tright : 6px;\n\theight : 12px;\n\twidth : 12px;\n\tbackground : url(images/tab_close.gif) no-repeat right top;\n}\n\n.dojoRemoteTabPaneCloseHover {\n\tbackground-image : url(images/tab_close_h.gif);\n}\n\n.dojoRemoteTabClose {\n\tdisplay : inline-block;\n\theight : 12px;\n\twidth : 12px;\n\tpadding : 0 12px 0 0;\n\tmargin : 0 -10
 px 0 10px;\n\tbackground : url(images/tab_close.gif) no-repeat right top;\n\tcursor : default;\n}\n\n.dojoRemoteTabCloseHover {\n\tbackground-image : url(images/tab_close_h.gif);\n}\n\n.dojoRemoteTab.current {\n\tpadding-bottom : 1px;\n\tborder-bottom : 0;\n\tbackground-position : 0 -150px;\n}\n\n.dojoRemoteTab.current div {\n\tpadding-bottom : 5px;\n\tmargin-bottom : -1px;\n\tbackground-position : 100% -150px;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/RemoteTabControl.css"),templateString:"<div dojoAttachPoint=\"domNode\" wairole=\"tablist\"></div>","class":"dojoRemoteTabController",tabContainer:"",postMixInProperties:function(){
+this.containerId=this.tabContainer;
+dojo.widget.RemoteTabController.superclass.postMixInProperties.apply(this,arguments);
+},fillInTemplate:function(){
+dojo.html.addClass(this.domNode,this["class"]);
+if(this.tabContainer){
+dojo.addOnLoad(dojo.lang.hitch(this,"setupTabs"));
+}
+dojo.widget.RemoteTabController.superclass.fillInTemplate.apply(this,arguments);
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RemoteTabController.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RemoteTabController.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RemoteTabController.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Repeater.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Repeater.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Repeater.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Repeater.js Sat May 26 15:47:41 2007
@@ -0,0 +1,115 @@
+dojo.provide("dojo.widget.Repeater");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.string");
+dojo.require("dojo.event.*");
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.widget.Repeater");
+dojo.widget.defineWidget("dojo.widget.Repeater",dojo.widget.HtmlWidget,{name:"",rowTemplate:"",myObject:null,pattern:"",useDnd:false,isContainer:true,initialize:function(_1,_2){
+var _3=this.getFragNodeRef(_2);
+_3.removeAttribute("dojotype");
+this.setRow(dojo.string.trim(_3.innerHTML),{});
+_3.innerHTML="";
+_2=null;
+},postCreate:function(_4,_5){
+if(this.useDnd){
+dojo.require("dojo.dnd.*");
+var _6=new dojo.dnd.HtmlDropTarget(this.domNode,[this.widgetId]);
+}
+},_reIndexRows:function(){
+for(var i=0,_8=this.domNode.childNodes.length;i<_8;i++){
+var _9=["INPUT","SELECT","TEXTAREA"];
+for(var k=0;k<_9.length;k++){
+var _b=this.domNode.childNodes[i].getElementsByTagName(_9[k]);
+for(var j=0,_d=_b.length;j<_d;j++){
+var _e=_b[j].name;
+var _f=dojo.string.escape("regexp",this.pattern);
+_f=_f.replace(/(%\\\{index\\\})/g,"%{index}");
+var _10=dojo.string.substituteParams(_f,{"index":"[0-9]*"});
+var _11=dojo.string.substituteParams(this.pattern,{"index":""+i});
+var re=new RegExp(_10,"g");
+_b[j].name=_e.replace(re,_11);
+}
+}
+}
+},onDeleteRow:function(e){
+var _14=dojo.string.escape("regexp",this.pattern);
+_14=_14.replace(/%\\\{index\\\}/g,"%{index}");
+var _15=dojo.string.substituteParams(_14,{"index":"([0-9]*)"});
+var re=new RegExp(_15,"g");
+this.deleteRow(re.exec(e.target.name)[1]);
+},hasRows:function(){
+if(this.domNode.childNodes.length>0){
+return true;
+}
+return false;
+},getRowCount:function(){
+return this.domNode.childNodes.length;
+},deleteRow:function(idx){
+this.domNode.removeChild(this.domNode.childNodes[idx]);
+this._reIndexRows();
+},_changeRowPosition:function(e){
+if(e.dragStatus=="dropFailure"){
+this.domNode.removeChild(e["dragSource"].domNode);
+}else{
+if(e.dragStatus=="dropSuccess"){
+}
+}
+this._reIndexRows();
+},setRow:function(_19,_1a){
+_19=_19.replace(/\%\{(index)\}/g,"0");
+this.rowTemplate=_19;
+this.myObject=_1a;
+},getRow:function(){
+return this.rowTemplate;
+},_initRow:function(_1b){
+if(typeof (_1b)=="number"){
+_1b=this.domNode.childNodes[_1b];
+}
+var _1c=["INPUT","SELECT","IMG"];
+for(var k=0;k<_1c.length;k++){
+var _1e=_1b.getElementsByTagName(_1c[k]);
+for(var i=0,len=_1e.length;i<len;i++){
+var _21=_1e[i];
+if(_21.nodeType!=1){
+continue;
+}
+if(_21.getAttribute("rowFunction")!=null){
+if(typeof (this.myObject[_21.getAttribute("rowFunction")])=="undefined"){
+dojo.debug("Function "+_21.getAttribute("rowFunction")+" not found");
+}else{
+this.myObject[_21.getAttribute("rowFunction")](_21);
+}
+}else{
+if(_21.getAttribute("rowAction")!=null){
+if(_21.getAttribute("rowAction")=="delete"){
+_21.name=dojo.string.substituteParams(this.pattern,{"index":""+(this.getRowCount()-1)});
+dojo.event.connect(_21,"onclick",this,"onDeleteRow");
+}
+}
+}
+}
+}
+},onAddRow:function(e){
+},addRow:function(_23){
+if(typeof (_23)=="undefined"){
+_23=true;
+}
+var _24=document.createElement("span");
+_24.innerHTML=this.getRow();
+if(_24.childNodes.length==1){
+_24=_24.childNodes[0];
+}
+this.domNode.appendChild(_24);
+var _25=new dojo.xml.Parse();
+var _26=_25.parseElement(_24,null,true);
+dojo.widget.getParser().createSubComponents(_26,this);
+this._reIndexRows();
+if(_23){
+this._initRow(_24);
+}
+if(this.useDnd){
+_24=new dojo.dnd.HtmlDragSource(_24,this.widgetId);
+dojo.event.connect(_24,"onDragEnd",this,"_changeRowPosition");
+}
+this.onAddRow(_24);
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Repeater.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Repeater.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Repeater.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizableTextarea.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizableTextarea.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizableTextarea.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizableTextarea.js Sat May 26 15:47:41 2007
@@ -0,0 +1,22 @@
+dojo.provide("dojo.widget.ResizableTextarea");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.LayoutContainer");
+dojo.require("dojo.widget.ResizeHandle");
+dojo.widget.defineWidget("dojo.widget.ResizableTextarea",dojo.widget.HtmlWidget,{templateString:"<div>\n\t<div style=\"border: 2px solid black; width: 90%; height: 200px;\"\n\t\tdojoAttachPoint=\"rootLayoutNode\">\n\t\t<div dojoAttachPoint=\"textAreaContainerNode\" \n\t\t\tstyle=\"border: 0px; margin: 0px; overflow: hidden;\">\n\t\t</div>\n\t\t<div dojoAttachPoint=\"statusBarContainerNode\" class=\"statusBar\">\n\t\t\t<div dojoAttachPoint=\"statusLabelNode\" \n\t\t\t\tclass=\"statusPanel\"\n\t\t\t\tstyle=\"padding-right: 0px; z-index: 1;\">drag to resize</div>\n\t\t\t<div dojoAttachPoint=\"resizeHandleNode\"></div>\n\t\t</div>\n\t</div>\n</div>\n",templateCssString:"div.statusBar {\n\tbackground-color: ThreeDFace;\n\theight: 28px;\n\tpadding: 1px;\n\toverflow: hidden;\n\tfont-size: 12px;\n}\n\ndiv.statusPanel {\n\tbackground-color: ThreeDFace;\n\tborder: 1px solid;\n\tborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\n\tmargin: 1px;\n\tpadding: 2px 6px
 ;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ResizableTextarea.css"),fillInTemplate:function(_1,_2){
+this.textAreaNode=this.getFragNodeRef(_2).cloneNode(true);
+dojo.body().appendChild(this.domNode);
+this.rootLayout=dojo.widget.createWidget("LayoutContainer",{minHeight:50,minWidth:100},this.rootLayoutNode);
+this.textAreaContainer=dojo.widget.createWidget("LayoutContainer",{layoutAlign:"client"},this.textAreaContainerNode);
+this.rootLayout.addChild(this.textAreaContainer);
+this.textAreaContainer.domNode.appendChild(this.textAreaNode);
+with(this.textAreaNode.style){
+width="100%";
+height="100%";
+}
+this.statusBar=dojo.widget.createWidget("LayoutContainer",{layoutAlign:"bottom",minHeight:28},this.statusBarContainerNode);
+this.rootLayout.addChild(this.statusBar);
+this.statusLabel=dojo.widget.createWidget("LayoutContainer",{layoutAlign:"client",minWidth:50},this.statusLabelNode);
+this.statusBar.addChild(this.statusLabel);
+this.resizeHandle=dojo.widget.createWidget("ResizeHandle",{targetElmId:this.rootLayout.widgetId},this.resizeHandleNode);
+this.statusBar.addChild(this.resizeHandle);
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizableTextarea.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizableTextarea.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizableTextarea.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizeHandle.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizeHandle.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizeHandle.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizeHandle.js Sat May 26 15:47:41 2007
@@ -0,0 +1,55 @@
+dojo.provide("dojo.widget.ResizeHandle");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.event.*");
+dojo.widget.defineWidget("dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId:"",templateCssString:".dojoHtmlResizeHandle {\n\tfloat: right;\n\tposition: absolute;\n\tright: 2px;\n\tbottom: 2px;\n\twidth: 13px;\n\theight: 13px;\n\tz-index: 20;\n\tcursor: nw-resize;\n\tbackground-image: url(grabCorner.gif);\n\tline-height: 0px;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ResizeHandle.css"),templateString:"<div class=\"dojoHtmlResizeHandle\"><div></div></div>",postCreate:function(){
+dojo.event.connect(this.domNode,"onmousedown",this,"_beginSizing");
+},_beginSizing:function(e){
+if(this._isSizing){
+return false;
+}
+this.targetWidget=dojo.widget.byId(this.targetElmId);
+this.targetDomNode=this.targetWidget?this.targetWidget.domNode:dojo.byId(this.targetElmId);
+if(!this.targetDomNode){
+return;
+}
+this._isSizing=true;
+this.startPoint={"x":e.clientX,"y":e.clientY};
+var mb=dojo.html.getMarginBox(this.targetDomNode);
+this.startSize={"w":mb.width,"h":mb.height};
+dojo.event.kwConnect({srcObj:dojo.body(),srcFunc:"onmousemove",targetObj:this,targetFunc:"_changeSizing",rate:25});
+dojo.event.connect(dojo.body(),"onmouseup",this,"_endSizing");
+e.preventDefault();
+},_changeSizing:function(e){
+try{
+if(!e.clientX||!e.clientY){
+return;
+}
+}
+catch(e){
+return;
+}
+var dx=this.startPoint.x-e.clientX;
+var dy=this.startPoint.y-e.clientY;
+var _6=this.startSize.w-dx;
+var _7=this.startSize.h-dy;
+if(this.minSize){
+var mb=dojo.html.getMarginBox(this.targetDomNode);
+if(_6<this.minSize.w){
+_6=mb.width;
+}
+if(_7<this.minSize.h){
+_7=mb.height;
+}
+}
+if(this.targetWidget){
+this.targetWidget.resizeTo(_6,_7);
+}else{
+dojo.html.setMarginBox(this.targetDomNode,{width:_6,height:_7});
+}
+e.preventDefault();
+},_endSizing:function(e){
+dojo.event.disconnect(dojo.body(),"onmousemove",this,"_changeSizing");
+dojo.event.disconnect(dojo.body(),"onmouseup",this,"_endSizing");
+this._isSizing=false;
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizeHandle.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizeHandle.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ResizeHandle.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RichText.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RichText.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RichText.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RichText.js Sat May 26 15:47:41 2007
@@ -0,0 +1,1154 @@
+dojo.provide("dojo.widget.RichText");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.html.*");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.event.*");
+dojo.require("dojo.string.extras");
+dojo.require("dojo.uri.Uri");
+dojo.require("dojo.Deferred");
+if(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"]){
+if(dojo.hostenv.post_load_){
+(function(){
+var _1=dojo.doc().createElement("textarea");
+_1.id="dojo.widget.RichText.savedContent";
+_1.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;";
+dojo.body().appendChild(_1);
+})();
+}else{
+try{
+dojo.doc().write("<textarea id=\"dojo.widget.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");
+}
+catch(e){
+}
+}
+}
+dojo.widget.defineWidget("dojo.widget.RichText",dojo.widget.HtmlWidget,function(){
+this.contentPreFilters=[];
+this.contentPostFilters=[];
+this.contentDomPreFilters=[];
+this.contentDomPostFilters=[];
+this.editingAreaStyleSheets=[];
+if(dojo.render.html.moz){
+this.contentPreFilters.push(this._fixContentForMoz);
+}
+this._keyHandlers={};
+if(dojo.Deferred){
+this.onLoadDeferred=new dojo.Deferred();
+}
+},{inheritWidth:false,focusOnLoad:false,saveName:"",styleSheets:"",_content:"",height:"",minHeight:"1em",isClosed:true,isLoaded:false,useActiveX:false,relativeImageUrls:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,fillInTemplate:function(){
+dojo.event.topic.publish("dojo.widget.RichText::init",this);
+this.open();
+dojo.event.connect(this,"onKeyPressed",this,"afterKeyPress");
+dojo.event.connect(this,"onKeyPress",this,"keyPress");
+dojo.event.connect(this,"onKeyDown",this,"keyDown");
+dojo.event.connect(this,"onKeyUp",this,"keyUp");
+this.setupDefaultShortcuts();
+},setupDefaultShortcuts:function(){
+var _2=this.KEY_CTRL;
+var _3=function(_4,_5){
+return arguments.length==1?function(){
+this.execCommand(_4);
+}:function(){
+this.execCommand(_4,_5);
+};
+};
+this.addKeyHandler("b",_2,_3("bold"));
+this.addKeyHandler("i",_2,_3("italic"));
+this.addKeyHandler("u",_2,_3("underline"));
+this.addKeyHandler("a",_2,_3("selectall"));
+this.addKeyHandler("s",_2,function(){
+this.save(true);
+});
+this.addKeyHandler("1",_2,_3("formatblock","h1"));
+this.addKeyHandler("2",_2,_3("formatblock","h2"));
+this.addKeyHandler("3",_2,_3("formatblock","h3"));
+this.addKeyHandler("4",_2,_3("formatblock","h4"));
+this.addKeyHandler("\\",_2,_3("insertunorderedlist"));
+if(!dojo.render.html.ie){
+this.addKeyHandler("Z",_2,_3("redo"));
+}
+},events:["onBlur","onFocus","onKeyPress","onKeyDown","onKeyUp","onClick"],open:function(_6){
+if(this.onLoadDeferred.fired>=0){
+this.onLoadDeferred=new dojo.Deferred();
+}
+var h=dojo.render.html;
+if(!this.isClosed){
+this.close();
+}
+dojo.event.topic.publish("dojo.widget.RichText::open",this);
+this._content="";
+if((arguments.length==1)&&(_6["nodeName"])){
+this.domNode=_6;
+}
+if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){
+this.textarea=this.domNode;
+var _8=this._preFilterContent(this.textarea.value);
+this.domNode=dojo.doc().createElement("div");
+dojo.html.copyStyle(this.domNode,this.textarea);
+var _9=dojo.lang.hitch(this,function(){
+with(this.textarea.style){
+display="block";
+position="absolute";
+left=top="-1000px";
+if(h.ie){
+this.__overflow=overflow;
+overflow="hidden";
+}
+}
+});
+if(h.ie){
+setTimeout(_9,10);
+}else{
+_9();
+}
+if(!h.safari){
+dojo.html.insertBefore(this.domNode,this.textarea);
+}
+if(this.textarea.form){
+dojo.event.connect("before",this.textarea.form,"onsubmit",dojo.lang.hitch(this,function(){
+this.textarea.value=this.getEditorContent();
+}));
+}
+var _a=this;
+dojo.event.connect(this,"postCreate",function(){
+dojo.html.insertAfter(_a.textarea,_a.domNode);
+});
+}else{
+var _8=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML));
+}
+if(_8==""){
+_8="&nbsp;";
+}
+var _b=dojo.html.getContentBox(this.domNode);
+this._oldHeight=_b.height;
+this._oldWidth=_b.width;
+this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top");
+this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom");
+this.savedContent=_8;
+this.domNode.innerHTML="";
+this.editingArea=dojo.doc().createElement("div");
+this.domNode.appendChild(this.editingArea);
+if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){
+this.domNode.innerHTML=" <br>";
+}
+if(this.saveName!=""&&(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"])){
+var _c=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
+if(_c.value!=""){
+var _d=_c.value.split(this._SEPARATOR);
+for(var i=0;i<_d.length;i++){
+var _f=_d[i].split(":");
+if(_f[0]==this.saveName){
+_8=_f[1];
+_d.splice(i,1);
+break;
+}
+}
+}
+dojo.event.connect("before",window,"onunload",this,"_saveContent");
+}
+if(h.ie70&&this.useActiveX){
+dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now.");
+this.useActiveX=false;
+}
+if(this.useActiveX&&h.ie){
+var _10=this;
+setTimeout(function(){
+_10._drawObject(_8);
+},0);
+}else{
+if(h.ie||this._safariIsLeopard()||h.opera){
+this.iframe=dojo.doc().createElement("iframe");
+this.iframe.src="javascript:void(0)";
+this.editorObject=this.iframe;
+with(this.iframe.style){
+border="0";
+width="100%";
+}
+this.iframe.frameBorder=0;
+this.editingArea.appendChild(this.iframe);
+this.window=this.iframe.contentWindow;
+this.document=this.window.document;
+this.document.open();
+this.document.write("<html><head><style>body{margin:0;padding:0;border:0;overflow:hidden;}</style></head><body><div></div></body></html>");
+this.document.close();
+this.editNode=this.document.body.firstChild;
+this.editNode.contentEditable=true;
+with(this.iframe.style){
+if(h.ie70){
+if(this.height){
+height=this.height;
+}
+if(this.minHeight){
+minHeight=this.minHeight;
+}
+}else{
+height=this.height?this.height:this.minHeight;
+}
+}
+var _11=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"];
+var _12="";
+for(var i in _11){
+if(_11[i].charAt(1)!="l"){
+_12+="<"+_11[i]+"><span>content</span></"+_11[i]+">";
+}else{
+_12+="<"+_11[i]+"><li>content</li></"+_11[i]+">";
+}
+}
+with(this.editNode.style){
+position="absolute";
+left="-2000px";
+top="-2000px";
+}
+this.editNode.innerHTML=_12;
+var _13=this.editNode.firstChild;
+while(_13){
+dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[_13.firstChild]);
+var _14=_13.tagName.toLowerCase();
+this._local2NativeFormatNames[_14]=this.queryCommandValue("formatblock");
+this._native2LocalFormatNames[this._local2NativeFormatNames[_14]]=_14;
+_13=_13.nextSibling;
+}
+with(this.editNode.style){
+position="";
+left="";
+top="";
+}
+this.editNode.innerHTML=_8;
+if(this.height){
+this.document.body.style.overflowY="scroll";
+}
+dojo.lang.forEach(this.events,function(e){
+dojo.event.connect(this.editNode,e.toLowerCase(),this,e);
+},this);
+this.onLoad();
+}else{
+this._drawIframe(_8);
+this.editorObject=this.iframe;
+}
+}
+if(this.domNode.nodeName=="LI"){
+this.domNode.lastChild.style.marginTop="-1.2em";
+}
+dojo.html.addClass(this.domNode,"RichTextEditable");
+this.isClosed=false;
+},_hasCollapseableMargin:function(_16,_17){
+if(dojo.html.getPixelValue(_16,"border-"+_17+"-width",false)){
+return false;
+}else{
+if(dojo.html.getPixelValue(_16,"padding-"+_17,false)){
+return false;
+}else{
+return true;
+}
+}
+},_getContributingMargin:function(_18,_19){
+if(_19=="top"){
+var _1a="previousSibling";
+var _1b="nextSibling";
+var _1c="firstChild";
+var _1d="margin-top";
+var _1e="margin-bottom";
+}else{
+var _1a="nextSibling";
+var _1b="previousSibling";
+var _1c="lastChild";
+var _1d="margin-bottom";
+var _1e="margin-top";
+}
+var _1f=dojo.html.getPixelValue(_18,_1d,false);
+function isSignificantNode(_20){
+return !(_20.nodeType==3&&dojo.string.isBlank(_20.data))&&dojo.html.getStyle(_20,"display")!="none"&&!dojo.html.isPositionAbsolute(_20);
+}
+var _21=0;
+var _22=_18[_1c];
+while(_22){
+while((!isSignificantNode(_22))&&_22[_1b]){
+_22=_22[_1b];
+}
+_21=Math.max(_21,dojo.html.getPixelValue(_22,_1d,false));
+if(!this._hasCollapseableMargin(_22,_19)){
+break;
+}
+_22=_22[_1c];
+}
+if(!this._hasCollapseableMargin(_18,_19)){
+return parseInt(_21);
+}
+var _23=0;
+var _24=_18[_1a];
+while(_24){
+if(isSignificantNode(_24)){
+_23=dojo.html.getPixelValue(_24,_1e,false);
+break;
+}
+_24=_24[_1a];
+}
+if(!_24){
+_23=dojo.html.getPixelValue(_18.parentNode,_1d,false);
+}
+if(_21>_1f){
+return parseInt(Math.max((_21-_1f)-_23,0));
+}else{
+return 0;
+}
+},_drawIframe:function(_25){
+var _26=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined"));
+if(!this.iframe){
+var _27=(new dojo.uri.Uri(dojo.doc().location)).host;
+this.iframe=dojo.doc().createElement("iframe");
+with(this.iframe){
+style.border="none";
+style.lineHeight="0";
+style.verticalAlign="bottom";
+scrolling=this.height?"auto":"no";
+}
+}
+if(djConfig["useXDomain"]&&!djConfig["dojoRichTextFrameUrl"]){
+dojo.debug("dojo.widget.RichText: When using cross-domain Dojo builds,"+" please save src/widget/templates/richtextframe.html to your domain and set djConfig.dojoRichTextFrameUrl"+" to the path on your domain to richtextframe.html");
+}
+this.iframe.src=(djConfig["dojoRichTextFrameUrl"]||dojo.uri.moduleUri("dojo.widget","templates/richtextframe.html"))+((dojo.doc().domain!=_27)?("#"+dojo.doc().domain):"");
+this.iframe.width=this.inheritWidth?this._oldWidth:"100%";
+if(this.height){
+this.iframe.style.height=this.height;
+}else{
+var _28=this._oldHeight;
+if(this._hasCollapseableMargin(this.domNode,"top")){
+_28+=this._firstChildContributingMargin;
+}
+if(this._hasCollapseableMargin(this.domNode,"bottom")){
+_28+=this._lastChildContributingMargin;
+}
+this.iframe.height=_28;
+}
+var _29=dojo.doc().createElement("div");
+_29.innerHTML=_25;
+this.editingArea.appendChild(_29);
+if(this.relativeImageUrls){
+var _2a=_29.getElementsByTagName("img");
+for(var i=0;i<_2a.length;i++){
+_2a[i].src=(new dojo.uri.Uri(dojo.global().location,_2a[i].src)).toString();
+}
+_25=_29.innerHTML;
+}
+var _2c=dojo.html.firstElement(_29);
+var _2d=dojo.html.lastElement(_29);
+if(_2c){
+_2c.style.marginTop=this._firstChildContributingMargin+"px";
+}
+if(_2d){
+_2d.style.marginBottom=this._lastChildContributingMargin+"px";
+}
+this.editingArea.appendChild(this.iframe);
+if(dojo.render.html.safari){
+this.iframe.src=this.iframe.src;
+}
+var _2e=false;
+var _2f=dojo.lang.hitch(this,function(){
+if(!_2e){
+_2e=true;
+}else{
+return;
+}
+if(!this.editNode){
+if(this.iframe.contentWindow){
+this.window=this.iframe.contentWindow;
+this.document=this.iframe.contentWindow.document;
+}else{
+if(this.iframe.contentDocument){
+this.window=this.iframe.contentDocument.window;
+this.document=this.iframe.contentDocument;
+}
+}
+var _30=(function(_31){
+return function(_32){
+return dojo.html.getStyle(_31,_32);
+};
+})(this.domNode);
+var _33=_30("font-weight")+" "+_30("font-size")+" "+_30("font-family");
+var _34="1.0";
+var _35=dojo.html.getUnitValue(this.domNode,"line-height");
+if(_35.value&&_35.units==""){
+_34=_35.value;
+}
+dojo.html.insertCssText("body,html{background:transparent;padding:0;margin:0;}"+"body{top:0;left:0;right:0;"+(((this.height)||(dojo.render.html.opera))?"":"position:fixed;")+"font:"+_33+";"+"min-height:"+this.minHeight+";"+"line-height:"+_34+"}"+"p{margin: 1em 0 !important;}"+"body > *:first-child{padding-top:0 !important;margin-top:"+this._firstChildContributingMargin+"px !important;}"+"body > *:last-child{padding-bottom:0 !important;margin-bottom:"+this._lastChildContributingMargin+"px !important;}"+"li > ul:-moz-first-node, li > ol:-moz-first-node{padding-top:1.2em;}\n"+"li{min-height:1.2em;}"+"",this.document);
+dojo.html.removeNode(_29);
+this.document.body.innerHTML=_25;
+if(_26||dojo.render.html.safari){
+this.document.designMode="on";
+}
+this.onLoad();
+}else{
+dojo.html.removeNode(_29);
+this.editNode.innerHTML=_25;
+this.onDisplayChanged();
+}
+});
+if(this.editNode){
+_2f();
+}else{
+if(dojo.render.html.moz){
+this.iframe.onload=function(){
+setTimeout(_2f,250);
+};
+}else{
+this.iframe.onload=_2f;
+}
+}
+},_applyEditingAreaStyleSheets:function(){
+var _36=[];
+if(this.styleSheets){
+_36=this.styleSheets.split(";");
+this.styleSheets="";
+}
+_36=_36.concat(this.editingAreaStyleSheets);
+this.editingAreaStyleSheets=[];
+if(_36.length>0){
+for(var i=0;i<_36.length;i++){
+var url=_36[i];
+if(url){
+this.addStyleSheet(dojo.uri.dojoUri(url));
+}
+}
+}
+},addStyleSheet:function(uri){
+var url=uri.toString();
+if(dojo.lang.find(this.editingAreaStyleSheets,url)>-1){
+dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");
+return;
+}
+if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
+url=(new dojo.uri.Uri(dojo.global().location,url)).toString();
+}
+this.editingAreaStyleSheets.push(url);
+if(this.document.createStyleSheet){
+this.document.createStyleSheet(url);
+}else{
+var _3b=this.document.getElementsByTagName("head")[0];
+var _3c=this.document.createElement("link");
+with(_3c){
+rel="stylesheet";
+type="text/css";
+href=url;
+}
+_3b.appendChild(_3c);
+}
+},removeStyleSheet:function(uri){
+var url=uri.toString();
+if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
+url=(new dojo.uri.Uri(dojo.global().location,url)).toString();
+}
+var _3f=dojo.lang.find(this.editingAreaStyleSheets,url);
+if(_3f==-1){
+dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!");
+return;
+}
+delete this.editingAreaStyleSheets[_3f];
+var _40=this.document.getElementsByTagName("link");
+for(var i=0;i<_40.length;i++){
+if(_40[i].href==url){
+if(dojo.render.html.ie){
+_40[i].href="";
+}
+dojo.html.removeNode(_40[i]);
+break;
+}
+}
+},_drawObject:function(_42){
+this.object=dojo.html.createExternalElement(dojo.doc(),"object");
+with(this.object){
+classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";
+width=this.inheritWidth?this._oldWidth:"100%";
+style.height=this.height?this.height:(this._oldHeight+"px");
+Scrollbars=this.height?true:false;
+Appearance=this._activeX.appearance.flat;
+}
+this.editorObject=this.object;
+this.editingArea.appendChild(this.object);
+this.object.attachEvent("DocumentComplete",dojo.lang.hitch(this,"onLoad"));
+dojo.lang.forEach(this.events,function(e){
+this.object.attachEvent(e.toLowerCase(),dojo.lang.hitch(this,e));
+},this);
+this.object.DocumentHTML="<!doctype HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">"+"<html><title></title>"+"<style type=\"text/css\">"+"    body,html { padding: 0; margin: 0; }"+(this.height?"":"    body,  { overflow: hidden; }")+"</style>"+"<body><div>"+_42+"<div></body></html>";
+this._cacheLocalBlockFormatNames();
+},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_cacheLocalBlockFormatNames:function(){
+if(!this._native2LocalFormatNames["p"]){
+var obj=this.object;
+var _45=false;
+if(!obj){
+try{
+obj=dojo.html.createExternalElement(dojo.doc(),"object");
+obj.classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";
+dojo.body().appendChild(obj);
+obj.DocumentHTML="<html><head></head><body></body></html>";
+}
+catch(e){
+_45=true;
+}
+}
+try{
+var _46=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");
+obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_46);
+var _47=new VBArray(_46.Names);
+var _48=_47.toArray();
+var _49=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"];
+for(var i=0;i<_49.length;++i){
+if(_49[i].length>0){
+this._local2NativeFormatNames[_48[i]]=_49[i];
+this._native2LocalFormatNames[_49[i]]=_48[i];
+}
+}
+}
+catch(e){
+_45=true;
+}
+if(obj&&!this.object){
+dojo.body().removeChild(obj);
+}
+}
+return !_45;
+},_isResized:function(){
+return false;
+},onLoad:function(e){
+this.isLoaded=true;
+if(this.object){
+this.document=this.object.DOM;
+this.window=this.document.parentWindow;
+this.editNode=this.document.body.firstChild;
+this.editingArea.style.height=this.height?this.height:this.minHeight;
+if(!this.height){
+this.connect(this,"onDisplayChanged","_updateHeight");
+}
+this.window._frameElement=this.object;
+}else{
+if(this.iframe&&!dojo.render.html.ie){
+this.editNode=this.document.body;
+if(!this.height){
+this.connect(this,"onDisplayChanged","_updateHeight");
+}
+try{
+this.document.execCommand("useCSS",false,true);
+this.document.execCommand("styleWithCSS",false,false);
+}
+catch(e2){
+}
+if(dojo.render.html.safari){
+this.connect(this.editNode,"onblur","onBlur");
+this.connect(this.editNode,"onfocus","onFocus");
+this.connect(this.editNode,"onclick","onFocus");
+this.interval=setInterval(dojo.lang.hitch(this,"onDisplayChanged"),750);
+}else{
+if(dojo.render.html.mozilla||dojo.render.html.opera){
+var doc=this.document;
+var _4d=dojo.event.browser.addListener;
+var _4e=this;
+dojo.lang.forEach(this.events,function(e){
+var l=_4d(_4e.document,e.substr(2).toLowerCase(),dojo.lang.hitch(_4e,e));
+if(e=="onBlur"){
+var _51={unBlur:function(e){
+dojo.event.browser.removeListener(doc,"blur",l);
+}};
+dojo.event.connect("before",_4e,"close",_51,"unBlur");
+}
+});
+}
+}
+}else{
+if(dojo.render.html.ie){
+if(!this.height){
+this.connect(this,"onDisplayChanged","_updateHeight");
+}
+this.editNode.style.zoom=1;
+}
+}
+}
+this._applyEditingAreaStyleSheets();
+if(this.focusOnLoad){
+this.focus();
+}
+this.onDisplayChanged(e);
+if(this.onLoadDeferred){
+this.onLoadDeferred.callback(true);
+}
+},onKeyDown:function(e){
+if((!e)&&(this.object)){
+e=dojo.event.browser.fixEvent(this.window.event);
+}
+if((dojo.render.html.ie)&&(e.keyCode==e.KEY_TAB)){
+e.preventDefault();
+e.stopPropagation();
+this.execCommand((e.shiftKey?"outdent":"indent"));
+}else{
+if(dojo.render.html.ie){
+if((65<=e.keyCode)&&(e.keyCode<=90)){
+e.charCode=e.keyCode;
+this.onKeyPress(e);
+}
+}
+}
+},onKeyUp:function(e){
+return;
+},KEY_CTRL:1,onKeyPress:function(e){
+if((!e)&&(this.object)){
+e=dojo.event.browser.fixEvent(this.window.event);
+}
+var _56=e.ctrlKey?this.KEY_CTRL:0;
+if(this._keyHandlers[e.key]){
+var _57=this._keyHandlers[e.key],i=0,_59;
+while(_59=_57[i++]){
+if(_56==_59.modifiers){
+e.preventDefault();
+_59.handler.call(this);
+break;
+}
+}
+}
+dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
+},addKeyHandler:function(key,_5b,_5c){
+if(!(this._keyHandlers[key] instanceof Array)){
+this._keyHandlers[key]=[];
+}
+this._keyHandlers[key].push({modifiers:_5b||0,handler:_5c});
+},onKeyPressed:function(e){
+this.onDisplayChanged();
+},onClick:function(e){
+this.onDisplayChanged(e);
+},onBlur:function(e){
+},_initialFocus:true,onFocus:function(e){
+if((dojo.render.html.mozilla)&&(this._initialFocus)){
+this._initialFocus=false;
+if(dojo.string.trim(this.editNode.innerHTML)=="&nbsp;"){
+this.placeCursorAtStart();
+}
+}
+},blur:function(){
+if(this.iframe){
+this.window.blur();
+}else{
+if(this.object){
+this.document.body.blur();
+}else{
+if(this.editNode){
+this.editNode.blur();
+}
+}
+}
+},focus:function(){
+if(this.iframe&&!dojo.render.html.ie){
+this.window.focus();
+}else{
+if(this.object){
+this.document.focus();
+}else{
+if(this.editNode&&this.editNode.focus){
+this.editNode.focus();
+}else{
+dojo.debug("Have no idea how to focus into the editor!");
+}
+}
+}
+},onDisplayChanged:function(e){
+},_activeX:{command:{bold:5000,italic:5023,underline:5048,justifycenter:5024,justifyleft:5025,justifyright:5026,cut:5003,copy:5002,paste:5032,"delete":5004,undo:5049,redo:5033,removeformat:5034,selectall:5035,unlink:5050,indent:5018,outdent:5031,insertorderedlist:5030,insertunorderedlist:5051,inserttable:5022,insertcell:5019,insertcol:5020,insertrow:5021,deletecells:5005,deletecols:5006,deleterows:5007,mergecells:5029,splitcell:5047,setblockformat:5043,getblockformat:5011,getblockformatnames:5012,setfontname:5044,getfontname:5013,setfontsize:5045,getfontsize:5014,setbackcolor:5042,getbackcolor:5010,setforecolor:5046,getforecolor:5015,findtext:5008,font:5009,hyperlink:5016,image:5017,lockelement:5027,makeabsolute:5028,sendbackward:5036,bringforward:5037,sendbelowtext:5038,bringabovetext:5039,sendtoback:5040,bringtofront:5041,properties:5052},ui:{"default":0,prompt:1,noprompt:2},status:{notsupported:0,disabled:1,enabled:3,latched:7,ninched:11},appearance:{flat:0,inset:1},state
 :{unchecked:0,checked:1,gray:2}},_normalizeCommand:function(cmd){
+var drh=dojo.render.html;
+var _64=cmd.toLowerCase();
+if(_64=="formatblock"){
+if(drh.safari){
+_64="heading";
+}
+}else{
+if(this.object){
+switch(_64){
+case "createlink":
+_64="hyperlink";
+break;
+case "insertimage":
+_64="image";
+break;
+}
+}else{
+if(_64=="hilitecolor"&&!drh.mozilla){
+_64="backcolor";
+}
+}
+}
+return _64;
+},_safariIsLeopard:function(){
+var _65=false;
+if(dojo.render.html.safari){
+var tmp=dojo.render.html.UA.split("AppleWebKit/")[1];
+var ver=parseFloat(tmp.split(" ")[0]);
+if(ver>=420){
+_65=true;
+}
+}
+return _65;
+},queryCommandAvailable:function(_68){
+var ie=1;
+var _6a=1<<1;
+var _6b=1<<2;
+var _6c=1<<3;
+var _6d=1<<4;
+var _6e=this._safariIsLeopard();
+function isSupportedBy(_6f){
+return {ie:Boolean(_6f&ie),mozilla:Boolean(_6f&_6a),safari:Boolean(_6f&_6b),safari420:Boolean(_6f&_6d),opera:Boolean(_6f&_6c)};
+}
+var _70=null;
+switch(_68.toLowerCase()){
+case "bold":
+case "italic":
+case "underline":
+case "subscript":
+case "superscript":
+case "fontname":
+case "fontsize":
+case "forecolor":
+case "hilitecolor":
+case "justifycenter":
+case "justifyfull":
+case "justifyleft":
+case "justifyright":
+case "delete":
+case "selectall":
+_70=isSupportedBy(_6a|ie|_6b|_6c);
+break;
+case "createlink":
+case "unlink":
+case "removeformat":
+case "inserthorizontalrule":
+case "insertimage":
+case "insertorderedlist":
+case "insertunorderedlist":
+case "indent":
+case "outdent":
+case "formatblock":
+case "inserthtml":
+case "undo":
+case "redo":
+case "strikethrough":
+_70=isSupportedBy(_6a|ie|_6c|_6d);
+break;
+case "blockdirltr":
+case "blockdirrtl":
+case "dirltr":
+case "dirrtl":
+case "inlinedirltr":
+case "inlinedirrtl":
+_70=isSupportedBy(ie);
+break;
+case "cut":
+case "copy":
+case "paste":
+_70=isSupportedBy(ie|_6a|_6d);
+break;
+case "inserttable":
+_70=isSupportedBy(_6a|(this.object?ie:0));
+break;
+case "insertcell":
+case "insertcol":
+case "insertrow":
+case "deletecells":
+case "deletecols":
+case "deleterows":
+case "mergecells":
+case "splitcell":
+_70=isSupportedBy(this.object?ie:0);
+break;
+default:
+return false;
+}
+return (dojo.render.html.ie&&_70.ie)||(dojo.render.html.mozilla&&_70.mozilla)||(dojo.render.html.safari&&_70.safari)||(_6e&&_70.safari420)||(dojo.render.html.opera&&_70.opera);
+},execCommand:function(_71,_72){
+var _73;
+this.focus();
+_71=this._normalizeCommand(_71);
+if(_72!=undefined){
+if(_71=="heading"){
+throw new Error("unimplemented");
+}else{
+if(_71=="formatblock"){
+if(this.object){
+_72=this._native2LocalFormatNames[_72];
+}else{
+if(dojo.render.html.ie){
+_72="<"+_72+">";
+}
+}
+}
+}
+}
+if(this.object){
+switch(_71){
+case "hilitecolor":
+_71="setbackcolor";
+break;
+case "forecolor":
+case "backcolor":
+case "fontsize":
+case "fontname":
+_71="set"+_71;
+break;
+case "formatblock":
+_71="setblockformat";
+}
+if(_71=="strikethrough"){
+_71="inserthtml";
+var _74=this.document.selection.createRange();
+if(!_74.htmlText){
+return;
+}
+_72=_74.htmlText.strike();
+}else{
+if(_71=="inserthorizontalrule"){
+_71="inserthtml";
+_72="<hr>";
+}
+}
+if(_71=="inserthtml"){
+var _74=this.document.selection.createRange();
+if(this.document.selection.type.toUpperCase()=="CONTROL"){
+for(var i=0;i<_74.length;i++){
+_74.item(i).outerHTML=_72;
+}
+}else{
+_74.pasteHTML(_72);
+_74.select();
+}
+_73=true;
+}else{
+if(arguments.length==1){
+_73=this.object.ExecCommand(this._activeX.command[_71],this._activeX.ui.noprompt);
+}else{
+_73=this.object.ExecCommand(this._activeX.command[_71],this._activeX.ui.noprompt,_72);
+}
+}
+}else{
+if(_71=="inserthtml"){
+if(dojo.render.html.ie){
+var _76=this.document.selection.createRange();
+_76.pasteHTML(_72);
+_76.select();
+return true;
+}else{
+return this.document.execCommand(_71,false,_72);
+}
+}else{
+if((_71=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){
+var _77=this.window.getSelection();
+var _78=_77.getRangeAt(0);
+var _79=_78.startContainer;
+var _7a=_78.startOffset;
+var _7b=_78.endContainer;
+var _7c=_78.endOffset;
+var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]);
+dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]);
+_73=this.document.execCommand("unlink",false,null);
+var _78=this.document.createRange();
+_78.setStart(_79,_7a);
+_78.setEnd(_7b,_7c);
+_77.removeAllRanges();
+_77.addRange(_78);
+return _73;
+}else{
+if((_71=="hilitecolor")&&(dojo.render.html.mozilla)){
+this.document.execCommand("useCSS",false,false);
+_73=this.document.execCommand(_71,false,_72);
+this.document.execCommand("useCSS",false,true);
+}else{
+if((dojo.render.html.ie)&&((_71=="backcolor")||(_71=="forecolor"))){
+_72=arguments.length>1?_72:null;
+_73=this.document.execCommand(_71,false,_72);
+}else{
+_72=arguments.length>1?_72:null;
+if(_72||_71!="createlink"){
+_73=this.document.execCommand(_71,false,_72);
+}
+}
+}
+}
+}
+}
+this.onDisplayChanged();
+return _73;
+},queryCommandEnabled:function(_7e){
+_7e=this._normalizeCommand(_7e);
+if(this.object){
+switch(_7e){
+case "hilitecolor":
+_7e="setbackcolor";
+break;
+case "forecolor":
+case "backcolor":
+case "fontsize":
+case "fontname":
+_7e="set"+_7e;
+break;
+case "formatblock":
+_7e="setblockformat";
+break;
+case "strikethrough":
+_7e="bold";
+break;
+case "inserthorizontalrule":
+return true;
+}
+if(typeof this._activeX.command[_7e]=="undefined"){
+return false;
+}
+var _7f=this.object.QueryStatus(this._activeX.command[_7e]);
+return ((_7f!=this._activeX.status.notsupported)&&(_7f!=this._activeX.status.disabled));
+}else{
+if(dojo.render.html.mozilla){
+if(_7e=="unlink"){
+return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]);
+}else{
+if(_7e=="inserttable"){
+return true;
+}
+}
+}
+var _80=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
+return _80.queryCommandEnabled(_7e);
+}
+},queryCommandState:function(_81){
+_81=this._normalizeCommand(_81);
+if(this.object){
+if(_81=="forecolor"){
+_81="setforecolor";
+}else{
+if(_81=="backcolor"){
+_81="setbackcolor";
+}else{
+if(_81=="strikethrough"){
+return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]);
+}else{
+if(_81=="inserthorizontalrule"){
+return false;
+}
+}
+}
+}
+if(typeof this._activeX.command[_81]=="undefined"){
+return null;
+}
+var _82=this.object.QueryStatus(this._activeX.command[_81]);
+return ((_82==this._activeX.status.latched)||(_82==this._activeX.status.ninched));
+}else{
+return this.document.queryCommandState(_81);
+}
+},queryCommandValue:function(_83){
+_83=this._normalizeCommand(_83);
+if(this.object){
+switch(_83){
+case "forecolor":
+case "backcolor":
+case "fontsize":
+case "fontname":
+_83="get"+_83;
+return this.object.execCommand(this._activeX.command[_83],this._activeX.ui.noprompt);
+case "formatblock":
+var _84=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt);
+if(_84){
+return this._local2NativeFormatNames[_84];
+}
+}
+}else{
+if(dojo.render.html.ie&&_83=="formatblock"){
+return this._local2NativeFormatNames[this.document.queryCommandValue(_83)]||this.document.queryCommandValue(_83);
+}
+return this.document.queryCommandValue(_83);
+}
+},placeCursorAtStart:function(){
+this.focus();
+if(dojo.render.html.moz&&this.editNode.firstChild&&this.editNode.firstChild.nodeType!=dojo.dom.TEXT_NODE){
+dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.firstChild]);
+}else{
+dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]);
+}
+dojo.withGlobal(this.window,"collapse",dojo.html.selection,[true]);
+},placeCursorAtEnd:function(){
+this.focus();
+if(dojo.render.html.moz&&this.editNode.lastChild&&this.editNode.lastChild.nodeType!=dojo.dom.TEXT_NODE){
+dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.lastChild]);
+}else{
+dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]);
+}
+dojo.withGlobal(this.window,"collapse",dojo.html.selection,[false]);
+},replaceEditorContent:function(_85){
+_85=this._preFilterContent(_85);
+if(this.isClosed){
+this.domNode.innerHTML=_85;
+}else{
+if(this.window&&this.window.getSelection&&!dojo.render.html.moz){
+this.editNode.innerHTML=_85;
+}else{
+if((this.window&&this.window.getSelection)||(this.document&&this.document.selection)){
+this.execCommand("selectall");
+if(dojo.render.html.moz&&!_85){
+_85="&nbsp;";
+}
+this.execCommand("inserthtml",_85);
+}
+}
+}
+},_preFilterContent:function(_86){
+var ec=_86;
+dojo.lang.forEach(this.contentPreFilters,function(ef){
+ec=ef(ec);
+});
+if(this.contentDomPreFilters.length>0){
+var dom=dojo.doc().createElement("div");
+dom.style.display="none";
+dojo.body().appendChild(dom);
+dom.innerHTML=ec;
+dojo.lang.forEach(this.contentDomPreFilters,function(ef){
+dom=ef(dom);
+});
+ec=dom.innerHTML;
+dojo.body().removeChild(dom);
+}
+return ec;
+},_postFilterContent:function(_8b){
+var ec=_8b;
+if(this.contentDomPostFilters.length>0){
+var dom=this.document.createElement("div");
+dom.innerHTML=ec;
+dojo.lang.forEach(this.contentDomPostFilters,function(ef){
+dom=ef(dom);
+});
+ec=dom.innerHTML;
+}
+dojo.lang.forEach(this.contentPostFilters,function(ef){
+ec=ef(ec);
+});
+return ec;
+},_lastHeight:0,_updateHeight:function(){
+if(!this.isLoaded){
+return;
+}
+if(this.height){
+return;
+}
+var _90=dojo.html.getBorderBox(this.editNode).height;
+if(!_90){
+_90=dojo.html.getBorderBox(this.document.body).height;
+}
+if(_90==0){
+dojo.debug("Can not figure out the height of the editing area!");
+return;
+}
+this._lastHeight=_90;
+this.editorObject.style.height=this._lastHeight+"px";
+this.window.scrollTo(0,0);
+},_saveContent:function(e){
+var _92=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
+_92.value+=this._SEPARATOR+this.saveName+":"+this.getEditorContent();
+},getEditorContent:function(){
+var ec="";
+try{
+ec=(this._content.length>0)?this._content:this.editNode.innerHTML;
+if(dojo.string.trim(ec)=="&nbsp;"){
+ec="";
+}
+}
+catch(e){
+}
+if(dojo.render.html.ie&&!this.object){
+var re=new RegExp("(?:<p>&nbsp;</p>[\n\r]*)+$","i");
+ec=ec.replace(re,"");
+}
+ec=this._postFilterContent(ec);
+if(this.relativeImageUrls){
+var _95=dojo.global().location.protocol+"//"+dojo.global().location.host;
+var _96=dojo.global().location.pathname;
+if(_96.match(/\/$/)){
+}else{
+var _97=_96.split("/");
+if(_97.length){
+_97.pop();
+}
+_96=_97.join("/")+"/";
+}
+var _98=new RegExp("(<img[^>]* src=[\"'])("+_95+"("+_96+")?)","ig");
+ec=ec.replace(_98,"$1");
+}
+return ec;
+},close:function(_99,_9a){
+if(this.isClosed){
+return false;
+}
+if(arguments.length==0){
+_99=true;
+}
+this._content=this._postFilterContent(this.editNode.innerHTML);
+var _9b=(this.savedContent!=this._content);
+if(this.interval){
+clearInterval(this.interval);
+}
+if(dojo.render.html.ie&&!this.object){
+dojo.event.browser.clean(this.editNode);
+}
+if(this.iframe){
+delete this.iframe;
+}
+if(this.textarea){
+with(this.textarea.style){
+position="";
+left=top="";
+if(dojo.render.html.ie){
+overflow=this.__overflow;
+this.__overflow=null;
+}
+}
+if(_99){
+this.textarea.value=this._content;
+}else{
+this.textarea.value=this.savedContent;
+}
+dojo.html.removeNode(this.domNode);
+this.domNode=this.textarea;
+}else{
+if(_99){
+if(dojo.render.html.moz){
+var nc=dojo.doc().createElement("span");
+this.domNode.appendChild(nc);
+nc.innerHTML=this.editNode.innerHTML;
+}else{
+this.domNode.innerHTML=this._content;
+}
+}else{
+this.domNode.innerHTML=this.savedContent;
+}
+}
+dojo.html.removeClass(this.domNode,"RichTextEditable");
+this.isClosed=true;
+this.isLoaded=false;
+delete this.editNode;
+if(this.window._frameElement){
+this.window._frameElement=null;
+}
+this.window=null;
+this.document=null;
+this.object=null;
+this.editingArea=null;
+this.editorObject=null;
+return _9b;
+},destroyRendering:function(){
+},destroy:function(){
+this.destroyRendering();
+if(!this.isClosed){
+this.close(false);
+}
+dojo.widget.RichText.superclass.destroy.call(this);
+},connect:function(_9d,_9e,_9f){
+dojo.event.connect(_9d,_9e,this,_9f);
+},disconnect:function(_a0,_a1,_a2){
+dojo.event.disconnect(_a0,_a1,this,_a2);
+},disconnectAllWithRoot:function(_a3){
+dojo.deprecated("disconnectAllWithRoot","is deprecated. No need to disconnect manually","0.5");
+},_fixContentForMoz:function(_a4){
+_a4=_a4.replace(/<strong([ \>])/gi,"<b$1");
+_a4=_a4.replace(/<\/strong>/gi,"</b>");
+_a4=_a4.replace(/<em([ \>])/gi,"<i$1");
+_a4=_a4.replace(/<\/em>/gi,"</i>");
+return _a4;
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RichText.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RichText.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/RichText.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Rounded.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Rounded.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Rounded.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Rounded.js Sat May 26 15:47:41 2007
@@ -0,0 +1,516 @@
+dojo.provide("dojo.widget.Rounded");
+dojo.widget.tags.addParseTreeHandler("dojo:rounded");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.ContentPane");
+dojo.require("dojo.html.style");
+dojo.require("dojo.html.display");
+dojo.require("dojo.gfx.color");
+dojo.deprecated("dojo.widget.Rounded will be removed in version 0.5; you can now apply rounded corners to any block element using dojo.lfx.rounded.","0.5");
+dojo.widget.defineWidget("dojo.widget.Rounded",dojo.widget.ContentPane,{isSafari:dojo.render.html.safari,boxMargin:"50px",radius:14,domNode:"",corners:"TR,TL,BR,BL",antiAlias:true,fillInTemplate:function(_1,_2){
+dojo.widget.Rounded.superclass.fillInTemplate.call(this,_1,_2);
+dojo.html.insertCssFile(this.templateCssPath);
+if(this.domNode.style.height<=0){
+var _3=(this.radius*1)+this.domNode.clientHeight;
+this.domNode.style.height=_3+"px";
+}
+if(this.domNode.style.width<=0){
+var _4=(this.radius*1)+this.domNode.clientWidth;
+this.domNode.style.width=_4+"px";
+}
+var _5=["TR","TL","BR","BL"];
+var _6=this.corners.split(",");
+this.settings={antiAlias:this.antiAlias};
+var _7=function(_8){
+var _9=_8.toLowerCase();
+if(dojo.lang.inArray(_6,_8)){
+this.settings[_9]={radius:this.radius,enabled:true};
+}else{
+this.settings[_9]={radius:0};
+}
+};
+dojo.lang.forEach(_5,_7,this);
+this.domNode.style.margin=this.boxMargin;
+this.curvyCorners(this.settings);
+this.applyCorners();
+},curvyCorners:function(_a){
+this.box=this.domNode;
+this.topContainer=null;
+this.bottomContainer=null;
+this.masterCorners=[];
+var _b=dojo.html.getStyle(this.box,"height");
+if(_b==""){
+_b="0px";
+}
+var _c=dojo.html.getStyle(this.box,"width");
+var _d=dojo.html.getStyle(this.box,"borderTopWidth");
+if(_d==""){
+_d="0px";
+}
+var _e=dojo.html.getStyle(this.box,"borderTopColor");
+if(_d>0){
+this.antiAlias=true;
+}
+var _f=dojo.html.getStyle(this.box,"backgroundColor");
+var _10=dojo.html.getStyle(this.box,"backgroundImage");
+var _11=dojo.html.getStyle(this.box,"position");
+this.boxHeight=parseInt(((_b!=""&&_b!="auto"&&_b.indexOf("%")==-1)?_b.substring(0,_b.indexOf("px")):this.box.scrollHeight));
+this.boxWidth=parseInt(((_c!=""&&_c!="auto"&&_c.indexOf("%")==-1)?_c.substring(0,_c.indexOf("px")):this.box.scrollWidth));
+this.borderWidth=parseInt(((_d!=""&&_d.indexOf("px")!==-1)?_d.slice(0,_d.indexOf("px")):0));
+var _12=new dojo.gfx.color.Color(_f);
+this.boxColour=((_f!=""&&_f!="transparent")?((_f.substr(0,3)=="rgb")?this.rgb2Hex(_f):_f):"#ffffff");
+this.borderColour=((_e!=""&&_e!="transparent"&&this.borderWidth>0)?((_e.substr(0,3)=="rgb")?this.rgb2Hex(_e):_e):this.boxColour);
+this.borderString=this.borderWidth+"px"+" solid "+this.borderColour;
+this.backgroundImage=((_10!="none")?_10:"");
+if(_11!="absolute"){
+this.box.style.position="relative";
+}
+this.applyCorners=function(){
+for(var t=0;t<2;t++){
+switch(t){
+case 0:
+if(this.settings.tl.enabled||this.settings.tr.enabled){
+var _14=document.createElement("DIV");
+with(_14.style){
+width="100%";
+fontSize="1px";
+overflow="hidden";
+position="absolute";
+paddingLeft=this.borderWidth+"px";
+paddingRight=this.borderWidth+"px";
+var _15=Math.max(this.settings.tl?this.settings.tl.radius:0,this.settings.tr?this.settings.tr.radius:0);
+height=_15+"px";
+top=0-_15+"px";
+left=0-this.borderWidth+"px";
+}
+this.topContainer=this.box.appendChild(_14);
+}
+break;
+case 1:
+if(this.settings.bl.enabled||this.settings.br.enabled){
+var _14=document.createElement("DIV");
+with(_14.style){
+width="100%";
+fontSize="1px";
+overflow="hidden";
+position="absolute";
+paddingLeft=this.borderWidth+"px";
+paddingRight=this.borderWidth+"px";
+var _16=Math.max(this.settings.bl?this.settings.bl.radius:0,this.settings.br?this.settings.br.radius:0);
+height=_16+"px";
+bottom=0-_16+"px";
+left=0-this.borderWidth+"px";
+}
+this.bottomContainer=this.box.appendChild(_14);
+}
+break;
+}
+}
+if(this.topContainer){
+this.box.style.borderTopWidth="0px";
+}
+if(this.bottomContainer){
+this.box.style.borderBottomWidth="0px";
+}
+var _17=["tr","tl","br","bl"];
+for(var i in _17){
+var cc=_17[i];
+if(!this.settings[cc]){
+if(((cc=="tr"||cc=="tl")&&this.topContainer!=null)||((cc=="br"||cc=="bl")&&this.bottomContainer!=null)){
+var _1a=document.createElement("DIV");
+_1a.style.position="relative";
+_1a.style.fontSize="1px";
+_1a.style.overflow="hidden";
+if(this.backgroundImage==""){
+_1a.style.backgroundColor=this.boxColour;
+}else{
+_1a.style.backgroundImage=this.backgroundImage;
+}
+switch(cc){
+case "tl":
+with(_1a.style){
+height=_15-this.borderWidth+"px";
+marginRight=this.settings.tr.radius-(this.borderWidth*2)+"px";
+borderLeft=this.borderString;
+borderTop=this.borderString;
+left=-this.borderWidth+"px";
+}
+break;
+case "tr":
+with(_1a.style){
+height=_15-this.borderWidth+"px";
+marginLeft=this.settings.tl.radius-(this.borderWidth*2)+"px";
+borderRight=this.borderString;
+borderTop=this.borderString;
+backgroundPosition="-"+this.boxWidth+"px 0px";
+left=this.borderWidth+"px";
+}
+break;
+case "bl":
+with(_1a.style){
+height=_16-this.borderWidth+"px";
+marginRight=this.settings.br.radius-(this.borderWidth*2)+"px";
+borderLeft=this.borderString;
+borderBottom=this.borderString;
+left=-this.borderWidth+"px";
+}
+break;
+case "br":
+with(_1a.style){
+height=_16-this.borderWidth+"px";
+marginLeft=this.settings.bl.radius-(this.borderWidth*2)+"px";
+borderRight=this.borderString;
+borderBottom=this.borderString;
+left=this.borderWidth+"px";
+}
+break;
+}
+}
+}else{
+if(this.masterCorners[this.settings[cc].radius]){
+var _1a=this.masterCorners[this.settings[cc].radius].cloneNode(true);
+}else{
+var _1a=document.createElement("DIV");
+with(_1a.style){
+height=this.settings[cc].radius+"px";
+width=this.settings[cc].radius+"px";
+position="absolute";
+fontSize="1px";
+overflow="hidden";
+}
+var _1b=parseInt(this.settings[cc].radius-this.borderWidth);
+for(var _1c=0,j=this.settings[cc].radius;_1c<j;_1c++){
+if((_1c+1)>=_1b){
+var y1=-1;
+}else{
+var y1=(Math.floor(Math.sqrt(Math.pow(_1b,2)-Math.pow((_1c+1),2)))-1);
+}
+if(_1b!=j){
+if((_1c)>=_1b){
+var y2=-1;
+}else{
+var y2=Math.ceil(Math.sqrt(Math.pow(_1b,2)-Math.pow(_1c,2)));
+}
+if((_1c+1)>=j){
+var y3=-1;
+}else{
+var y3=(Math.floor(Math.sqrt(Math.pow(j,2)-Math.pow((_1c+1),2)))-1);
+}
+}
+if((_1c)>=j){
+var y4=-1;
+}else{
+var y4=Math.ceil(Math.sqrt(Math.pow(j,2)-Math.pow(_1c,2)));
+}
+if(y1>-1){
+this.drawPixel(_1c,0,this.boxColour,100,(y1+1),_1a,-1,this.settings[cc].radius);
+}
+if(_1b!=j){
+if(this.antiAlias){
+for(var _22=(y1+1);_22<y2;_22++){
+if(this.backgroundImage!=""){
+var _23=(this.pixelFraction(_1c,_22,_1b)*100);
+if(_23<30){
+this.drawPixel(_1c,_22,this.borderColour,100,1,_1a,0,this.settings[cc].radius);
+}else{
+this.drawPixel(_1c,_22,this.borderColour,100,1,_1a,-1,this.settings[cc].radius);
+}
+}else{
+var _24=dojo.gfx.color.blend(this.boxColour,this.borderColour,this.pixelFraction(_1c,_22,_1b));
+this.drawPixel(_1c,_22,_24,100,1,_1a,0,this.settings[cc].radius);
+}
+}
+}
+if(y3>=y2){
+if(y1==-1){
+y1=0;
+}
+this.drawPixel(_1c,y2,this.borderColour,100,(y3-y2+1),_1a,0,this.settings[cc].radius);
+}
+var _25=this.borderColour;
+}else{
+var _25=this.boxColour;
+var y3=y1;
+}
+if(this.antiAlias){
+for(var _22=(y3+1);_22<y4;_22++){
+this.drawPixel(_1c,_22,_25,(this.pixelFraction(_1c,_22,j)*100),1,_1a,((this.borderWidth>0)?0:-1),this.settings[cc].radius);
+}
+}
+}
+this.masterCorners[this.settings[cc].radius]=_1a.cloneNode(true);
+}
+if(cc!="br"){
+for(var t=0,k=_1a.childNodes.length;t<k;t++){
+var _27=_1a.childNodes[t];
+var _28=parseInt(_27.style.top.substring(0,_27.style.top.indexOf("px")));
+var _29=parseInt(_27.style.left.substring(0,_27.style.left.indexOf("px")));
+var _2a=parseInt(_27.style.height.substring(0,_27.style.height.indexOf("px")));
+if(cc=="tl"||cc=="bl"){
+_27.style.left=this.settings[cc].radius-_29-1+"px";
+}
+if(cc=="tr"||cc=="tl"){
+_27.style.top=this.settings[cc].radius-_2a-_28+"px";
+}
+var _2b;
+switch(cc){
+case "tr":
+_2b=(-1*(Math.abs((this.boxWidth-this.settings[cc].radius+this.borderWidth)+_29)-(Math.abs(this.settings[cc].radius-_2a-_28-this.borderWidth))));
+_27.style.backgroundPosition=_2b+"px";
+break;
+case "tl":
+_2b=(-1*(Math.abs((this.settings[cc].radius-_29-1)-this.borderWidth)-(Math.abs(this.settings[cc].radius-_2a-_28-this.borderWidth))));
+_27.style.backgroundPosition=_2b+"px";
+break;
+case "bl":
+_2b=(-1*(Math.abs((this.settings[cc].radius-_29-1)-this.borderWidth)-(Math.abs((this.boxHeight+this.settings[cc].radius+_28)-this.borderWidth))));
+_27.style.backgroundPosition=_2b+"px";
+break;
+}
+}
+}
+}
+if(_1a){
+switch(cc){
+case "tl":
+if(_1a.style.position=="absolute"){
+_1a.style.top="0px";
+}
+if(_1a.style.position=="absolute"){
+_1a.style.left="0px";
+}
+if(this.topContainer){
+this.topContainer.appendChild(_1a);
+}
+break;
+case "tr":
+if(_1a.style.position=="absolute"){
+_1a.style.top="0px";
+}
+if(_1a.style.position=="absolute"){
+_1a.style.right="0px";
+}
+if(this.topContainer){
+this.topContainer.appendChild(_1a);
+}
+break;
+case "bl":
+if(_1a.style.position=="absolute"){
+_1a.style.bottom="0px";
+}
+if(_1a.style.position=="absolute"){
+_1a.style.left="0px";
+}
+if(this.bottomContainer){
+this.bottomContainer.appendChild(_1a);
+}
+break;
+case "br":
+if(_1a.style.position=="absolute"){
+_1a.style.bottom="0px";
+}
+if(_1a.style.position=="absolute"){
+_1a.style.right="0px";
+}
+if(this.bottomContainer){
+this.bottomContainer.appendChild(_1a);
+}
+break;
+}
+}
+}
+var _2c=[];
+_2c["t"]=this.settings.tl.enabled&&this.settings.tr.enabled?Math.abs(this.settings.tl.radius-this.settings.tr.radius):0;
+_2c["b"]=this.settings.bl.enabled&&this.settings.br.enabled?Math.abs(this.settings.bl.radius-this.settings.br.radius):0;
+for(var z in _2c){
+if(_2c[z]){
+var _2e=((this.settings[z+"l"].radius<this.settings[z+"r"].radius)?z+"l":z+"r");
+var _2f=document.createElement("DIV");
+with(_2f.style){
+height=_2c[z]+"px";
+width=this.settings[_2e].radius+"px";
+position="absolute";
+fontSize="1px";
+overflow="hidden";
+backgroundColor=this.boxColour;
+}
+switch(_2e){
+case "tl":
+with(_2f.style){
+bottom="0px";
+left="0px";
+borderLeft=this.borderString;
+}
+this.topContainer.appendChild(_2f);
+break;
+case "tr":
+with(_2f.style){
+bottom="0px";
+right="0px";
+borderRight=this.borderString;
+}
+this.topContainer.appendChild(_2f);
+break;
+case "bl":
+with(_2f.style){
+top="0px";
+left="0px";
+borderLeft=this.borderString;
+}
+this.bottomContainer.appendChild(_2f);
+break;
+case "br":
+with(_2f.style){
+top="0px";
+right="0px";
+borderRight=this.borderString;
+}
+this.bottomContainer.appendChild(_2f);
+break;
+}
+}
+var _30=document.createElement("DIV");
+with(_30.style){
+position="relative";
+fontSize="1px";
+overflow="hidden";
+backgroundColor=this.boxColour;
+}
+switch(z){
+case "t":
+if(this.topContainer){
+with(_30.style){
+height=_15-this.borderWidth+"px";
+marginLeft=this.settings.tl.radius-this.borderWidth+"px";
+marginRight=this.settings.tr.radius-this.borderWidth+"px";
+borderTop=this.borderString;
+}
+this.topContainer.appendChild(_30);
+}
+break;
+case "b":
+if(this.bottomContainer){
+with(_30.style){
+height=_16-this.borderWidth+"px";
+marginLeft=this.settings.bl.radius-this.borderWidth+"px";
+marginRight=this.settings.br.radius-this.borderWidth+"px";
+borderBottom=this.borderString;
+}
+this.bottomContainer.appendChild(_30);
+}
+break;
+}
+}
+};
+this.drawPixel=function(_31,_32,_33,_34,_35,_36,_37,_38){
+var _39=document.createElement("DIV");
+_39.style.height=_35+"px";
+_39.style.width="1px";
+_39.style.position="absolute";
+_39.style.fontSize="1px";
+_39.style.overflow="hidden";
+if(_37==-1&&this.backgroundImage!=""){
+_39.style.backgroundImage=this.backgroundImage;
+_39.style.backgroundPosition="-"+(this.boxWidth-(_38-_31)+this.borderWidth)+"px -"+((this.boxHeight+_38+_32)-this.borderWidth)+"px";
+}else{
+_39.style.backgroundColor=_33;
+}
+if(_34!=100){
+dojo.html.setOpacity(_39,_34);
+}
+_39.style.top=_32+"px";
+_39.style.left=_31+"px";
+_36.appendChild(_39);
+};
+},pixelFraction:function(x,y,r){
+var _3d=0;
+var _3e=[];
+var _3f=[];
+var _40=0;
+var _41="";
+var _42=Math.sqrt((Math.pow(r,2)-Math.pow(x,2)));
+if((_42>=y)&&(_42<(y+1))){
+_41="Left";
+_3e[_40]=0;
+_3f[_40]=_42-y;
+_40=_40+1;
+}
+var _42=Math.sqrt((Math.pow(r,2)-Math.pow(y+1,2)));
+if((_42>=x)&&(_42<(x+1))){
+_41=_41+"Top";
+_3e[_40]=_42-x;
+_3f[_40]=1;
+_40=_40+1;
+}
+var _42=Math.sqrt((Math.pow(r,2)-Math.pow(x+1,2)));
+if((_42>=y)&&(_42<(y+1))){
+_41=_41+"Right";
+_3e[_40]=1;
+_3f[_40]=_42-y;
+_40=_40+1;
+}
+var _42=Math.sqrt((Math.pow(r,2)-Math.pow(y,2)));
+if((_42>=x)&&(_42<(x+1))){
+_41=_41+"Bottom";
+_3e[_40]=_42-x;
+_3f[_40]=0;
+}
+switch(_41){
+case "LeftRight":
+_3d=Math.min(_3f[0],_3f[1])+((Math.max(_3f[0],_3f[1])-Math.min(_3f[0],_3f[1]))/2);
+break;
+case "TopRight":
+_3d=1-(((1-_3e[0])*(1-_3f[1]))/2);
+break;
+case "TopBottom":
+_3d=Math.min(_3e[0],_3e[1])+((Math.max(_3e[0],_3e[1])-Math.min(_3e[0],_3e[1]))/2);
+break;
+case "LeftBottom":
+_3d=(_3f[0]*_3e[1])/2;
+break;
+default:
+_3d=1;
+}
+return _3d;
+},rgb2Hex:function(_43){
+try{
+var _44=this.rgb2Array(_43);
+var red=parseInt(_44[0]);
+var _46=parseInt(_44[1]);
+var _47=parseInt(_44[2]);
+var _48="#"+this.intToHex(red)+this.intToHex(_46)+this.intToHex(_47);
+}
+catch(e){
+alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");
+}
+return _48;
+},intToHex:function(_49){
+var _4a=_49/16;
+var rem=_49%16;
+var _4a=_4a-(rem/16);
+var _4c=this.makeHex(_4a);
+var _4d=this.makeHex(rem);
+return _4c+""+_4d;
+},makeHex:function(x){
+if((x>=0)&&(x<=9)){
+return x;
+}else{
+switch(x){
+case 10:
+return "A";
+case 11:
+return "B";
+case 12:
+return "C";
+case 13:
+return "D";
+case 14:
+return "E";
+case 15:
+return "F";
+}
+}
+},rgb2Array:function(_4f){
+var _50=_4f.substring(4,_4f.indexOf(")"));
+var _51=_50.split(", ");
+return _51;
+}});