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 2006/12/14 16:45:26 UTC

svn commit: r487242 [16/20] - in /tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo: ./ nls/ src/ src/behavior/ src/cal/ src/charting/ src/charting/svg/ src/charting/vml/ src/collections/ src/crypto/ src/data/ src/data/core/ src/data/old/ src/dat...

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PageContainer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PageContainer.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PageContainer.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PageContainer.js Thu Dec 14 07:45:13 2006
@@ -1,18 +1,23 @@
 
 dojo.provide("dojo.widget.PageContainer");dojo.require("dojo.lang.func");dojo.require("dojo.widget.*");dojo.require("dojo.event.*");dojo.require("dojo.html.selection");dojo.widget.defineWidget("dojo.widget.PageContainer", dojo.widget.HtmlWidget, {isContainer: true,doLayout: true,templateString: "<div dojoAttachPoint='containerNode'></div>",selectedChild: "",fillInTemplate: function(args, frag) {var source = this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode, source);dojo.widget.PageContainer.superclass.fillInTemplate.apply(this, arguments);},postCreate: function(args, frag) {if(this.children.length){dojo.lang.forEach(this.children, this._setupChild, this);var initialChild;if(this.selectedChild){this.selectChild(this.selectedChild);}else{for(var i=0; i<this.children.length; i++){if(this.children[i].selected){this.selectChild(this.children[i]);break;}}
-if(!this.selectedChildWidget){this.selectChild(this.children[0]);}}}},addChild: function(child){dojo.widget.PageContainer.superclass.addChild.apply(this, arguments);this._setupChild(child);this.onResized();if(!this.selectedChildWidget){this.selectChild(child);}},_setupChild: function( page){page.hide();page.domNode.style.position="relative";dojo.event.topic.publish(this.widgetId+"-addChild", page);},removeChild: function( page){dojo.widget.PageContainer.superclass.removeChild.apply(this, arguments);if(this._beingDestroyed){ return; }
-dojo.event.topic.publish(this.widgetId+"-removeChild", page);this.onResized();if (this.selectedChildWidget === page) {this.selectedChildWidget = undefined;if (this.children.length > 0) {this.selectChild(this.children[0], true);}}},selectChild: function( page,  callingWidget){page = dojo.widget.byId(page);this.correspondingPageButton = callingWidget;if(this.selectedChildWidget){this._hideChild(this.selectedChildWidget);}
+if(!this.selectedChildWidget){this.selectChild(this.children[0]);}}
+}},addChild: function(child){dojo.widget.PageContainer.superclass.addChild.apply(this, arguments);this._setupChild(child);this.onResized();if(!this.selectedChildWidget){this.selectChild(child);}},_setupChild: function( page){page.hide();page.domNode.style.position="relative";dojo.event.topic.publish(this.widgetId+"-addChild", page);},removeChild: function( page){dojo.widget.PageContainer.superclass.removeChild.apply(this, arguments);if(this._beingDestroyed){ return; }
+dojo.event.topic.publish(this.widgetId+"-removeChild", page);this.onResized();if (this.selectedChildWidget === page) {this.selectedChildWidget = undefined;if (this.children.length > 0) {this.selectChild(this.children[0], true);}}
+},selectChild: function( page,  callingWidget){page = dojo.widget.byId(page);this.correspondingPageButton = callingWidget;if(this.selectedChildWidget){this._hideChild(this.selectedChildWidget);}
 this.selectedChildWidget = page;this.selectedChild = page.widgetId;this._showChild(page);page.isFirstChild = (page == this.children[0]);page.isLastChild = (page == this.children[this.children.length-1]);dojo.event.topic.publish(this.widgetId+"-selectChild", page);},forward: function(){var index = dojo.lang.find(this.children, this.selectedChildWidget);this.selectChild(this.children[index+1]);},back: function(){var index = dojo.lang.find(this.children, this.selectedChildWidget);this.selectChild(this.children[index-1]);},onResized: function(){if(this.doLayout && this.selectedChildWidget){with(this.selectedChildWidget.domNode.style){top = dojo.html.getPixelValue(this.containerNode, "padding-top", true);left = dojo.html.getPixelValue(this.containerNode, "padding-left", true);}
 var content = dojo.html.getContentBox(this.containerNode);this.selectedChildWidget.resizeTo(content.width, content.height);}},_showChild: function( page) {if(this.doLayout){var content = dojo.html.getContentBox(this.containerNode);page.resizeTo(content.width, content.height);}
 page.selected=true;page.show();},_hideChild: function( page) {page.selected=false;page.hide();},closeChild: function( page) {var remove = page.onClose(this, page);if(remove) {this.removeChild(page);page.destroy();}},destroy: function(){this._beingDestroyed = true;dojo.event.topic.destroy(this.widgetId+"-addChild");dojo.event.topic.destroy(this.widgetId+"-removeChild");dojo.event.topic.destroy(this.widgetId+"-selectChild");dojo.widget.PageContainer.superclass.destroy.apply(this, arguments);}});dojo.widget.defineWidget(
 "dojo.widget.PageController",dojo.widget.HtmlWidget,{templateString: "<span wairole='tablist' dojoAttachEvent='onKey'></span>",isContainer: true,containerId: "",buttonWidget: "PageButton","class": "dojoPageController",fillInTemplate: function() {dojo.html.addClass(this.domNode, this["class"]);dojo.widget.wai.setAttr(this.domNode, "waiRole", "role", "tablist");},postCreate: function(){this.pane2button = {};var container = dojo.widget.byId(this.containerId);if(container){dojo.lang.forEach(container.children, this.onAddChild, this);}
-dojo.event.topic.subscribe(this.containerId+"-addChild", this, "onAddChild");dojo.event.topic.subscribe(this.containerId+"-removeChild", this, "onRemoveChild");dojo.event.topic.subscribe(this.containerId+"-selectChild", this, "onSelectChild");},destroy: function(){dojo.event.topic.unsubscribe(this.containerId+"-addChild", this, "onAddChild");dojo.event.topic.unsubscribe(this.containerId+"-removeChild", this, "onRemoveChild");dojo.event.topic.unsubscribe(this.containerId+"-selectChild", this, "onSelectChild");dojo.widget.PageController.superclass.destroy.apply(this, arguments);},onAddChild: function( page){var button = dojo.widget.createWidget(this.buttonWidget,{label: page.label,closeButton: page.closable});this.addChild(button);this.domNode.appendChild(button.domNode);this.pane2button[page]=button;page.controlButton = button;var _this = this;dojo.event.connect(button, "onClick", function(){ _this.onButtonClick(page); });dojo.event.connect(button, "onCloseButtonClick", funct
 ion(){ _this.onCloseButtonClick(page); });},onRemoveChild: function( page){if(this._currentChild == page){ this._currentChild = null; }
+dojo.event.topic.subscribe(this.containerId+"-addChild", this, "onAddChild");dojo.event.topic.subscribe(this.containerId+"-removeChild", this, "onRemoveChild");dojo.event.topic.subscribe(this.containerId+"-selectChild", this, "onSelectChild");},destroy: function(){dojo.event.topic.unsubscribe(this.containerId+"-addChild", this, "onAddChild");dojo.event.topic.unsubscribe(this.containerId+"-removeChild", this, "onRemoveChild");dojo.event.topic.unsubscribe(this.containerId+"-selectChild", this, "onSelectChild");dojo.widget.PageController.superclass.destroy.apply(this, arguments);},onAddChild: function( page){var button = dojo.widget.createWidget(this.buttonWidget,{label: page.label,closeButton: page.closable
+});this.addChild(button);this.domNode.appendChild(button.domNode);this.pane2button[page]=button;page.controlButton = button;var _this = this;dojo.event.connect(button, "onClick", function(){ _this.onButtonClick(page); });dojo.event.connect(button, "onCloseButtonClick", function(){ _this.onCloseButtonClick(page); });},onRemoveChild: function( page){if(this._currentChild == page){ this._currentChild = null; }
 var button = this.pane2button[page];if(button){button.destroy();}
 this.pane2button[page] = null;},onSelectChild: function( page){if(this._currentChild){var oldButton=this.pane2button[this._currentChild];oldButton.clearSelected();}
 var newButton=this.pane2button[page];newButton.setSelected();this._currentChild=page;},onButtonClick: function( page){var container = dojo.widget.byId(this.containerId);container.selectChild(page, false, this);},onCloseButtonClick: function( page){var container = dojo.widget.byId(this.containerId);container.closeChild(page);},onKey: function( evt){if( (evt.keyCode == evt.KEY_RIGHT_ARROW)||
 (evt.keyCode == evt.KEY_LEFT_ARROW) ){var current = 0;var next = null;var current = dojo.lang.find(this.children, this.pane2button[this._currentChild]);if(evt.keyCode == evt.KEY_RIGHT_ARROW){next = this.children[ (current+1) % this.children.length ];}else{next = this.children[ (current+ (this.children.length-1)) % this.children.length ];}
-dojo.event.browser.stopEvent(evt);next.onClick();}}}
+dojo.event.browser.stopEvent(evt);next.onClick();}}
+}
 );dojo.widget.defineWidget("dojo.widget.PageButton", dojo.widget.HtmlWidget,{templateString: "<span class='item'>" +
 "<span dojoAttachEvent='onClick' dojoAttachPoint='titleNode' class='selectButton'>${this.label}</span>" +
 "<span dojoAttachEvent='onClick:onCloseButtonClick' class='closeButton'>[X]</span>" +
-"</span>",label: "foo",closeButton: false,onClick: function(){this.focus();},onCloseButtonMouseOver: function(){dojo.html.addClass(this.closeButtonNode, "closeHover");},onCloseButtonMouseOut: function(){dojo.html.removeClass(this.closeButtonNode, "closeHover");},onCloseButtonClick: function( evt){},setSelected: function(){dojo.html.addClass(this.domNode, "current");this.titleNode.setAttribute("tabIndex","0");},clearSelected: function(){dojo.html.removeClass(this.domNode, "current");this.titleNode.setAttribute("tabIndex","-1");},focus: function(){if(this.titleNode.focus){this.titleNode.focus();}}});dojo.lang.extend(dojo.widget.Widget, {label: "",selected: false,closable: false,onClose: function(){return true;}});
\ No newline at end of file
+"</span>",label: "foo",closeButton: false,onClick: function(){this.focus();},onCloseButtonMouseOver: function(){dojo.html.addClass(this.closeButtonNode, "closeHover");},onCloseButtonMouseOut: function(){dojo.html.removeClass(this.closeButtonNode, "closeHover");},onCloseButtonClick: function( evt){},setSelected: function(){dojo.html.addClass(this.domNode, "current");this.titleNode.setAttribute("tabIndex","0");},clearSelected: function(){dojo.html.removeClass(this.domNode, "current");this.titleNode.setAttribute("tabIndex","-1");},focus: function(){if(this.titleNode.focus){this.titleNode.focus();}}
+});dojo.lang.extend(dojo.widget.Widget, {label: "",selected: false,closable: false,onClose: function(){return true;}});
\ No newline at end of file

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Parse.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Parse.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Parse.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Parse.js Thu Dec 14 07:45:13 2006
@@ -1,12 +1,14 @@
 
 dojo.provide("dojo.widget.Parse");dojo.require("dojo.widget.Manager");dojo.require("dojo.dom");dojo.widget.Parse = function(fragment){this.propertySetsList = [];this.fragment = fragment;this.createComponents = function(frag, parentComp){var comps = [];var built = false;try{if(frag && frag.tagName && (frag != frag.nodeRef)){var djTags = dojo.widget.tags;var tna = String(frag.tagName).split(";");for(var x=0; x<tna.length; x++){var ltn = tna[x].replace(/^\s+|\s+$/g, "").toLowerCase();frag.tagName = ltn;var ret;if(djTags[ltn]){built = true;ret = djTags[ltn](frag, this, parentComp, frag.index);comps.push(ret);}else{if(ltn.indexOf(":") == -1){ltn = "dojo:"+ltn;}
-ret = dojo.widget.buildWidgetFromParseTree(ltn, frag, this, parentComp, frag.index);if(ret){built = true;comps.push(ret);}}}}}catch(e){dojo.debug("dojo.widget.Parse: error:", e);}
+ret = dojo.widget.buildWidgetFromParseTree(ltn, frag, this, parentComp, frag.index);if(ret){built = true;comps.push(ret);}}
+}}
+}catch(e){dojo.debug("dojo.widget.Parse: error:", e);}
 if(!built){comps = comps.concat(this.createSubComponents(frag, parentComp));}
 return comps;}
 this.createSubComponents = function(fragment, parentComp){var frag, comps = [];for(var item in fragment){frag = fragment[item];if(frag && typeof frag == "object"
 &&(frag!=fragment.nodeRef)
 &&(frag!=fragment.tagName)
-&&(!dojo.dom.isNode(frag))){comps = comps.concat(this.createComponents(frag, parentComp));}}
+&&(item.indexOf('$')==-1)){comps = comps.concat(this.createComponents(frag, parentComp));}}
 return comps;}
 this.parsePropertySets = function(fragment){return [];}
 this.parseProperties = function(fragment){var properties = {};for(var item in fragment){if((fragment[item] == fragment.tagName)||(fragment[item] == fragment.nodeRef)){}else{var frag = fragment[item];if(frag.tagName && dojo.widget.tags[frag.tagName.toLowerCase()]){}else if(frag[0] && frag[0].value!="" && frag[0].value!=null){try{if(item.toLowerCase() == "dataprovider"){var _this = this;this.getDataProvider(_this, frag[0].value);properties.dataProvider = this.dataProvider;}
@@ -14,14 +16,17 @@
 switch(item.toLowerCase()){case "checked":
 case "disabled":
 if (typeof properties[item] != "boolean"){properties[item] = true;}
-break;}}}
+break;}}
+}
 return properties;}
-this.getDataProvider = function(objRef, dataUrl){dojo.io.bind({url: dataUrl,load: function(type, evaldObj){if(type=="load"){objRef.dataProvider = evaldObj;}},mimetype: "text/javascript",sync: true});}
+this.getDataProvider = function(objRef, dataUrl){dojo.io.bind({url: dataUrl,load: function(type, evaldObj){if(type=="load"){objRef.dataProvider = evaldObj;}},mimetype: "text/javascript",sync: true
+});}
 this.getPropertySetById = function(propertySetId){for(var x = 0; x < this.propertySetsList.length; x++){if(propertySetId == this.propertySetsList[x]["id"][0].value){return this.propertySetsList[x];}}
 return "";}
 this.getPropertySetsByType = function(componentType){var propertySets = [];for(var x=0; x < this.propertySetsList.length; x++){var cpl = this.propertySetsList[x];var cpcc = cpl.componentClass || cpl.componentType || null;var propertySetId = this.propertySetsList[x]["id"][0].value;if(cpcc && (propertySetId == cpcc[0].value)){propertySets.push(cpl);}}
 return propertySets;}
-this.getPropertySets = function(fragment){var ppl = "dojo:propertyproviderlist";var propertySets = [];var tagname = fragment.tagName;if(fragment[ppl]){var propertyProviderIds = fragment[ppl].value.split(" ");for(var propertySetId in propertyProviderIds){if((propertySetId.indexOf("..")==-1)&&(propertySetId.indexOf("://")==-1)){var propertySet = this.getPropertySetById(propertySetId);if(propertySet != ""){propertySets.push(propertySet);}}else{}}}
+this.getPropertySets = function(fragment){var ppl = "dojo:propertyproviderlist";var propertySets = [];var tagname = fragment.tagName;if(fragment[ppl]){var propertyProviderIds = fragment[ppl].value.split(" ");for(var propertySetId in propertyProviderIds){if((propertySetId.indexOf("..")==-1)&&(propertySetId.indexOf("://")==-1)){var propertySet = this.getPropertySetById(propertySetId);if(propertySet != ""){propertySets.push(propertySet);}}else{}}
+}
 return this.getPropertySetsByType(tagname).concat(propertySets);}
 this.createComponentFromScript = function(nodeRef, componentName, properties, ns){properties.fastMixIn = true;var ltn = (ns || "dojo") + ":" + componentName.toLowerCase();if(dojo.widget.tags[ltn]){return [dojo.widget.tags[ltn](properties, this, null, null, properties)];}
 return [dojo.widget.buildWidgetFromParseTree(ltn, properties, this, null, null, properties)];}}
@@ -31,10 +36,11 @@
 dojo.widget.createWidget = function(name, props, refNode, position){var isNode = false;var isNameStr = (typeof name == "string");if(isNameStr){var pos = name.indexOf(":");var ns = (pos > -1) ? name.substring(0,pos) : "dojo";if(pos > -1){ name = name.substring(pos+1); }
 var lowerCaseName = name.toLowerCase();var namespacedName = ns + ":" + lowerCaseName;isNode = (dojo.byId(name) && !dojo.widget.tags[namespacedName]);}
 if((arguments.length == 1) && (isNode || !isNameStr)){var xp = new dojo.xml.Parse();var tn = isNode ? dojo.byId(name) : name;return dojo.widget.getParser().createComponents(xp.parseElement(tn, null, true))[0];}
-function fromScript(placeKeeperNode, name, props, ns){props[namespacedName] = {dojotype: [{value: lowerCaseName}],nodeRef: placeKeeperNode,fastMixIn: true};props.ns = ns;return dojo.widget.getParser().createComponentFromScript(placeKeeperNode, name, props, ns);}
+function fromScript(placeKeeperNode, name, props, ns){props[namespacedName] = {dojotype: [{value: lowerCaseName}],nodeRef: placeKeeperNode,fastMixIn: true
+};props.ns = ns;return dojo.widget.getParser().createComponentFromScript(placeKeeperNode, name, props, ns);}
 props = props||{};var notRef = false;var tn = null;var h = dojo.render.html.capable;if(h){tn = document.createElement("span");}
 if(!refNode){notRef = true;refNode = tn;if(h){dojo.body().appendChild(refNode);}}else if(position){dojo.dom.insertAtPosition(tn, refNode, position);}else{tn = refNode;}
-var widgetArray = fromScript(tn, name.toLowerCase(), props, ns);if(	(!widgetArray)||(!widgetArray[0])||
+var widgetArray = fromScript(tn, name.toLowerCase(), props, ns);if((!widgetArray)||(!widgetArray[0])||
 (typeof widgetArray[0].widgetType == "undefined") ){throw new Error("createWidget: Creation of \"" + name + "\" widget failed.");}
 try{if(notRef && widgetArray[0].domNode.parentNode){widgetArray[0].domNode.parentNode.removeChild(widgetArray[0].domNode);}}catch(e){dojo.debug(e);}
 return widgetArray[0];}

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PopupContainer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PopupContainer.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PopupContainer.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/PopupContainer.js Thu Dec 14 07:45:13 2006
@@ -20,7 +20,8 @@
 dojo.lang.hitch(this,function(){try{if(this.parent['focus']){this.parent.focus();}else{this.parent.domNode.focus();}}catch(e){dojo.debug("No idea how to focus to parent", e);}}
 ),10
 );}
-if(this._bookmark && dojo.withGlobal(this.openedForWindow||dojo.global(), dojo.html.selection.isCollapsed)){if(this.openedForWindow){this.openedForWindow.focus()}
+if(this._bookmark && dojo.withGlobal(this.openedForWindow||dojo.global(), dojo.html.selection.isCollapsed)){if(this.openedForWindow){this.openedForWindow.focus()
+}
 try{dojo.withGlobal(this.openedForWindow||dojo.global(), "moveToBookmark", dojo.html.selection, [this._bookmark]);}catch(e){}}
 this._bookmark = null;},closeAll: function(force){if (this.parentPopup){this.parentPopup.closeAll(force);}else{this.close(force);}},setOpenedSubpopup: function(popup) {this.currentSubpopup = popup;},closeSubpopup: function(force) {if(this.currentSubpopup == null){ return; }
 this.currentSubpopup.close(force);this.currentSubpopup = null;},onShow: function() {dojo.widget.PopupContainer.superclass.onShow.apply(this, arguments);this.openedSize={w: this.domNode.style.width, h: this.domNode.style.height};if(dojo.render.html.ie){if(!this.bgIframe){this.bgIframe = new dojo.html.BackgroundIframe();this.bgIframe.setZIndex(this.domNode);}
@@ -29,7 +30,8 @@
 this.processQueue();}});dojo.widget.defineWidget(
 "dojo.widget.PopupContainer",[dojo.widget.HtmlWidget, dojo.widget.PopupContainerBase], {});dojo.widget.PopupManager = new function(){this.currentMenu = null;this.currentButton = null;this.currentFocusMenu = null;this.focusNode = null;this.registeredWindows = [];this.registerWin = function(win){if(!win.__PopupManagerRegistered)
 {dojo.event.connect(win.document, 'onmousedown', this, 'onClick');dojo.event.connect(win, "onscroll", this, "onClick");dojo.event.connect(win.document, "onkey", this, 'onKey');win.__PopupManagerRegistered = true;this.registeredWindows.push(win);}};this.registerAllWindows = function(targetWindow){if(!targetWindow) {targetWindow = dojo.html.getDocumentWindow(window.top && window.top.document || window.document);}
-this.registerWin(targetWindow);for (var i = 0; i < targetWindow.frames.length; i++){try{var win = dojo.html.getDocumentWindow(targetWindow.frames[i].document);if(win){this.registerAllWindows(win);}}catch(e){  }}};this.unRegisterWin = function(win){if(win.__PopupManagerRegistered)
+this.registerWin(targetWindow);for (var i = 0; i < targetWindow.frames.length; i++){try{var win = dojo.html.getDocumentWindow(targetWindow.frames[i].document);if(win){this.registerAllWindows(win);}}catch(e){  }}
+};this.unRegisterWin = function(win){if(win.__PopupManagerRegistered)
 {dojo.event.disconnect(win.document, 'onmousedown', this, 'onClick');dojo.event.disconnect(win, "onscroll", this, "onClick");dojo.event.disconnect(win.document, "onkey", this, 'onKey');win.__PopupManagerRegistered = false;}};this.unRegisterAllWindows = function(){for(var i=0;i<this.registeredWindows.length;++i){this.unRegisterWin(this.registeredWindows[i]);}
 this.registeredWindows = [];};dojo.addOnLoad(this, "registerAllWindows");dojo.addOnUnload(this, "unRegisterAllWindows");this.closed = function(menu){if (this.currentMenu == menu){this.currentMenu = null;this.currentButton = null;this.currentFocusMenu = null;}};this.opened = function(menu, button){if (menu == this.currentMenu){ return; }
 if (this.currentMenu){this.currentMenu.close();}

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RadioGroup.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RadioGroup.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RadioGroup.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RadioGroup.js Thu Dec 14 07:45:13 2006
@@ -2,7 +2,8 @@
 dojo.provide("dojo.widget.RadioGroup");dojo.require("dojo.lang.common");dojo.require("dojo.event.browser");dojo.require("dojo.html.selection");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");dojo.widget.defineWidget(
 "dojo.widget.RadioGroup",dojo.widget.HtmlWidget,function(){this.selectedItem=null;this.items=[];this.selected=[];this.groupCssClass="radioGroup";this.selectedCssClass="selected";this.itemContentCssClass="itemContent";},{isContainer:false,templatePath: null,templateCssPath: null,postCreate:function(){this._parseStructure();dojo.html.addClass(this.domNode, this.groupCssClass);this._setupChildren();dojo.event.browser.addListener(this.domNode, "onclick", dojo.lang.hitch(this, "onSelect"));if (this.selectedItem){this._selectItem(this.selectedItem);}},_parseStructure: function() {if(this.domNode.tagName.toLowerCase() != "ul"
 && this.domNode.tagName.toLowerCase() != "ol") {dojo.raise("RadioGroup: Expected ul or ol content.");return;}
-this.items=[];var nl=this.domNode.getElementsByTagName("li");for (var i=0; i<nl.length; i++){if(nl[i].parentNode==this.domNode){this.items.push(nl[i]);}}},add:function( node){if(node.parentNode!=this.domNode){this.domNode.appendChild(node);}
+this.items=[];var nl=this.domNode.getElementsByTagName("li");for (var i=0; i<nl.length; i++){if(nl[i].parentNode==this.domNode){this.items.push(nl[i]);}}
+},add:function( node){if(node.parentNode!=this.domNode){this.domNode.appendChild(node);}
 this.items.push(node);this._setup(node);},remove:function( node){var idx=-1;for(var i=0; i<this.items.length; i++){if(this.items[i]==node){idx=i;break;}}
 if(idx<0) {return;}
 this.items.splice(idx,1);node.parentNode.removeChild(node);},clear:function(){for(var i=0; i<this.items.length; i++){this.domNode.removeChild(this.items[i]);}
@@ -10,5 +11,7 @@
 this.selectedItem=null;},_setup:function(node){var span = document.createElement("span");dojo.html.disableSelection(span);dojo.html.addClass(span, this.itemContentCssClass);dojo.dom.moveChildren(node, span);node.appendChild(span);if (this.selected.length > 0) {var uid = dojo.html.getAttribute(node, "id");if (uid && uid == this.selected){this.selectedItem = node;}}
 dojo.event.browser.addListener(node, "onclick", dojo.lang.hitch(this, "onItemSelect"));if (dojo.html.hasAttribute(node, "onitemselect")) {var tn = dojo.lang.nameAnonFunc(new Function(dojo.html.getAttribute(node, "onitemselect")),this);dojo.event.browser.addListener(node, "onclick", dojo.lang.hitch(this, tn));}},_setupChildren:function(){for (var i=0; i<this.items.length; i++){this._setup(this.items[i]);}},_selectItem:function(node, event, nofire){if(this.selectedItem){dojo.html.removeClass(this.selectedItem, this.selectedCssClass);}
 this.selectedItem = node;dojo.html.addClass(this.selectedItem, this.selectedCssClass);if (!dj_undef("currentTarget", event)){return;}
-if(!nofire){if(dojo.render.html.ie){this.selectedItem.fireEvent("onclick");}else{var e = document.createEvent("MouseEvents");e.initEvent("click", true, false);this.selectedItem.dispatchEvent(e);}}},getValue:function() {return this.selectedItem;},onSelect:function(e) {},onItemSelect:function(e) {if (!dj_undef("currentTarget", e)){this._selectItem(e.currentTarget, e);}}}
+if(!nofire){if(dojo.render.html.ie){this.selectedItem.fireEvent("onclick");}else{var e = document.createEvent("MouseEvents");e.initEvent("click", true, false);this.selectedItem.dispatchEvent(e);}}
+},getValue:function() {return this.selectedItem;},onSelect:function(e) {},onItemSelect:function(e) {if (!dj_undef("currentTarget", e)){this._selectItem(e.currentTarget, e);}}
+}
 );

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js Thu Dec 14 07:45:13 2006
@@ -1,8 +1,11 @@
 
-dojo.provide("dojo.widget.Repeater");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.string");dojo.require("dojo.event.*");dojo.require("dojo.experimental");dojo.experimental("dojo.widget.Repeater");dojo.widget.defineWidget("dojo.widget.Repeater", dojo.widget.HtmlWidget,{name: "",rowTemplate: "",myObject: null,pattern: "",useDnd: false,isContainer: true,initialize: function(args,frag) {var node = this.getFragNodeRef(frag);node.removeAttribute("dojotype");this.setRow(dojo.string.trim(node.innerHTML), {});node.innerHTML="";frag=null;},postCreate: function(args,frag){if (this.useDnd) {dojo.require("dojo.dnd.*");var dnd = new dojo.dnd.HtmlDropTarget(this.domNode, [this.widgetId]);}},_reIndexRows: function() {for(var i=0,len=this.domNode.childNodes.length; i<len;i++) {var elems = ["INPUT", "SELECT", "TEXTAREA"];for (var k=0; k < elems.length; k++) {var list = this.domNode.childNodes[i].getElementsByTagName(elems[k]);for (var j=0,len2=list.length; j<len2; j++) {var name 
 = list[j].name;var index=dojo.string.escape("regexp", this.pattern);index = index.replace(/(%\\\{index\\\})/g,"%{index}");var nameRegexp = dojo.string.substituteParams(index, {"index": "[0-9]*"});var newName= dojo.string.substituteParams(this.pattern, {"index": "" + i});var re=new RegExp(nameRegexp,"g");list[j].name = name.replace(re,newName);}}}},onDeleteRow: function(e) {var index=dojo.string.escape("regexp", this.pattern);index = index.replace(/%\\\{index\\\}/g,"\%{index}");var nameRegexp = dojo.string.substituteParams(index, {"index": "([0-9]*)"});var re=new RegExp(nameRegexp,"g");this.deleteRow(re.exec(e.target.name)[1]);},hasRows: function() {if (this.domNode.childNodes.length > 0) {return true;}
+dojo.provide("dojo.widget.Repeater");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.string");dojo.require("dojo.event.*");dojo.require("dojo.experimental");dojo.experimental("dojo.widget.Repeater");dojo.widget.defineWidget("dojo.widget.Repeater", dojo.widget.HtmlWidget,{name: "",rowTemplate: "",myObject: null,pattern: "",useDnd: false,isContainer: true,initialize: function(args,frag) {var node = this.getFragNodeRef(frag);node.removeAttribute("dojotype");this.setRow(dojo.string.trim(node.innerHTML), {});node.innerHTML="";frag=null;},postCreate: function(args,frag){if (this.useDnd) {dojo.require("dojo.dnd.*");var dnd = new dojo.dnd.HtmlDropTarget(this.domNode, [this.widgetId]);}},_reIndexRows: function() {for(var i=0,len=this.domNode.childNodes.length; i<len;i++) {var elems = ["INPUT", "SELECT", "TEXTAREA"];for (var k=0; k < elems.length; k++) {var list = this.domNode.childNodes[i].getElementsByTagName(elems[k]);for (var j=0,len2=list.length; j<len2; j++) {var name 
 = list[j].name;var index=dojo.string.escape("regexp", this.pattern);index = index.replace(/(%\\\{index\\\})/g,"%{index}");var nameRegexp = dojo.string.substituteParams(index, {"index": "[0-9]*"});var newName= dojo.string.substituteParams(this.pattern, {"index": "" + i});var re=new RegExp(nameRegexp,"g");list[j].name = name.replace(re,newName);}}
+}},onDeleteRow: function(e) {var index=dojo.string.escape("regexp", this.pattern);index = index.replace(/%\\\{index\\\}/g,"\%{index}");var nameRegexp = dojo.string.substituteParams(index, {"index": "([0-9]*)"});var re=new RegExp(nameRegexp,"g");this.deleteRow(re.exec(e.target.name)[1]);},hasRows: function() {if (this.domNode.childNodes.length > 0) {return true;}
 return false;},getRowCount: function() {return this.domNode.childNodes.length;},deleteRow: function(idx) {this.domNode.removeChild(this.domNode.childNodes[idx]);this._reIndexRows();},_changeRowPosition: function(e) {if (e.dragStatus == "dropFailure") {this.domNode.removeChild(e["dragSource"].domNode);} else if (e.dragStatus == "dropSuccess") {}
 this._reIndexRows();},setRow: function(template, myObject) {template= template.replace(/\%\{(index)\}/g, "0");this.rowTemplate=template;this.myObject = myObject;},getRow: function() {return this.rowTemplate;},_initRow: function(node) {if (typeof(node) == "number") {node=this.domNode.childNodes[node];}
-var elems = ["INPUT", "SELECT", "IMG"];for (var k=0; k < elems.length; k++) {var list = node.getElementsByTagName(elems[k]);for(var i=0, len=list.length; i<len; i++) {var child = list[i];if(child.nodeType != 1) {continue};if (child.getAttribute("rowFunction") != null) {if(typeof(this.myObject[child.getAttribute("rowFunction")]) == "undefined") {dojo.debug("Function " + child.getAttribute("rowFunction") + " not found");} else {this.myObject[child.getAttribute("rowFunction")](child);}} else if (child.getAttribute("rowAction") != null) {if(child.getAttribute("rowAction") == "delete") {child.name=dojo.string.substituteParams(this.pattern, {"index": "" + (this.getRowCount() - 1)});dojo.event.connect(child, "onclick", this, "onDeleteRow");}}}}},onAddRow: function(e) {},addRow: function(doInit) {if (typeof(doInit) == "undefined") {doInit=true;}
+var elems = ["INPUT", "SELECT", "IMG"];for (var k=0; k < elems.length; k++) {var list = node.getElementsByTagName(elems[k]);for(var i=0, len=list.length; i<len; i++) {var child = list[i];if(child.nodeType != 1) {continue};if (child.getAttribute("rowFunction") != null) {if(typeof(this.myObject[child.getAttribute("rowFunction")]) == "undefined") {dojo.debug("Function " + child.getAttribute("rowFunction") + " not found");} else {this.myObject[child.getAttribute("rowFunction")](child);}} else if (child.getAttribute("rowAction") != null) {if(child.getAttribute("rowAction") == "delete") {child.name=dojo.string.substituteParams(this.pattern, {"index": "" + (this.getRowCount() - 1)});dojo.event.connect(child, "onclick", this, "onDeleteRow");}}
+}}
+},onAddRow: function(e) {},addRow: function(doInit) {if (typeof(doInit) == "undefined") {doInit=true;}
 var node = document.createElement('span');node.innerHTML=this.getRow();if (node.childNodes.length == 1) {node=node.childNodes[0];}
 this.domNode.appendChild(node);var parser = new dojo.xml.Parse();var frag = parser.parseElement(node, null, true);dojo.widget.getParser().createSubComponents(frag, this);this._reIndexRows();if (doInit) {this._initRow(node);}
 if (this.useDnd) {node=new dojo.dnd.HtmlDragSource(node, this.widgetId);dojo.event.connect(node, "onDragEnd", this, "_changeRowPosition");}

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js Thu Dec 14 07:45:13 2006
@@ -1,14 +1,17 @@
 
 dojo.provide("dojo.widget.ResizableTextarea");dojo.require("dojo.widget.*");dojo.require("dojo.widget.LayoutContainer");dojo.require("dojo.widget.ResizeHandle");dojo.require("dojo.i18n.common");dojo.requireLocalization("dojo.widget", "ResizableTextarea", null, "ROOT");dojo.widget.defineWidget(
 "dojo.widget.ResizableTextarea",dojo.widget.HtmlWidget,{templatePath: dojo.uri.dojoUri("src/widget/templates/ResizableTextarea.html"),templateCssPath: dojo.uri.dojoUri("src/widget/templates/ResizableTextarea.css"),postMixInProperties: function(){dojo.widget.HtmlWidget.superclass.postMixInProperties.apply(this, arguments);this.messages = dojo.i18n.getLocalization("dojo.widget", "ResizableTextarea", this.lang);},fillInTemplate: function(args, frag){this.textAreaNode = this.getFragNodeRef(frag).cloneNode(true);dojo.body().appendChild(this.domNode);this.rootLayout = dojo.widget.createWidget(
-"LayoutContainer",{minHeight: 50,minWidth: 100},this.rootLayoutNode
+"LayoutContainer",{minHeight: 50,minWidth: 100
+},this.rootLayoutNode
 );this.textAreaContainer = dojo.widget.createWidget(
 "LayoutContainer",{ layoutAlign: "client" },this.textAreaContainerNode
 );this.rootLayout.addChild(this.textAreaContainer);this.textAreaContainer.domNode.appendChild(this.textAreaNode);with(this.textAreaNode.style){width="100%";height="100%";}
 this.statusBar = dojo.widget.createWidget(
-"LayoutContainer",{layoutAlign: "bottom",minHeight: 28},this.statusBarContainerNode
+"LayoutContainer",{layoutAlign: "bottom",minHeight: 28
+},this.statusBarContainerNode
 );this.rootLayout.addChild(this.statusBar);this.statusLabel = dojo.widget.createWidget(
-"LayoutContainer",{layoutAlign: "client",minWidth: 50},this.statusLabelNode
+"LayoutContainer",{layoutAlign: "client",minWidth: 50
+},this.statusLabelNode
 );this.statusBar.addChild(this.statusLabel);this.resizeHandle = dojo.widget.createWidget(
 "ResizeHandle",{ targetElmId: this.rootLayout.widgetId },this.resizeHandleNode
 );this.statusBar.addChild(this.resizeHandle);}});

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js Thu Dec 14 07:45:13 2006
@@ -2,7 +2,8 @@
 dojo.provide("dojo.widget.ResizeHandle");dojo.require("dojo.widget.*");dojo.require("dojo.html.layout");dojo.require("dojo.event.*");dojo.widget.defineWidget(
 "dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId: '',templateCssPath: dojo.uri.dojoUri("src/widget/templates/ResizeHandle.css"),templateString: '<div class="dojoHtmlResizeHandle"><div></div></div>',postCreate: function(){dojo.event.connect(this.domNode, "onmousedown", this, "_beginSizing");},_beginSizing: function( e){if (this._isSizing){ return false; }
 this.targetWidget = dojo.widget.byId(this.targetElmId);this.targetDomNode = this.targetWidget ? this.targetWidget.domNode : dojo.byId(this.targetElmId);if (!this.targetDomNode){ return; }
-this._isSizing = true;this.startPoint  = {'x':e.clientX, 'y':e.clientY};var mb = dojo.html.getMarginBox(this.targetDomNode);this.startSize  = {'w':mb.width, 'h':mb.height};dojo.event.kwConnect({srcObj: dojo.body(),srcFunc: "onmousemove",targetObj: this,targetFunc: "_changeSizing",rate: 25});dojo.event.connect(dojo.body(), "onmouseup", this, "_endSizing");e.preventDefault();},_changeSizing: function( e){try{if(!e.clientX  || !e.clientY){ return; }}catch(e){return;}
+this._isSizing = true;this.startPoint  = {'x':e.clientX, 'y':e.clientY};var mb = dojo.html.getMarginBox(this.targetDomNode);this.startSize  = {'w':mb.width, 'h':mb.height};dojo.event.kwConnect({srcObj: dojo.body(),srcFunc: "onmousemove",targetObj: this,targetFunc: "_changeSizing",rate: 25
+});dojo.event.connect(dojo.body(), "onmouseup", this, "_endSizing");e.preventDefault();},_changeSizing: function( e){try{if(!e.clientX  || !e.clientY){ return; }}catch(e){return;}
 var dx = this.startPoint.x - e.clientX;var dy = this.startPoint.y - e.clientY;var newW = this.startSize.w - dx;var newH = this.startSize.h - dy;if (this.minSize) {var mb = dojo.html.getMarginBox(this.targetDomNode);if (newW < this.minSize.w) {newW = mb.width;}
 if (newH < this.minSize.h) {newH = mb.height;}}
 if(this.targetWidget){this.targetWidget.resizeTo(newW, newH);}else{dojo.html.setMarginBox(this.targetDomNode, { width: newW, height: newH});}

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js Thu Dec 14 07:45:13 2006
@@ -8,16 +8,18 @@
 this.addKeyHandler("b", ctrl, exec("bold"));this.addKeyHandler("i", ctrl, exec("italic"));this.addKeyHandler("u", ctrl, exec("underline"));this.addKeyHandler("a", ctrl, exec("selectall"));this.addKeyHandler("s", ctrl, function () { this.save(true); });this.addKeyHandler("1", ctrl, exec("formatblock", "h1"));this.addKeyHandler("2", ctrl, exec("formatblock", "h2"));this.addKeyHandler("3", ctrl, exec("formatblock", "h3"));this.addKeyHandler("4", ctrl, exec("formatblock", "h4"));this.addKeyHandler("\\", ctrl, exec("insertunorderedlist"));if(!dojo.render.html.ie){this.addKeyHandler("Z", ctrl, exec("redo"));}},events: ["onBlur", "onFocus", "onKeyPress", "onKeyDown", "onKeyUp", "onClick"],open: function (element) {if(this.onLoadDeferred.fired >= 0){this.onLoadDeferred = new dojo.Deferred();}
 var h = dojo.render.html;if (!this.isClosed) { this.close(); }
 dojo.event.topic.publish("dojo.widget.RichText::open", this);this._content = "";if((arguments.length == 1)&&(element["nodeName"])){ this.domNode = element; }
-if(	(this.domNode["nodeName"])&&
-(this.domNode.nodeName.toLowerCase() == "textarea")){this.textarea = this.domNode;var html = dojo.string.trim(this.textarea.value);this.domNode = dojo.doc().createElement("div");dojo.html.copyStyle(this.domNode, this.textarea);var tmpFunc = dojo.lang.hitch(this, function(){with(this.textarea.style){display = "block";position = "absolute";left = top = "-1000px";if(h.ie){this.__overflow = overflow;overflow = "hidden";}}});if(h.ie){setTimeout(tmpFunc, 10);}else{tmpFunc();}
+if((this.domNode["nodeName"])&&
+(this.domNode.nodeName.toLowerCase() == "textarea")){this.textarea = this.domNode;var html = dojo.string.trim(this.textarea.value);this.domNode = dojo.doc().createElement("div");dojo.html.copyStyle(this.domNode, this.textarea);var tmpFunc = dojo.lang.hitch(this, function(){with(this.textarea.style){display = "block";position = "absolute";left = top = "-1000px";if(h.ie){this.__overflow = overflow;overflow = "hidden";}}
+});if(h.ie){setTimeout(tmpFunc, 10);}else{tmpFunc();}
 if(!h.safari){dojo.html.insertBefore(this.domNode, this.textarea);}
 if(this.textarea.form){dojo.event.connect('before', this.textarea.form, "onsubmit",dojo.lang.hitch(this, function(){this.textarea.value = this.getEditorContent();})
 );}
 var editor = this;dojo.event.connect(this, "postCreate", function (){dojo.html.insertAfter(editor.textarea, editor.domNode);});}else{var html = this._preFilterContent(dojo.string.trim(this.domNode.innerHTML));}
 if(html == ""){ html = "&nbsp;"; }
-var content = dojo.html.getContentBox(this.domNode);this._oldHeight = content.height;this._oldWidth = content.width;this._firstChildContributingMargin = this._getContributingMargin(this.domNode, "top");this._lastChildContributingMargin = this._getContributingMargin(this.domNode, "bottom");this.savedContent = this.domNode.innerHTML;this.domNode.innerHTML = '';if(	(this.domNode["nodeName"])&&
+var content = dojo.html.getContentBox(this.domNode);this._oldHeight = content.height;this._oldWidth = content.width;this._firstChildContributingMargin = this._getContributingMargin(this.domNode, "top");this._lastChildContributingMargin = this._getContributingMargin(this.domNode, "bottom");this.savedContent = this.domNode.innerHTML;this.domNode.innerHTML = '';if((this.domNode["nodeName"])&&
 (this.domNode.nodeName == "LI")){this.domNode.innerHTML = " <br>";}
-this.editingArea = dojo.doc().createElement("div");this.domNode.appendChild(this.editingArea);if(this.saveName != ""){var saveTextarea = dojo.doc().getElementById("dojo.widget.RichText.savedContent");if (saveTextarea.value != "") {var datas = saveTextarea.value.split(this._SEPARATOR);for (var i = 0; i < datas.length; i++) {var data = datas[i].split(":");if (data[0] == this.saveName) {html = data[1];datas.splice(i, 1);break;}}}
+this.editingArea = dojo.doc().createElement("div");this.domNode.appendChild(this.editingArea);if(this.saveName != ""){var saveTextarea = dojo.doc().getElementById("dojo.widget.RichText.savedContent");if (saveTextarea.value != "") {var datas = saveTextarea.value.split(this._SEPARATOR);for (var i = 0; i < datas.length; i++) {var data = datas[i].split(":");if (data[0] == this.saveName) {html = data[1];datas.splice(i, 1);break;}}
+}
 dojo.event.connect("before", window, "onunload", this, "_saveContent");}
 if(h.ie70 && this.useActiveX){dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now.");this.useActiveX = false;}
 if(this.useActiveX && h.ie){var self = this;setTimeout(function(){self._drawObject(html);}, 0);}else if(h.ie || this._safariIsLeopard() || h.opera){this.iframe = dojo.doc().createElement( 'iframe' ) ;this.iframe.src = 'javascript:void(0)';this.editorObject = this.iframe;with(this.iframe.style){border = '0';width = "100%";}
@@ -31,7 +33,7 @@
 this.editNode.innerHTML = html;if(this.height){ this.document.body.style.overflowY="scroll"; }
 dojo.lang.forEach(this.events, function(e){dojo.event.connect(this.editNode, e.toLowerCase(), this, e);}, this);this.onLoad();} else {this._drawIframe(html);this.editorObject = this.iframe;}
 if (this.domNode.nodeName == "LI") { this.domNode.lastChild.style.marginTop = "-1.2em"; }
-dojo.html.addClass(this.domNode, "RichTextEditable");this.isClosed = false;},_hasCollapseableMargin: function(element, side) {if (dojo.html.getPixelValue(element,'border-'+side+'-width',false)) {return false;} else if (dojo.html.getPixelValue(element,'padding-'+side,false)) {return false;} else {return true;}},_getContributingMargin:	function(element, topOrBottom) {if (topOrBottom == "top") {var siblingAttr = "previousSibling";var childSiblingAttr = "nextSibling";var childAttr = "firstChild";var marginProp = "margin-top";var siblingMarginProp = "margin-bottom";} else {var siblingAttr = "nextSibling";var childSiblingAttr = "previousSibling";var childAttr = "lastChild";var marginProp = "margin-bottom";var siblingMarginProp = "margin-top";}
+dojo.html.addClass(this.domNode, "RichTextEditable");this.isClosed = false;},_hasCollapseableMargin: function(element, side) {if (dojo.html.getPixelValue(element,'border-'+side+'-width',false)) {return false;} else if (dojo.html.getPixelValue(element,'padding-'+side,false)) {return false;} else {return true;}},_getContributingMargin:function(element, topOrBottom) {if (topOrBottom == "top") {var siblingAttr = "previousSibling";var childSiblingAttr = "nextSibling";var childAttr = "firstChild";var marginProp = "margin-top";var siblingMarginProp = "margin-bottom";} else {var siblingAttr = "nextSibling";var childSiblingAttr = "previousSibling";var childAttr = "lastChild";var marginProp = "margin-bottom";var siblingMarginProp = "margin-top";}
 var elementMargin = dojo.html.getPixelValue(element, marginProp, false);function isSignificantNode(element) {return !(element.nodeType==3 && dojo.string.isBlank(element.data))
 && dojo.html.getStyle(element, "display") != "none"
 && !dojo.html.isPositionAbsolute(element);}
@@ -53,7 +55,8 @@
 if(lastChild){lastChild.style.marginBottom = this._lastChildContributingMargin+"px";}
 this.editingArea.appendChild(this.iframe);if(dojo.render.html.safari){this.iframe.src = this.iframe.src;}
 var _iframeInitialized = false;var ifrFunc = dojo.lang.hitch(this, function(){if(!_iframeInitialized){_iframeInitialized = true;}else{ return; }
-if(!this.editNode){if(this.iframe.contentWindow){this.window = this.iframe.contentWindow;this.document = this.iframe.contentWindow.document}else if(this.iframe.contentDocument){this.window = this.iframe.contentDocument.window;this.document = this.iframe.contentDocument;}
+if(!this.editNode){if(this.iframe.contentWindow){this.window = this.iframe.contentWindow;this.document = this.iframe.contentWindow.document
+}else if(this.iframe.contentDocument){this.window = this.iframe.contentDocument.window;this.document = this.iframe.contentDocument;}
 var getStyle = (function (domNode) { return function (style) {return dojo.html.getStyle(domNode, style);}; })(this.domNode);var font =
 getStyle('font-weight') + " " +
 getStyle('font-size') + " " +
@@ -72,21 +75,24 @@
 'li{min-height:1.2em;}' +
 '', this.document);dojo.html.removeNode(tmpContent);this.document.body.innerHTML = html;if(oldMoz||dojo.render.html.safari){this.document.designMode = "on";}
 this.onLoad();}else{dojo.html.removeNode(tmpContent);this.editNode.innerHTML = html;this.onDisplayChanged();}});if(this.editNode){ifrFunc();}else if(dojo.render.html.moz){this.iframe.onload = function(){setTimeout(ifrFunc, 250);}}else{this.iframe.onload = ifrFunc;}},_applyEditingAreaStyleSheets: function(){var files = [];if(this.styleSheets){files = this.styleSheets.split(';');this.styleSheets = '';}
-files = files.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets = [];if(files.length>0){for(var i=0;i<files.length;i++){var url = files[i];if(url){this.addStyleSheet(dojo.uri.dojoUri(url));}}}},addStyleSheet: function(uri) {var url=uri.toString();if(dojo.lang.find(this.editingAreaStyleSheets, url) > -1){dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");return;}
+files = files.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets = [];if(files.length>0){for(var i=0;i<files.length;i++){var url = files[i];if(url){this.addStyleSheet(dojo.uri.dojoUri(url));}}
+}},addStyleSheet: function(uri) {var url=uri.toString();if(dojo.lang.find(this.editingAreaStyleSheets, url) > -1){dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");return;}
 if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){url = (new dojo.uri.Uri(dojo.global().location, url)).toString();}
 this.editingAreaStyleSheets.push(url);if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head = this.document.getElementsByTagName("head")[0];var stylesheet = this.document.createElement("link");with(stylesheet){rel="stylesheet";type="text/css";href=url;}
 head.appendChild(stylesheet);}},removeStyleSheet: function (uri) {var url=uri.toString();if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){url = (new dojo.uri.Uri(dojo.global().location, url)).toString();}
 var index = dojo.lang.find(this.editingAreaStyleSheets, url);if(index == -1){dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!");return;}
 delete this.editingAreaStyleSheets[index];var links = this.document.getElementsByTagName("link");for(var i=0;i<links.length;i++){if(links[i].href == url){if(dojo.render.html.ie){links[i].href="";}
-dojo.html.removeNode(links[i]);break;}}},_drawObject: function (html) {this.object = dojo.html.createExternalElement(dojo.doc(), "object");with (this.object) {classid = "clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";width = this.inheritWidth ? this._oldWidth : "100%";style.height = this.height ? this.height : (this._oldHeight+"px");Scrollbars = this.height ? true : false;Appearance = this._activeX.appearance.flat;}
-this.editorObject = this.object;this.editingArea.appendChild(this.object);this.object.attachEvent("DocumentComplete", dojo.lang.hitch(this, "onLoad"));dojo.lang.forEach(this.events, function(e){this.object.attachEvent(e.toLowerCase(), dojo.lang.hitch(this, e));}, this);this.object.DocumentHTML = '<!doctype HTML PUBLIC "-
+dojo.html.removeNode(links[i]);break;}}
+},_drawObject: function (html) {this.object = dojo.html.createExternalElement(dojo.doc(), "object");with (this.object) {classid = "clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";width = this.inheritWidth ? this._oldWidth : "100%";style.height = this.height ? this.height : (this._oldHeight+"px");Scrollbars = this.height ? true : false;Appearance = this._activeX.appearance.flat;}
+this.editorObject = this.object;this.editingArea.appendChild(this.object);this.object.attachEvent("DocumentComplete", dojo.lang.hitch(this, "onLoad"));dojo.lang.forEach(this.events, function(e){this.object.attachEvent(e.toLowerCase(), dojo.lang.hitch(this, e));}, this);this.object.DocumentHTML = '<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' +
 '<html><title></title>' +
 '<style type="text/css">' +
 '    body,html { padding: 0; margin: 0; }' +
 (this.height ? '' : '    body,  { overflow: hidden; }') +
 '</style>' +
 '<body><div>' + html + '<div></body></html>';this._cacheLocalBlockFormatNames();},_local2NativeFormatNames: {},_native2LocalFormatNames: {},_cacheLocalBlockFormatNames: function(){if(!this._native2LocalFormatNames['p']){var obj = this.object;var error = false;if(!obj){try{obj = dojo.html.createExternalElement(dojo.doc(), "object");obj.classid = "clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";dojo.body().appendChild(obj);obj.DocumentHTML = "<html><head></head><body></body></html>";}catch(e){ error = true; }}
-try{var oNamesParm = new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");obj.ExecCommand(this._activeX.command['getblockformatnames'], 0, oNamesParm);var vbNamesArray = new VBArray(oNamesParm.Names);var localFormats = vbNamesArray.toArray();var nativeFormats = ['p', 'pre', 'address', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', '', '', '','','div'];for(var i=0;i<nativeFormats.length;++i){if(nativeFormats[i].length>0){this._local2NativeFormatNames[localFormats[i]] = nativeFormats[i];this._native2LocalFormatNames[nativeFormats[i]] = localFormats[i];}}}catch(e){ error = true; }
+try{var oNamesParm = new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");obj.ExecCommand(this._activeX.command['getblockformatnames'], 0, oNamesParm);var vbNamesArray = new VBArray(oNamesParm.Names);var localFormats = vbNamesArray.toArray();var nativeFormats = ['p', 'pre', 'address', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', '', '', '','','div'];for(var i=0;i<nativeFormats.length;++i){if(nativeFormats[i].length>0){this._local2NativeFormatNames[localFormats[i]] = nativeFormats[i];this._native2LocalFormatNames[nativeFormats[i]] = localFormats[i];}}
+}catch(e){ error = true; }
 if(obj && !this.object){dojo.body().removeChild(obj);}}
 return !error;},_isResized: function(){ return false; },onLoad: function(e){this.isLoaded = true;if (this.object){this.document = this.object.DOM;this.window = this.document.parentWindow;this.editNode = this.document.body.firstChild;this.editingArea.style.height = this.height ? this.height : this.minHeight;if(!this.height){this.connect(this, "onDisplayChanged", "_updateHeight");}
 this.window._frameElement = this.object;}else if (this.iframe && !dojo.render.html.ie){this.editNode = this.document.body;if(!this.height){this.connect(this, "onDisplayChanged", "_updateHeight");}
@@ -95,19 +101,29 @@
 this.editNode.style.zoom = 1.0;}
 this._applyEditingAreaStyleSheets();if(this.focusOnLoad){this.focus();}
 this.onDisplayChanged(e);if(this.onLoadDeferred){this.onLoadDeferred.callback(true);}},onKeyDown: function(e){if((!e)&&(this.object)){e = dojo.event.browser.fixEvent(this.window.event);}
-if((dojo.render.html.ie)&&(e.keyCode == e.KEY_TAB)){e.preventDefault();e.stopPropagation();this.execCommand((e.shiftKey ? "outdent" : "indent"));}else if(dojo.render.html.ie){if((65 <= e.keyCode)&&(e.keyCode <= 90)){e.charCode = e.keyCode;this.onKeyPress(e);}}},onKeyUp: function(e){return;},KEY_CTRL: 1,onKeyPress: function(e){if((!e)&&(this.object)){e = dojo.event.browser.fixEvent(this.window.event);}
-var modifiers = e.ctrlKey ? this.KEY_CTRL : 0;if (this._keyHandlers[e.key]) {var handlers = this._keyHandlers[e.key], i = 0, handler;while (handler = handlers[i++]) {if (modifiers == handler.modifiers) {e.preventDefault();handler.handler.call(this);break;}}}
+if((dojo.render.html.ie)&&(e.keyCode == e.KEY_TAB)){e.preventDefault();e.stopPropagation();this.execCommand((e.shiftKey ? "outdent" : "indent"));}else if(dojo.render.html.ie){if((65 <= e.keyCode)&&(e.keyCode <= 90)){e.charCode = e.keyCode;this.onKeyPress(e);}}
+},onKeyUp: function(e){return;},KEY_CTRL: 1,onKeyPress: function(e){if((!e)&&(this.object)){e = dojo.event.browser.fixEvent(this.window.event);}
+var modifiers = e.ctrlKey ? this.KEY_CTRL : 0;if (this._keyHandlers[e.key]) {var handlers = this._keyHandlers[e.key], i = 0, handler;while (handler = handlers[i++]) {if (modifiers == handler.modifiers) {e.preventDefault();handler.handler.call(this);break;}}
+}
 dojo.lang.setTimeout(this, this.onKeyPressed, 1, e);},addKeyHandler: function (key, modifiers, handler) {if (!(this._keyHandlers[key] instanceof Array)) { this._keyHandlers[key] = []; }
-this._keyHandlers[key].push({modifiers: modifiers || 0,handler: handler});},onKeyPressed: function (e) {this.onDisplayChanged();},onClick: function(e){ this.onDisplayChanged(e); },onBlur: function(e){ },_initialFocus: true,onFocus: function(e){if( (dojo.render.html.mozilla)&&(this._initialFocus) ){this._initialFocus = false;if(dojo.string.trim(this.editNode.innerHTML) == "&nbsp;"){this.placeCursorAtStart();}}},blur: function () {if(this.iframe) { this.window.blur(); }
+this._keyHandlers[key].push({modifiers: modifiers || 0,handler: handler
+});},onKeyPressed: function (e) {this.onDisplayChanged();},onClick: function(e){ this.onDisplayChanged(e); },onBlur: function(e){ },_initialFocus: true,onFocus: function(e){if( (dojo.render.html.mozilla)&&(this._initialFocus) ){this._initialFocus = false;if(dojo.string.trim(this.editNode.innerHTML) == "&nbsp;"){this.placeCursorAtStart();}}
+},blur: function () {if(this.iframe) { this.window.blur(); }
 else if(this.object) { this.document.body.blur(); }
 else if(this.editNode) { this.editNode.blur(); }},focus: function () {if(this.iframe && !dojo.render.html.ie) { this.window.focus(); }
 else if(this.object) { this.document.focus(); }
 else if(this.editNode && this.editNode.focus) { this.editNode.focus(); }
-else{dojo.debug("Have no idea how to focus into the editor!");}},onDisplayChanged: function (e){ },_activeX: {command: {bold: 5000,italic: 5023,underline: 5048,justifycenter: 5024,justifyleft: 5025,justifyright: 5026,cut: 5003,copy: 5002,paste: 5032,"delete": 5004,undo: 5049,redo: 5033,removeformat: 5034,selectall: 5035,unlink: 5050,indent: 5018,outdent: 5031,insertorderedlist: 5030,insertunorderedlist: 5051,inserttable: 5022,insertcell: 5019,insertcol: 5020,insertrow: 5021,deletecells: 5005,deletecols: 5006,deleterows: 5007,mergecells: 5029,splitcell: 5047,setblockformat: 5043,getblockformat: 5011,getblockformatnames: 5012,setfontname: 5044,getfontname: 5013,setfontsize: 5045,getfontsize: 5014,setbackcolor: 5042,getbackcolor: 5010,setforecolor: 5046,getforecolor: 5015,findtext: 5008,font: 5009,hyperlink: 5016,image: 5017,lockelement: 5027,makeabsolute: 5028,sendbackward: 5036,bringforward: 5037,sendbelowtext: 5038,bringabovetext: 5039,sendtoback: 5040,bringtofront: 5041,pro
 perties: 5052},ui: {"default": 0,prompt: 1,noprompt: 2},status: {notsupported: 0,disabled: 1,enabled: 3,latched: 7,ninched: 11},appearance: {flat: 0,inset: 1},state: {unchecked: 0,checked: 1,gray: 2}},_normalizeCommand: function (cmd){var drh = dojo.render.html;var command = cmd.toLowerCase();if(command == "formatblock"){if(drh.safari){ command = "heading"; }}else if(this.object){switch(command){case "createlink":
+else{dojo.debug("Have no idea how to focus into the editor!");}},onDisplayChanged: function (e){ },_activeX: {command: {bold: 5000,italic: 5023,underline: 5048,justifycenter: 5024,justifyleft: 5025,justifyright: 5026,cut: 5003,copy: 5002,paste: 5032,"delete": 5004,undo: 5049,redo: 5033,removeformat: 5034,selectall: 5035,unlink: 5050,indent: 5018,outdent: 5031,insertorderedlist: 5030,insertunorderedlist: 5051,inserttable: 5022,insertcell: 5019,insertcol: 5020,insertrow: 5021,deletecells: 5005,deletecols: 5006,deleterows: 5007,mergecells: 5029,splitcell: 5047,setblockformat: 5043,getblockformat: 5011,getblockformatnames: 5012,setfontname: 5044,getfontname: 5013,setfontsize: 5045,getfontsize: 5014,setbackcolor: 5042,getbackcolor: 5010,setforecolor: 5046,getforecolor: 5015,findtext: 5008,font: 5009,hyperlink: 5016,image: 5017,lockelement: 5027,makeabsolute: 5028,sendbackward: 5036,bringforward: 5037,sendbelowtext: 5038,bringabovetext: 5039,sendtoback: 5040,bringtofront: 5041,pro
 perties: 5052
+},ui: {"default": 0,prompt: 1,noprompt: 2
+},status: {notsupported: 0,disabled: 1,enabled: 3,latched: 7,ninched: 11
+},appearance: {flat: 0,inset: 1
+},state: {unchecked: 0,checked: 1,gray: 2
+}},_normalizeCommand: function (cmd){var drh = dojo.render.html;var command = cmd.toLowerCase();if(command == "formatblock"){if(drh.safari){ command = "heading"; }}else if(this.object){switch(command){case "createlink":
 command = "hyperlink";break;case "insertimage":
 command = "image";break;}}else if(command == "hilitecolor" && !drh.mozilla){command = "backcolor";}
 return command;},_safariIsLeopard: function(){var gt420 = false;if(dojo.render.html.safari){var tmp = dojo.render.html.UA.split("AppleWebKit/")[1];var ver = parseFloat(tmp.split(" ")[0]);if(ver >= 420){ gt420 = true; }}
-return gt420;},queryCommandAvailable: function (command) {var ie = 1;var mozilla = 1 << 1;var safari = 1 << 2;var opera = 1 << 3;var safari420 = 1 << 4;var gt420 = this._safariIsLeopard();function isSupportedBy (browsers) {return {ie: Boolean(browsers & ie),mozilla: Boolean(browsers & mozilla),safari: Boolean(browsers & safari),safari420: Boolean(browsers & safari420),opera: Boolean(browsers & opera)}}
+return gt420;},queryCommandAvailable: function (command) {var ie = 1;var mozilla = 1 << 1;var safari = 1 << 2;var opera = 1 << 3;var safari420 = 1 << 4;var gt420 = this._safariIsLeopard();function isSupportedBy (browsers) {return {ie: Boolean(browsers & ie),mozilla: Boolean(browsers & mozilla),safari: Boolean(browsers & safari),safari420: Boolean(browsers & safari420),opera: Boolean(browsers & opera)
+}}
 var supportedBy = null;switch (command.toLowerCase()) {case "bold": case "italic": case "underline":
 case "subscript": case "superscript":
 case "fontname": case "fontsize":
@@ -134,7 +150,8 @@
 (gt420 && supportedBy.safari420) ||
 (dojo.render.html.opera && supportedBy.opera);},execCommand: function (command, argument){var returnValue;this.focus();command = this._normalizeCommand(command);if (argument != undefined) {if(command == "heading") { throw new Error("unimplemented"); }
 else if(command == "formatblock"){if(this.object){argument = this._native2LocalFormatNames[argument];}
-else if(dojo.render.html.ie){ argument = '<'+argument+'>'; }}}
+else if(dojo.render.html.ie){ argument = '<'+argument+'>'; }}
+}
 if(this.object){switch (command) {case "hilitecolor":
 command = "setbackcolor";break;case "forecolor":
 case "backcolor":
@@ -170,7 +187,8 @@
 command = "get" + command;return this.object.execCommand(
 this._activeX.command[command],this._activeX.ui.noprompt);case "formatblock":
 var retvalue = this.object.execCommand(
-this._activeX.command["getblockformat"],this._activeX.ui.noprompt);if(retvalue){return this._local2NativeFormatNames[retvalue];}}} else {if(dojo.render.html.ie && command == "formatblock"){return this._local2NativeFormatNames[this.document.queryCommandValue(command)] || this.document.queryCommandValue(command);}
+this._activeX.command["getblockformat"],this._activeX.ui.noprompt);if(retvalue){return this._local2NativeFormatNames[retvalue];}}
+} else {if(dojo.render.html.ie && command == "formatblock"){return this._local2NativeFormatNames[this.document.queryCommandValue(command)] || this.document.queryCommandValue(command);}
 return this.document.queryCommandValue(command);}},placeCursorAtStart: function(){this.focus();if(dojo.render.html.moz && this.editNode.firstChild &&
 this.editNode.firstChild.nodeType != dojo.dom.TEXT_NODE){dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode.firstChild]);}else{dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode]);}
 dojo.withGlobal(this.window, "collapse", dojo.html.selection, [true]);},placeCursorAtEnd: function(){this.focus();if(dojo.render.html.moz && this.editNode.lastChild &&

Modified: 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=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js Thu Dec 14 07:45:13 2006
@@ -1,4 +1,5 @@
 
 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);}}
+"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);}}
 );

Modified: 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=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js Thu Dec 14 07:45:13 2006
@@ -4,16 +4,19 @@
 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);}}})
+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]){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;}
+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;}
@@ -28,15 +31,18 @@
 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";}});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();}}});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();}}
+});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,templatePath: dojo.uri.dojoUri("src/widget/templates/ShowSlide.html"),templateCssPath: dojo.uri.dojoUri("src/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("as");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"] && (
+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;}
+) ){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")||
@@ -51,8 +57,10 @@
 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(tmpAction == "color"){var from = n
 ew 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";}}}
+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
+var parent = node.parentNode;if((parent)&&(parent.tagName.toLowerCase() == "li")){parent.style.listStyleType = parent.oldType;}}
+});
\ No newline at end of file

Modified: 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=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js Thu Dec 14 07:45:13 2006
@@ -5,5 +5,7 @@
 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.0);this[this._background].src = this.imgUrlBase+this.imgUrls[this._urlsIdx++];if(this._urlsIdx>(this.imgUrls.length-1)){this._urlsIdx = 0;}}}
+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.0);this[this._background].src = this.imgUrlBase+this.imgUrls[this._urlsIdx++];if(this._urlsIdx>(this.imgUrls.length-1)){this._urlsIdx = 0;}}
+}
 );

Modified: 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=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js Thu Dec 14 07:45:13 2006
@@ -1,11 +1,15 @@
 
 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.0,_valueSizeY: 0.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,templateCssPath: dojo.uri.dojoUri ("src/widget/templates/Slider.css"),templatePath: dojo.uri.dojoUri ("src/widget/templates/Slider.html"),_isDragInProgress: false,bottomButtonSrc: dojo.uri.dojoUri("src/widget/templates/images/slider_down_arrow.png"),topButtonSrc: dojo.uri.dojoUri("src/widget/templates/images/slider_up_arrow.png"),leftButtonSrc: dojo.uri.dojoUri("src/widget/templates/images/slider_left_arrow.png"),rightButtonSrc: dojo.uri.dojoUri("src/widget/templates/images/slider_right_arrow.png"),backgroundSrc: dojo.uri.dojoUri("src/
 widget/templates/images/blank.gif"),progressBackgroundSrc: dojo.uri.dojoUri("src/widget/templates/images/blank.gif"),backgroundSize: "width:200px;height:200px;",backgroundStyle: "",buttonStyleX: "",buttonStyleY: "",handleStyle: "",handleSrc: dojo.uri.dojoUri("src/widget/templates/images/slider-button.png"),showButtons: true,_eventCount: 0,_typamaticTimer: null,_typamaticFunction: null,defaultTimeout: 500,timeoutChangeRate: 0.90,_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;}}
+if(!evt.ctrlKey && !evt.altKey){var isXOnly = this.isEnableX && !this.isEnableY;var isYOnly = this.isEnableY && !this.isEnableX;switch(evt.key){case evt.KEY_LEFT_ARROW:
+dojo.event.browser.stopEvent(evt);if (isYOnly){this._bottomButtonPressed(evt);}else{this._leftButtonPressed(evt);}
+return;case evt.KEY_RIGHT_ARROW:
+dojo.event.browser.stopEvent(evt);if (isYOnly){this._topButtonPressed(evt);}else{this._rightButtonPressed(evt);}
+return;case evt.KEY_DOWN_ARROW:
+dojo.event.browser.stopEvent(evt);if (isXOnly){this._leftButtonPressed(evt);}else{this._bottomButtonPressed(evt);}
+return;case evt.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(evt);if (isXOnly){this._rightButtonPressed(evt);}else{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;}
@@ -21,7 +25,8 @@
 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)
+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 =
@@ -96,4 +101,5 @@
 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
+if(this.slider.activeDrag){this.slider.notifyListeners();}}
+});
\ No newline at end of file