You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2007/05/09 04:56:45 UTC
svn commit: r536397 [28/36] - in
/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo: ./ nls/ src/
src/animation/ src/cal/ src/charting/ src/charting/svg/ src/charting/vml/
src/collections/ src/crypto/ src/data/ src/data/core/ src/data/old/ src/da...
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js Tue May 8 19:56:15 2007
@@ -0,0 +1,2 @@
+
+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 (value) {this.comboBoxValue.value = value;dojo.widget.html.stabile.setState(this.widgetId, this.getState(), true);this.onValueChanged(value);}, setLabel:function (value) {this.comboBoxSelectionValue.value = value;if (this.textInputNode.value != value) {this.textInputNode.value = value;}}, getLabel:function () {return this.comboBoxSelectionValue.value;}, getState:function () {return {value:this.getValue(), label:this.getLabel()};}, onKeyUp:function (evt) {this.setLabel(this.textInputNode.value);}, setState:function (state) {this.setValue(state.value);this.setLabel(state.label);}, setAllValues:function (value1, value2) {this.setLabel(value1);this.setValue(value2);}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js Tue May 8 19:56:15 2007
@@ -0,0 +1,32 @@
+
+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\"><</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\">></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\tposition: 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: 15
px;\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 (args, frag) {if (args.debugPane) {var dp = this.debugPane = dojo.widget.byId(args.debugPane);dp.hide();dojo.event.connect(dp, "closeWindow", dojo.lang.hitch(this, function () {this.debugPane = false;}));}
+var source = this.getFragNodeRef(frag);this.sourceNode = dojo.body().appendChild(source.cloneNode(true));for (var i = 0, child; child = this.sourceNode.childNodes[i]; i++) {if (child.tagName && child.getAttribute("dojotype").toLowerCase() == "showslide") {child.className = "dojoShowPrintSlide";child.innerHTML = "<h1>" + child.title + "</h1>" + child.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, child; child = this.children[i]; i++) {if (child.widgetType == "ShowSlide") {this._slides.push(child);this.option.text = child.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 parts = ("" + window.location).split(this.widgetId + "_SlideNo_");if (parts.length > 1) {setTimeout(dojo.lang.hitch(this, function () {this.gotoSlide(parseInt(parts[1]), true);}), 300);}}
+}));}, gotoSlide:function (slide, preventSetHash) {if (slide == this._slide) {return;}
+if (!this._slides[slide]) {for (var i = 0, child; child = this._slides[i]; i++) {if (child.title == slide) {slide = i;break;}}
+}
+if (!this._slides[slide]) {return;}
+if (this.debugPane) {if (this._slides[slide].debug) {this.debugPane.show();} else {this.debugPane.hide();}}
+if (this._slide != -1) {while (this._slides[this._slide].previousAction()) {}}
+if (!preventSetHash) {window.location.href = "#" + this.widgetId + "_SlideNo_" + slide;}
+if (this._slides[this._slide]) {this._slides[this._slide].hide();}
+this._slide = slide;this.select.selectedIndex = slide;var cn = this.contentNode;while (cn.firstChild) {cn.removeChild(cn.firstChild);}
+cn.appendChild(this._slides[slide].domNode);this._slides[slide].show();}, gotoSlideByEvent:function (event) {var node = event.target;var type = event.type;if (type == "click") {if (node.tagName == "OPTION" && node.parentNode == this.select) {this.gotoSlide(node.index);} else {if (node == this.select) {this.gotoSlide(node.selectedIndex);} else {this.nextSlide(event);}}
+} else {if (type == "keydown" || type == "keypress") {var key = event.keyCode;var ch = event.charCode;if (key == 63234 || key == 37) {this.previousSlide(event);} else {if (key == 63235 || key == 39 || ch == 32) {this.nextSlide(event);}}
+}}
+}, nextSlide:function (event) {if (!this.stopEvent(event)) {return false;}
+if (!this._slides[this._slide].nextAction(event)) {if ((this._slide + 1) != this._slides.length) {this.gotoSlide(this._slide + 1);return true;}
+return false;}}, previousSlide:function (event) {if (!this.stopEvent(event)) {return false;}
+if (!this._slides[this._slide].previousAction(event)) {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 target = ev.target;while (target != null) {if (target == this.domNode) {target = ev.target;break;}
+target = target.parentNode;}
+if (!dojo.dom.isDescendantOf(target, this.nav)) {while (target && target != this.domNode) {if (target.tagName == "A" || target.tagName == "INPUT" || target.tagName == "TEXTAREA" || target.tagName == "SELECT") {return false;}
+if (typeof target.onclick == "function" || typeof target.onkeypress == "function") {return false;}
+target = target.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";}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js Tue May 8 19:56:15 2007
@@ -0,0 +1,2 @@
+
+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();}}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js Tue May 8 19:56:15 2007
@@ -0,0 +1,27 @@
+
+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 (action) {this._action = action;}, _nextAction:function (event) {if ((this._action + 1) != this._actions.length) {++this._action;return true;}
+return false;}, _previousAction:function (event) {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 actions = this.getChildrenOfType("ShowAction", false);var atypes = {};dojo.lang.forEach(actions, function (act) {atypes[act.on] = true;});this._components = {};var cn = this.containerNode;var nodes = dojo.render.html.ie ? cn.all : cn.getElementsByTagName("*");dojo.lang.forEach(nodes, function (node) {var as = node.getAttribute("a
s");if (as) {if (!this._components[as]) {this._components[as] = [];}
+this._components[as].push(node);if (!atypes[as]) {var tmpAction = dojo.widget.createWidget("ShowAction", {on:as});this.addChild(tmpAction);atypes[as] = true;}}
+}, this);this._actions = [];actions = this.getChildrenOfType("ShowAction", false);dojo.lang.forEach(actions, function (child) {this._actions.push(child);var components = this._components[child.on];for (var j = 0, component; component = components[j]; j++) {if (child["action"] && ((child.action != "remove") && (child.action != "fadeout") && (child.action != "wipeout"))) {this.hideComponent(component);}}
+}, this);}, previousAction:function (event) {if (!this.parent.stopEvent(event)) {return false;}
+var action = this._actions[this._action];if (!action) {return false;}
+var on = action.on;while (action.on == on) {var components = this._components[on];for (var i = 0, component; component = components[i]; i++) {if ((action.action == "remove") || (action.action == "fadeout") || (action.action == "wipeout")) {if (component.style.display == "none") {component.style.display = "";component.style.visibility = "visible";var exits = true;}
+dojo.html.setOpacity(component, 1);} else {if (action.action) {this.hideComponent(component);}}
+}
+--this._action;if (exits) {return true;}
+if (action.auto == "true") {on = this._actions[this._action].on;}
+action = this._actions[this._action];if (!action) {return false;}}
+return true;}, hideComponent:function (component) {component.style.visibility = "hidden";component.style.backgroundColor = "transparent";var parent = component.parentNode;if ((parent) && (parent.tagName.toLowerCase() == "li")) {parent.oldType = parent.style.listStyleType;parent.style.listStyleType = "none";}}, nextAction:function (event) {if (!this.parent.stopEvent(event)) {return false;}
+if (!this._nextAction(this)) {return false;}
+var action = this._actions[this._action];if (!action) {return false;}
+var tmpAction = action["action"];var components = this._components[action.on];for (var i = 0, component; component = components[i]; i++) {if (tmpAction) {var duration = action.duration || 1000;if ((tmpAction == "fade") || (tmpAction == "fadeIn")) {dojo.html.setOpacity(component, 0);dojo.lfx.html.fadeShow(component, duration).play(true);} else {if (tmpAction == "fadeout") {dojo.lfx.html.fadeHide(component, duration).play(true);} else {if (tmpAction == "fly") {var width = dojo.html.getMarginBox(component).width;var position = dojo.html.getAbsolutePosition(component);component.style.position = "relative";component.style.left = -(width + position.x) + "px";dojo.lfx.html.slideBy(component, {top:0, left:(width + position.x)}, duration, -1, this.callWith).play(true);} else {if ((tmpAction == "wipe") || (tmpAction == "wipein")) {dojo.lfx.html.wipeIn(component, duration).play();} else {if (tmpAction == "wipeout") {dojo.lfx.html.wipeOut(component, duration).play();} else {if (tmpActio
n == "color") {var from = new dojo.gfx.color.Color(action.from).toRgb();var to = new dojo.gfx.color.Color(action.to).toRgb();var anim = new dojo.animation.Animation(new dojo.math.curves.Line(from, to), duration, 0);var node = component;dojo.event.connect(anim, "onAnimate", function (e) {node.style.color = "rgb(" + e.coordsAsInts().join(",") + ")";});anim.play(true);} else {if (tmpAction == "bgcolor") {dojo.lfx.html.unhighlight(component, action.to, duration).play();} else {if (tmpAction == "remove") {component.style.display = "none";}}
+}}
+}}
+}}
+if (tmpAction == "hide") {component.style.visibility = "hidden";} else {component.style.visibility = "visible";}}
+}
+action = this._actions[this._action + 1];if (action && action.auto == "true") {this.nextAction();}
+return true;}, callWith:function (node) {if (!node) {return;}
+if (dojo.lang.isArray(node)) {dojo.lang.forEach(node, arguments.callee);return;}
+var parent = node.parentNode;if ((parent) && (parent.tagName.toLowerCase() == "li")) {parent.style.listStyleType = parent.oldType;}}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js Tue May 8 19:56:15 2007
@@ -0,0 +1,7 @@
+
+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("dojo.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 tmp = this._foreground;this._foreground = this._background;this._background = tmp;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;}}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js Tue May 8 19:56:15 2007
@@ -0,0 +1,70 @@
+
+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 \" \n\tclass=\"sliderMain\" \n\tdojoAttachPoint=\"focusNode\" \n\t
dojoAttachEvent=\"onmousedown:_setFocus; onkey:_handleKeyEvents; onkeyup:_buttonReleased; onmouseup:_buttonReleased; onmousewheel:_mouseWheeled;\"\n\ttabindex=\"0\" cols=3 cellpadding=0 cellspacing=0 style=\"\">\n\t<tr valign=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.backgroundStyle}\"\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"), backgroundSize:"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 (evt) {if (!evt.key) {return;}
+if (!evt.ctrlKey && !evt.altKey) {switch (evt.key) {case evt.KEY_LEFT_ARROW:
+dojo.event.browser.stopEvent(evt);this._leftButtonPressed(evt);return;case evt.KEY_RIGHT_ARROW:
+dojo.event.browser.stopEvent(evt);this._rightButtonPressed(evt);return;case evt.KEY_DOWN_ARROW:
+dojo.event.browser.stopEvent(evt);this._bottomButtonPressed(evt);return;case evt.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(evt);this._topButtonPressed(evt);return;}}
+this._eventCount++;}, _pressButton:function (buttonNode) {buttonNode.className = buttonNode.className.replace("Outset", "Inset");}, _releaseButton:function (buttonNode) {buttonNode.className = buttonNode.className.replace("Inset", "Outset");}, _buttonPressed:function (evt, buttonNode) {this._setFocus();if (typeof evt == "object") {if (this._typamaticTimer != null) {if (this._typamaticNode == buttonNode) {return;}
+clearTimeout(this._typamaticTimer);}
+this._buttonReleased(null);this._eventCount++;this._typamaticTimer = null;this._currentTimeout = this.defaultTimeout;dojo.event.browser.stopEvent(evt);} else {if (evt != this._eventCount) {this._buttonReleased(null);return false;}}
+if (buttonNode == this.leftButtonNode && this.isEnableX) {this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") - this._valueSizeX);} else {if (buttonNode == this.rightButtonNode && this.isEnableX) {this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") + this._valueSizeX);} else {if (buttonNode == this.topButtonNode && this.isEnableY) {this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") - this._valueSizeY);} else {if (buttonNode == this.bottomButtonNode && this.isEnableY) {this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") + this._valueSizeY);} else {return false;}}
+}}
+this._pressButton(buttonNode);this.notifyListeners();this._typamaticNode = buttonNode;this._typamaticTimer = dojo.lang.setTimeout(this, "_buttonPressed", this._currentTimeout, this._eventCount, buttonNode);this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate);return false;}, _bottomButtonPressed:function (evt) {return this._buttonPressed(evt, this.bottomButtonNode);}, _bottomButtonDoubleClicked:function (evt) {var rc = this._bottomButtonPressed(evt);dojo.lang.setTimeout(this, "_buttonReleased", 50, null);return rc;}, _topButtonPressed:function (evt) {return this._buttonPressed(evt, this.topButtonNode);}, _topButtonDoubleClicked:function (evt) {var rc = this._topButtonPressed(evt);dojo.lang.setTimeout(this, "_buttonReleased", 50, null);return rc;}, _leftButtonPressed:function (evt) {return this._buttonPressed(evt, this.leftButtonNode);}, _leftButtonDoubleClicked:function (evt) {var rc = this._leftButtonPressed(evt);dojo.lang.setTimeout(this, "_butto
nReleased", 50, null);return rc;}, _rightButtonPressed:function (evt) {return this._buttonPressed(evt, 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 keyCode = evt.keyCode;switch (keyCode) {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 scrollAmount = 0;if (typeof evt.wheelDelta == "number") {scrollAmount = evt.wheelDelta;} else {if (typeof evt.detail == "number") {scrollAmount = -evt.detail;}}
+if (this.isEnableY) {if (scrollAmount > 0) {this._topButtonPressed(evt);this._buttonReleased(evt);} else {if (scrollAmount < 0) {this._bottomButtonPressed(evt);this._buttonReleased(evt);}}
+} else {if (this.isEnableX) {if (scrollAmount > 0) {this._rightButtonPressed(evt);this._buttonReleased(evt);} else {if (scrollAmount < 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 (args, frag) {var source = this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode, source);var padding = this.domNode.style.padding;if (dojo.lang.isString(padding) && padding != "" && padding != "0px" && padding != "0px 0px 0px 0px") {this.topBorderNode.style.padding = this.bottomBorderNode.style.padding = padding;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 borderWidth = this.domNode.style.borderWidth;if (dojo.lang.isString(borderWidth) && borderWidth != "" && borderWidth != "0px" && borderWidth != "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 = borderWidth;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 selectedValue = Math.round(x / this._valueSizeX);x = Math.round(selectedValue * 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 constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);if (isNaN(constrainingCtrBox.width) || isNaN(sliderHandleBox.width) || constrainingCtrBox.width <= 0 || sliderHandleBox.width <= 0) {return false;}
+this._constraintWidth = constrainingCtrBox.width + dojo.html.getPadding(this.constrainingContainerNode).width - sliderHandleBox.width;if (this.flipX) {this._clipLeft = this._clipRight = constrainingCtrBox.width;} else {this._clipLeft = this._clipRight = 0;}
+this._clipXdelta = sliderHandleBox.width >> 1;if (!this.isEnableY) {this._clipTop = 0;this._clipBottom = constrainingCtrBox.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 (value) {if (0 == this._valueSizeX) {if (this._calc_valueSizeX() == false) {dojo.lang.setTimeout(this, "setValueX", 100, value);return;}}
+if (isNaN(value)) {value = 0;}
+if (value > this.maximumX) {value = this.maximumX;} else {if (value < this.minimumX) {value = this.minimumX;}}
+var pixelPercent = (value - this.minimumX) / (this.maximumX - this.minimumX);if (this.flipX) {pixelPercent = 1 - pixelPercent;}
+this._snapX(pixelPercent * this._constraintWidth);this.notifyListeners();}, getValueX:function () {var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "left") / this._constraintWidth;if (this.flipX) {pixelPercent = 1 - pixelPercent;}
+return Math.round(pixelPercent * (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 selectedValue = Math.round(y / this._valueSizeY);y = Math.round(selectedValue * 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 constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);if (isNaN(constrainingCtrBox.height) || isNaN(sliderHandleBox.height) || constrainingCtrBox.height <= 0 || sliderHandleBox.height <= 0) {return false;}
+this._constraintHeight = constrainingCtrBox.height + dojo.html.getPadding(this.constrainingContainerNode).height - sliderHandleBox.height;if (this.flipY) {this._clipTop = this._clipBottom = constrainingCtrBox.height;} else {this._clipTop = this._clipBottom = 0;}
+this._clipYdelta = sliderHandleBox.height >> 1;if (!this.isEnableX) {this._clipLeft = 0;this._clipRight = constrainingCtrBox.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 (value) {if (0 == this._valueSizeY) {if (this._calc_valueSizeY() == false) {dojo.lang.setTimeout(this, "setValueY", 100, value);return;}}
+if (isNaN(value)) {value = 0;}
+if (value > this.maximumY) {value = this.maximumY;} else {if (value < this.minimumY) {value = this.minimumY;}}
+var pixelPercent = (value - this.minimumY) / (this.maximumY - this.minimumY);if (this.flipY) {pixelPercent = 1 - pixelPercent;}
+this._snapY(pixelPercent * this._constraintHeight);this.notifyListeners();}, getValueY:function () {var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "top") / this._constraintHeight;if (this.flipY) {pixelPercent = 1 - pixelPercent;}
+return Math.round(pixelPercent * (this.snapValuesY - 1)) * ((this.maximumY - this.minimumY) / (this.snapValuesY - 1)) + this.minimumY;}, _onClick:function (evt) {if (this._isDragInProgress) {return;}
+var parent = dojo.html.getAbsolutePosition(this.constrainingContainerNode, true, dojo.html.boxSizing.MARGIN_BOX);var content = dojo.html.getContentBox(this._handleMove.domNode);if (this.isEnableX) {var x = evt.pageX - parent.x - (content.width >> 1);this._snapX(x);}
+if (this.isEnableY) {var y = evt.pageY - parent.y - (content.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 (value) {this.setValueX(value);}, onValueChanged:function (value) {}});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 (value) {this.setValueY(value);}, onValueChanged:function (value) {}});dojo.declare("dojo.widget._SliderDragMoveSource", dojo.dnd.HtmlDragMoveSource, {slider:null, onDragStart:function (evt) {this.slider._isDragInProgress = true;var dragObj = this.createDragMoveObject();this.slider.notifyListeners();return dragObj;}, onDragEnd:function (evt) {this.slider._isDragInProgress = false;this.slider.notifyListeners();}, createDragMoveObject:function () {var dragObj = new dojo.widget._SliderDragMoveObject(this.dragObject, this.type);dragObj.slider = this.slider;if (this.dragClass) {dragObj.dragClass = this.dragClass;}
+return dragObj;}, setParent:function (slider) {this.slider = slider;}});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();}}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SortableTable.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SortableTable.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SortableTable.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SortableTable.js Tue May 8 19:56:15 2007
@@ -0,0 +1,72 @@
+
+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 parts = s.split("."), i = 0, obj = dj_global;do {obj = obj[parts[i++]];} while (i < parts.length && obj);return (obj != dj_global) ? obj : 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 idx = -1;for (var i = 0; i < this.selected.length; i++) {if (this.compare(this.selected[i], o)) {idx = i;break;}}
+if (idx >= 0) {this.selected.splice(idx, 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 (body) {this.selected = [];var idx = 0;var rows = body.getElementsByTagName("tr");for (var i = 0; i < rows.length; i++) {if (rows[i].parentNode == body) {rows[i].removeAttribute("selected");if (this.enableAlternateRows && idx % 2 == 1) {rows[i].className = this.rowAlternateClass;} else {rows[i].className = "";}
+idx++;}}
+}, getObjectFromRow:function (row) {var cells = 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()] = cells[i].innerHTML;} else {var text = dojo.html.renderedTextContent(cells[i]);var val = text;if (this.columns[i].getType() != String) {var val = new (this.columns[i].getType())(text);}
+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 (node) {this.reset();var row = node.getElementsByTagName("tr")[0];var cells = row.getElementsByTagName("td");if (cells.length == 0) {cells = row.getElementsByTagName("th");}
+for (var i = 0; i < cells.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(cells[i], "align")) {o.align = dojo.html.getAttribute(cells[i], "align");}
+if (dojo.html.hasAttribute(cells[i], "valign")) {o.valign = dojo.html.getAttribute(cells[i], "valign");}
+if (dojo.html.hasAttribute(cells[i], "nosort")) {o.noSort = dojo.html.getAttribute(cells[i], "nosort") == "true";}
+if (dojo.html.hasAttribute(cells[i], "sortusing")) {var trans = dojo.html.getAttribute(cells[i], "sortusing");var f = this.getTypeFromString(trans);if (f != null && f != window && typeof (f) == "function") {o.sortFunction = f;}}
+if (dojo.html.hasAttribute(cells[i], "field")) {o.field = dojo.html.getAttribute(cells[i], "field");}
+if (dojo.html.hasAttribute(cells[i], "format")) {o.format = dojo.html.getAttribute(cells[i], "format");}
+if (dojo.html.hasAttribute(cells[i], "dataType")) {var sortType = dojo.html.getAttribute(cells[i], "dataType");if (sortType.toLowerCase() == "html" || sortType.toLowerCase() == "markup") {o.sortType = "__markup__";o.noSort = true;} else {var type = this.getTypeFromString(sortType);if (type) {o.sortType = sortType;o.dataType = type;}}
+}
+o.label = dojo.html.renderedTextContent(cells[i]);this.columns.push(o);if (dojo.html.hasAttribute(cells[i], "sort")) {this.sortIndex = i;var dir = dojo.html.getAttribute(cells[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 (data) {this.data = [];this.selected = [];for (var i = 0; i < data.length; i++) {var o = {};for (var j = 0; j < this.columns.length; j++) {var field = this.columns[j].getField();if (this.columns[j].sortType == "__markup__") {o[field] = String(data[i][field]);} else {var type = this.columns[j].getType();var val = data[i][field];var t = this.columns[j].sortType.toLowerCase();if (type == String) {o[field] = val;} else {if (val != null) {o[field] = new type(val);} else {o[field] = new type();}}
+}}
+if (data[i][this.valueField] && !o[this.valueField]) {o[this.valueField] = data[i][this.valueField];}
+this.data.push(o);}}, parseDataFromTable:function (tbody) {this.data = [];this.selected = [];var rows = tbody.getElementsByTagName("tr");for (var i = 0; i < rows.length; i++) {if (dojo.html.getAttribute(rows[i], "ignoreIfParsed") == "true") {continue;}
+var o = {};var cells = rows[i].getElementsByTagName("td");for (var j = 0; j < this.columns.length; j++) {var field = this.columns[j].getField();if (this.columns[j].sortType == "__markup__") {o[field] = cells[j].innerHTML;} else {var type = this.columns[j].getType();var val = dojo.html.renderedTextContent(cells[j]);if (type == String) {o[field] = val;} else {if (val != null) {o[field] = new type(val);} else {o[field] = new type();}}
+}}
+if (dojo.html.hasAttribute(rows[i], "value") && !o[this.valueField]) {o[this.valueField] = dojo.html.getAttribute(rows[i], "value");}
+this.data.push(o);if (dojo.html.getAttribute(rows[i], "selected") == "true") {this.selected.push(o);}}
+}, showSelections:function () {var body = this.domNode.getElementsByTagName("tbody")[0];var rows = body.getElementsByTagName("tr");var idx = 0;for (var i = 0; i < rows.length; i++) {if (rows[i].parentNode == body) {if (dojo.html.getAttribute(rows[i], "selected") == "true") {rows[i].className = this.rowSelectedClass;} else {if (this.enableAlternateRows && idx % 2 == 1) {rows[i].className = this.rowAlternateClass;} else {rows[i].className = "";}}
+idx++;}}
+}, render:function (bDontPreserve) {var data = [];var body = this.domNode.getElementsByTagName("tbody")[0];if (!bDontPreserve) {this.parseDataFromTable(body);}
+for (var i = 0; i < this.data.length; i++) {data.push(this.data[i]);}
+var col = this.columns[this.sortIndex];if (!col.noSort) {var field = col.getField();if (col.sortFunction) {var sort = col.sortFunction;} else {var sort = function (a, b) {if (a[field] > b[field]) {return 1;}
+if (a[field] < b[field]) {return -1;}
+return 0;};}
+data.sort(sort);if (this.sortDirection != 0) {data.reverse();}}
+while (body.childNodes.length > 0) {body.removeChild(body.childNodes[0]);}
+for (var i = 0; i < data.length; i++) {var row = document.createElement("tr");dojo.html.disableSelection(row);if (data[i][this.valueField]) {row.setAttribute("value", data[i][this.valueField]);}
+if (this.isSelected(data[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 cell = document.createElement("td");cell.setAttribute("align", this.columns[j].align);cell.setAttribute("valign", this.columns[j].valign);dojo.html.disableSelection(cell);if (this.sortIndex == j) {cell.className = this.columnSelected;}
+if (this.columns[j].sortType == "__markup__") {cell.innerHTML = data[i][this.columns[j].getField()];for (var k = 0; k < cell.childNodes.length; k++) {var node = cell.childNodes[k];if (node && node.nodeType == dojo.html.ELEMENT_NODE) {dojo.html.disableSelection(node);}}
+} else {if (this.columns[j].getType() == Date) {var format = this.defaultDateFormat;if (this.columns[j].format) {format = this.columns[j].format;}
+cell.appendChild(document.createTextNode(dojo.date.strftime(data[i][this.columns[j].getField()], format)));} else {cell.appendChild(document.createTextNode(data[i][this.columns[j].getField()]));}}
+row.appendChild(cell);}
+body.appendChild(row);dojo.event.connect(row, "onclick", this, "onUISelect");}
+var minRows = parseInt(this.minRows);if (!isNaN(minRows) && minRows > 0 && data.length < minRows) {var mod = 0;if (data.length % 2 == 0) {mod = 1;}
+var nRows = minRows - data.length;for (var i = 0; i < nRows; 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 cell = document.createElement("td");cell.appendChild(document.createTextNode("\xa0"));row.appendChild(cell);}
+body.appendChild(row);}}
+}, onSelect:function (e) {}, onUISelect:function (e) {var row = dojo.html.getParentByType(e.target, "tr");var body = 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 startRow;var rows = body.getElementsByTagName("tr");for (var i = 0; i < rows.length; i++) {if (rows[i].parentNode == body) {if (rows[i] == row) {break;}
+if (dojo.html.getAttribute(rows[i], "selected") == "true") {startRow = rows[i];}}
+}
+if (!startRow) {startRow = row;for (; i < rows.length; i++) {if (dojo.html.getAttribute(rows[i], "selected") == "true") {row = rows[i];break;}}
+}
+this.resetSelections(body);if (startRow == row) {row.setAttribute("selected", "true");this.setSelectionByRow(row);} else {var doSelect = false;for (var i = 0; i < rows.length; i++) {if (rows[i].parentNode == body) {rows[i].removeAttribute("selected");if (rows[i] == startRow) {doSelect = true;}
+if (doSelect) {this.setSelectionByRow(rows[i]);rows[i].setAttribute("selected", "true");}
+if (rows[i] == row) {doSelect = false;}}
+}}
+} else {this.resetSelections(body);row.setAttribute("selected", "true");this.setSelectionByRow(row);}}
+} else {this.resetSelections(body);row.setAttribute("selected", "true");this.setSelectionByRow(row);}
+this.showSelections();this.onSelect(e);e.stopPropagation();e.preventDefault();}, onHeaderClick:function (e) {var oldIndex = this.sortIndex;var oldDirection = this.sortDirection;var source = e.target;var row = dojo.html.getParentByType(source, "tr");var cellTag = "td";if (row.getElementsByTagName(cellTag).length == 0) {cellTag = "th";}
+var headers = row.getElementsByTagName(cellTag);var header = dojo.html.getParentByType(source, cellTag);for (var i = 0; i < headers.length; i++) {if (headers[i] == header) {if (i != oldIndex) {this.sortIndex = i;this.sortDirection = 0;headers[i].className = this.headerSortDownClass;} else {this.sortDirection = (oldDirection == 0) ? 1 : 0;if (this.sortDirection == 0) {headers[i].className = this.headerSortDownClass;} else {headers[i].className = this.headerSortUpClass;}}
+} else {headers[i].className = this.headerClass;}}
+this.render();}, postCreate:function () {var thead = this.domNode.getElementsByTagName("thead")[0];if (this.headClass.length > 0) {thead.className = this.headClass;}
+dojo.html.disableSelection(this.domNode);this.parseColumns(thead);var header = "td";if (thead.getElementsByTagName(header).length == 0) {header = "th";}
+var headers = thead.getElementsByTagName(header);for (var i = 0; i < headers.length; i++) {if (!this.columns[i].noSort) {dojo.event.connect(headers[i], "onclick", this, "onHeaderClick");}
+if (this.sortIndex == i) {if (this.sortDirection == 0) {headers[i].className = this.headerSortDownClass;} else {headers[i].className = this.headerSortUpClass;}}
+}
+var tbody = this.domNode.getElementsByTagName("tbody")[0];if (this.tbodyClass.length > 0) {tbody.className = this.tbodyClass;}
+this.parseDataFromTable(tbody);this.render(true);}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SortableTable.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SortableTable.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SortableTable.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Spinner.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Spinner.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Spinner.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Spinner.js Tue May 8 19:56:15 2007
@@ -0,0 +1,88 @@
+
+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 \"\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; onMouseMove: _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}'>${thi
s.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:"\n.ie .dojoSpinner, .safari .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\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\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.widge
t", "templates/images/spinnerDecrement.gif"), _handleKeyEvents:function (evt) {if (!evt.key) {return;}
+if (!evt.ctrlKey && !evt.altKey) {switch (evt.key) {case evt.KEY_DOWN_ARROW:
+dojo.event.browser.stopEvent(evt);this._downArrowPressed(evt);return;case evt.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(evt);this._upArrowPressed(evt);return;}}
+this._eventCount++;}, _onSpinnerKeyUp:function (evt) {this._arrowReleased(evt);this.onkeyup(evt);}, _resize:function () {var inputSize = dojo.html.getBorderBox(this.textbox);this.buttonSize = {width:inputSize.height / 2, height:inputSize.height / 2};if (this.upArrowNode) {dojo.html.setMarginBox(this.upArrowNode, this.buttonSize);dojo.html.setMarginBox(this.downArrowNode, this.buttonSize);}}, _pressButton:function (node) {node.style.borderWidth = "1px 0px 0px 1px";node.style.borderStyle = "inset";}, _releaseButton:function (node) {node.style.borderWidth = "0px 1px 1px 0px";node.style.borderStyle = "outset";}, _arrowPressed:function (evt, direction) {var nodePressed = (direction == -1) ? this.downArrowNode : this.upArrowNode;var nodeReleased = (direction == +1) ? this.downArrowNode : this.upArrowNode;if (typeof evt != "number") {if (this._typamaticTimer != null) {if (this._typamaticNode == nodePressed) {return;}
+dojo.lang.clearTimeout(this._typamaticTimer);}
+this._releaseButton(nodeReleased);this._eventCount++;this._typamaticTimer = null;this._currentTimeout = this.defaultTimeout;} else {if (evt != this._eventCount) {this._releaseButton(nodePressed);return;}}
+this._pressButton(nodePressed);this._setCursorX(this.adjustValue(direction, this._getCursorX()));this._typamaticNode = nodePressed;this._typamaticTimer = dojo.lang.setTimeout(this, "_arrowPressed", this._currentTimeout, this._eventCount, direction);this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate);}, _downArrowPressed:function (evt) {return this._arrowPressed(evt, -1);}, _downArrowDoubleClicked:function (evt) {var rc = this._downArrowPressed(evt);dojo.lang.setTimeout(this, "_arrowReleased", 50, null);return rc;}, _upArrowPressed:function (evt) {return this._arrowPressed(evt, +1);}, _upArrowDoubleClicked:function (evt) {var rc = this._upArrowPressed(evt);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 keyCode = evt.keyCode;var k = dojo.event.browser.keys;switch (keyCode) {case k.KEY_DOWN_AR
ROW:
+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 scrollAmount = 0;if (typeof evt.wheelDelta == "number") {scrollAmount = evt.wheelDelta;} else {if (typeof evt.detail == "number") {scrollAmount = -evt.detail;}}
+if (scrollAmount > 0) {this._upArrowPressed(evt);this._arrowReleased(evt);} else {if (scrollAmount < 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 range = document.selection.createRange().duplicate();if (range.parentElement() == this.textbox) {range.moveStart("textedit", -1);x = range.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 range = this.textbox.createTextRange();range.collapse(true);range.moveEnd("character", x);range.moveStart("character", x);range.select();}}
+}
+catch (e) {}}, _spinnerPostMixInProperties:function (args, frag) {var inputNode = this.getFragNodeRef(frag);var inputSize = dojo.html.getBorderBox(inputNode);this.buttonSize = {width:inputSize.height / 2 - 1, height:inputSize.height / 2 - 1};}, _spinnerPostCreate:function (args, frag) {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 (args, frag) {dojo.widget.IntegerSpinner.superclass.postMixInProperties.apply(this, arguments);this._spinnerPostMixInProperties(args, frag);}, postCreate:function (args, frag) {dojo.widget.IntegerSpinner.superclass.postCreate.apply(this, arguments);this._spinnerPostCreate(args, frag);}, adjustValue:function (direction, x) {var val = this
.getValue().replace(/[^\-+\d]/g, "");if (val.length == 0) {return;}
+var num = Math.min(Math.max((parseInt(val) + (parseInt(this.delta) * direction)), (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 (args, frag) {dojo.widget.RealNumberSpinner.superclass.postMixInProperties.apply(this, arguments);this._spinnerPostMixInProperties(args, frag);}, postCreate:function (args, frag) {dojo.widget.RealNumberSpinner.superclass.postCreate.apply(this, arguments);this._spinnerPostCreate(args, frag);}, adjustValue:function (direction, x) {var val = this.getValue().replace(/[^\-+\.eE\d]/g, "");if (!val.length) {return;}
+var num = parseFloat(val);if (isNaN(num)) {return;}
+var delta = this.delta.split(/[eE]/);if (!delta.length) {delta = [1, 1];} else {delta[0] = parseFloat(delta[0].replace(/[^\-+\.\d]/g, ""));if (isNaN(delta[0])) {delta[0] = 1;}
+if (delta.length > 1) {delta[1] = parseInt(delta[1]);}
+if (isNaN(delta[1])) {delta[1] = 1;}}
+val = this.getValue().split(/[eE]/);if (!val.length) {return;}
+var numBase = parseFloat(val[0].replace(/[^\-+\.\d]/g, ""));if (val.length == 1) {var numExp = 0;} else {var numExp = parseInt(val[1].replace(/[^\-+\d]/g, ""));}
+if (x <= val[0].length) {x = 0;numBase += delta[0] * direction;} else {x = Number.MAX_VALUE;numExp += delta[1] * direction;if (this.flags.eSigned == false && numExp < 0) {numExp = 0;}}
+num = Math.min(Math.max((numBase * Math.pow(10, numExp)), (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 (args, frag) {dojo.widget.TimeSpinner.superclass.postMixInProperties.apply(this, arguments);this._spinnerPostMixInProperties(args, frag);}, postCreate:function (args, frag) {dojo.widget.TimeSpinner.superclass.postCreate.apply(this, arguments);this._spinnerPostCreate(args, frag);}, adjustValue:function (direction, x) {var val = this.getValue();var format = (this.flags.format && this.flags.format.search(/[Hhmst]/) >= 0) ? this.flags.format : "hh:mm:ss t";if (direction == 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 qualifiers = format.replace(/H/g, "h").replace(/[^hmst]/g, "").replace(/([hmst])\1/g, "$1");var hourPos = qualifiers.indexOf("h") + 1;var minPos = qualifiers.indexOf("m") + 1;var secPos = qualifiers.indexOf("s") + 1;var ampmPos = qualifiers.indexOf("t") + 1;var cursorFormat = format;var ampm = "";if (ampmPos > 0) {ampm = val.replace(new RegExp(re), "$" + ampmPos);cursorFormat = cursorFormat.replace(/t+/, ampm.replace(/./g, "t"));}
+var hour = 0;var deltaHour = 1;if (hourPos > 0) {hour = val.replace(new RegExp(re), "$" + hourPos);if (dojo.lang.isString(this.delta)) {deltaHour = this.delta.replace(new RegExp(re), "$" + hourPos);}
+if (isNaN(deltaHour)) {deltaHour = 1;} else {deltaHour = parseInt(deltaHour);}
+if (hour.length == 2) {cursorFormat = cursorFormat.replace(/([Hh])+/, "$1$1");} else {cursorFormat = cursorFormat.replace(/([Hh])+/, "$1");}
+if (isNaN(hour)) {hour = 0;} else {hour = parseInt(hour.replace(/^0(\d)/, "$1"));}}
+var min = 0;var deltaMin = 1;if (minPos > 0) {min = val.replace(new RegExp(re), "$" + minPos);if (dojo.lang.isString(this.delta)) {deltaMin = this.delta.replace(new RegExp(re), "$" + minPos);}
+if (isNaN(deltaMin)) {deltaMin = 1;} else {deltaMin = parseInt(deltaMin);}
+cursorFormat = cursorFormat.replace(/m+/, min.replace(/./g, "m"));if (isNaN(min)) {min = 0;} else {min = parseInt(min.replace(/^0(\d)/, "$1"));}}
+var sec = 0;var deltaSec = 1;if (secPos > 0) {sec = val.replace(new RegExp(re), "$" + secPos);if (dojo.lang.isString(this.delta)) {deltaSec = this.delta.replace(new RegExp(re), "$" + secPos);}
+if (isNaN(deltaSec)) {deltaSec = 1;} else {deltaSec = parseInt(deltaSec);}
+cursorFormat = cursorFormat.replace(/s+/, sec.replace(/./g, "s"));if (isNaN(sec)) {sec = 0;} else {sec = parseInt(sec.replace(/^0(\d)/, "$1"));}}
+if (isNaN(x) || x >= cursorFormat.length) {x = cursorFormat.length - 1;}
+var cursorToken = cursorFormat.charAt(x);switch (cursorToken) {case "t":
+if (ampm == this.flags.amSymbol) {ampm = this.flags.pmSymbol;} else {if (ampm == this.flags.pmSymbol) {ampm = this.flags.amSymbol;}}
+break;default:
+if (hour >= 1 && hour < 12 && ampm == this.flags.pmSymbol) {hour += 12;}
+if (hour == 12 && ampm == this.flags.amSymbol) {hour = 0;}
+switch (cursorToken) {case "s":
+sec += deltaSec * direction;while (sec < 0) {min--;sec += 60;}
+while (sec >= 60) {min++;sec -= 60;}
+case "m":
+if (cursorToken == "m") {min += deltaMin * direction;}
+while (min < 0) {hour--;min += 60;}
+while (min >= 60) {hour++;min -= 60;}
+case "h":
+case "H":
+if (cursorToken == "h" || cursorToken == "H") {hour += deltaHour * direction;}
+while (hour < 0) {hour += 24;}
+while (hour >= 24) {hour -= 24;}
+break;default:
+return;}
+if (hour >= 12) {ampm = this.flags.pmSymbol;if (format.indexOf("h") >= 0 && hour >= 13) {hour -= 12;}} else {ampm = this.flags.amSymbol;if (format.indexOf("h") >= 0 && hour == 0) {hour = 12;}}
+}
+cursorFormat = format;if (hour >= 0 && hour < 10 && format.search(/[hH]{2}/) >= 0) {hour = "0" + hour.toString();}
+if (hour >= 10 && cursorFormat.search(/[hH]{2}/) < 0) {cursorFormat = cursorFormat.replace(/(h|H)/, "$1$1");}
+if (min >= 0 && min < 10 && cursorFormat.search(/mm/) >= 0) {min = "0" + min.toString();}
+if (min >= 10 && cursorFormat.search(/mm/) < 0) {cursorFormat = cursorFormat.replace(/m/, "$1$1");}
+if (sec >= 0 && sec < 10 && cursorFormat.search(/ss/) >= 0) {sec = "0" + sec.toString();}
+if (sec >= 10 && cursorFormat.search(/ss/) < 0) {cursorFormat = cursorFormat.replace(/s/, "$1$1");}
+x = cursorFormat.indexOf(cursorToken);if (x == -1) {x = format.length;}
+format = format.replace(/[hH]+/, hour);format = format.replace(/m+/, min);format = format.replace(/s+/, sec);format = format.replace(/t/, ampm);this.setValue(format);if (x > format.length) {x = format.length;}
+return x;}});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Spinner.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Spinner.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Spinner.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SplitContainer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SplitContainer.js?view=auto&rev=536397
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SplitContainer.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SplitContainer.js Tue May 8 19:56:15 2007
@@ -0,0 +1,32 @@
+
+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: m
ove;\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 content = dojo.html.getContentBox(this.domNode);this.paneWidth = content.width;this.paneHeight = content.height;}, onResized:function (e) {var content = dojo.html.getContentBox(this.domNode);this.paneWidth = content.width;this.paneHeight = content.height;this._layoutPanels();}, postCreate:function (args, fragment, parentComp) {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 (child) {with (child.domNode.style) {position = "absolute";}
+dojo.html.addClass(child.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 self = this;var handler = (function () {var sizer_i = i;return function (e) {self.beginSizing(e, sizer_i);};})();dojo.event.connect(this.sizers[i], "onmousedown", handler);this.domNode.appendChild(this.sizers[i]);dojo.html.disableSelection(this.sizers[i]);}, removeChild:function (widget) {if (this.sizers.length > 0) {for (var x = 0; x < this.children.length; x++) {if (this.children[x] === widget) {var i = this.sizers.length - 1;this.domNode.removeChild(this.sizers[i]);this.sizers.length = i;break;}}
+}
+dojo.widget.SplitContainer.superclass.removeChild.call(this, widget, arguments);this.onResized();}, addChild:function (widget) {dojo.widget.SplitContainer.superclass.addChild.apply(this, arguments);this._injectChild(widget);if (this.children.length > 1) {this._addSizer();}
+this._layoutPanels();}, _layoutPanels:function () {if (this.children.length == 0) {return;}
+var space = this.isHorizontal ? this.paneWidth : this.paneHeight;if (this.children.length > 1) {space -= this.sizerWidth * (this.children.length - 1);}
+var out_of = 0;for (var i = 0; i < this.children.length; i++) {out_of += this.children[i].sizeShare;}
+var pix_per_unit = space / out_of;var total_size = 0;for (var i = 0; i < this.children.length - 1; i++) {var size = Math.round(pix_per_unit * this.children[i].sizeShare);this.children[i].sizeActual = size;total_size += size;}
+this.children[this.children.length - 1].sizeActual = space - total_size;this._checkSizes();var pos = 0;var size = this.children[0].sizeActual;this._movePanel(this.children[0], pos, size);this.children[0].position = pos;pos += size;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;size = this.children[i].sizeActual;this._movePanel(this.children[i], pos, size);this.children[i].position = pos;pos += size;}}, _movePanel:function (panel, pos, size) {if (this.isHorizontal) {panel.domNode.style.left = pos + "px";panel.domNode.style.top = 0;panel.resizeTo(size, this.paneHeight);} else {panel.domNode.style.left = 0;panel.domNode.style.top = pos + "px";panel.resizeTo(this.paneWidth, size);}}, _moveSlider:function (slider, pos, size) {if (this.isHorizontal) {slider.style.left = pos + "px";slider.style.top = 0;dojo.html.setMarginBox(slider, {width:size, height:this.paneHeigh
t});} else {slider.style.left = 0;slider.style.top = pos + "px";dojo.html.setMarginBox(slider, {width:this.paneWidth, height:size});}}, _growPane:function (growth, pane) {if (growth > 0) {if (pane.sizeActual > pane.sizeMin) {if ((pane.sizeActual - pane.sizeMin) > growth) {pane.sizeActual = pane.sizeActual - growth;growth = 0;} else {growth -= pane.sizeActual - pane.sizeMin;pane.sizeActual = pane.sizeMin;}}
+}
+return growth;}, _checkSizes:function () {var total_min_size = 0;var total_size = 0;for (var i = 0; i < this.children.length; i++) {total_size += this.children[i].sizeActual;total_min_size += this.children[i].sizeMin;}
+if (total_min_size <= total_size) {var growth = 0;for (var i = 0; i < this.children.length; i++) {if (this.children[i].sizeActual < this.children[i].sizeMin) {growth += this.children[i].sizeMin - this.children[i].sizeActual;this.children[i].sizeActual = this.children[i].sizeMin;}}
+if (growth > 0) {if (this.isDraggingLeft) {for (var i = this.children.length - 1; i >= 0; i--) {growth = this._growPane(growth, this.children[i]);}} else {for (var i = 0; i < this.children.length; i++) {growth = this._growPane(growth, this.children[i]);}}
+}} else {for (var i = 0; i < this.children.length; i++) {this.children[i].sizeActual = Math.round(total_size * (this.children[i].sizeMin / total_min_size));}}
+}, 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 client = (e.layerX ? e.layerX : e.offsetX);var screen = e.pageX;this.originPos = this.originPos.x;} else {var client = (e.layerY ? e.layerY : e.offsetY);var screen = e.pageY;this.originPos = this.originPos.y;}
+this.startPoint = this.lastPoint = screen;this.screenToClientOffset = screen - client;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 start_region = this.paneBefore.position;var end_region = this.paneAfter.position + this.paneAfter.sizeActual;this.paneBefore.sizeActual = pos - start_region;this.paneAfter.position = pos + this.sizerWidth;this.paneAfter.sizeActual = end_region - 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 cookieName = this._getCookieName(i);var cookieValue = dojo.io.cookie.getCookie(cookieName);if (cookieValue != null) {var pos = parseInt(cookieValue);if (typeof pos == "number") {this.children[i].sizeShare = pos;}}
+}}, _saveState:function () {for (var i = 0; i < this.children.length; i++) {var cookieName = this._getCookieName(i);dojo.io.cookie.setCookie(cookieName, 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, {});
\ No newline at end of file
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SplitContainer.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SplitContainer.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SplitContainer.js
------------------------------------------------------------------------------
svn:mime-type = text/plain