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 [33/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...

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Select.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Select.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Select.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Select.js Sat May 26 15:47:41 2007
@@ -0,0 +1,26 @@
+dojo.provide("dojo.widget.Select");
+dojo.require("dojo.widget.ComboBox");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.html.stabile");
+dojo.widget.defineWidget("dojo.widget.Select",dojo.widget.ComboBox,{forceValidOption:true,setValue:function(_1){
+this.comboBoxValue.value=_1;
+dojo.widget.html.stabile.setState(this.widgetId,this.getState(),true);
+this.onValueChanged(_1);
+},setLabel:function(_2){
+this.comboBoxSelectionValue.value=_2;
+if(this.textInputNode.value!=_2){
+this.textInputNode.value=_2;
+}
+},getLabel:function(){
+return this.comboBoxSelectionValue.value;
+},getState:function(){
+return {value:this.getValue(),label:this.getLabel()};
+},onKeyUp:function(_3){
+this.setLabel(this.textInputNode.value);
+},setState:function(_4){
+this.setValue(_4.value);
+this.setLabel(_4.label);
+},setAllValues:function(_5,_6){
+this.setLabel(_5);
+this.setValue(_6);
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Show.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Show.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Show.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Show.js Sat May 26 15:47:41 2007
@@ -0,0 +1,198 @@
+dojo.provide("dojo.widget.Show");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.uri.Uri");
+dojo.require("dojo.event.*");
+dojo.require("dojo.lfx.*");
+dojo.require("dojo.math.curves");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.lang.func");
+dojo.widget.defineWidget("dojo.widget.Show",dojo.widget.HtmlWidget,function(){
+this._slides=[];
+},{isContainer:true,_slide:-1,body:null,nav:null,hider:null,select:null,option:null,inNav:false,debugPane:null,noClick:false,templateString:"<div class=\"dojoShow\">\n\t<div dojoAttachPoint=\"contentNode\"></div>\n\t<div class=\"dojoShowNav\" dojoAttachPoint=\"nav\">\n\t\t<div class=\"dojoShowHider\" dojoAttachPoint=\"hider\"></div>\n\t\t<span unselectable=\"on\" style=\"cursor: default;\" dojoAttachEvent=\"onClick:previousSlide\">&lt;</span>\n\t\t<select dojoAttachEvent=\"onClick:gotoSlideByEvent\" dojoAttachPoint=\"select\">\n\t\t\t<option dojoAttachPoint=\"option\">Title</option>\n\t\t</select>\n\t\t<span unselectable=\"on\" style=\"cursor: default;\" dojoAttachEvent=\"onClick:nextSlide\">&gt;</span>\n\t</div>\n</div>\n",templateCssString:"@media screen {\n\thtml, body {\n\t\tmargin: 0px;\n\t\tpadding: 0px;\n\t\twidth: 100%;\n\t}\n\th1 {\n\t\tfont-size: 50px;\n\t}\n\tp, li {\n\t\tfont-size: 30px;\n\t}\n\t.dojoShowNav {\n\t\tbackground: #369;\n\t\toverflow: hidden;\n\t\tpo
 sition: absolute;\n\t\theight: 5px;\n\t\tbottom: 0px;\n\t\tleft: 0px;\n\t\twidth: 100%;\n\t\ttext-align: center;\n\t}\n\t.dojoShowNav input {\n\t\tmargin: 0px;\n\t}\n\t.dojoShowHider {\n\t\theight: 5px;\n\t\toverflow: hidden;\n\t\twidth: 100%;\n\t}\n\t.dojoShowPrint {\n\t\tposition: absolute;\n\t\tleft: 5px;\n\t\ttop: 0px;\n\t}\n\t.dojoShow {\n\t\tdisplay: none;\n\t}\n}\n@media print {\n\t.dojoShow {\n\t\tdisplay: none !important;\n\t}\n\t.dojoShowPrint {\n\t\tdisplay: block !important;\n\t}\n\t.dojoShowPrintSlide {\n\t\tborder: 1px solid #aaa;\n\t\tpadding: 10px;\n\t\tmargin-bottom: 15px;\n\t}\n\t.dojoShowPrintSlide, ul {\n\tpage-break-inside: avoid;\n\t}\n\th1 {\n\t\tmargin-top: 0;\n\t\tpage-break-after: avoid;\n\t}\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/Show.css"),fillInTemplate:function(_1,_2){
+if(_1.debugPane){
+var dp=this.debugPane=dojo.widget.byId(_1.debugPane);
+dp.hide();
+dojo.event.connect(dp,"closeWindow",dojo.lang.hitch(this,function(){
+this.debugPane=false;
+}));
+}
+var _4=this.getFragNodeRef(_2);
+this.sourceNode=dojo.body().appendChild(_4.cloneNode(true));
+for(var i=0,_6;_6=this.sourceNode.childNodes[i];i++){
+if(_6.tagName&&_6.getAttribute("dojotype").toLowerCase()=="showslide"){
+_6.className="dojoShowPrintSlide";
+_6.innerHTML="<h1>"+_6.title+"</h1>"+_6.innerHTML;
+}
+}
+this.sourceNode.className="dojoShowPrint";
+this.sourceNode.style.display="none";
+dojo.event.connect(document,"onclick",this,"gotoSlideByEvent");
+if(dojo.render.html.ie){
+dojo.event.connect(document,"onkeydown",this,"gotoSlideByEvent");
+}else{
+dojo.event.connect(document,"onkeypress",this,"gotoSlideByEvent");
+}
+dojo.event.connect(window,"onresize",this,"resizeWindow");
+dojo.event.connect(this.nav,"onmousemove",this,"popUpNav");
+},postCreate:function(){
+this._slides=[];
+for(var i=0,_8;_8=this.children[i];i++){
+if(_8.widgetType=="ShowSlide"){
+this._slides.push(_8);
+this.option.text=_8.title+" ("+(i+1)+")";
+this.option.parentNode.insertBefore(this.option.cloneNode(true),this.option);
+}
+}
+this.option.parentNode.removeChild(this.option);
+this.domNode.style.display="block";
+this.resizeWindow();
+this.gotoSlide(0,true);
+dojo.addOnLoad(dojo.lang.hitch(this,function(){
+var th=window.location.hash;
+if(th.length){
+var _a=(""+window.location).split(this.widgetId+"_SlideNo_");
+if(_a.length>1){
+setTimeout(dojo.lang.hitch(this,function(){
+this.gotoSlide(parseInt(_a[1]),true);
+}),300);
+}
+}
+}));
+},gotoSlide:function(_b,_c){
+if(_b==this._slide){
+return;
+}
+if(!this._slides[_b]){
+for(var i=0,_e;_e=this._slides[i];i++){
+if(_e.title==_b){
+_b=i;
+break;
+}
+}
+}
+if(!this._slides[_b]){
+return;
+}
+if(this.debugPane){
+if(this._slides[_b].debug){
+this.debugPane.show();
+}else{
+this.debugPane.hide();
+}
+}
+if(this._slide!=-1){
+while(this._slides[this._slide].previousAction()){
+}
+}
+if(!_c){
+window.location.href="#"+this.widgetId+"_SlideNo_"+_b;
+}
+if(this._slides[this._slide]){
+this._slides[this._slide].hide();
+}
+this._slide=_b;
+this.select.selectedIndex=_b;
+var cn=this.contentNode;
+while(cn.firstChild){
+cn.removeChild(cn.firstChild);
+}
+cn.appendChild(this._slides[_b].domNode);
+this._slides[_b].show();
+},gotoSlideByEvent:function(_10){
+var _11=_10.target;
+var _12=_10.type;
+if(_12=="click"){
+if(_11.tagName=="OPTION"&&_11.parentNode==this.select){
+this.gotoSlide(_11.index);
+}else{
+if(_11==this.select){
+this.gotoSlide(_11.selectedIndex);
+}else{
+this.nextSlide(_10);
+}
+}
+}else{
+if(_12=="keydown"||_12=="keypress"){
+var key=_10.keyCode;
+var ch=_10.charCode;
+if(key==63234||key==37){
+this.previousSlide(_10);
+}else{
+if(key==63235||key==39||ch==32){
+this.nextSlide(_10);
+}
+}
+}
+}
+},nextSlide:function(_15){
+if(!this.stopEvent(_15)){
+return false;
+}
+if(!this._slides[this._slide].nextAction(_15)){
+if((this._slide+1)!=this._slides.length){
+this.gotoSlide(this._slide+1);
+return true;
+}
+return false;
+}
+},previousSlide:function(_16){
+if(!this.stopEvent(_16)){
+return false;
+}
+if(!this._slides[this._slide].previousAction(_16)){
+if((this._slide-1)!=-1){
+this.gotoSlide(this._slide-1);
+return true;
+}
+return false;
+}
+},stopEvent:function(ev){
+if(!ev){
+return true;
+}
+if(ev.type=="click"&&(this._slides[this._slide].noClick||this.noClick)){
+return false;
+}
+var _18=ev.target;
+while(_18!=null){
+if(_18==this.domNode){
+_18=ev.target;
+break;
+}
+_18=_18.parentNode;
+}
+if(!dojo.dom.isDescendantOf(_18,this.nav)){
+while(_18&&_18!=this.domNode){
+if(_18.tagName=="A"||_18.tagName=="INPUT"||_18.tagName=="TEXTAREA"||_18.tagName=="SELECT"){
+return false;
+}
+if(typeof _18.onclick=="function"||typeof _18.onkeypress=="function"){
+return false;
+}
+_18=_18.parentNode;
+}
+}
+if(window.event){
+ev.returnValue=false;
+ev.cancelBubble=true;
+}else{
+ev.preventDefault();
+ev.stopPropagation();
+}
+return true;
+},popUpNav:function(){
+if(!this.inNav){
+dojo.lfx.propertyAnimation(this.nav,{"height":{start:5,end:30}},250).play();
+}
+clearTimeout(this.inNav);
+this.inNav=setTimeout(dojo.lang.hitch(this,"hideNav"),2000);
+},hideNav:function(){
+clearTimeout(this.inNav);
+this.inNav=false;
+dojo.lfx.propertyAnimation(this.nav,{"height":{start:30,end:5}},250).play();
+},resizeWindow:function(ev){
+dojo.body().style.height="auto";
+var h=Math.max(document.documentElement.scrollHeight||dojo.body().scrollHeight,dojo.html.getViewport().height);
+dojo.body().style.height=h+"px";
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowAction.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowAction.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowAction.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowAction.js Sat May 26 15:47:41 2007
@@ -0,0 +1,7 @@
+dojo.provide("dojo.widget.ShowAction");
+dojo.require("dojo.widget.*");
+dojo.widget.defineWidget("dojo.widget.ShowAction",dojo.widget.HtmlWidget,{on:"",action:"fade",duration:350,from:"",to:"",auto:"false",postMixInProperties:function(){
+if(dojo.render.html.opera){
+this.action=this.action.split("/").pop();
+}
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowSlide.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowSlide.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowSlide.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/ShowSlide.js Sat May 26 15:47:41 2007
@@ -0,0 +1,188 @@
+dojo.provide("dojo.widget.ShowSlide");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.lfx.html");
+dojo.require("dojo.html.display");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.animation.Animation");
+dojo.require("dojo.gfx.color");
+dojo.widget.defineWidget("dojo.widget.ShowSlide",dojo.widget.HtmlWidget,{title:"",_action:-1,isContainer:true,_components:{},_actions:[],gotoAction:function(_1){
+this._action=_1;
+},_nextAction:function(_2){
+if((this._action+1)!=this._actions.length){
+++this._action;
+return true;
+}
+return false;
+},_previousAction:function(_3){
+if((this._action-1)!=-1){
+--this._action;
+return true;
+}
+return false;
+},htmlTitle:null,debug:false,noClick:false,templateString:"<div class=\"dojoShowSlide\">\n\t<div class=\"dojoShowSlideTitle\">\n\t\t<h1 dojoAttachPoint=\"htmlTitle\">Title</h1>\n\t</div>\n\t<div class=\"dojoShowSlideBody\" dojoAttachPoint=\"containerNode\"></div>\n</div>\n",templateCssString:".dojoShowSlideTitle {\n\theight: 100px;\n\tbackground: #369;\n}\n.dojoShowSlideTitle h1 {\n\tmargin-top: 0;\n\tline-height: 100px;\n\tmargin-left: 30px;\n}\n.dojoShowSlideBody {\n\tmargin: 15px;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ShowSlide.css"),postCreate:function(){
+this.htmlTitle.innerHTML=this.title;
+var _4=this.getChildrenOfType("ShowAction",false);
+var _5={};
+dojo.lang.forEach(_4,function(_6){
+_5[_6.on]=true;
+});
+this._components={};
+var cn=this.containerNode;
+var _8=dojo.render.html.ie?cn.all:cn.getElementsByTagName("*");
+dojo.lang.forEach(_8,function(_9){
+var as=_9.getAttribute("as");
+if(as){
+if(!this._components[as]){
+this._components[as]=[];
+}
+this._components[as].push(_9);
+if(!_5[as]){
+var _b=dojo.widget.createWidget("ShowAction",{on:as});
+this.addChild(_b);
+_5[as]=true;
+}
+}
+},this);
+this._actions=[];
+_4=this.getChildrenOfType("ShowAction",false);
+dojo.lang.forEach(_4,function(_c){
+this._actions.push(_c);
+var _d=this._components[_c.on];
+for(var j=0,_f;_f=_d[j];j++){
+if(_c["action"]&&((_c.action!="remove")&&(_c.action!="fadeout")&&(_c.action!="wipeout"))){
+this.hideComponent(_f);
+}
+}
+},this);
+},previousAction:function(_10){
+if(!this.parent.stopEvent(_10)){
+return false;
+}
+var _11=this._actions[this._action];
+if(!_11){
+return false;
+}
+var on=_11.on;
+while(_11.on==on){
+var _13=this._components[on];
+for(var i=0,_15;_15=_13[i];i++){
+if((_11.action=="remove")||(_11.action=="fadeout")||(_11.action=="wipeout")){
+if(_15.style.display=="none"){
+_15.style.display="";
+_15.style.visibility="visible";
+var _16=true;
+}
+dojo.html.setOpacity(_15,1);
+}else{
+if(_11.action){
+this.hideComponent(_15);
+}
+}
+}
+--this._action;
+if(_16){
+return true;
+}
+if(_11.auto=="true"){
+on=this._actions[this._action].on;
+}
+_11=this._actions[this._action];
+if(!_11){
+return false;
+}
+}
+return true;
+},hideComponent:function(_17){
+_17.style.visibility="hidden";
+_17.style.backgroundColor="transparent";
+var _18=_17.parentNode;
+if((_18)&&(_18.tagName.toLowerCase()=="li")){
+_18.oldType=_18.style.listStyleType;
+_18.style.listStyleType="none";
+}
+},nextAction:function(_19){
+if(!this.parent.stopEvent(_19)){
+return false;
+}
+if(!this._nextAction(this)){
+return false;
+}
+var _1a=this._actions[this._action];
+if(!_1a){
+return false;
+}
+var _1b=_1a["action"];
+var _1c=this._components[_1a.on];
+for(var i=0,_1e;_1e=_1c[i];i++){
+if(_1b){
+var _1f=_1a.duration||1000;
+if((_1b=="fade")||(_1b=="fadeIn")){
+dojo.html.setOpacity(_1e,0);
+dojo.lfx.html.fadeShow(_1e,_1f).play(true);
+}else{
+if(_1b=="fadeout"){
+dojo.lfx.html.fadeHide(_1e,_1f).play(true);
+}else{
+if(_1b=="fly"){
+var _20=dojo.html.getMarginBox(_1e).width;
+var _21=dojo.html.getAbsolutePosition(_1e);
+_1e.style.position="relative";
+_1e.style.left=-(_20+_21.x)+"px";
+dojo.lfx.html.slideBy(_1e,{top:0,left:(_20+_21.x)},_1f,-1,this.callWith).play(true);
+}else{
+if((_1b=="wipe")||(_1b=="wipein")){
+dojo.lfx.html.wipeIn(_1e,_1f).play();
+}else{
+if(_1b=="wipeout"){
+dojo.lfx.html.wipeOut(_1e,_1f).play();
+}else{
+if(_1b=="color"){
+var _22=new dojo.gfx.color.Color(_1a.from).toRgb();
+var to=new dojo.gfx.color.Color(_1a.to).toRgb();
+var _24=new dojo.animation.Animation(new dojo.math.curves.Line(_22,to),_1f,0);
+var _25=_1e;
+dojo.event.connect(_24,"onAnimate",function(e){
+_25.style.color="rgb("+e.coordsAsInts().join(",")+")";
+});
+_24.play(true);
+}else{
+if(_1b=="bgcolor"){
+dojo.lfx.html.unhighlight(_1e,_1a.to,_1f).play();
+}else{
+if(_1b=="remove"){
+_1e.style.display="none";
+}
+}
+}
+}
+}
+}
+}
+}
+if(_1b=="hide"){
+_1e.style.visibility="hidden";
+}else{
+_1e.style.visibility="visible";
+}
+}
+}
+_1a=this._actions[this._action+1];
+if(_1a&&_1a.auto=="true"){
+this.nextAction();
+}
+return true;
+},callWith:function(_27){
+if(!_27){
+return;
+}
+if(dojo.lang.isArray(_27)){
+dojo.lang.forEach(_27,arguments.callee);
+return;
+}
+var _28=_27.parentNode;
+if((_28)&&(_28.tagName.toLowerCase()=="li")){
+_28.style.listStyleType=_28.oldType;
+}
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SlideShow.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SlideShow.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SlideShow.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SlideShow.js Sat May 26 15:47:41 2007
@@ -0,0 +1,64 @@
+dojo.provide("dojo.widget.SlideShow");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.lfx.*");
+dojo.require("dojo.html.display");
+dojo.widget.defineWidget("dojo.widget.SlideShow",dojo.widget.HtmlWidget,{templateString:"<div style=\"position: relative; padding: 3px;\">\n\t\t<div>\n\t\t\t<input type=\"button\" value=\"pause\" \n\t\t\t\tdojoAttachPoint=\"startStopButton\"\n\t\t\t\tdojoAttachEvent=\"onClick: togglePaused;\">\n\t\t</div>\n\t\t<div style=\"position: relative; width: ${this.width}; height: ${this.height};\"\n\t\t\tdojoAttachPoint=\"imagesContainer\"\n\t\t\tdojoAttachEvent=\"onClick: togglePaused;\">\n\t\t\t<img dojoAttachPoint=\"img1\" class=\"slideShowImg\" \n\t\t\t\tstyle=\"z-index: 1; width: ${this.width}; height: ${this.height};\"  />\n\t\t\t<img dojoAttachPoint=\"img2\" class=\"slideShowImg\" \n\t\t\t\tstyle=\"z-index: 0; width: ${this.width}; height: ${this.height};\" />\n\t\t</div>\t\n</div>\n",templateCssString:".slideShowImg {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px; \n\tborder: 2px solid #4d4d4d;\n\tpadding: 0px;\n\tmargin: 0px;\n}\n\n",templateCssPath:dojo.uri.moduleUri("d
 ojo.widget","templates/SlideShow.css"),imgUrls:[],imgUrlBase:"",delay:4000,transitionInterval:2000,imgWidth:800,imgHeight:600,preventCache:false,stopped:false,_urlsIdx:0,_background:"img2",_foreground:"img1",fadeAnim:null,startStopButton:null,img1:null,img2:null,postMixInProperties:function(){
+this.width=this.imgWidth+"px";
+this.height=this.imgHeight+"px";
+},fillInTemplate:function(){
+if(dojo.render.html.safari&&this.imgUrls.length==2){
+this.preventCache=true;
+}
+dojo.html.setOpacity(this.img1,0.9999);
+dojo.html.setOpacity(this.img2,0.9999);
+if(this.imgUrls.length>1){
+this.img2.src=this.imgUrlBase+this.imgUrls[this._urlsIdx++]+this._getUrlSuffix();
+this._endTransition();
+}else{
+this.img1.src=this.imgUrlBase+this.imgUrls[this._urlsIdx++]+this._getUrlSuffix();
+}
+},_getUrlSuffix:function(){
+if(this.preventCache){
+return "?ts="+(new Date()).getTime();
+}else{
+return "";
+}
+},togglePaused:function(){
+if(this.stopped){
+this.stopped=false;
+this._backgroundImageLoaded();
+this.startStopButton.value="pause";
+}else{
+this.stopped=true;
+this.startStopButton.value="play";
+}
+},_backgroundImageLoaded:function(){
+if(this.stopped){
+return;
+}
+if(this.fadeAnim){
+this.fadeAnim.stop();
+}
+this.fadeAnim=dojo.lfx.fadeOut(this[this._foreground],this.transitionInterval,null);
+dojo.event.connect(this.fadeAnim,"onEnd",this,"_endTransition");
+this.fadeAnim.play();
+},_endTransition:function(){
+with(this[this._background].style){
+zIndex=parseInt(zIndex)+1;
+}
+with(this[this._foreground].style){
+zIndex=parseInt(zIndex)-1;
+}
+var _1=this._foreground;
+this._foreground=this._background;
+this._background=_1;
+this._loadNextImage();
+},_loadNextImage:function(){
+dojo.event.kwConnect({srcObj:this[this._background],srcFunc:"onload",adviceObj:this,adviceFunc:"_backgroundImageLoaded",once:true,delay:this.delay});
+dojo.html.setOpacity(this[this._background],1);
+this[this._background].src=this.imgUrlBase+this.imgUrls[this._urlsIdx++];
+if(this._urlsIdx>(this.imgUrls.length-1)){
+this._urlsIdx=0;
+}
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Slider.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Slider.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Slider.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Slider.js Sat May 26 15:47:41 2007
@@ -0,0 +1,462 @@
+dojo.provide("dojo.widget.Slider");
+dojo.require("dojo.event.*");
+dojo.require("dojo.dnd.*");
+dojo.require("dojo.dnd.HtmlDragMove");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.html.layout");
+dojo.widget.defineWidget("dojo.widget.Slider",dojo.widget.HtmlWidget,{minimumX:0,minimumY:0,maximumX:10,maximumY:10,snapValuesX:0,snapValuesY:0,_snapToGrid:true,isEnableX:true,isEnableY:true,_valueSizeX:0,_valueSizeY:0,_minX:0,_minY:0,_constraintWidth:0,_constraintHeight:0,_clipLeft:0,_clipRight:0,_clipTop:0,_clipBottom:0,_clipXdelta:0,_clipYdelta:0,initialValueX:0,initialValueY:0,flipX:false,flipY:false,clickSelect:true,activeDrag:false,templateCssString:".sliderMain {\n  border: 0px !important;\n  border-spacing: 0px !important;\n  line-height: 0px !important;\n  padding: 0px !important;\n  display: -moz-inline-table !important;\n  display: inline !important;\n  -moz-user-focus: normal !important;\n}\n\n.sliderComponent {\n  border: 0px;\n  padding: 0px;\n  margin: 0px;\n}\n\n.sliderHandle { \n  top: 0px;\n  left: 0px;\n  z-index: 1000;\n  position: absolute !important;\n}\n\n.sliderOutsetButton { \n  border-style: outset;\n  border-width: 0px 1px 1px 0px;\n  border-color:
  black;\n}\n\n.sliderInsetButton { \n  border-style: inset;\n  border-width: 1px 0px 0px 1px;\n  border-color: black;\n}\n\n.sliderButtonY {\n  margin: 0px;\n  padding: 0px;\n  z-index: 900;\n}\n\n.sliderButtonX {\n  margin: 0px;\n  padding: 0px;\n  z-index: 900;\n}\n\n.sliderBackground { \n  z-index: 0;\n  display: block !important;\n  position: relative !important;\n}\n\n.sliderProgressBackground { \n  z-index: 800;\n  position: absolute !important;\n  clip: rect(0px,0px,0px,0px);\n}\n\n.sliderBackgroundSizeOnly { \n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/Slider.css"),templateString:"<table _=\"weird end tag formatting is to prevent whitespace from becoming &nbsp;\" \n\tclass=\"sliderMain\" \n\tdojoAttachPoint=\"focusNode\" \n\tdojoAttachEvent=\"onmousedown:_setFocus; onkey:_handleKeyEvents; onkeyup:_buttonReleased; onmouseup:_buttonReleased; onmousewheel:_mouseWheeled;\"\n\ttabindex=\"0\" cols=3 cellpadding=0 cellspacing=0 style=\"\">\n\t<tr valig
 n=middle align=center>\n\t\t<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=topBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonY\"\n\t\t\t\tdojoAttachPoint=topButtonNode \n\t\t\t\tdojoAttachEvent=\"onmousedown:_topButtonPressed; onmousemove:_discardEvent; ondblclick:_topButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.topButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleY}\"\n\t\t></td>\n\t</tr>\n\t<tr valign=middle align=center>\n\t\t<td class=\"sliderComponent\" dojoAttachPoint=leftBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonX\"\n\t\t\t\tdojoAttachPoint=leftButtonNode\n\t\t\t\tdojoAttachEvent=\"onmousedown:_leftButtonPressed; onmousemove:_discardEvent; ondblclick:_leftButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.leftButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleX}\"\n\t\t></td>\n\t\t<td dojoAttachPoint=constrainingContainerNode \n\t\t\tclass=\"sliderComponent sliderBackground\"\n\t\t\tstyle=\"${this.backgroundSt
 yle}\"\n\t\t\t><img src=\"${this.handleSrc}\" \n\t\t\t\tclass=sliderHandle\n\t\t\t\tdojoAttachPoint=sliderHandleNode\n\t\t\t\tstyle=\"${this.handleStyle}\"\n\t\t\t><img src=\"${this.progressBackgroundSrc}\"\n\t\t\t\tclass=\"sliderBackgroundSizeOnly sliderProgressBackground\"\n\t\t\t\tdojoAttachPoint=progressBackgroundNode\n\t\t\t\tstyle=\"${this.backgroundSize}\"\n\t\t\t><img src=\"${this.backgroundSrc}\" \n\t\t\t\tclass=sliderBackgroundSizeOnly\n\t\t\t\tdojoAttachPoint=sliderBackgroundNode\n\t\t\t\tstyle=\"${this.backgroundSize}\"\n\t\t></td>\n\t\t<td class=\"sliderComponent\" dojoAttachPoint=rightBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonX\"\n\t\t\t\tdojoAttachPoint=rightButtonNode\n\t\t\t\tdojoAttachEvent=\"onmousedown:_rightButtonPressed; onmousemove:_discardEvent; ondblclick:_rightButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.rightButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleX}\"\n\t\t></td>\n\t</tr>\n\t<tr valign=middle align=center>\
 n\t\t<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=bottomBorderNode style=\"\"\n\t\t\t><img class=\"sliderOutsetButton sliderButtonY\"\n\t\t\t\tdojoAttachPoint=bottomButtonNode \n\t\t\t\tdojoAttachEvent=\"onmousedown:_bottomButtonPressed; onmousemove:_discardEvent; ondblclick:_bottomButtonDoubleClicked;\"\n\t\t\t\tsrc=\"${this.bottomButtonSrc}\" \n\t\t\t\tstyle=\"${this.buttonStyleY}\"\n\t\t></td>\n\t</tr>\n</table>\n",_isDragInProgress:false,bottomButtonSrc:dojo.uri.moduleUri("dojo.widget","templates/images/slider_down_arrow.png"),topButtonSrc:dojo.uri.moduleUri("dojo.widget","templates/images/slider_up_arrow.png"),leftButtonSrc:dojo.uri.moduleUri("dojo.widget","templates/images/slider_left_arrow.png"),rightButtonSrc:dojo.uri.moduleUri("dojo.widget","templates/images/slider_right_arrow.png"),backgroundSrc:dojo.uri.moduleUri("dojo.widget","templates/images/blank.gif"),progressBackgroundSrc:dojo.uri.moduleUri("dojo.widget","templates/images/blank.gif"),backgroundSiz
 e:"width:200px;height:200px;",backgroundStyle:"",buttonStyleX:"",buttonStyleY:"",handleStyle:"",handleSrc:dojo.uri.moduleUri("dojo.widget","templates/images/slider-button.png"),showButtons:true,_eventCount:0,_typamaticTimer:null,_typamaticFunction:null,defaultTimeout:500,timeoutChangeRate:0.9,_currentTimeout:this.defaultTimeout,_handleKeyEvents:function(_1){
+if(!_1.key){
+return;
+}
+if(!_1.ctrlKey&&!_1.altKey){
+switch(_1.key){
+case _1.KEY_LEFT_ARROW:
+dojo.event.browser.stopEvent(_1);
+this._leftButtonPressed(_1);
+return;
+case _1.KEY_RIGHT_ARROW:
+dojo.event.browser.stopEvent(_1);
+this._rightButtonPressed(_1);
+return;
+case _1.KEY_DOWN_ARROW:
+dojo.event.browser.stopEvent(_1);
+this._bottomButtonPressed(_1);
+return;
+case _1.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(_1);
+this._topButtonPressed(_1);
+return;
+}
+}
+this._eventCount++;
+},_pressButton:function(_2){
+_2.className=_2.className.replace("Outset","Inset");
+},_releaseButton:function(_3){
+_3.className=_3.className.replace("Inset","Outset");
+},_buttonPressed:function(_4,_5){
+this._setFocus();
+if(typeof _4=="object"){
+if(this._typamaticTimer!=null){
+if(this._typamaticNode==_5){
+return;
+}
+clearTimeout(this._typamaticTimer);
+}
+this._buttonReleased(null);
+this._eventCount++;
+this._typamaticTimer=null;
+this._currentTimeout=this.defaultTimeout;
+dojo.event.browser.stopEvent(_4);
+}else{
+if(_4!=this._eventCount){
+this._buttonReleased(null);
+return false;
+}
+}
+if(_5==this.leftButtonNode&&this.isEnableX){
+this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")-this._valueSizeX);
+}else{
+if(_5==this.rightButtonNode&&this.isEnableX){
+this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")+this._valueSizeX);
+}else{
+if(_5==this.topButtonNode&&this.isEnableY){
+this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")-this._valueSizeY);
+}else{
+if(_5==this.bottomButtonNode&&this.isEnableY){
+this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")+this._valueSizeY);
+}else{
+return false;
+}
+}
+}
+}
+this._pressButton(_5);
+this.notifyListeners();
+this._typamaticNode=_5;
+this._typamaticTimer=dojo.lang.setTimeout(this,"_buttonPressed",this._currentTimeout,this._eventCount,_5);
+this._currentTimeout=Math.round(this._currentTimeout*this.timeoutChangeRate);
+return false;
+},_bottomButtonPressed:function(_6){
+return this._buttonPressed(_6,this.bottomButtonNode);
+},_bottomButtonDoubleClicked:function(_7){
+var rc=this._bottomButtonPressed(_7);
+dojo.lang.setTimeout(this,"_buttonReleased",50,null);
+return rc;
+},_topButtonPressed:function(_9){
+return this._buttonPressed(_9,this.topButtonNode);
+},_topButtonDoubleClicked:function(_a){
+var rc=this._topButtonPressed(_a);
+dojo.lang.setTimeout(this,"_buttonReleased",50,null);
+return rc;
+},_leftButtonPressed:function(_c){
+return this._buttonPressed(_c,this.leftButtonNode);
+},_leftButtonDoubleClicked:function(_d){
+var rc=this._leftButtonPressed(_d);
+dojo.lang.setTimeout(this,"_buttonReleased",50,null);
+return rc;
+},_rightButtonPressed:function(_f){
+return this._buttonPressed(_f,this.rightButtonNode);
+},_rightButtonDoubleClicked:function(evt){
+var rc=this._rightButtonPressed(evt);
+dojo.lang.setTimeout(this,"_buttonReleased",50,null);
+return rc;
+},_buttonReleased:function(evt){
+if(typeof evt=="object"&&evt!=null&&typeof evt.keyCode!="undefined"&&evt.keyCode!=null){
+var _13=evt.keyCode;
+switch(_13){
+case evt.KEY_LEFT_ARROW:
+case evt.KEY_RIGHT_ARROW:
+case evt.KEY_DOWN_ARROW:
+case evt.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(evt);
+break;
+}
+}
+this._releaseButton(this.topButtonNode);
+this._releaseButton(this.bottomButtonNode);
+this._releaseButton(this.leftButtonNode);
+this._releaseButton(this.rightButtonNode);
+this._eventCount++;
+if(this._typamaticTimer!=null){
+clearTimeout(this._typamaticTimer);
+}
+this._typamaticTimer=null;
+this._currentTimeout=this.defaultTimeout;
+},_mouseWheeled:function(evt){
+var _15=0;
+if(typeof evt.wheelDelta=="number"){
+_15=evt.wheelDelta;
+}else{
+if(typeof evt.detail=="number"){
+_15=-evt.detail;
+}
+}
+if(this.isEnableY){
+if(_15>0){
+this._topButtonPressed(evt);
+this._buttonReleased(evt);
+}else{
+if(_15<0){
+this._bottomButtonPressed(evt);
+this._buttonReleased(evt);
+}
+}
+}else{
+if(this.isEnableX){
+if(_15>0){
+this._rightButtonPressed(evt);
+this._buttonReleased(evt);
+}else{
+if(_15<0){
+this._leftButtonPressed(evt);
+this._buttonReleased(evt);
+}
+}
+}
+}
+},_discardEvent:function(evt){
+dojo.event.browser.stopEvent(evt);
+},_setFocus:function(){
+if(this.focusNode.focus){
+this.focusNode.focus();
+}
+},fillInTemplate:function(_17,_18){
+var _19=this.getFragNodeRef(_18);
+dojo.html.copyStyle(this.domNode,_19);
+var _1a=this.domNode.style.padding;
+if(dojo.lang.isString(_1a)&&_1a!=""&&_1a!="0px"&&_1a!="0px 0px 0px 0px"){
+this.topBorderNode.style.padding=this.bottomBorderNode.style.padding=_1a;
+this.topBorderNode.style.paddingBottom="0px";
+this.bottomBorderNode.style.paddingTop="0px";
+this.rightBorderNode.style.paddingRight=this.domNode.style.paddingRight;
+this.leftBorderNode.style.paddingLeft=this.domNode.style.paddingLeft;
+this.domNode.style.padding="0px 0px 0px 0px";
+}
+var _1b=this.domNode.style.borderWidth;
+if(dojo.lang.isString(_1b)&&_1b!=""&&_1b!="0px"&&_1b!="0px 0px 0px 0px"){
+this.topBorderNode.style.borderStyle=this.rightBorderNode.style.borderStyle=this.bottomBorderNode.style.borderStyle=this.leftBorderNode.style.borderStyle=this.domNode.style.borderStyle;
+this.topBorderNode.style.borderColor=this.rightBorderNode.style.borderColor=this.bottomBorderNode.style.borderColor=this.leftBorderNode.style.borderColor=this.domNode.style.borderColor;
+this.topBorderNode.style.borderWidth=this.bottomBorderNode.style.borderWidth=_1b;
+this.topBorderNode.style.borderBottomWidth="0px";
+this.bottomBorderNode.style.borderTopWidth="0px";
+this.rightBorderNode.style.borderRightWidth=this.domNode.style.borderRightWidth;
+this.leftBorderNode.style.borderLeftWidth=this.domNode.style.borderLeftWidth;
+this.domNode.style.borderWidth="0px 0px 0px 0px";
+}
+this._handleMove=new dojo.widget._SliderDragMoveSource(this.sliderHandleNode);
+this._handleMove.setParent(this);
+if(this.clickSelect){
+dojo.event.connect(this.constrainingContainerNode,"onmousedown",this,"_onClick");
+}
+if(this.isEnableX){
+this.setValueX(!isNaN(this.initialValueX)?this.initialValueX:(!isNaN(this.minimumX)?this.minimumX:0));
+}
+if(!this.isEnableX||!this.showButtons){
+this.rightButtonNode.style.width="1px";
+this.rightButtonNode.style.visibility="hidden";
+this.leftButtonNode.style.width="1px";
+this.leftButtonNode.style.visibility="hidden";
+}
+if(this.isEnableY){
+this.setValueY(!isNaN(this.initialValueY)?this.initialValueY:(!isNaN(this.minimumY)?this.minimumY:0));
+}
+if(!this.isEnableY||!this.showButtons){
+this.bottomButtonNode.style.width="1px";
+this.bottomButtonNode.style.visibility="hidden";
+this.topButtonNode.style.width="1px";
+this.topButtonNode.style.visibility="hidden";
+}
+if(this.focusNode.addEventListener){
+this.focusNode.addEventListener("DOMMouseScroll",dojo.lang.hitch(this,"_mouseWheeled"),false);
+}
+},_snapX:function(x){
+if(x<0){
+x=0;
+}else{
+if(x>this._constraintWidth){
+x=this._constraintWidth;
+}else{
+var _1d=Math.round(x/this._valueSizeX);
+x=Math.round(_1d*this._valueSizeX);
+}
+}
+this.sliderHandleNode.style.left=x+"px";
+if(this.flipX){
+this._clipLeft=x+this._clipXdelta;
+}else{
+this._clipRight=x+this._clipXdelta;
+}
+this.progressBackgroundNode.style.clip="rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";
+},_calc_valueSizeX:function(){
+var _1e=dojo.html.getContentBox(this.constrainingContainerNode);
+var _1f=dojo.html.getContentBox(this.sliderHandleNode);
+if(isNaN(_1e.width)||isNaN(_1f.width)||_1e.width<=0||_1f.width<=0){
+return false;
+}
+this._constraintWidth=_1e.width+dojo.html.getPadding(this.constrainingContainerNode).width-_1f.width;
+if(this.flipX){
+this._clipLeft=this._clipRight=_1e.width;
+}else{
+this._clipLeft=this._clipRight=0;
+}
+this._clipXdelta=_1f.width>>1;
+if(!this.isEnableY){
+this._clipTop=0;
+this._clipBottom=_1e.height;
+}
+if(this._constraintWidth<=0){
+return false;
+}
+if(this.snapValuesX==0){
+this.snapValuesX=this._constraintWidth+1;
+}
+this._valueSizeX=this._constraintWidth/(this.snapValuesX-1);
+return true;
+},setValueX:function(_20){
+if(0==this._valueSizeX){
+if(this._calc_valueSizeX()==false){
+dojo.lang.setTimeout(this,"setValueX",100,_20);
+return;
+}
+}
+if(isNaN(_20)){
+_20=0;
+}
+if(_20>this.maximumX){
+_20=this.maximumX;
+}else{
+if(_20<this.minimumX){
+_20=this.minimumX;
+}
+}
+var _21=(_20-this.minimumX)/(this.maximumX-this.minimumX);
+if(this.flipX){
+_21=1-_21;
+}
+this._snapX(_21*this._constraintWidth);
+this.notifyListeners();
+},getValueX:function(){
+var _22=dojo.html.getPixelValue(this.sliderHandleNode,"left")/this._constraintWidth;
+if(this.flipX){
+_22=1-_22;
+}
+return Math.round(_22*(this.snapValuesX-1))*((this.maximumX-this.minimumX)/(this.snapValuesX-1))+this.minimumX;
+},_snapY:function(y){
+if(y<0){
+y=0;
+}else{
+if(y>this._constraintHeight){
+y=this._constraintHeight;
+}else{
+var _24=Math.round(y/this._valueSizeY);
+y=Math.round(_24*this._valueSizeY);
+}
+}
+this.sliderHandleNode.style.top=y+"px";
+if(this.flipY){
+this._clipTop=y+this._clipYdelta;
+}else{
+this._clipBottom=y+this._clipYdelta;
+}
+this.progressBackgroundNode.style.clip="rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";
+},_calc_valueSizeY:function(){
+var _25=dojo.html.getContentBox(this.constrainingContainerNode);
+var _26=dojo.html.getContentBox(this.sliderHandleNode);
+if(isNaN(_25.height)||isNaN(_26.height)||_25.height<=0||_26.height<=0){
+return false;
+}
+this._constraintHeight=_25.height+dojo.html.getPadding(this.constrainingContainerNode).height-_26.height;
+if(this.flipY){
+this._clipTop=this._clipBottom=_25.height;
+}else{
+this._clipTop=this._clipBottom=0;
+}
+this._clipYdelta=_26.height>>1;
+if(!this.isEnableX){
+this._clipLeft=0;
+this._clipRight=_25.width;
+}
+if(this._constraintHeight<=0){
+return false;
+}
+if(this.snapValuesY==0){
+this.snapValuesY=this._constraintHeight+1;
+}
+this._valueSizeY=this._constraintHeight/(this.snapValuesY-1);
+return true;
+},setValueY:function(_27){
+if(0==this._valueSizeY){
+if(this._calc_valueSizeY()==false){
+dojo.lang.setTimeout(this,"setValueY",100,_27);
+return;
+}
+}
+if(isNaN(_27)){
+_27=0;
+}
+if(_27>this.maximumY){
+_27=this.maximumY;
+}else{
+if(_27<this.minimumY){
+_27=this.minimumY;
+}
+}
+var _28=(_27-this.minimumY)/(this.maximumY-this.minimumY);
+if(this.flipY){
+_28=1-_28;
+}
+this._snapY(_28*this._constraintHeight);
+this.notifyListeners();
+},getValueY:function(){
+var _29=dojo.html.getPixelValue(this.sliderHandleNode,"top")/this._constraintHeight;
+if(this.flipY){
+_29=1-_29;
+}
+return Math.round(_29*(this.snapValuesY-1))*((this.maximumY-this.minimumY)/(this.snapValuesY-1))+this.minimumY;
+},_onClick:function(evt){
+if(this._isDragInProgress){
+return;
+}
+var _2b=dojo.html.getAbsolutePosition(this.constrainingContainerNode,true,dojo.html.boxSizing.MARGIN_BOX);
+var _2c=dojo.html.getContentBox(this._handleMove.domNode);
+if(this.isEnableX){
+var x=evt.pageX-_2b.x-(_2c.width>>1);
+this._snapX(x);
+}
+if(this.isEnableY){
+var y=evt.pageY-_2b.y-(_2c.height>>1);
+this._snapY(y);
+}
+this.notifyListeners();
+},notifyListeners:function(){
+this.onValueChanged(this.getValueX(),this.getValueY());
+},onValueChanged:function(x,y){
+}});
+dojo.widget.defineWidget("dojo.widget.SliderHorizontal",dojo.widget.Slider,{isEnableX:true,isEnableY:false,initialValue:"",snapValues:"",minimum:"",maximum:"",buttonStyle:"",backgroundSize:"height:10px;width:200px;",backgroundSrc:dojo.uri.moduleUri("dojo.widget","templates/images/slider-bg.gif"),flip:false,postMixInProperties:function(){
+dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this,arguments);
+if(!isNaN(parseFloat(this.initialValue))){
+this.initialValueX=parseFloat(this.initialValue);
+}
+if(!isNaN(parseFloat(this.minimum))){
+this.minimumX=parseFloat(this.minimum);
+}
+if(!isNaN(parseFloat(this.maximum))){
+this.maximumX=parseFloat(this.maximum);
+}
+if(!isNaN(parseInt(this.snapValues))){
+this.snapValuesX=parseInt(this.snapValues);
+}
+if(dojo.lang.isString(this.buttonStyle)&&this.buttonStyle!=""){
+this.buttonStyleX=this.buttonStyle;
+}
+if(dojo.lang.isBoolean(this.flip)){
+this.flipX=this.flip;
+}
+},notifyListeners:function(){
+this.onValueChanged(this.getValueX());
+},getValue:function(){
+return this.getValueX();
+},setValue:function(_31){
+this.setValueX(_31);
+},onValueChanged:function(_32){
+}});
+dojo.widget.defineWidget("dojo.widget.SliderVertical",dojo.widget.Slider,{isEnableX:false,isEnableY:true,initialValue:"",snapValues:"",minimum:"",maximum:"",buttonStyle:"",backgroundSize:"width:10px;height:200px;",backgroundSrc:dojo.uri.moduleUri("dojo.widget","templates/images/slider-bg-vert.gif"),flip:false,postMixInProperties:function(){
+dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this,arguments);
+if(!isNaN(parseFloat(this.initialValue))){
+this.initialValueY=parseFloat(this.initialValue);
+}
+if(!isNaN(parseFloat(this.minimum))){
+this.minimumY=parseFloat(this.minimum);
+}
+if(!isNaN(parseFloat(this.maximum))){
+this.maximumY=parseFloat(this.maximum);
+}
+if(!isNaN(parseInt(this.snapValues))){
+this.snapValuesY=parseInt(this.snapValues);
+}
+if(dojo.lang.isString(this.buttonStyle)&&this.buttonStyle!=""){
+this.buttonStyleY=this.buttonStyle;
+}
+if(dojo.lang.isBoolean(this.flip)){
+this.flipY=this.flip;
+}
+},notifyListeners:function(){
+this.onValueChanged(this.getValueY());
+},getValue:function(){
+return this.getValueY();
+},setValue:function(_33){
+this.setValueY(_33);
+},onValueChanged:function(_34){
+}});
+dojo.declare("dojo.widget._SliderDragMoveSource",dojo.dnd.HtmlDragMoveSource,{slider:null,onDragStart:function(evt){
+this.slider._isDragInProgress=true;
+var _36=this.createDragMoveObject();
+this.slider.notifyListeners();
+return _36;
+},onDragEnd:function(evt){
+this.slider._isDragInProgress=false;
+this.slider.notifyListeners();
+},createDragMoveObject:function(){
+var _38=new dojo.widget._SliderDragMoveObject(this.dragObject,this.type);
+_38.slider=this.slider;
+if(this.dragClass){
+_38.dragClass=this.dragClass;
+}
+return _38;
+},setParent:function(_39){
+this.slider=_39;
+}});
+dojo.declare("dojo.widget._SliderDragMoveObject",dojo.dnd.HtmlDragMoveObject,{slider:null,onDragMove:function(evt){
+this.updateDragOffset();
+if(this.slider.isEnableX){
+var x=this.dragOffset.x+evt.pageX;
+this.slider._snapX(x);
+}
+if(this.slider.isEnableY){
+var y=this.dragOffset.y+evt.pageY;
+this.slider._snapY(y);
+}
+if(this.slider.activeDrag){
+this.slider.notifyListeners();
+}
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SortableTable.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SortableTable.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SortableTable.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SortableTable.js Sat May 26 15:47:41 2007
@@ -0,0 +1,487 @@
+dojo.provide("dojo.widget.SortableTable");
+dojo.deprecated("SortableTable will be removed in favor of FilteringTable.","0.5");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.date.format");
+dojo.require("dojo.html.*");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.html.util");
+dojo.require("dojo.html.style");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.widget.defineWidget("dojo.widget.SortableTable",dojo.widget.HtmlWidget,function(){
+this.data=[];
+this.selected=[];
+this.columns=[];
+},{enableMultipleSelect:false,maximumNumberOfSelections:0,enableAlternateRows:false,minRows:0,defaultDateFormat:"%D",sortIndex:0,sortDirection:0,valueField:"Id",headClass:"",tbodyClass:"",headerClass:"",headerSortUpClass:"selected",headerSortDownClass:"selected",rowClass:"",rowAlternateClass:"alt",rowSelectedClass:"selected",columnSelected:"sorted-column",isContainer:false,templatePath:null,templateCssPath:null,getTypeFromString:function(s){
+var _2=s.split("."),i=0,_4=dj_global;
+do{
+_4=_4[_2[i++]];
+}while(i<_2.length&&_4);
+return (_4!=dj_global)?_4:null;
+},compare:function(o1,o2){
+for(var p in o1){
+if(!(p in o2)){
+return false;
+}
+if(o1[p].valueOf()!=o2[p].valueOf()){
+return false;
+}
+}
+return true;
+},isSelected:function(o){
+for(var i=0;i<this.selected.length;i++){
+if(this.compare(this.selected[i],o)){
+return true;
+}
+}
+return false;
+},removeFromSelected:function(o){
+var _b=-1;
+for(var i=0;i<this.selected.length;i++){
+if(this.compare(this.selected[i],o)){
+_b=i;
+break;
+}
+}
+if(_b>=0){
+this.selected.splice(_b,1);
+}
+},getSelection:function(){
+return this.selected;
+},getValue:function(){
+var a=[];
+for(var i=0;i<this.selected.length;i++){
+if(this.selected[i][this.valueField]){
+a.push(this.selected[i][this.valueField]);
+}
+}
+return a.join();
+},reset:function(){
+this.columns=[];
+this.data=[];
+this.resetSelections(this.domNode.getElementsByTagName("tbody")[0]);
+},resetSelections:function(_f){
+this.selected=[];
+var idx=0;
+var _11=_f.getElementsByTagName("tr");
+for(var i=0;i<_11.length;i++){
+if(_11[i].parentNode==_f){
+_11[i].removeAttribute("selected");
+if(this.enableAlternateRows&&idx%2==1){
+_11[i].className=this.rowAlternateClass;
+}else{
+_11[i].className="";
+}
+idx++;
+}
+}
+},getObjectFromRow:function(row){
+var _14=row.getElementsByTagName("td");
+var o={};
+for(var i=0;i<this.columns.length;i++){
+if(this.columns[i].sortType=="__markup__"){
+o[this.columns[i].getField()]=_14[i].innerHTML;
+}else{
+var _17=dojo.html.renderedTextContent(_14[i]);
+var val=_17;
+if(this.columns[i].getType()!=String){
+var val=new (this.columns[i].getType())(_17);
+}
+o[this.columns[i].getField()]=val;
+}
+}
+if(dojo.html.hasAttribute(row,"value")){
+o[this.valueField]=dojo.html.getAttribute(row,"value");
+}
+return o;
+},setSelectionByRow:function(row){
+var o=this.getObjectFromRow(row);
+var b=false;
+for(var i=0;i<this.selected.length;i++){
+if(this.compare(this.selected[i],o)){
+b=true;
+break;
+}
+}
+if(!b){
+this.selected.push(o);
+}
+},parseColumns:function(_1d){
+this.reset();
+var row=_1d.getElementsByTagName("tr")[0];
+var _1f=row.getElementsByTagName("td");
+if(_1f.length==0){
+_1f=row.getElementsByTagName("th");
+}
+for(var i=0;i<_1f.length;i++){
+var o={field:null,format:null,noSort:false,sortType:"String",dataType:String,sortFunction:null,label:null,align:"left",valign:"middle",getField:function(){
+return this.field||this.label;
+},getType:function(){
+return this.dataType;
+}};
+if(dojo.html.hasAttribute(_1f[i],"align")){
+o.align=dojo.html.getAttribute(_1f[i],"align");
+}
+if(dojo.html.hasAttribute(_1f[i],"valign")){
+o.valign=dojo.html.getAttribute(_1f[i],"valign");
+}
+if(dojo.html.hasAttribute(_1f[i],"nosort")){
+o.noSort=dojo.html.getAttribute(_1f[i],"nosort")=="true";
+}
+if(dojo.html.hasAttribute(_1f[i],"sortusing")){
+var _22=dojo.html.getAttribute(_1f[i],"sortusing");
+var f=this.getTypeFromString(_22);
+if(f!=null&&f!=window&&typeof (f)=="function"){
+o.sortFunction=f;
+}
+}
+if(dojo.html.hasAttribute(_1f[i],"field")){
+o.field=dojo.html.getAttribute(_1f[i],"field");
+}
+if(dojo.html.hasAttribute(_1f[i],"format")){
+o.format=dojo.html.getAttribute(_1f[i],"format");
+}
+if(dojo.html.hasAttribute(_1f[i],"dataType")){
+var _24=dojo.html.getAttribute(_1f[i],"dataType");
+if(_24.toLowerCase()=="html"||_24.toLowerCase()=="markup"){
+o.sortType="__markup__";
+o.noSort=true;
+}else{
+var _25=this.getTypeFromString(_24);
+if(_25){
+o.sortType=_24;
+o.dataType=_25;
+}
+}
+}
+o.label=dojo.html.renderedTextContent(_1f[i]);
+this.columns.push(o);
+if(dojo.html.hasAttribute(_1f[i],"sort")){
+this.sortIndex=i;
+var dir=dojo.html.getAttribute(_1f[i],"sort");
+if(!isNaN(parseInt(dir))){
+dir=parseInt(dir);
+this.sortDirection=(dir!=0)?1:0;
+}else{
+this.sortDirection=(dir.toLowerCase()=="desc")?1:0;
+}
+}
+}
+},parseData:function(_27){
+this.data=[];
+this.selected=[];
+for(var i=0;i<_27.length;i++){
+var o={};
+for(var j=0;j<this.columns.length;j++){
+var _2b=this.columns[j].getField();
+if(this.columns[j].sortType=="__markup__"){
+o[_2b]=String(_27[i][_2b]);
+}else{
+var _2c=this.columns[j].getType();
+var val=_27[i][_2b];
+var t=this.columns[j].sortType.toLowerCase();
+if(_2c==String){
+o[_2b]=val;
+}else{
+if(val!=null){
+o[_2b]=new _2c(val);
+}else{
+o[_2b]=new _2c();
+}
+}
+}
+}
+if(_27[i][this.valueField]&&!o[this.valueField]){
+o[this.valueField]=_27[i][this.valueField];
+}
+this.data.push(o);
+}
+},parseDataFromTable:function(_2f){
+this.data=[];
+this.selected=[];
+var _30=_2f.getElementsByTagName("tr");
+for(var i=0;i<_30.length;i++){
+if(dojo.html.getAttribute(_30[i],"ignoreIfParsed")=="true"){
+continue;
+}
+var o={};
+var _33=_30[i].getElementsByTagName("td");
+for(var j=0;j<this.columns.length;j++){
+var _35=this.columns[j].getField();
+if(this.columns[j].sortType=="__markup__"){
+o[_35]=_33[j].innerHTML;
+}else{
+var _36=this.columns[j].getType();
+var val=dojo.html.renderedTextContent(_33[j]);
+if(_36==String){
+o[_35]=val;
+}else{
+if(val!=null){
+o[_35]=new _36(val);
+}else{
+o[_35]=new _36();
+}
+}
+}
+}
+if(dojo.html.hasAttribute(_30[i],"value")&&!o[this.valueField]){
+o[this.valueField]=dojo.html.getAttribute(_30[i],"value");
+}
+this.data.push(o);
+if(dojo.html.getAttribute(_30[i],"selected")=="true"){
+this.selected.push(o);
+}
+}
+},showSelections:function(){
+var _38=this.domNode.getElementsByTagName("tbody")[0];
+var _39=_38.getElementsByTagName("tr");
+var idx=0;
+for(var i=0;i<_39.length;i++){
+if(_39[i].parentNode==_38){
+if(dojo.html.getAttribute(_39[i],"selected")=="true"){
+_39[i].className=this.rowSelectedClass;
+}else{
+if(this.enableAlternateRows&&idx%2==1){
+_39[i].className=this.rowAlternateClass;
+}else{
+_39[i].className="";
+}
+}
+idx++;
+}
+}
+},render:function(_3c){
+var _3d=[];
+var _3e=this.domNode.getElementsByTagName("tbody")[0];
+if(!_3c){
+this.parseDataFromTable(_3e);
+}
+for(var i=0;i<this.data.length;i++){
+_3d.push(this.data[i]);
+}
+var col=this.columns[this.sortIndex];
+if(!col.noSort){
+var _41=col.getField();
+if(col.sortFunction){
+var _42=col.sortFunction;
+}else{
+var _42=function(a,b){
+if(a[_41]>b[_41]){
+return 1;
+}
+if(a[_41]<b[_41]){
+return -1;
+}
+return 0;
+};
+}
+_3d.sort(_42);
+if(this.sortDirection!=0){
+_3d.reverse();
+}
+}
+while(_3e.childNodes.length>0){
+_3e.removeChild(_3e.childNodes[0]);
+}
+for(var i=0;i<_3d.length;i++){
+var row=document.createElement("tr");
+dojo.html.disableSelection(row);
+if(_3d[i][this.valueField]){
+row.setAttribute("value",_3d[i][this.valueField]);
+}
+if(this.isSelected(_3d[i])){
+row.className=this.rowSelectedClass;
+row.setAttribute("selected","true");
+}else{
+if(this.enableAlternateRows&&i%2==1){
+row.className=this.rowAlternateClass;
+}
+}
+for(var j=0;j<this.columns.length;j++){
+var _47=document.createElement("td");
+_47.setAttribute("align",this.columns[j].align);
+_47.setAttribute("valign",this.columns[j].valign);
+dojo.html.disableSelection(_47);
+if(this.sortIndex==j){
+_47.className=this.columnSelected;
+}
+if(this.columns[j].sortType=="__markup__"){
+_47.innerHTML=_3d[i][this.columns[j].getField()];
+for(var k=0;k<_47.childNodes.length;k++){
+var _49=_47.childNodes[k];
+if(_49&&_49.nodeType==dojo.html.ELEMENT_NODE){
+dojo.html.disableSelection(_49);
+}
+}
+}else{
+if(this.columns[j].getType()==Date){
+var _4a=this.defaultDateFormat;
+if(this.columns[j].format){
+_4a=this.columns[j].format;
+}
+_47.appendChild(document.createTextNode(dojo.date.strftime(_3d[i][this.columns[j].getField()],_4a)));
+}else{
+_47.appendChild(document.createTextNode(_3d[i][this.columns[j].getField()]));
+}
+}
+row.appendChild(_47);
+}
+_3e.appendChild(row);
+dojo.event.connect(row,"onclick",this,"onUISelect");
+}
+var _4b=parseInt(this.minRows);
+if(!isNaN(_4b)&&_4b>0&&_3d.length<_4b){
+var mod=0;
+if(_3d.length%2==0){
+mod=1;
+}
+var _4d=_4b-_3d.length;
+for(var i=0;i<_4d;i++){
+var row=document.createElement("tr");
+row.setAttribute("ignoreIfParsed","true");
+if(this.enableAlternateRows&&i%2==mod){
+row.className=this.rowAlternateClass;
+}
+for(var j=0;j<this.columns.length;j++){
+var _47=document.createElement("td");
+_47.appendChild(document.createTextNode("\xa0"));
+row.appendChild(_47);
+}
+_3e.appendChild(row);
+}
+}
+},onSelect:function(e){
+},onUISelect:function(e){
+var row=dojo.html.getParentByType(e.target,"tr");
+var _51=dojo.html.getParentByType(row,"tbody");
+if(this.enableMultipleSelect){
+if(e.metaKey||e.ctrlKey){
+if(this.isSelected(this.getObjectFromRow(row))){
+this.removeFromSelected(this.getObjectFromRow(row));
+row.removeAttribute("selected");
+}else{
+this.setSelectionByRow(row);
+row.setAttribute("selected","true");
+}
+}else{
+if(e.shiftKey){
+var _52;
+var _53=_51.getElementsByTagName("tr");
+for(var i=0;i<_53.length;i++){
+if(_53[i].parentNode==_51){
+if(_53[i]==row){
+break;
+}
+if(dojo.html.getAttribute(_53[i],"selected")=="true"){
+_52=_53[i];
+}
+}
+}
+if(!_52){
+_52=row;
+for(;i<_53.length;i++){
+if(dojo.html.getAttribute(_53[i],"selected")=="true"){
+row=_53[i];
+break;
+}
+}
+}
+this.resetSelections(_51);
+if(_52==row){
+row.setAttribute("selected","true");
+this.setSelectionByRow(row);
+}else{
+var _55=false;
+for(var i=0;i<_53.length;i++){
+if(_53[i].parentNode==_51){
+_53[i].removeAttribute("selected");
+if(_53[i]==_52){
+_55=true;
+}
+if(_55){
+this.setSelectionByRow(_53[i]);
+_53[i].setAttribute("selected","true");
+}
+if(_53[i]==row){
+_55=false;
+}
+}
+}
+}
+}else{
+this.resetSelections(_51);
+row.setAttribute("selected","true");
+this.setSelectionByRow(row);
+}
+}
+}else{
+this.resetSelections(_51);
+row.setAttribute("selected","true");
+this.setSelectionByRow(row);
+}
+this.showSelections();
+this.onSelect(e);
+e.stopPropagation();
+e.preventDefault();
+},onHeaderClick:function(e){
+var _57=this.sortIndex;
+var _58=this.sortDirection;
+var _59=e.target;
+var row=dojo.html.getParentByType(_59,"tr");
+var _5b="td";
+if(row.getElementsByTagName(_5b).length==0){
+_5b="th";
+}
+var _5c=row.getElementsByTagName(_5b);
+var _5d=dojo.html.getParentByType(_59,_5b);
+for(var i=0;i<_5c.length;i++){
+if(_5c[i]==_5d){
+if(i!=_57){
+this.sortIndex=i;
+this.sortDirection=0;
+_5c[i].className=this.headerSortDownClass;
+}else{
+this.sortDirection=(_58==0)?1:0;
+if(this.sortDirection==0){
+_5c[i].className=this.headerSortDownClass;
+}else{
+_5c[i].className=this.headerSortUpClass;
+}
+}
+}else{
+_5c[i].className=this.headerClass;
+}
+}
+this.render();
+},postCreate:function(){
+var _5f=this.domNode.getElementsByTagName("thead")[0];
+if(this.headClass.length>0){
+_5f.className=this.headClass;
+}
+dojo.html.disableSelection(this.domNode);
+this.parseColumns(_5f);
+var _60="td";
+if(_5f.getElementsByTagName(_60).length==0){
+_60="th";
+}
+var _61=_5f.getElementsByTagName(_60);
+for(var i=0;i<_61.length;i++){
+if(!this.columns[i].noSort){
+dojo.event.connect(_61[i],"onclick",this,"onHeaderClick");
+}
+if(this.sortIndex==i){
+if(this.sortDirection==0){
+_61[i].className=this.headerSortDownClass;
+}else{
+_61[i].className=this.headerSortUpClass;
+}
+}
+}
+var _63=this.domNode.getElementsByTagName("tbody")[0];
+if(this.tbodyClass.length>0){
+_63.className=this.tbodyClass;
+}
+this.parseDataFromTable(_63);
+this.render(true);
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Spinner.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Spinner.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Spinner.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/Spinner.js Sat May 26 15:47:41 2007
@@ -0,0 +1,513 @@
+dojo.provide("dojo.widget.Spinner");
+dojo.require("dojo.io.*");
+dojo.require("dojo.lfx.*");
+dojo.require("dojo.html.*");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.string");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.IntegerTextbox");
+dojo.require("dojo.widget.RealNumberTextbox");
+dojo.require("dojo.widget.DateTextbox");
+dojo.require("dojo.experimental");
+dojo.declare("dojo.widget.Spinner",null,{_typamaticTimer:null,_typamaticFunction:null,_currentTimeout:this.defaultTimeout,_eventCount:0,defaultTimeout:500,timeoutChangeRate:0.9,templateString:"<span _=\"weird end tag formatting is to prevent whitespace from becoming &nbsp;\"\n\tstyle='float:${this.htmlfloat};'\n\t><table cellpadding=0 cellspacing=0 class=\"dojoSpinner\">\n\t\t<tr>\n\t\t\t<td\n\t\t\t\t><input\n\t\t\t\t\tdojoAttachPoint='textbox' type='${this.type}'\n\t\t\t\t\tdojoAttachEvent='onblur;onfocus;onkey:_handleKeyEvents;onKeyUp:_onSpinnerKeyUp;onresize:_resize'\n\t\t\t\t\tid='${this.widgetId}' name='${this.name}' size='${this.size}' maxlength='${this.maxlength}'\n\t\t\t\t\tvalue='${this.value}' class='${this.className}' autocomplete=\"off\"\n\t\t\t></td>\n\t\t\t<td\n\t\t\t\t><img dojoAttachPoint=\"upArrowNode\"\n\t\t\t\t\tdojoAttachEvent=\"onDblClick: _upArrowDoubleClicked;  onMouseDown: _upArrowPressed; onMouseUp: _arrowReleased; onMouseOut: _arrowReleased; onMouse
 Move: _discardEvent;\"\n\t\t\t\t\tsrc=\"${this.incrementSrc}\" style=\"width: ${this.buttonSize.width}px; height: ${this.buttonSize.height}px;\"\n\t\t\t\t><img dojoAttachPoint=\"downArrowNode\"\n\t\t\t\t\tdojoAttachEvent=\"onDblClick: _downArrowDoubleClicked;  onMouseDown: _downArrowPressed; onMouseUp: _arrowReleased; onMouseOut: _arrowReleased; onMouseMove: _discardEvent;\"\n\t\t\t\t\tsrc=\"${this.decrementSrc}\" style=\"width: ${this.buttonSize.width}px; height: ${this.buttonSize.height}px;\"\n\t\t\t></td>\n\t\t</tr>\n\t</table\n\t><span dojoAttachPoint='invalidSpan' class='${this.invalidClass}'>${this.messages.invalidMessage}</span\n\t><span dojoAttachPoint='missingSpan' class='${this.missingClass}'>${this.messages.missingMessage}</span\n\t><span dojoAttachPoint='rangeSpan' class='${this.rangeClass}'>${this.messages.rangeMessage}</span\n></span>\n",templateCssString:"/* inline the table holding the <input> and buttons (method varies by browser) */\n.ie .dojoSpinner, .safa
 ri .dojoSpinner {\n\tdisplay: inline;\n}\n\n.moz .dojoSpinner {\n\tdisplay: -moz-inline-box;\n}\n\n.opera .dojoSpinner {\n\tdisplay: inline-table;\n}\n\n/* generic stuff for the table */\n.dojoSpinner td {\n\tpadding:0px;\n\tmargin:0px;\n\tvertical-align: middle;\n}\ntable.dojoSpinner {\n\tborder:0px;\n\tborder-spacing:0px;\n\tline-height:0px;\n\tpadding:0px;\n\tmargin: 0px;\n\tvertical-align: middle;\n}\n\n/* the buttons */\n.dojoSpinner img {\n\tdisplay: block;\n\tborder-width:0px 1px 1px 0px;\n\tborder-style:outset;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/Spinner.css"),incrementSrc:dojo.uri.moduleUri("dojo.widget","templates/images/spinnerIncrement.gif"),decrementSrc:dojo.uri.moduleUri("dojo.widget","templates/images/spinnerDecrement.gif"),_handleKeyEvents:function(_1){
+if(!_1.key){
+return;
+}
+if(!_1.ctrlKey&&!_1.altKey){
+switch(_1.key){
+case _1.KEY_DOWN_ARROW:
+dojo.event.browser.stopEvent(_1);
+this._downArrowPressed(_1);
+return;
+case _1.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(_1);
+this._upArrowPressed(_1);
+return;
+}
+}
+this._eventCount++;
+},_onSpinnerKeyUp:function(_2){
+this._arrowReleased(_2);
+this.onkeyup(_2);
+},_resize:function(){
+var _3=dojo.html.getBorderBox(this.textbox);
+this.buttonSize={width:_3.height/2,height:_3.height/2};
+if(this.upArrowNode){
+dojo.html.setMarginBox(this.upArrowNode,this.buttonSize);
+dojo.html.setMarginBox(this.downArrowNode,this.buttonSize);
+}
+},_pressButton:function(_4){
+_4.style.borderWidth="1px 0px 0px 1px";
+_4.style.borderStyle="inset";
+},_releaseButton:function(_5){
+_5.style.borderWidth="0px 1px 1px 0px";
+_5.style.borderStyle="outset";
+},_arrowPressed:function(_6,_7){
+var _8=(_7==-1)?this.downArrowNode:this.upArrowNode;
+var _9=(_7==+1)?this.downArrowNode:this.upArrowNode;
+if(typeof _6!="number"){
+if(this._typamaticTimer!=null){
+if(this._typamaticNode==_8){
+return;
+}
+dojo.lang.clearTimeout(this._typamaticTimer);
+}
+this._releaseButton(_9);
+this._eventCount++;
+this._typamaticTimer=null;
+this._currentTimeout=this.defaultTimeout;
+}else{
+if(_6!=this._eventCount){
+this._releaseButton(_8);
+return;
+}
+}
+this._pressButton(_8);
+this._setCursorX(this.adjustValue(_7,this._getCursorX()));
+this._typamaticNode=_8;
+this._typamaticTimer=dojo.lang.setTimeout(this,"_arrowPressed",this._currentTimeout,this._eventCount,_7);
+this._currentTimeout=Math.round(this._currentTimeout*this.timeoutChangeRate);
+},_downArrowPressed:function(_a){
+return this._arrowPressed(_a,-1);
+},_downArrowDoubleClicked:function(_b){
+var rc=this._downArrowPressed(_b);
+dojo.lang.setTimeout(this,"_arrowReleased",50,null);
+return rc;
+},_upArrowPressed:function(_d){
+return this._arrowPressed(_d,+1);
+},_upArrowDoubleClicked:function(_e){
+var rc=this._upArrowPressed(_e);
+dojo.lang.setTimeout(this,"_arrowReleased",50,null);
+return rc;
+},_arrowReleased:function(evt){
+this.textbox.focus();
+if(evt!=null&&typeof evt=="object"&&evt.keyCode&&evt.keyCode!=null){
+var _11=evt.keyCode;
+var k=dojo.event.browser.keys;
+switch(_11){
+case k.KEY_DOWN_ARROW:
+case k.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(evt);
+break;
+}
+}
+this._releaseButton(this.upArrowNode);
+this._releaseButton(this.downArrowNode);
+this._eventCount++;
+if(this._typamaticTimer!=null){
+dojo.lang.clearTimeout(this._typamaticTimer);
+}
+this._typamaticTimer=null;
+this._currentTimeout=this.defaultTimeout;
+},_mouseWheeled:function(evt){
+var _14=0;
+if(typeof evt.wheelDelta=="number"){
+_14=evt.wheelDelta;
+}else{
+if(typeof evt.detail=="number"){
+_14=-evt.detail;
+}
+}
+if(_14>0){
+this._upArrowPressed(evt);
+this._arrowReleased(evt);
+}else{
+if(_14<0){
+this._downArrowPressed(evt);
+this._arrowReleased(evt);
+}
+}
+},_discardEvent:function(evt){
+dojo.event.browser.stopEvent(evt);
+},_getCursorX:function(){
+var x=-1;
+try{
+this.textbox.focus();
+if(typeof this.textbox.selectionEnd=="number"){
+x=this.textbox.selectionEnd;
+}else{
+if(document.selection&&document.selection.createRange){
+var _17=document.selection.createRange().duplicate();
+if(_17.parentElement()==this.textbox){
+_17.moveStart("textedit",-1);
+x=_17.text.length;
+}
+}
+}
+}
+catch(e){
+}
+return x;
+},_setCursorX:function(x){
+try{
+this.textbox.focus();
+if(!x){
+x=0;
+}
+if(typeof this.textbox.selectionEnd=="number"){
+this.textbox.selectionEnd=x;
+}else{
+if(this.textbox.createTextRange){
+var _19=this.textbox.createTextRange();
+_19.collapse(true);
+_19.moveEnd("character",x);
+_19.moveStart("character",x);
+_19.select();
+}
+}
+}
+catch(e){
+}
+},_spinnerPostMixInProperties:function(_1a,_1b){
+var _1c=this.getFragNodeRef(_1b);
+var _1d=dojo.html.getBorderBox(_1c);
+this.buttonSize={width:_1d.height/2-1,height:_1d.height/2-1};
+},_spinnerPostCreate:function(_1e,_1f){
+if(this.textbox.addEventListener){
+this.textbox.addEventListener("DOMMouseScroll",dojo.lang.hitch(this,"_mouseWheeled"),false);
+}else{
+dojo.event.connect(this.textbox,"onmousewheel",this,"_mouseWheeled");
+}
+}});
+dojo.widget.defineWidget("dojo.widget.IntegerSpinner",[dojo.widget.IntegerTextbox,dojo.widget.Spinner],{delta:"1",postMixInProperties:function(_20,_21){
+dojo.widget.IntegerSpinner.superclass.postMixInProperties.apply(this,arguments);
+this._spinnerPostMixInProperties(_20,_21);
+},postCreate:function(_22,_23){
+dojo.widget.IntegerSpinner.superclass.postCreate.apply(this,arguments);
+this._spinnerPostCreate(_22,_23);
+},adjustValue:function(_24,x){
+var val=this.getValue().replace(/[^\-+\d]/g,"");
+if(val.length==0){
+return;
+}
+var num=Math.min(Math.max((parseInt(val)+(parseInt(this.delta)*_24)),(this.flags.min?this.flags.min:-Infinity)),(this.flags.max?this.flags.max:+Infinity));
+val=num.toString();
+if(num>=0){
+val=((this.flags.signed==true)?"+":" ")+val;
+}
+if(this.flags.separator.length>0){
+for(var i=val.length-3;i>1;i-=3){
+val=val.substr(0,i)+this.flags.separator+val.substr(i);
+}
+}
+if(val.substr(0,1)==" "){
+val=val.substr(1);
+}
+this.setValue(val);
+return val.length;
+}});
+dojo.widget.defineWidget("dojo.widget.RealNumberSpinner",[dojo.widget.RealNumberTextbox,dojo.widget.Spinner],function(){
+dojo.experimental("dojo.widget.RealNumberSpinner");
+},{delta:"1e1",postMixInProperties:function(_29,_2a){
+dojo.widget.RealNumberSpinner.superclass.postMixInProperties.apply(this,arguments);
+this._spinnerPostMixInProperties(_29,_2a);
+},postCreate:function(_2b,_2c){
+dojo.widget.RealNumberSpinner.superclass.postCreate.apply(this,arguments);
+this._spinnerPostCreate(_2b,_2c);
+},adjustValue:function(_2d,x){
+var val=this.getValue().replace(/[^\-+\.eE\d]/g,"");
+if(!val.length){
+return;
+}
+var num=parseFloat(val);
+if(isNaN(num)){
+return;
+}
+var _31=this.delta.split(/[eE]/);
+if(!_31.length){
+_31=[1,1];
+}else{
+_31[0]=parseFloat(_31[0].replace(/[^\-+\.\d]/g,""));
+if(isNaN(_31[0])){
+_31[0]=1;
+}
+if(_31.length>1){
+_31[1]=parseInt(_31[1]);
+}
+if(isNaN(_31[1])){
+_31[1]=1;
+}
+}
+val=this.getValue().split(/[eE]/);
+if(!val.length){
+return;
+}
+var _32=parseFloat(val[0].replace(/[^\-+\.\d]/g,""));
+if(val.length==1){
+var _33=0;
+}else{
+var _33=parseInt(val[1].replace(/[^\-+\d]/g,""));
+}
+if(x<=val[0].length){
+x=0;
+_32+=_31[0]*_2d;
+}else{
+x=Number.MAX_VALUE;
+_33+=_31[1]*_2d;
+if(this.flags.eSigned==false&&_33<0){
+_33=0;
+}
+}
+num=Math.min(Math.max((_32*Math.pow(10,_33)),(this.flags.min?this.flags.min:-Infinity)),(this.flags.max?this.flags.max:+Infinity));
+if((this.flags.exponent==true||(this.flags.exponent!=false&&x!=0))&&num.toExponential){
+if(isNaN(this.flags.places)||this.flags.places==Infinity){
+val=num.toExponential();
+}else{
+val=num.toExponential(this.flags.places);
+}
+}else{
+if(num.toFixed&&num.toPrecision){
+if(isNaN(this.flags.places)||this.flags.places==Infinity){
+val=num.toPrecision((1/3).toString().length-1);
+}else{
+val=num.toFixed(this.flags.places);
+}
+}else{
+val=num.toString();
+}
+}
+if(num>=0){
+if(this.flags.signed==true){
+val="+"+val;
+}
+}
+val=val.split(/[eE]/);
+if(this.flags.separator.length>0){
+if(num>=0&&val[0].substr(0,1)!="+"){
+val[0]=" "+val[0];
+}
+var i=val[0].lastIndexOf(".");
+if(i>=0){
+i-=3;
+}else{
+i=val[0].length-3;
+}
+for(;i>1;i-=3){
+val[0]=val[0].substr(0,i)+this.flags.separator+val[0].substr(i);
+}
+if(val[0].substr(0,1)==" "){
+val[0]=val[0].substr(1);
+}
+}
+if(val.length>1){
+if((this.flags.eSigned==true)&&(val[1].substr(0,1)!="+")){
+val[1]="+"+val[1];
+}else{
+if((!this.flags.eSigned)&&(val[1].substr(0,1)=="+")){
+val[1]=val[1].substr(1);
+}else{
+if((!this.flags.eSigned)&&(val[1].substr(0,1)=="-")&&(num.toFixed&&num.toPrecision)){
+if(isNaN(this.flags.places)){
+val[0]=num.toPrecision((1/3).toString().length-1);
+}else{
+val[0]=num.toFixed(this.flags.places).toString();
+}
+val[1]="0";
+}
+}
+}
+val[0]+="e"+val[1];
+}
+this.setValue(val[0]);
+if(x>val[0].length){
+x=val[0].length;
+}
+return x;
+}});
+dojo.widget.defineWidget("dojo.widget.TimeSpinner",[dojo.widget.TimeTextbox,dojo.widget.Spinner],function(){
+dojo.experimental("dojo.widget.TimeSpinner");
+},{postMixInProperties:function(_35,_36){
+dojo.widget.TimeSpinner.superclass.postMixInProperties.apply(this,arguments);
+this._spinnerPostMixInProperties(_35,_36);
+},postCreate:function(_37,_38){
+dojo.widget.TimeSpinner.superclass.postCreate.apply(this,arguments);
+this._spinnerPostCreate(_37,_38);
+},adjustValue:function(_39,x){
+var val=this.getValue();
+var _3c=(this.flags.format&&this.flags.format.search(/[Hhmst]/)>=0)?this.flags.format:"hh:mm:ss t";
+if(_39==0||!val.length||!this.isValid()){
+return;
+}
+if(!this.flags.amSymbol){
+this.flags.amSymbol="AM";
+}
+if(!this.flags.pmSymbol){
+this.flags.pmSymbol="PM";
+}
+var re=dojo.regexp.time(this.flags);
+var _3e=_3c.replace(/H/g,"h").replace(/[^hmst]/g,"").replace(/([hmst])\1/g,"$1");
+var _3f=_3e.indexOf("h")+1;
+var _40=_3e.indexOf("m")+1;
+var _41=_3e.indexOf("s")+1;
+var _42=_3e.indexOf("t")+1;
+var _43=_3c;
+var _44="";
+if(_42>0){
+_44=val.replace(new RegExp(re),"$"+_42);
+_43=_43.replace(/t+/,_44.replace(/./g,"t"));
+}
+var _45=0;
+var _46=1;
+if(_3f>0){
+_45=val.replace(new RegExp(re),"$"+_3f);
+if(dojo.lang.isString(this.delta)){
+_46=this.delta.replace(new RegExp(re),"$"+_3f);
+}
+if(isNaN(_46)){
+_46=1;
+}else{
+_46=parseInt(_46);
+}
+if(_45.length==2){
+_43=_43.replace(/([Hh])+/,"$1$1");
+}else{
+_43=_43.replace(/([Hh])+/,"$1");
+}
+if(isNaN(_45)){
+_45=0;
+}else{
+_45=parseInt(_45.replace(/^0(\d)/,"$1"));
+}
+}
+var min=0;
+var _48=1;
+if(_40>0){
+min=val.replace(new RegExp(re),"$"+_40);
+if(dojo.lang.isString(this.delta)){
+_48=this.delta.replace(new RegExp(re),"$"+_40);
+}
+if(isNaN(_48)){
+_48=1;
+}else{
+_48=parseInt(_48);
+}
+_43=_43.replace(/m+/,min.replace(/./g,"m"));
+if(isNaN(min)){
+min=0;
+}else{
+min=parseInt(min.replace(/^0(\d)/,"$1"));
+}
+}
+var sec=0;
+var _4a=1;
+if(_41>0){
+sec=val.replace(new RegExp(re),"$"+_41);
+if(dojo.lang.isString(this.delta)){
+_4a=this.delta.replace(new RegExp(re),"$"+_41);
+}
+if(isNaN(_4a)){
+_4a=1;
+}else{
+_4a=parseInt(_4a);
+}
+_43=_43.replace(/s+/,sec.replace(/./g,"s"));
+if(isNaN(sec)){
+sec=0;
+}else{
+sec=parseInt(sec.replace(/^0(\d)/,"$1"));
+}
+}
+if(isNaN(x)||x>=_43.length){
+x=_43.length-1;
+}
+var _4b=_43.charAt(x);
+switch(_4b){
+case "t":
+if(_44==this.flags.amSymbol){
+_44=this.flags.pmSymbol;
+}else{
+if(_44==this.flags.pmSymbol){
+_44=this.flags.amSymbol;
+}
+}
+break;
+default:
+if(_45>=1&&_45<12&&_44==this.flags.pmSymbol){
+_45+=12;
+}
+if(_45==12&&_44==this.flags.amSymbol){
+_45=0;
+}
+switch(_4b){
+case "s":
+sec+=_4a*_39;
+while(sec<0){
+min--;
+sec+=60;
+}
+while(sec>=60){
+min++;
+sec-=60;
+}
+case "m":
+if(_4b=="m"){
+min+=_48*_39;
+}
+while(min<0){
+_45--;
+min+=60;
+}
+while(min>=60){
+_45++;
+min-=60;
+}
+case "h":
+case "H":
+if(_4b=="h"||_4b=="H"){
+_45+=_46*_39;
+}
+while(_45<0){
+_45+=24;
+}
+while(_45>=24){
+_45-=24;
+}
+break;
+default:
+return;
+}
+if(_45>=12){
+_44=this.flags.pmSymbol;
+if(_3c.indexOf("h")>=0&&_45>=13){
+_45-=12;
+}
+}else{
+_44=this.flags.amSymbol;
+if(_3c.indexOf("h")>=0&&_45==0){
+_45=12;
+}
+}
+}
+_43=_3c;
+if(_45>=0&&_45<10&&_3c.search(/[hH]{2}/)>=0){
+_45="0"+_45.toString();
+}
+if(_45>=10&&_43.search(/[hH]{2}/)<0){
+_43=_43.replace(/(h|H)/,"$1$1");
+}
+if(min>=0&&min<10&&_43.search(/mm/)>=0){
+min="0"+min.toString();
+}
+if(min>=10&&_43.search(/mm/)<0){
+_43=_43.replace(/m/,"$1$1");
+}
+if(sec>=0&&sec<10&&_43.search(/ss/)>=0){
+sec="0"+sec.toString();
+}
+if(sec>=10&&_43.search(/ss/)<0){
+_43=_43.replace(/s/,"$1$1");
+}
+x=_43.indexOf(_4b);
+if(x==-1){
+x=_3c.length;
+}
+_3c=_3c.replace(/[hH]+/,_45);
+_3c=_3c.replace(/m+/,min);
+_3c=_3c.replace(/s+/,sec);
+_3c=_3c.replace(/t/,_44);
+this.setValue(_3c);
+if(x>_3c.length){
+x=_3c.length;
+}
+return x;
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SplitContainer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SplitContainer.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SplitContainer.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SplitContainer.js Sat May 26 15:47:41 2007
@@ -0,0 +1,312 @@
+dojo.provide("dojo.widget.SplitContainer");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.ContentPane");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.html.style");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.io.cookie");
+dojo.widget.defineWidget("dojo.widget.SplitContainer",dojo.widget.HtmlWidget,function(){
+this.sizers=[];
+},{isContainer:true,templateCssString:".dojoSplitContainer{\n\tposition: relative;\n\toverflow: hidden;\n\tdisplay: block;\n}\n\n.dojoSplitPane{\n\tposition: absolute;\n}\n\n.dojoSplitContainerSizerH,\n.dojoSplitContainerSizerV {\n\tfont-size: 1px;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: ThreeDFace;\n\tborder: 1px solid;\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n\tmargin: 0;\n}\n\n.dojoSplitContainerSizerV {\n\tcursor: n-resize;\n}\n\n.dojoSplitContainerVirtualSizerH,\n.dojoSplitContainerVirtualSizerV {\n\tfont-size: 1px;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: ThreeDShadow;\n\t-moz-opacity: 0.5;\n\topacity: 0.5;\n\tfilter: Alpha(Opacity=50);\n\tmargin: 0;\n}\n\n.dojoSplitContainerVirtualSizerV {\n\tcursor: n-resize;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/SplitContainer.css"),activeSizing:false,sizerWidth:15,orientation:"horizontal",persist:true,postMixInProperties:function(){
+dojo.widget.SplitContainer.superclass.postMixInProperties.apply(this,arguments);
+this.isHorizontal=(this.orientation=="horizontal");
+},fillInTemplate:function(){
+dojo.widget.SplitContainer.superclass.fillInTemplate.apply(this,arguments);
+dojo.html.addClass(this.domNode,"dojoSplitContainer");
+if(dojo.render.html.moz){
+this.domNode.style.overflow="-moz-scrollbars-none";
+}
+var _1=dojo.html.getContentBox(this.domNode);
+this.paneWidth=_1.width;
+this.paneHeight=_1.height;
+},onResized:function(e){
+var _3=dojo.html.getContentBox(this.domNode);
+this.paneWidth=_3.width;
+this.paneHeight=_3.height;
+this._layoutPanels();
+},postCreate:function(_4,_5,_6){
+dojo.widget.SplitContainer.superclass.postCreate.apply(this,arguments);
+for(var i=0;i<this.children.length;i++){
+with(this.children[i].domNode.style){
+position="absolute";
+}
+dojo.html.addClass(this.children[i].domNode,"dojoSplitPane");
+if(i==this.children.length-1){
+break;
+}
+this._addSizer();
+}
+if(typeof this.sizerWidth=="object"){
+try{
+this.sizerWidth=parseInt(this.sizerWidth.toString());
+}
+catch(e){
+this.sizerWidth=15;
+}
+}
+this.virtualSizer=document.createElement("div");
+this.virtualSizer.style.position="absolute";
+this.virtualSizer.style.display="none";
+this.virtualSizer.style.zIndex=10;
+this.virtualSizer.className=this.isHorizontal?"dojoSplitContainerVirtualSizerH":"dojoSplitContainerVirtualSizerV";
+this.domNode.appendChild(this.virtualSizer);
+dojo.html.disableSelection(this.virtualSizer);
+if(this.persist){
+this._restoreState();
+}
+this.resizeSoon();
+},_injectChild:function(_8){
+with(_8.domNode.style){
+position="absolute";
+}
+dojo.html.addClass(_8.domNode,"dojoSplitPane");
+},_addSizer:function(){
+var i=this.sizers.length;
+this.sizers[i]=document.createElement("div");
+this.sizers[i].style.position="absolute";
+this.sizers[i].className=this.isHorizontal?"dojoSplitContainerSizerH":"dojoSplitContainerSizerV";
+var _a=this;
+var _b=(function(){
+var _c=i;
+return function(e){
+_a.beginSizing(e,_c);
+};
+})();
+dojo.event.connect(this.sizers[i],"onmousedown",_b);
+this.domNode.appendChild(this.sizers[i]);
+dojo.html.disableSelection(this.sizers[i]);
+},removeChild:function(_e){
+if(this.sizers.length>0){
+for(var x=0;x<this.children.length;x++){
+if(this.children[x]===_e){
+var i=this.sizers.length-1;
+this.domNode.removeChild(this.sizers[i]);
+this.sizers.length=i;
+break;
+}
+}
+}
+dojo.widget.SplitContainer.superclass.removeChild.call(this,_e,arguments);
+this.onResized();
+},addChild:function(_11){
+dojo.widget.SplitContainer.superclass.addChild.apply(this,arguments);
+this._injectChild(_11);
+if(this.children.length>1){
+this._addSizer();
+}
+this._layoutPanels();
+},_layoutPanels:function(){
+if(this.children.length==0){
+return;
+}
+var _12=this.isHorizontal?this.paneWidth:this.paneHeight;
+if(this.children.length>1){
+_12-=this.sizerWidth*(this.children.length-1);
+}
+var _13=0;
+for(var i=0;i<this.children.length;i++){
+_13+=this.children[i].sizeShare;
+}
+var _15=_12/_13;
+var _16=0;
+for(var i=0;i<this.children.length-1;i++){
+var _17=Math.round(_15*this.children[i].sizeShare);
+this.children[i].sizeActual=_17;
+_16+=_17;
+}
+this.children[this.children.length-1].sizeActual=_12-_16;
+this._checkSizes();
+var pos=0;
+var _17=this.children[0].sizeActual;
+this._movePanel(this.children[0],pos,_17);
+this.children[0].position=pos;
+pos+=_17;
+for(var i=1;i<this.children.length;i++){
+this._moveSlider(this.sizers[i-1],pos,this.sizerWidth);
+this.sizers[i-1].position=pos;
+pos+=this.sizerWidth;
+_17=this.children[i].sizeActual;
+this._movePanel(this.children[i],pos,_17);
+this.children[i].position=pos;
+pos+=_17;
+}
+},_movePanel:function(_19,pos,_1b){
+if(this.isHorizontal){
+_19.domNode.style.left=pos+"px";
+_19.domNode.style.top=0;
+_19.resizeTo(_1b,this.paneHeight);
+}else{
+_19.domNode.style.left=0;
+_19.domNode.style.top=pos+"px";
+_19.resizeTo(this.paneWidth,_1b);
+}
+},_moveSlider:function(_1c,pos,_1e){
+if(this.isHorizontal){
+_1c.style.left=pos+"px";
+_1c.style.top=0;
+dojo.html.setMarginBox(_1c,{width:_1e,height:this.paneHeight});
+}else{
+_1c.style.left=0;
+_1c.style.top=pos+"px";
+dojo.html.setMarginBox(_1c,{width:this.paneWidth,height:_1e});
+}
+},_growPane:function(_1f,_20){
+if(_1f>0){
+if(_20.sizeActual>_20.sizeMin){
+if((_20.sizeActual-_20.sizeMin)>_1f){
+_20.sizeActual=_20.sizeActual-_1f;
+_1f=0;
+}else{
+_1f-=_20.sizeActual-_20.sizeMin;
+_20.sizeActual=_20.sizeMin;
+}
+}
+}
+return _1f;
+},_checkSizes:function(){
+var _21=0;
+var _22=0;
+for(var i=0;i<this.children.length;i++){
+_22+=this.children[i].sizeActual;
+_21+=this.children[i].sizeMin;
+}
+if(_21<=_22){
+var _24=0;
+for(var i=0;i<this.children.length;i++){
+if(this.children[i].sizeActual<this.children[i].sizeMin){
+_24+=this.children[i].sizeMin-this.children[i].sizeActual;
+this.children[i].sizeActual=this.children[i].sizeMin;
+}
+}
+if(_24>0){
+if(this.isDraggingLeft){
+for(var i=this.children.length-1;i>=0;i--){
+_24=this._growPane(_24,this.children[i]);
+}
+}else{
+for(var i=0;i<this.children.length;i++){
+_24=this._growPane(_24,this.children[i]);
+}
+}
+}
+}else{
+for(var i=0;i<this.children.length;i++){
+this.children[i].sizeActual=Math.round(_22*(this.children[i].sizeMin/_21));
+}
+}
+},beginSizing:function(e,i){
+this.paneBefore=this.children[i];
+this.paneAfter=this.children[i+1];
+this.isSizing=true;
+this.sizingSplitter=this.sizers[i];
+this.originPos=dojo.html.getAbsolutePosition(this.children[0].domNode,true,dojo.html.boxSizing.MARGIN_BOX);
+if(this.isHorizontal){
+var _27=(e.layerX?e.layerX:e.offsetX);
+var _28=e.pageX;
+this.originPos=this.originPos.x;
+}else{
+var _27=(e.layerY?e.layerY:e.offsetY);
+var _28=e.pageY;
+this.originPos=this.originPos.y;
+}
+this.startPoint=this.lastPoint=_28;
+this.screenToClientOffset=_28-_27;
+this.dragOffset=this.lastPoint-this.paneBefore.sizeActual-this.originPos-this.paneBefore.position;
+if(!this.activeSizing){
+this._showSizingLine();
+}
+dojo.event.connect(document.documentElement,"onmousemove",this,"changeSizing");
+dojo.event.connect(document.documentElement,"onmouseup",this,"endSizing");
+dojo.event.browser.stopEvent(e);
+},changeSizing:function(e){
+this.lastPoint=this.isHorizontal?e.pageX:e.pageY;
+if(this.activeSizing){
+this.movePoint();
+this._updateSize();
+}else{
+this.movePoint();
+this._moveSizingLine();
+}
+dojo.event.browser.stopEvent(e);
+},endSizing:function(e){
+if(!this.activeSizing){
+this._hideSizingLine();
+}
+this._updateSize();
+this.isSizing=false;
+dojo.event.disconnect(document.documentElement,"onmousemove",this,"changeSizing");
+dojo.event.disconnect(document.documentElement,"onmouseup",this,"endSizing");
+if(this.persist){
+this._saveState(this);
+}
+},movePoint:function(){
+var p=this.lastPoint-this.screenToClientOffset;
+var a=p-this.dragOffset;
+a=this.legaliseSplitPoint(a);
+p=a+this.dragOffset;
+this.lastPoint=p+this.screenToClientOffset;
+},legaliseSplitPoint:function(a){
+a+=this.sizingSplitter.position;
+this.isDraggingLeft=(a>0)?true:false;
+if(!this.activeSizing){
+if(a<this.paneBefore.position+this.paneBefore.sizeMin){
+a=this.paneBefore.position+this.paneBefore.sizeMin;
+}
+if(a>this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin))){
+a=this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin));
+}
+}
+a-=this.sizingSplitter.position;
+this._checkSizes();
+return a;
+},_updateSize:function(){
+var pos=this.lastPoint-this.dragOffset-this.originPos;
+var _2f=this.paneBefore.position;
+var _30=this.paneAfter.position+this.paneAfter.sizeActual;
+this.paneBefore.sizeActual=pos-_2f;
+this.paneAfter.position=pos+this.sizerWidth;
+this.paneAfter.sizeActual=_30-this.paneAfter.position;
+for(var i=0;i<this.children.length;i++){
+this.children[i].sizeShare=this.children[i].sizeActual;
+}
+this._layoutPanels();
+},_showSizingLine:function(){
+this._moveSizingLine();
+if(this.isHorizontal){
+dojo.html.setMarginBox(this.virtualSizer,{width:this.sizerWidth,height:this.paneHeight});
+}else{
+dojo.html.setMarginBox(this.virtualSizer,{width:this.paneWidth,height:this.sizerWidth});
+}
+this.virtualSizer.style.display="block";
+},_hideSizingLine:function(){
+this.virtualSizer.style.display="none";
+},_moveSizingLine:function(){
+var pos=this.lastPoint-this.startPoint+this.sizingSplitter.position;
+if(this.isHorizontal){
+this.virtualSizer.style.left=pos+"px";
+}else{
+var pos=(this.lastPoint-this.startPoint)+this.sizingSplitter.position;
+this.virtualSizer.style.top=pos+"px";
+}
+},_getCookieName:function(i){
+return this.widgetId+"_"+i;
+},_restoreState:function(){
+for(var i=0;i<this.children.length;i++){
+var _35=this._getCookieName(i);
+var _36=dojo.io.cookie.getCookie(_35);
+if(_36!=null){
+var pos=parseInt(_36);
+if(typeof pos=="number"){
+this.children[i].sizeShare=pos;
+}
+}
+}
+},_saveState:function(){
+for(var i=0;i<this.children.length;i++){
+var _39=this._getCookieName(i);
+dojo.io.cookie.setCookie(_39,this.children[i].sizeShare,null,null,null,null);
+}
+}});
+dojo.lang.extend(dojo.widget.Widget,{sizeMin:10,sizeShare:10});
+dojo.widget.defineWidget("dojo.widget.SplitContainerPanel",dojo.widget.ContentPane,{});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SvgButton.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SvgButton.js?view=auto&rev=541946
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SvgButton.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3/src/widget/SvgButton.js Sat May 26 15:47:41 2007
@@ -0,0 +1,87 @@
+dojo.provide("dojo.widget.SvgButton");
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.widget.SvgButton");
+dojo.widget.SvgButton=function(){
+dojo.widget.DomButton.call(this);
+dojo.widget.SvgWidget.call(this);
+this.onFoo=function(){
+alert("bar");
+};
+this.label="huzzah!";
+this.setLabel=function(x,y,_3,_4,_5){
+var _6=dojo.widget.SvgButton.prototype.coordinates(x,y,_3,_4,_5);
+var _7="";
+switch(_5){
+case "ellipse":
+_7="<text x='"+_6[6]+"' y='"+_6[7]+"'>"+_4+"</text>";
+break;
+case "rectangle":
+_7="";
+break;
+case "circle":
+_7="";
+break;
+}
+return _7;
+};
+this.fillInTemplate=function(x,y,_a,_b,_c){
+this.textSize=_a||12;
+this.label=_b;
+var _d=this.label.length*this.textSize;
+};
+};
+dojo.inherits(dojo.widget.SvgButton,dojo.widget.DomButton);
+dojo.widget.SvgButton.prototype.shapeString=function(x,y,_10,_11,_12){
+switch(_12){
+case "ellipse":
+var _13=dojo.widget.SvgButton.prototype.coordinates(x,y,_10,_11,_12);
+return "<ellipse cx='"+_13[4]+"' cy='"+_13[5]+"' rx='"+_13[2]+"' ry='"+_13[3]+"'/>";
+break;
+case "rect":
+return "";
+break;
+case "circle":
+return "";
+break;
+}
+};
+dojo.widget.SvgButton.prototype.coordinates=function(x,y,_16,_17,_18){
+switch(_18){
+case "ellipse":
+var _19=_17.length*_16;
+var _1a=_16*2.5;
+var rx=_19/2;
+var ry=_1a/2;
+var cx=rx+x;
+var cy=ry+y;
+var _1f=cx-rx*_16/25;
+var _20=cy*1.1;
+return [_19,_1a,rx,ry,cx,cy,_1f,_20];
+break;
+case "rectangle":
+return "";
+break;
+case "circle":
+return "";
+break;
+}
+};
+dojo.widget.SvgButton.prototype.labelString=function(x,y,_23,_24,_25){
+var _26="";
+var _27=dojo.widget.SvgButton.prototype.coordinates(x,y,_23,_24,_25);
+switch(_25){
+case "ellipse":
+_26="<text x='"+_27[6]+"' y='"+_27[7]+"'>"+_24+"</text>";
+break;
+case "rectangle":
+_26="";
+break;
+case "circle":
+_26="";
+break;
+}
+return _26;
+};
+dojo.widget.SvgButton.prototype.templateString=function(x,y,_2a,_2b,_2c){
+return "<g class='dojoButton' dojoAttachEvent='onClick; onMouseMove: onFoo;' dojoAttachPoint='labelNode'>"+dojo.widgets.SVGButton.prototype.shapeString(x,y,_2a,_2b,_2c)+dojo.widget.SVGButton.prototype.labelString(x,y,_2a,_2b,_2c)+"</g>";
+};

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

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

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