tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r618461 [33/43] - in /tapestry/tapestry4/trunk/tapestry-framework/src/js: dojo-0.4.3-custom-4.1.5/ dojo-0.4.3-custom-4.1.5/nls/ dojo-0.4.3-custom-4.1.5/src/ dojo-0.4.3-custom-4.1.5/src/animation/ dojo-0.4.3-custom-4.1.5/src/cal/ dojo-0.4.3-...
Date Mon, 04 Feb 2008 22:08:37 GMT
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Rounded.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Rounded.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Rounded.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Rounded.js Mon Feb  4 14:07:13 2008
@@ -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;
+}});

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

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Select.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Select.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Select.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Select.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/Select.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Show.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Show.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Show.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Show.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/Show.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowAction.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowAction.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowAction.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowAction.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/ShowAction.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowSlide.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowSlide.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowSlide.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/ShowSlide.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/ShowSlide.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SlideShow.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SlideShow.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SlideShow.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SlideShow.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/SlideShow.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Slider.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Slider.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Slider.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Slider.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/Slider.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SortableTable.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SortableTable.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SortableTable.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/SortableTable.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/SortableTable.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Spinner.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Spinner.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Spinner.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Spinner.js Mon Feb  4 14:07:13 2008
@@ -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-custom-4.1.5/src/widget/Spinner.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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



Mime
View raw message