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/02/06 06:01:49 UTC

svn commit: r503984 [25/29] - in /tapestry/tapestry4/trunk: ./ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-framework/ tapestry-framework/src/java/org/apache/tapestry/asset/ tapestry-framework/src/java/org/apache/tapestry/dojo/ tapestry-...

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeSelectorV3.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeSelectorV3.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeSelectorV3.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeSelectorV3.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,25 @@
+
+dojo.provide("dojo.widget.TreeSelectorV3");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.widget.TreeCommon");dojo.widget.defineWidget(
+"dojo.widget.TreeSelectorV3",[dojo.widget.HtmlWidget, dojo.widget.TreeCommon],function() {this.eventNames = {};this.listenedTrees = {};this.selectedNodes = [];this.lastClicked = {}},{listenTreeEvents: ["afterTreeCreate","afterCollapse","afterChangeTree", "afterDetach", "beforeTreeDestroy", "afterNavigate"],listenNodeFilter: function(elem) { return elem instanceof dojo.widget.Widget},allowedMulti: true,dblselectTimeout: 300,eventNamesDefault: {select : "select",deselect : "deselect",dblselect: "dblselect"
+},onAfterTreeCreate: function(message) {var tree = message.source;dojo.event.browser.addListener(tree.domNode, "onclick", dojo.lang.hitch(this, this.onTreeClick));if (dojo.render.html.ie) {dojo.event.browser.addListener(tree.domNode, "ondblclick", dojo.lang.hitch(this, this.onTreeDblClick));}
+dojo.event.browser.addListener(tree.domNode, "onKey", dojo.lang.hitch(this, this.onKey));},onKey: function(e) {if (!e.key || e.altKey) { return; }
+if (e.key == ' ') {var node = this.domElement2TreeNode(e.target);if (node){this.processNode(node, e);}}
+},onAfterNavigate: function(message) {this.processNode(message.node, message.event);},onAfterChangeTree: function(message) {if (!message.oldTree && message.node.selected) {this.select(message.node);}
+if (!message.newTree || !this.listenedTrees[message.newTree.widgetId]) {if (this.selectedNode && message.node.children) {this.deselectIfAncestorMatch(message.node);}}
+},initialize: function(args) {for(name in this.eventNamesDefault) {if (dojo.lang.isUndefined(this.eventNames[name])) {this.eventNames[name] = this.widgetId+"/"+this.eventNamesDefault[name];}}
+},onBeforeTreeDestroy: function(message) {this.unlistenTree(message.source);},onAfterCollapse: function(message) {this.deselectIfAncestorMatch(message.source);},onTreeDblClick: function(event) {this.onTreeClick(event);},checkSpecialEvent: function(event) {return event.shiftKey || event.ctrlKey;},onTreeClick: function(event) {var node = this.domElement2TreeNode(event.target);if (!node) {return;}
+var checkLabelClick = function(domElement) {return domElement === node.labelNode;}
+if (this.checkPathCondition(event.target, checkLabelClick)) {this.processNode(node, event);}},processNode: function(node, event) {if (node.actionIsDisabled(node.actions.SELECT)) {return;}
+if (dojo.lang.inArray(this.selectedNodes, node)) {if(this.checkSpecialEvent(event)){this.deselect(node);return;}
+var _this = this;var i=0;var selectedNode;while(this.selectedNodes.length > i) {selectedNode = this.selectedNodes[i];if (selectedNode !== node) {this.deselect(selectedNode);continue;}
+i++;}
+var wasJustClicked = this.checkRecentClick(node)
+eventName = wasJustClicked ? this.eventNames.dblselect : this.eventNames.select;if (wasJustClicked) {eventName = this.eventNames.dblselect;this.forgetLastClicked();} else {eventName = this.eventNames.select;this.setLastClicked(node)
+}
+dojo.event.topic.publish(eventName, { node: node });return;}
+this.deselectIfNoMulti(event);this.setLastClicked(node);this.select(node);},forgetLastClicked: function() {this.lastClicked = {}},setLastClicked: function(node) {this.lastClicked.date = new Date();this.lastClicked.node = node;},checkRecentClick: function(node) {var diff = new Date() - this.lastClicked.date;if (this.lastClicked.node && diff < this.dblselectTimeout) {return true;} else {return false;}},deselectIfNoMulti: function(event) {if (!this.checkSpecialEvent(event) || !this.allowedMulti) {this.deselectAll();}},deselectIfAncestorMatch: function(ancestor) {var _this = this;dojo.lang.forEach(this.selectedNodes, function(node) {var selectedNode = node;node = node.parent
+while (node && node.isTreeNode) {if (node === ancestor) {_this.deselect(selectedNode);return;}
+node = node.parent;}});},onAfterDetach: function(message) {this.deselectIfAncestorMatch(message.child);},select: function(node) {var index = dojo.lang.find(this.selectedNodes, node, true);if (index >=0 ) {return;}
+this.selectedNodes.push(node);dojo.event.topic.publish(this.eventNames.select, {node: node} );},deselect: function(node){var index = dojo.lang.find(this.selectedNodes, node, true);if (index < 0) {return;}
+this.selectedNodes.splice(index, 1);dojo.event.topic.publish(this.eventNames.deselect, {node: node} );},deselectAll: function() {while (this.selectedNodes.length) {this.deselect(this.selectedNodes[0]);}}
+});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeTimeoutIterator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeTimeoutIterator.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeTimeoutIterator.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeTimeoutIterator.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,10 @@
+
+dojo.provide("dojo.widget.TreeTimeoutIterator");dojo.require("dojo.event.*");dojo.require("dojo.json")
+dojo.require("dojo.io.*");dojo.require("dojo.widget.TreeCommon");dojo.declare(
+"dojo.widget.TreeTimeoutIterator",null,function(elem, callFunc, callObj) {var _this = this;this.currentParent = elem;this.callFunc = callFunc;this.callObj = callObj ? callObj: this;this.stack = [];},{maxStackDepth: Number.POSITIVE_INFINITY,stack: null,currentParent: null,currentIndex: 0,filterFunc: function() { return true },finishFunc: function() { return true },setFilter: function(func, obj) {this.filterFunc = func;this.filterObj = obj;},setMaxLevel: function(level) {this.maxStackDepth = level-2;},forward: function(timeout) {var _this = this;if (this.timeout) {var tid = setTimeout(function() {_this.processNext(); clearTimeout(tid); }, _this.timeout);} else {return this.processNext();}},start: function(processFirst) {if (processFirst) {return this.callFunc.call(this.callObj, this.currentParent, this);}
+return this.processNext();},processNext: function() {var handler;var _this = this;var found;var next;if (this.maxStackDepth == -2) {return;}
+while (true) {var children = this.currentParent.children;if (children && children.length) {do {next = children[this.currentIndex];} while (this.currentIndex++ < children.length && !(found = this.filterFunc.call(this.filterObj,next)));if (found) {if (next.isFolder && this.stack.length <= this.maxStackDepth) {this.moveParent(next,0);}
+return this.callFunc.call(this.callObj, next, this);}}
+if (this.stack.length) {this.popParent();continue;}
+break;}
+return this.finishFunc.call(this.finishObj);},setFinish: function(func, obj) {this.finishFunc = func;this.finishObj = obj;},popParent: function() {var p = this.stack.pop();this.currentParent = p[0];this.currentIndex = p[1];},moveParent: function(nextParent, nextIndex) {this.stack.push([this.currentParent, this.currentIndex]);this.currentParent = nextParent;this.currentIndex = nextIndex;}});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeToggleOnSelect.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeToggleOnSelect.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeToggleOnSelect.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeToggleOnSelect.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.widget.TreeToggleOnSelect");dojo.require("dojo.widget.HtmlWidget");dojo.widget.defineWidget(
+"dojo.widget.TreeToggleOnSelect",dojo.widget.HtmlWidget,{selector: "",controller: "",selectEvent: "select",initialize: function() {this.selector = dojo.widget.byId(this.selector);this.controller = dojo.widget.byId(this.controller);dojo.event.topic.subscribe(this.selector.eventNames[this.selectEvent], this, "onSelectEvent");},onSelectEvent: function(message) {var node = message.node
+node.isExpanded ? this.controller.collapse(node) : this.controller.expand(node)
+}});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeV3.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeV3.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeV3.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeV3.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,19 @@
+
+dojo.provide("dojo.widget.TreeV3");dojo.require("dojo.widget.TreeWithNode");dojo.require("dojo.widget.*");dojo.require("dojo.event.*");dojo.require("dojo.io.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.widget.TreeNodeV3");dojo.widget.defineWidget(
+"dojo.widget.TreeV3",[dojo.widget.HtmlWidget, dojo.widget.TreeWithNode],function(){this.eventNames = {};this.DndAcceptTypes = [];this.actionsDisabled = [];this.listeners = [];this.tree = this;},{DndMode: "",defaultChildWidget: null,defaultChildTitle: "New Node",eagerWidgetInstantiation: false,eventNamesDefault:{afterTreeCreate: "afterTreeCreate",beforeTreeDestroy: "beforeTreeDestroy",beforeNodeDestroy: "beforeNodeDestroy",afterChangeTree: "afterChangeTree",afterSetFolder: "afterSetFolder",afterUnsetFolder: "afterUnsetFolder",beforeMoveFrom: "beforeMoveFrom",beforeMoveTo: "beforeMoveTo",afterMoveFrom: "afterMoveFrom",afterMoveTo: "afterMoveTo",afterAddChild: "afterAddChild",afterDetach: "afterDetach",afterExpand: "afterExpand",beforeExpand: "beforeExpand",afterSetTitle: "afterSetTitle",afterCollapse: "afterCollapse",beforeCollapse: "beforeCollapse",afterNavigate: "afterNavigate"
+},classPrefix: "Tree",style: "",allowAddChildToLeaf: true,unsetFolderOnEmpty: true,DndModes: {BETWEEN: 1,ONTO: 2
+},DndAcceptTypes: "",templateCssPath: dojo.uri.moduleUri("dojo.widget", "templates/TreeV3.css"),templateString: '<div style="${this.style}">\n</div>',isExpanded: true,isTree: true,createNode: function(data){data.tree = this.widgetId;if(data.widgetName){return dojo.widget.createWidget(data.widgetName, data);}else if(this.defaultChildWidget.prototype.createSimple){return this.defaultChildWidget.prototype.createSimple(data);}else{var ns = this.defaultChildWidget.prototype.ns;var wt = this.defaultChildWidget.prototype.widgetType;return dojo.widget.createWidget(ns + ":" + wt, data);}},makeNodeTemplate: function(){var domNode = document.createElement("div");dojo.html.setClass(domNode, this.classPrefix+"Node "+this.classPrefix+"ExpandLeaf "+this.classPrefix+"ChildrenNo");dojo.widget.wai.setAttr(domNode, "waiRole", "role", "presentation");this.nodeTemplate = domNode;var expandNode = document.createElement("div");var clazz = this.classPrefix+"Expand";dojo.widget.wai.setAttr(expandNod
 e, "waiRole", "role", "presentation");if (dojo.render.html.ie){clazz = clazz + ' ' + this.classPrefix+"IEExpand";}
+dojo.html.setClass(expandNode, clazz);this.expandNodeTemplate = expandNode;var labelNode = document.createElement("span");dojo.html.setClass(labelNode, this.classPrefix+"Label");dojo.widget.wai.setAttr(labelNode, "waiRole", "role", "treeitem");this.labelNodeTemplate = labelNode;var contentNode = document.createElement("div");dojo.widget.wai.setAttr(contentNode, "waiRole", "role", "presentation");var clazz = this.classPrefix+"Content";if(dojo.render.html.ie && !dojo.render.html.ie70){clazz = clazz + ' ' + this.classPrefix+"IEContent";}
+dojo.html.setClass(contentNode, clazz);this.contentNodeTemplate = contentNode;domNode.appendChild(expandNode);domNode.appendChild(contentNode);contentNode.appendChild(labelNode);},makeContainerNodeTemplate: function(){var div = document.createElement('div');div.style.display = 'none';dojo.html.setClass(div, this.classPrefix+"Container");dojo.widget.wai.setAttr(div, "waiRole", "role", "presentation");this.containerNodeTemplate = div;},actions: {ADDCHILD: "ADDCHILD"
+},getInfo: function(){var info = {widgetId: this.widgetId,objectId: this.objectId
+}
+return info;},adjustEventNames: function(){for(var name in this.eventNamesDefault){if(dojo.lang.isUndefined(this.eventNames[name])){this.eventNames[name] = this.widgetId+"/"+this.eventNamesDefault[name];}}
+},adjustDndMode: function(){var _this = this;var DndMode = 0;dojo.lang.forEach(this.DndMode.split(';'),function(elem){var mode = _this.DndModes[dojo.string.trim(elem).toUpperCase()];if(mode){DndMode = DndMode | mode;}}
+);this.DndMode = DndMode;},destroy: function(){dojo.event.topic.publish(this.tree.eventNames.beforeTreeDestroy, { source: this } );return dojo.widget.HtmlWidget.prototype.destroy.apply(this, arguments);},initialize: function(args){this.domNode.widgetId = this.widgetId;for(var i=0; i<this.actionsDisabled.length; i++){this.actionsDisabled[i] = this.actionsDisabled[i].toUpperCase();}
+if(!args.defaultChildWidget){this.defaultChildWidget = dojo.widget.TreeNodeV3;}else{this.defaultChildWidget = dojo.getObject(args.defaultChildWidget);}
+this.adjustEventNames();this.adjustDndMode();this.makeNodeTemplate();this.makeContainerNodeTemplate();this.containerNode = this.domNode;dojo.html.setClass(this.domNode, this.classPrefix+"Container");dojo.widget.wai.setAttr(this.domNode, "waiRole", "role", "tree");var _this = this;dojo.lang.forEach(this.listeners,function(elem){var t = dojo.lang.isString(elem) ? dojo.widget.byId(elem) : elem;t.listenTree(_this)
+}
+);},postCreate: function(){dojo.event.topic.publish(this.eventNames.afterTreeCreate, { source: this } );},move: function(child, newParent, index){if(!child.parent){dojo.raise(this.widgetType+": child can be moved only while it's attached");}
+var oldParent = child.parent;var oldTree = child.tree;var oldIndex = child.getParentIndex();var newTree = newParent.tree;var newParent = newParent;var newIndex = index;var message = {oldParent: oldParent, oldTree: oldTree, oldIndex: oldIndex,newParent: newParent, newTree: newTree, newIndex: newIndex,child: child
+};dojo.event.topic.publish(oldTree.eventNames.beforeMoveFrom, message);dojo.event.topic.publish(newTree.eventNames.beforeMoveTo, message);this.doMove.apply(this, arguments);dojo.event.topic.publish(oldTree.eventNames.afterMoveFrom, message);dojo.event.topic.publish(newTree.eventNames.afterMoveTo, message);},doMove: function(child, newParent, index){child.doDetach();newParent.doAddChild(child, index);},toString: function(){return "["+this.widgetType+" ID:"+this.widgetId+"]"
+}});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeWithNode.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeWithNode.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeWithNode.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/TreeWithNode.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,23 @@
+
+dojo.require("dojo.lang.declare");dojo.provide("dojo.widget.TreeWithNode");dojo.declare(
+"dojo.widget.TreeWithNode",null,function(){ },{loadStates: {UNCHECKED: "UNCHECKED",LOADING: "LOADING",LOADED: "LOADED"
+},state: "UNCHECKED",objectId: "",isContainer: true,lockLevel: 0,lock: function() {this.lockLevel++;},unlock: function() {if (!this.lockLevel) {dojo.raise(this.widgetType+" unlock: not locked");}
+this.lockLevel--;},expandLevel: 0,loadLevel: 0,hasLock: function() {return this.lockLevel>0;},isLocked: function() {var node = this;while (true) {if (node.lockLevel) {return true;}
+if (!node.parent || node.isTree) {break;}
+node = node.parent;}
+return false;},flushLock: function() {this.lockLevel = 0;},actionIsDisabled: function(action) {var disabled = false;if (dojo.lang.inArray(this.actionsDisabled, action)) {disabled = true;}
+if (this.isTreeNode) {if (!this.tree.allowAddChildToLeaf && action == this.actions.ADDCHILD && !this.isFolder) {disabled = true;}}
+return disabled;},actionIsDisabledNow: function(action) {return this.actionIsDisabled(action) || this.isLocked();},setChildren: function(childrenArray) {if (this.isTreeNode && !this.isFolder) {this.setFolder();} else if (this.isTreeNode) {this.state = this.loadStates.LOADED;}
+var hadChildren = this.children.length > 0;if (hadChildren && childrenArray){this.destroyChildren()
+}
+if (childrenArray) {this.children = childrenArray;}
+var hasChildren = this.children.length > 0;if (this.isTreeNode && hasChildren != hadChildren) {this.viewSetHasChildren();}
+for(var i=0; i<this.children.length; i++) {var child = this.children[i];if (!(child instanceof dojo.widget.Widget)) {child = this.children[i] = this.tree.createNode(child);var childWidgetCreated = true;} else {var childWidgetCreated = false;}
+if (!child.parent) {child.parent = this;if (this.tree !== child.tree) {child.updateTree(this.tree);}
+child.viewAddLayout();this.containerNode.appendChild(child.domNode);var message = {child: child,index: i,parent: this,childWidgetCreated: childWidgetCreated
+}
+delete dojo.widget.manager.topWidgets[child.widgetId];dojo.event.topic.publish(this.tree.eventNames.afterAddChild, message);}
+if (this.tree.eagerWidgetInstantiation && child.children.length) {child.setChildren();}}
+},doAddChild: function(child, index) {return this.addChild(child, index, true);},addChild: function(child, index, dontPublishEvent) {if (dojo.lang.isUndefined(index)) {index = this.children.length;}
+if (!child.isTreeNode){dojo.raise("You can only add TreeNode widgets to a "+this.widgetType+" widget!");return;}
+this.children.splice(index, 0, child);child.parent = this;child.addedTo(this, index, dontPublishEvent);delete dojo.widget.manager.topWidgets[child.widgetId];},onShow: function() {this.animationInProgress=false;},onHide: function() {this.animationInProgress=false;}});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/UsTextbox.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/UsTextbox.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/UsTextbox.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/UsTextbox.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,11 @@
+
+dojo.provide("dojo.widget.UsTextbox");dojo.require("dojo.widget.ValidationTextbox");dojo.require("dojo.validate.us");dojo.widget.defineWidget(
+"dojo.widget.UsStateTextbox",dojo.widget.ValidationTextbox,{mixInProperties: function(localProperties){dojo.widget.UsStateTextbox.superclass.mixInProperties.apply(this, arguments);if(localProperties.allowterritories){this.flags.allowTerritories = (localProperties.allowterritories == "true");}
+if(localProperties.allowmilitary){this.flags.allowMilitary = (localProperties.allowmilitary == "true");}},isValid: function(){return dojo.validate.us.isState(this.textbox.value, this.flags);}}
+);dojo.widget.defineWidget(
+"dojo.widget.UsZipTextbox",dojo.widget.ValidationTextbox,{isValid: function(){return dojo.validate.us.isZipCode(this.textbox.value);}}
+);dojo.widget.defineWidget(
+"dojo.widget.UsSocialSecurityNumberTextbox",dojo.widget.ValidationTextbox,{isValid: function(){return dojo.validate.us.isSocialSecurityNumber(this.textbox.value);}}
+);dojo.widget.defineWidget(
+"dojo.widget.UsPhoneNumberTextbox",dojo.widget.ValidationTextbox,{isValid: function(){return dojo.validate.us.isPhoneNumber(this.textbox.value);}}
+);
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ValidationTextbox.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ValidationTextbox.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ValidationTextbox.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ValidationTextbox.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,10 @@
+
+dojo.provide("dojo.widget.ValidationTextbox");dojo.require("dojo.widget.Textbox");dojo.require("dojo.i18n.common");dojo.widget.defineWidget(
+"dojo.widget.ValidationTextbox",dojo.widget.Textbox,function() {this.flags = {};},{required: false,rangeClass: "range",invalidClass: "invalid",missingClass: "missing",classPrefix: "dojoValidate",size: "",maxlength: "",promptMessage: "",invalidMessage: "",missingMessage: "",rangeMessage: "",listenOnKeyPress: true,htmlfloat: "none",lastCheckedValue: null,templatePath: dojo.uri.moduleUri("dojo.widget", "templates/ValidationTextbox.html"),templateCssPath: dojo.uri.moduleUri("dojo.widget", "templates/Validate.css"),invalidSpan: null,missingSpan: null,rangeSpan: null,getValue: function() {return this.textbox.value;},setValue: function(value) {this.textbox.value = value;this.update();},isValid: function() {return true;},isInRange: function() {return true;},isEmpty: function() {return ( /^\s*$/.test(this.textbox.value) );},isMissing: function() {return ( this.required && this.isEmpty() );},update: function() {this.lastCheckedValue = this.textbox.value;this.missingSpan.style.display 
 = "none";this.invalidSpan.style.display = "none";this.rangeSpan.style.display = "none";var empty = this.isEmpty();var valid = true;if(this.promptMessage != this.textbox.value){valid = this.isValid();}
+var missing = this.isMissing();if(missing){this.missingSpan.style.display = "";}else if( !empty && !valid ){this.invalidSpan.style.display = "";}else if( !empty && !this.isInRange() ){this.rangeSpan.style.display = "";}
+this.highlight();},updateClass: function(className){var pre = this.classPrefix;dojo.html.removeClass(this.textbox,pre+"Empty");dojo.html.removeClass(this.textbox,pre+"Valid");dojo.html.removeClass(this.textbox,pre+"Invalid");dojo.html.addClass(this.textbox,pre+className);},highlight: function() {if (this.isEmpty()) {this.updateClass("Empty");}else if (this.isValid() && this.isInRange() ){this.updateClass("Valid");}else if(this.textbox.value != this.promptMessage){this.updateClass("Invalid");}else{this.updateClass("Empty");}},onfocus: function(evt) {if ( !this.listenOnKeyPress) {this.updateClass("Empty");}},onblur: function(evt) {this.filter();this.update();},onkeyup: function(evt){if(this.listenOnKeyPress){this.update();}else if (this.textbox.value != this.lastCheckedValue){this.updateClass("Empty");}},postMixInProperties: function(localProperties, frag) {dojo.widget.ValidationTextbox.superclass.postMixInProperties.apply(this, arguments);this.messages = dojo.i18n.getLocaliza
 tion("dojo.widget", "validate", this.lang);dojo.lang.forEach(["invalidMessage", "missingMessage", "rangeMessage"], function(prop) {if(this[prop]){ this.messages[prop] = this[prop]; }}, this);},fillInTemplate: function() {dojo.widget.ValidationTextbox.superclass.fillInTemplate.apply(this, arguments);this.textbox.isValid = function() { this.isValid.call(this); };this.textbox.isMissing = function() { this.isMissing.call(this); };this.textbox.isInRange = function() { this.isInRange.call(this); };dojo.html.setClass(this.invalidSpan,this.invalidClass);this.update();this.filter();if(dojo.render.html.ie){ dojo.html.addClass(this.domNode, "ie"); }
+if(dojo.render.html.moz){ dojo.html.addClass(this.domNode, "moz"); }
+if(dojo.render.html.opera){ dojo.html.addClass(this.domNode, "opera"); }
+if(dojo.render.html.safari){ dojo.html.addClass(this.domNode, "safari"); }}
+}
+);
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Widget.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Widget.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Widget.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Widget.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,31 @@
+
+dojo.provide("dojo.widget.Widget");dojo.require("dojo.lang.func");dojo.require("dojo.lang.array");dojo.require("dojo.lang.extras");dojo.require("dojo.lang.declare");dojo.require("dojo.ns");dojo.require("dojo.widget.Manager");dojo.require("dojo.event.*");dojo.require("dojo.a11y");dojo.declare("dojo.widget.Widget", null,function(){this.children = [];this.extraArgs = {};},{parent: null,isTopLevel:  false,disabled: false,isContainer: false,widgetId: "",widgetType: "Widget",ns: "dojo",getNamespacedType: function(){return (this.ns ? this.ns + ":" + this.widgetType : this.widgetType).toLowerCase();},toString: function(){return '[Widget ' + this.getNamespacedType() + ', ' + (this.widgetId || 'NO ID') + ']';},repr: function(){return this.toString();},enable: function(){this.disabled = false;},disable: function(){this.disabled = true;},onResized: function(){this.notifyChildrenOfResize();},notifyChildrenOfResize: function(){for(var i=0; i<this.children.length; i++){var child = this.chi
 ldren[i];if( child.onResized ){child.onResized();}}
+},create: function(args, fragment, parent, ns){if(ns){this.ns = ns;}
+this.satisfyPropertySets(args, fragment, parent);this.mixInProperties(args, fragment, parent);this.postMixInProperties(args, fragment, parent);dojo.widget.manager.add(this);this.buildRendering(args, fragment, parent);this.initialize(args, fragment, parent);this.postInitialize(args, fragment, parent);this.postCreate(args, fragment, parent);return this;},destroy: function(finalize){if(this.parent){this.parent.removeChild(this);}
+this.destroyChildren();this.uninitialize();this.destroyRendering(finalize);dojo.widget.manager.removeById(this.widgetId);},destroyChildren: function(){var widget;var i=0;while(this.children.length > i){widget = this.children[i];if (widget instanceof dojo.widget.Widget) {this.removeChild(widget);widget.destroy();continue;}
+i++;}},getChildrenOfType: function(type, recurse){var ret = [];var isFunc = dojo.lang.isFunction(type);if(!isFunc){type = type.toLowerCase();}
+for(var x=0; x<this.children.length; x++){if(isFunc){if(this.children[x] instanceof type){ret.push(this.children[x]);}}else{if(this.children[x].widgetType.toLowerCase() == type){ret.push(this.children[x]);}}
+if(recurse){ret = ret.concat(this.children[x].getChildrenOfType(type, recurse));}}
+return ret;},getDescendants: function(){var result = [];var stack = [this];var elem;while ((elem = stack.pop())){result.push(elem);if (elem.children) {dojo.lang.forEach(elem.children, function(elem) { stack.push(elem); });}}
+return result;},isFirstChild: function(){return this === this.parent.children[0];},isLastChild: function() {return this === this.parent.children[this.parent.children.length-1];},satisfyPropertySets: function(args){return args;},mixInProperties: function(args, frag){if((args["fastMixIn"])||(frag["fastMixIn"])){for(var x in args){this[x] = args[x];}
+return;}
+var undef;var lcArgs = dojo.widget.lcArgsCache[this.widgetType];if ( lcArgs == null ){lcArgs = {};for(var y in this){lcArgs[((new String(y)).toLowerCase())] = y;}
+dojo.widget.lcArgsCache[this.widgetType] = lcArgs;}
+var visited = {};for(var x in args){if(!this[x]){var y = lcArgs[(new String(x)).toLowerCase()];if(y){args[y] = args[x];x = y;}}
+if(visited[x]){ continue; }
+visited[x] = true;if((typeof this[x]) != (typeof undef)){if(typeof args[x] != "string"){this[x] = args[x];}else{if(dojo.lang.isString(this[x])){this[x] = args[x];}else if(dojo.lang.isNumber(this[x])){this[x] = new Number(args[x]);}else if(dojo.lang.isBoolean(this[x])){this[x] = (args[x].toLowerCase()=="false") ? false : true;}else if(dojo.lang.isFunction(this[x])){if(args[x].search(/[^\w\.]+/i) == -1){this[x] = dojo.getObject(args[x], false);}else{var tn = dojo.lang.nameAnonFunc(new Function(args[x]), this);dojo.event.kwConnect({srcObj: this,srcFunc: x,adviceObj: this,adviceFunc: tn
+});}}else if(dojo.lang.isArray(this[x])){this[x] = args[x].split(";");} else if (this[x] instanceof Date) {this[x] = new Date(Number(args[x]));}else if(typeof this[x] == "object"){if (this[x] instanceof dojo.uri.Uri){this[x] = dojo.uri.dojoUri(args[x]);}else{var pairs = args[x].split(";");for(var y=0; y<pairs.length; y++){var si = pairs[y].indexOf(":");if((si != -1)&&(pairs[y].length>si)){this[x][pairs[y].substr(0, si).replace(/^\s+|\s+$/g, "")] = pairs[y].substr(si+1);}}
+}}else{this[x] = args[x];}}
+}else{this.extraArgs[x.toLowerCase()] = args[x];}}
+},postMixInProperties: function(args, frag, parent){},initialize: function(args, frag, parent){return false;},postInitialize: function(args, frag, parent){return false;},postCreate: function(args, frag, parent){return false;},uninitialize: function(){return false;},buildRendering: function(args, frag, parent){dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");return false;},destroyRendering: function(){dojo.unimplemented("dojo.widget.Widget.destroyRendering");return false;},addedTo: function(parent){},addChild: function(child){dojo.unimplemented("dojo.widget.Widget.addChild");return false;},removeChild: function(widget){for(var x=0; x<this.children.length; x++){if(this.children[x] === widget){this.children.splice(x, 1);widget.parent=null;break;}}
+return widget;},getPreviousSibling: function(){var idx = this.getParentIndex();if (idx<=0) return null;return this.parent.children[idx-1];},getSiblings: function(){return this.parent.children;},getParentIndex: function(){return dojo.lang.indexOf(this.parent.children, this, true);},getNextSibling: function(){var idx = this.getParentIndex();if (idx == this.parent.children.length-1){return null;}
+if (idx < 0){return null;}
+return this.parent.children[idx+1];}});dojo.widget.lcArgsCache = {};dojo.widget.tags = {};dojo.widget.tags["dojo:propertyset"] = function(fragment, widgetParser, parentComp){var properties = widgetParser.parseProperties(fragment["dojo:propertyset"]);}
+dojo.widget.tags["dojo:connect"] = function(fragment, widgetParser, parentComp){var properties = widgetParser.parseProperties(fragment["dojo:connect"]);}
+dojo.widget.buildWidgetFromParseTree = function(type,frag,parser,parentComp,insertionIndex,localProps){dojo.a11y.setAccessibleMode();var stype = type.split(":");stype = (stype.length == 2) ? stype[1] : type;var localProperties = localProps || parser.parseProperties(frag[frag["ns"]+":"+stype]);var twidget = dojo.widget.manager.getImplementation(stype,null,null,frag["ns"]);if(!twidget){throw new Error('cannot find "' + type + '" widget');}else if (!twidget.create){throw new Error('"' + type + '" widget object has no "create" method and does not appear to implement *Widget');}
+localProperties["dojoinsertionindex"] = insertionIndex;var ret = twidget.create(localProperties, frag, parentComp, frag["ns"]);return ret;}
+dojo.widget.defineWidget = function(widgetClass, renderer, superclasses, init, props){if(dojo.lang.isString(arguments[3])){dojo.widget._defineWidget(arguments[0], arguments[3], arguments[1], arguments[4], arguments[2]);}else{var args = [ arguments[0] ], p = 3;if(dojo.lang.isString(arguments[1])){args.push(arguments[1], arguments[2]);}else{args.push('', arguments[1]);p = 2;}
+if(dojo.lang.isFunction(arguments[p])){args.push(arguments[p], arguments[p+1]);}else{args.push(null, arguments[p]);}
+dojo.widget._defineWidget.apply(this, args);}}
+dojo.widget.defineWidget.renderers = "html|svg|vml";dojo.widget._defineWidget = function(widgetClass , renderer , superclasses , init , props ){var module = widgetClass.split(".");var type = module.pop();var regx = "\\.(" + (renderer ? renderer + '|' : '') + dojo.widget.defineWidget.renderers + ")\\.";var r = widgetClass.search(new RegExp(regx));module = (r < 0 ? module.join(".") : widgetClass.substr(0, r));dojo.widget.manager.registerWidgetPackage(module);var pos = module.indexOf(".");var nsName = (pos > -1) ? module.substring(0,pos) : module;props=(props)||{};props.widgetType = type;if((!init)&&(props["classConstructor"])){init = props.classConstructor;delete props.classConstructor;}
+dojo.declare(widgetClass, superclasses, init, props);}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Wizard.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Wizard.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Wizard.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Wizard.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,18 @@
+
+dojo.provide("dojo.widget.Wizard");dojo.require("dojo.widget.*");dojo.require("dojo.widget.LayoutContainer");dojo.require("dojo.widget.ContentPane");dojo.require("dojo.event.*");dojo.require("dojo.html.style");dojo.require("dojo.i18n.common");dojo.requireLocalization("dojo.widget", "common", null, "de,ROOT,it");dojo.requireLocalization("dojo.widget", "Wizard", null, "ROOT,de,it");dojo.widget.defineWidget(
+"dojo.widget.WizardContainer",dojo.widget.LayoutContainer,{templatePath: dojo.uri.moduleUri("dojo.widget", "templates/Wizard.html"),templateCssPath: dojo.uri.moduleUri("dojo.widget", "templates/Wizard.css"),selected: null,nextButtonLabel: "",previousButtonLabel: "",cancelButtonLabel: "",doneButtonLabel: "",cancelFunction: "",hideDisabledButtons: false,postMixInProperties: function(){dojo.widget.LayoutContainer.superclass.postMixInProperties.apply(this, arguments);this.commonMessages = dojo.i18n.getLocalization("dojo.widget", "common", this.lang);this.messages = dojo.i18n.getLocalization("dojo.widget", "Wizard", this.lang);},fillInTemplate: function(args, frag){dojo.event.connect(this.nextButton, "onclick", this, "_onNextButtonClick");dojo.event.connect(this.previousButton, "onclick", this, "_onPreviousButtonClick");if (this.cancelFunction){dojo.event.connect(this.cancelButton, "onclick", this.cancelFunction);}else{this.cancelButton.style.display = "none";}
+dojo.event.connect(this.doneButton, "onclick", this, "done");},postCreate: function(){dojo.widget.LayoutContainer.superclass.postCreate.apply(this, arguments);if(this.nextButtonLabel){this.nextButton.value = this.nextButtonLabel;}
+if(this.previousButtonLabel){this.previousButton.value = this.previousButtonLabel;}
+if(this.cancelButtonLabel){this.cancelButton.value = this.cancelButtonLabel;}
+if(this.doneButtonLabel){this.doneButton.value = this.doneButtonLabel;}},_checkButtons: function(){var lastStep = !this.hasNextPanel();this.nextButton.disabled = lastStep;this._setButtonClass(this.nextButton);if(this.selected.doneFunction){this.doneButton.style.display = "";if(lastStep){this.nextButton.style.display = "none";}}else{this.doneButton.style.display = "none";}
+this.previousButton.disabled = ((!this.hasPreviousPanel()) || (!this.selected.canGoBack));this._setButtonClass(this.previousButton);},_setButtonClass: function(button){if(!this.hideDisabledButtons){button.style.display = "";dojo.html.setClass(button, button.disabled ? "WizardButtonDisabled" : "WizardButton");}else{button.style.display = button.disabled ? "none" : "";}},registerChild: function(panel, insertionIndex){dojo.widget.WizardContainer.superclass.registerChild.call(this, panel, insertionIndex);this.wizardPanelContainerNode.appendChild(panel.domNode);panel.hide();if(!this.selected){this.onSelected(panel);}
+this._checkButtons();},onSelected: function( panel){if(this.selected ){if (this.selected._checkPass()) {this.selected.hide();} else {return;}}
+panel.show();this.selected = panel;},getPanels: function() {return this.getChildrenOfType("WizardPane", false);},selectedIndex: function() {if (this.selected) {return dojo.lang.indexOf(this.getPanels(), this.selected);}
+return -1;},_onNextButtonClick: function() {var selectedIndex = this.selectedIndex();if ( selectedIndex > -1 ) {var childPanels = this.getPanels();if (childPanels[selectedIndex + 1]) {this.onSelected(childPanels[selectedIndex + 1]);}}
+this._checkButtons();},_onPreviousButtonClick: function() {var selectedIndex = this.selectedIndex();if ( selectedIndex > -1 ) {var childPanels = this.getPanels();if (childPanels[selectedIndex - 1]) {this.onSelected(childPanels[selectedIndex - 1]);}}
+this._checkButtons();},hasNextPanel: function() {var selectedIndex = this.selectedIndex();return (selectedIndex < (this.getPanels().length - 1));},hasPreviousPanel: function() {var selectedIndex = this.selectedIndex();return (selectedIndex > 0);},done: function() {this.selected.done();}});dojo.widget.defineWidget(
+"dojo.widget.WizardPane",dojo.widget.ContentPane,{canGoBack: true,passFunction: "",doneFunction: "",postMixInProperties: function(args, frag) {if (this.passFunction) {this.passFunction = dj_global[this.passFunction];}
+if (this.doneFunction) {this.doneFunction = dj_global[this.doneFunction];}
+dojo.widget.WizardPane.superclass.postMixInProperties.apply(this, arguments);},_checkPass: function() {if (this.passFunction && dojo.lang.isFunction(this.passFunction)) {var failMessage = this.passFunction();if (failMessage) {alert(failMessage);return false;}}
+return true;},done: function() {if (this.doneFunction && dojo.lang.isFunction(this.doneFunction)) {this.doneFunction();}}
+});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/YahooMap.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/YahooMap.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/YahooMap.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/YahooMap.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,21 @@
+
+dojo.provide("dojo.widget.YahooMap");dojo.require("dojo.event.*");dojo.require("dojo.math");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");(function(){var yappid = djConfig["yAppId"]||djConfig["yahooAppId"]||"dojotoolkit";if(!dojo.hostenv.post_load_){if(yappid == "dojotoolkit"){dojo.debug("please provide a unique Yahoo App ID in djConfig.yahooAppId when using the map widget");}
+var tag = "<scr"+"ipt src='http://api.maps.yahoo.com/ajaxymap?v=3.0&appid="+yappid+"'></scri"+"pt>";if(!dj_global["YMap"]){document.write(tag);}}else{dojo.debug("cannot initialize map system after the page has been loaded! Please either manually include the script block provided by Yahoo in your page or require() the YahooMap widget before onload has fired");}})();dojo.widget.defineWidget(
+"dojo.widget.YahooMap",dojo.widget.HtmlWidget,function(){this.map=null;this.datasrc="";this.data=[];this.width=0;this.height=0;this.controls=["zoomlong","maptype","pan"];},{isContainer: false,templatePath:null,templateCssPath:null,findCenter:function(aPts){var start=new YGeoPoint(37,-90);if(aPts.length==0) return start;var minLat,maxLat, minLon, maxLon, cLat, cLon;minLat=maxLat=aPts[0].Lat;minLon=maxLon=aPts[0].Lon;for(var i=0; i<aPts.length; i++){minLat=Math.min(minLat,aPts[i].Lat);maxLat=Math.max(maxLat,aPts[i].Lat);minLon=Math.min(minLon,aPts[i].Lon);maxLon=Math.max(maxLon,aPts[i].Lon);}
+cLat=dojo.math.round((minLat+maxLat)/2,6);cLon=dojo.math.round((minLon+maxLon)/2,6);return new YGeoPoint(cLat,cLon);},setControls:function(){var methodmap={maptype:"addTypeControl",pan:"addPanControl",zoomlong:"addZoomLong",zoomshort:"addZoomShort"
+}
+var c=this.controls;for(var i=0; i<c.length; i++){var controlMethod=methodmap[c[i].toLowerCase()];if(this.map[controlMethod]){this.map[controlMethod]();}}
+},parse:function(table){this.data=[];var h=table.getElementsByTagName("thead")[0];if(!h){return;}
+var a=[];var cols=h.getElementsByTagName("td");if(cols.length==0){cols=h.getElementsByTagName("th");}
+for(var i=0; i<cols.length; i++){var c=cols[i].innerHTML.toLowerCase();if(c=="long") c="lng";a.push(c);}
+var b=table.getElementsByTagName("tbody")[0];if(!b){return;}
+for(var i=0; i<b.childNodes.length; i++){if(!(b.childNodes[i].nodeName&&b.childNodes[i].nodeName.toLowerCase()=="tr")){continue;}
+var cells=b.childNodes[i].getElementsByTagName("td");var o={};for(var j=0; j<a.length; j++){var col=a[j];if(col=="lat"||col=="lng"){o[col]=parseFloat(cells[j].innerHTML);}else{o[col]=cells[j].innerHTML;}}
+this.data.push(o);}},render:function(){var pts=[];var d=this.data;for(var i=0; i<d.length; i++){var pt=new YGeoPoint(d[i].lat, d[i].lng);pts.push(pt);var icon=d[i].icon||null;if(icon){icon=new YImage(icon);}
+var m=new YMarker(pt,icon);if(d[i].description){m.addAutoExpand("<div>"+d[i].description+"</div>");}
+this.map.addOverlay(m);}
+var c=this.findCenter(pts);var z=this.map.getZoomLevel(pts);this.map.drawZoomAndCenter(c,z);},initialize:function(args, frag){if(!YMap || !YGeoPoint){dojo.raise("dojo.widget.YahooMap: The Yahoo Map script must be included in order to use this widget.");}
+if(this.datasrc){this.parse(dojo.byId(this.datasrc));}
+else if(this.domNode.getElementsByTagName("table")[0]){this.parse(this.domNode.getElementsByTagName("table")[0]);}},postCreate:function(){while(this.domNode.childNodes.length>0){this.domNode.removeChild(this.domNode.childNodes[0]);}
+if(this.width>0&&this.height>0){this.map=new YMap(this.domNode, YAHOO_MAP_REG, new YSize(this.width, this.height));}else{this.map=new YMap(this.domNode);}
+this.setControls();this.render();}});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/__package__.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/__package__.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+
+dojo.kwCompoundRequire({common: ["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser: ["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard: ["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:  ["dojo.widget.SvgWidget"],rhino:  ["dojo.widget.SwtWidget"]
+});dojo.provide("dojo.widget.*");
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoContainer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoContainer.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoContainer.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoContainer.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.widget.demoEngine.DemoContainer");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.widget.demoEngine.DemoPane");dojo.require("dojo.widget.demoEngine.SourcePane");dojo.require("dojo.widget.TabContainer");dojo.widget.defineWidget("my.widget.demoEngine.DemoContainer",dojo.widget.HtmlWidget,{templatePath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoContainer.html"),templateCssPath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoContainer.css"),postCreate: function() {dojo.html.addClass(this.domNode,this.domNodeClass);dojo.html.addClass(this.tabNode, this.tabClass);dojo.html.addClass(this.returnImageNode, this.returnClass);this.returnImageNode.src=this.returnImage;this.tabContainer = dojo.widget.createWidget("TabContainer",{},this.tabNode);this.demoTab = dojo.widget.createWidget("DemoPane",{});this.tabContainer.addChild(this.demoTab);this.sourceTab= dojo.widget.createWidget("SourcePane",{});thi
 s.tabContainer.addChild(this.sourceTab);dojo.html.setOpacity(this.domNode,0);dojo.html.hide(this.domNode);},loadDemo: function(url) {this.demoTab.setHref(url);this.sourceTab.setHref(url);this.showDemo();},setName: function(name) {dojo.html.removeChildren(this.demoNameNode);this.demoNameNode.appendChild(document.createTextNode(name));},setSummary: function(summary) {dojo.html.removeChildren(this.summaryNode);this.summaryNode.appendChild(document.createTextNode(summary));},showSource: function() {dojo.html.removeClass(this.demoButtonNode,this.selectedButtonClass);dojo.html.addClass(this.sourceButtonNode,this.selectedButtonClass);this.tabContainer.selectTab(this.sourceTab);},showDemo: function() {dojo.html.removeClass(this.sourceButtonNode,this.selectedButtonClass);dojo.html.addClass(this.demoButtonNode,this.selectedButtonClass);this.tabContainer.selectTab(this.demoTab);},returnToDemos: function() {dojo.debug("Return To Demos");},show: function() {dojo.html.setOpacity(this.domN
 ode,1);dojo.html.show(this.domNode);this.tabContainer.checkSize();}},"",function() {dojo.debug("DemoPane Init");this.domNodeClass="demoContainer";this.tabContainer="";this.sourceTab="";this.demoTab="";this.headerNode="";this.returnNode="";this.returnImageNode="";this.returnImage="images/dojoDemos.gif";this.returnClass="return";this.summaryNode="";this.demoNameNode="";this.tabControlNode="";this.tabNode="";this.tabClass = "demoContainerTabs";this.sourceButtonNode="";this.demoButtonNode="";this.selectedButtonClass="selected";}
+);
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoItem.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoItem.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoItem.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoItem.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.widget.demoEngine.DemoItem");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.i18n.common");dojo.requireLocalization("dojo.widget", "DemoEngine", null, "de,ROOT,it");dojo.widget.defineWidget("my.widget.demoEngine.DemoItem",dojo.widget.HtmlWidget,{templatePath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoItem.html"),templateCssPath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoItem.css"),postCreate: function() {dojo.html.addClass(this.domNode,this.domNodeClass);dojo.html.addClass(this.summaryBoxNode, this.summaryBoxClass);dojo.html.addClass(this.screenshotTdNode, this.screenshotTdClass);dojo.html.addClass(this.summaryContainerNode, this.summaryContainerClass);dojo.html.addClass(this.summaryNode, this.summaryClass);dojo.html.addClass(this.viewDemoLinkNode, this.viewDemoLinkClass);this.nameNode.appendChild(document.createTextNode(this.name));this.descriptionNode.appendChild(document.createT
 extNode(this.description));this.thumbnailImageNode.src = this.thumbnail;this.thumbnailImageNode.name=this.name;this.viewDemoImageNode.src = this.viewDemoImage;this.viewDemoImageNode.name=this.name;},onSelectDemo: function() {}},"",function() {this.demo = "";this.domNodeClass="demoItemWrapper";this.summaryBoxNode="";this.summaryBoxClass="demoItemSummaryBox";this.nameNode="";this.thumbnailImageNode="";this.viewDemoImageNode="";this.screenshotTdNode="";this.screenshotTdClass="demoItemScreenshot";this.summaryContainerNode="";this.summaryContainerClass="demoItemSummaryContainer";this.summaryNode="";this.summaryClass="demoItemSummary";this.viewDemoLinkNode="";this.viewDemoLinkClass="demoItemView";this.descriptionNode="";this.name="Some Demo";var bundle = dojo.i18n.getLocalization("dojo.widget", "DemoEngine");this.description=bundle.itemDescription;this.thumbnail="images/test_thumb.gif";this.viewDemoImage="images/viewDemo.png";}
+);
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoNavigator.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoNavigator.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoNavigator.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoNavigator.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,11 @@
+
+dojo.provide("dojo.widget.demoEngine.DemoNavigator");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.widget.Button");dojo.require("dojo.widget.demoEngine.DemoItem");dojo.require("dojo.io.*");dojo.require("dojo.lfx.*");dojo.require("dojo.lang.common");dojo.require("dojo.i18n.common");dojo.requireLocalization("dojo.widget", "DemoEngine", null, "de,ROOT,it");dojo.widget.defineWidget("my.widget.demoEngine.DemoNavigator",dojo.widget.HtmlWidget,{templatePath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoNavigator.html"),templateCssPath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoNavigator.css"),postMixInProperties: function(){dojo.widget.HtmlWidget.superclass.postMixInProperties.apply(this, arguments);this.messages = dojo.i18n.getLocalization("dojo.widget", "DemoEngine", this.lang);},postCreate: function() {dojo.html.addClass(this.domNode,this.domNodeClass);dojo.html.addClass(this.demoListWrapperNode,this.demo
 ListWrapperClass);dojo.html.addClass(this.demoListContainerNode,this.demoListContainerClass);if (dojo.render.html.ie) {dojo.debug("render ie");dojo.html.hide(this.demoListWrapperNode);} else {dojo.debug("render non-ie");dojo.lfx.html.fadeHide(this.demoListWrapperNode, 0).play();}
+this.getRegistry(this.demoRegistryUrl);this.demoContainer = dojo.widget.createWidget("DemoContainer",{returnImage: this.returnImage},this.demoNode);dojo.event.connect(this.demoContainer,"returnToDemos", this, "returnToDemos");this.demoContainer.hide();},returnToDemos: function() {this.demoContainer.hide();if (dojo.render.html.ie) {dojo.debug("render ie");dojo.html.show(this.navigationContainer) ;} else {dojo.debug("render non-ie");dojo.lfx.html.fadeShow(this.navigationContainer,250).play();}
+dojo.lang.forEach(this.categoriesChildren, dojo.lang.hitch(this, function(child){child.checkSize();}));dojo.lang.forEach(this.demoListChildren, dojo.lang.hitch(this, function(child){child.checkSize();}));},show: function() {dojo.html.show(this.domNode);dojo.html.setOpacity(this.domNode,1);dojo.html.setOpacity(this.navigationContainer,1);dojo.lang.forEach(this.categoriesChildren, dojo.lang.hitch(this, function(child){child.checkSize();}));dojo.lang.forEach(this.demoListChildren, dojo.lang.hitch(this, function(child){child.checkSize();}));},getRegistry: function(url) {dojo.io.bind({url: url,load: dojo.lang.hitch(this,this.processRegistry),mimetype: "text/json"
+});},processRegistry: function(type,registry,e) {dojo.debug("Processing Registry");this.registry = registry;dojo.lang.forEach(this.registry.navigation, dojo.lang.hitch(this,this.addCategory));},addCategory: function(category) {var newCat = dojo.widget.createWidget("Button",{caption: category.name});if(!dojo.lang.isObject(this.registry.categories)) {this.registry.categories=function(){};}
+this.registry.categories[category.name] = category;this.categoriesChildren.push(newCat);this.categoriesButtonsNode.appendChild(newCat.domNode);newCat.domNode.categoryName = category.name;dojo.event.connect(newCat,"onClick", this, "onSelectCategory");},addDemo: function(demoName) {var demo = this.registry.definitions[demoName];if (dojo.render.html.ie) {dojo.html.show(this.demoListWrapperNode)
+} else {dojo.lfx.html.fadeShow(this.demoListWrapperNode, 250).play();}
+var newDemo = dojo.widget.createWidget("DemoItem",{viewDemoImage: this.viewDemoImage, name: demoName, description: demo.description, thumbnail: demo.thumbnail});this.demoListChildren.push(newDemo);this.demoListContainerNode.appendChild(newDemo.domNode);dojo.event.connect(newDemo,"onSelectDemo",this,"onSelectDemo");},onSelectCategory: function(e) {catName = e.currentTarget.categoryName;dojo.debug("Selected Category: " + catName);dojo.lang.forEach(this.demoListChildren, function(child) {child.destroy();});this.demoListChildren=[];dojo.lang.forEach(this.registry.categories[catName].demos, dojo.lang.hitch(this,function(demoName){this.addDemo(demoName);}));},onSelectDemo: function(e) {dojo.debug("Demo Selected: " + e.target.name);if (dojo.render.html.ie) {dojo.debug("render ie");dojo.html.hide(this.navigationContainer) ;this.demoContainer.show();this.demoContainer.showDemo();} else {dojo.debug("render non-ie");dojo.lfx.html.fadeHide(this.navigationContainer,250,null,dojo.lang.hit
 ch(this, function() {this.demoContainer.show();this.demoContainer.showDemo();})).play();}
+if(this.registry.definitions[e.target.name].url.indexOf("http://")>-1){window.open(this.registry.definitions[e.target.name].url, e.target.name);} else {this.demoContainer.loadDemo(this.registry.definitions[e.target.name].url);this.demoContainer.setName(e.target.name);this.demoContainer.setSummary(this.registry.definitions[e.target.name].description);}}
+},"",function() {this.demoRegistryUrl="demoRegistry.json";this.registry=function(){};this.categoriesNode="";this.categoriesButtonsNode="";this.navigationContainer="";this.domNodeClass="demoNavigator";this.demoNode="";this.demoContainer="";this.demoListWrapperNode="";this.demoListWrapperClass="demoNavigatorListWrapper";this.demoListContainerClass="demoNavigatorListContainer";this.returnImage="images/dojoDemos.gif";this.viewDemoImage="images/viewDemo.png";this.demoListChildren = [];this.categoriesChildren = [];}
+);
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoPane.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoPane.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoPane.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/DemoPane.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.widget.demoEngine.DemoPane");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");dojo.widget.defineWidget("my.widget.demoEngine.DemoPane",dojo.widget.HtmlWidget,{templatePath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoPane.html"),templateCssPath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoPane.css"),postCreate: function() {dojo.html.addClass(this.domNode,this.domNodeClass);dojo.debug("PostCreate");this._launchDemo();},_launchDemo: function() {dojo.debug("Launching Demo");dojo.debug(this.demoNode);this.demoNode.src=this.href;},setHref: function(url) {this.href = url;this._launchDemo();}},"",function() {dojo.debug("DemoPane Init");this.domNodeClass="demoPane";this.demoNode = "";this.href = "";}
+);
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/SourcePane.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/SourcePane.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/SourcePane.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/SourcePane.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,4 @@
+
+dojo.provide("dojo.widget.demoEngine.SourcePane");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.io.*");dojo.widget.defineWidget("my.widget.demoEngine.SourcePane",dojo.widget.HtmlWidget,{templatePath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/SourcePane.html"),templateCssPath: dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/SourcePane.css"),postCreate: function() {dojo.html.addClass(this.domNode,this.domNodeClass);dojo.debug("PostCreate");},getSource: function() {if (this.href) {dojo.io.bind({url: this.href,load: dojo.lang.hitch(this, "fillInSource"),mimetype: "text/plain"
+});}},fillInSource: function(type, source, e) {this.sourceNode.value=source;},setHref: function(url) {this.href = url;this.getSource();}},"",function() {dojo.debug("SourcePane Init");this.domNodeClass="sourcePane";this.sourceNode = "";this.href = "";}
+);
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/__package__.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/__package__.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,5 @@
+
+dojo.kwCompoundRequire({browser: [
+"dojo.widget.demoEngine.DemoItem","dojo.widget.demoEngine.DemoNavigator","dojo.widget.demoEngine.DemoPane","dojo.widget.demoEngine.SourcePane","dojo.widget.demoEngine.DemoContainer"
+]
+});dojo.provide("dojo.widget.demoEngine.*");
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.css?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.css (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.css Mon Feb  5 21:01:25 2007
@@ -0,0 +1,8 @@
+.demoContainer{width: 100%;height: 100%;padding: 0px;margin: 0px;}
+.demoContainer .return {cursor: pointer;}
+.demoContainer span {margin-right: 10px;cursor: pointer;}
+.demoContainer .selected {border-bottom: 5px solid #95bfff;}
+.demoContainer table {background: #f5f5f5;width: 100%;height: 100%;}
+.demoContainerTabs {width: 100%;height: 400px;}
+.demoContainerTabs .dojoTabLabels-top {display: none;}
+.demoContainerTabs .dojoTabPaneWrapper {border: 0px;}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.html?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoContainer.html Mon Feb  5 21:01:25 2007
@@ -0,0 +1,25 @@
+<div dojoAttachPoint="domNode">
+	<table width="100%" cellspacing="0" cellpadding="5">
+		<tbody>
+			<tr dojoAttachPoint="headerNode">
+				<td dojoAttachPoint="returnNode" valign="middle" width="1%">
+					<img dojoAttachPoint="returnImageNode" dojoAttachEvent="onclick: returnToDemos"/>
+				</td>
+				<td>
+					<h1 dojoAttachPoint="demoNameNode"></h1>
+					<p dojoAttachPoint="summaryNode"></p>
+				</td>
+				<td dojoAttachPoint="tabControlNode" valign="middle" align="right" nowrap>
+					<span dojoAttachPoint="sourceButtonNode" dojoAttachEvent="onclick: showSource">source</span>
+					<span dojoAttachPoint="demoButtonNode" dojoAttachEvent="onclick: showDemo">demo</span>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="3">
+					<div dojoAttachPoint="tabNode">
+					</div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+</div>

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.css?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.css (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.css Mon Feb  5 21:01:25 2007
@@ -0,0 +1,10 @@
+.demoItemSummaryBox {background: #efefef;border:1px solid #dae3ee;}
+.demoItemScreenshot {padding:0.65em;width:175px;border-right:1px solid #fafafa;text-align:center;cursor: pointer;}
+.demoItemWrapper{margin-bottom:1em;}
+.demoItemWrapper a:link, .demoItemWrapper a:visited {color:#a6238f;text-decoration:none;}
+.demoItemSummaryContainer {border-left:1px solid #ddd;}
+.demoItemSummaryContainer h1 {background-color:#e8e8e8;border-bottom: 1px solid #e6e6e6;color:#738fb9;margin:1px;padding:0.5em;font-family:"Lucida Grande", "Tahoma", serif;font-size:1.25em;font-weight:normal;}
+.demoItemSummaryContainer h1 .packageSummary {display:block;color:#000;font-size:10px;margin-top:2px;}
+.demoItemSummaryContainer .demoItemSummary{padding:1em;}
+.demoItemSummaryContainer .demoItemSummary p {font-size:0.85em;padding:0;margin:0;}
+.demoItemView {text-align:right;cursor: pointer;}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.html?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoItem.html Mon Feb  5 21:01:25 2007
@@ -0,0 +1,21 @@
+<div dojoAttachPoint="domNode">
+	<div dojoAttachPoint="summaryBoxNode">
+		<table width="100%" cellspacing="0" cellpadding="0">
+			<tbody>
+				<tr>
+					<td dojoAttachPoint="screenshotTdNode" valign="top" width="1%">
+						<img dojoAttachPoint="thumbnailImageNode" dojoAttachEvent="onclick: onSelectDemo" />
+					</td>
+					<td dojoAttachPoint="summaryContainerNode" valign="top">
+						<h1 dojoAttachPoint="nameNode">
+						</h1>
+						<div dojoAttachPoint="summaryNode">
+							<p dojoAttachPoint="descriptionNode"></p>
+							<div dojoAttachPoint="viewDemoLinkNode"><img dojoAttachPoint="viewDemoImageNode"/ dojoAttachEvent="onclick: onSelectDemo"></div>
+						</div>
+					</td>
+				</tr>
+			</tbody>
+		</table>
+	</div>
+</div>

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.css?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.css (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.css Mon Feb  5 21:01:25 2007
@@ -0,0 +1,5 @@
+.demoNavigatorListWrapper {border:1px solid #dcdbdb;background-color:#f8f8f8;padding:2px;}
+.demoNavigatorListContainer {border:1px solid #f0f0f0;background-color:#fff;padding:1em;}
+.demoNavigator h1 {margin-top: 0px;margin-bottom: 10px;font-size: 1.2em;border-bottom:1px dotted #a9ccf5;}
+.demoNavigator .dojoButton {margin-bottom: 5px;}
+.demoNavigator .dojoButton .dojoButtonContents {font-size: 1.1em;width: 100px;color: black;}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.html?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoNavigator.html Mon Feb  5 21:01:25 2007
@@ -0,0 +1,24 @@
+<div dojoAttachPoint="domNode">
+	<table width="100%" cellspacing="0" cellpadding="5">
+		<tbody>
+			<tr dojoAttachPoint="navigationContainer">
+				<td dojoAttachPoint="categoriesNode" valign="top" width="1%">
+					<h1>${this.messages.categories}</h1>
+					<div dojoAttachPoint="categoriesButtonsNode"></div>
+				</td>
+
+				<td dojoAttachPoint="demoListNode" valign="top">
+					<div dojoAttachPoint="demoListWrapperNode">
+						<div dojoAttachPoint="demoListContainerNode">
+						</div>
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					<div dojoAttachPoint="demoNode"></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+</div>

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.css?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.css (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.css Mon Feb  5 21:01:25 2007
@@ -0,0 +1,2 @@
+.demoPane {width: 100%;height: 100%;padding: 0px;margin: 0px;overflow: hidden;}
+.demoPane iframe {width: 100%;height: 100%;border: 0px;border: none;overflow: auto;padding: 0px;margin:0px;background: #ffffff;}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.html?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/DemoPane.html Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+<div dojoAttachPoint="domNode">
+	<iframe dojoAttachPoint="demoNode"></iframe>
+</div>

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.css?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.css (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.css Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+.sourcePane {width: 100%;height: 100%;padding: 0px;margin: 0px;overflow: hidden;}
+.sourcePane textarea{width: 100%;height: 100%;border: 0px;overflow: auto;padding: 0px;margin:0px;}
+* html .sourcePane {overflow: auto;}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.html?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/SourcePane.html Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+<div dojoAttachPoint="domNode">
+	<textarea dojoAttachPoint="sourceNode" rows="100%"></textarea>
+</div>

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/general.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/general.css?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/general.css (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/general.css Mon Feb  5 21:01:25 2007
@@ -0,0 +1,13 @@
+.demoListWrapper {border:1px solid #dcdbdb;background-color:#f8f8f8;padding:2px;}
+.demoListContainer {border:1px solid #f0f0f0;background-color:#fff;padding:1em;}
+.demoSummaryBox {background: #efefef;border:1px solid #dae3ee;}
+.screenshot {padding:0.65em;width:175px;border-right:1px solid #fafafa;text-align:center;}
+.demoSummary {margin-bottom:1em;}
+.demoSummary a:link, .demoSummary a:visited {color:#a6238f;text-decoration:none;}
+.summaryContainer {border-left:1px solid #ddd;}
+.summaryContainer h1 {background-color:#e8e8e8;border-bottom: 1px solid #e6e6e6;color:#738fb9;margin:1px;padding:0.5em;font-family:"Lucida Grande", "Tahoma", serif;font-size:1.25em;font-weight:normal;}
+.summaryContainer h1 .packageSummary {display:block;color:#000;font-size:10px;margin-top:2px;}
+.summaryContainer .summary {padding:1em;}
+.summaryContainer .summary p {font-size:0.85em;padding:0;margin:0;}
+.reflection {background: url("images/demoBoxReflection.gif") repeat-x top left;height:25px;}
+.view {text-align:right;}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/images/test_thumb.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/images/test_thumb.gif?view=auto&rev=503984
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/images/test_thumb.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/images/viewDemo.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/images/viewDemo.png?view=auto&rev=503984
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/demoEngine/templates/images/viewDemo.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/html/layout.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/html/layout.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/html/layout.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/html/layout.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,20 @@
+
+dojo.provide("dojo.widget.html.layout");dojo.require("dojo.lang.common");dojo.require("dojo.string.extras");dojo.require("dojo.html.style");dojo.require("dojo.html.layout");dojo.widget.html.layout = function( container,  children,  layoutPriority) {dojo.html.addClass(container, "dojoLayoutContainer");children = dojo.lang.filter(children, function(child, idx){child.idx = idx;return dojo.lang.inArray(["top","bottom","left","right","client","flood"], child.layoutAlign)
+});if(layoutPriority && layoutPriority!="none"){var rank = function(child){switch(child.layoutAlign){case "flood":
+return 1;case "left":
+case "right":
+return (layoutPriority=="left-right") ? 2 : 3;case "top":
+case "bottom":
+return (layoutPriority=="left-right") ? 3 : 2;default:
+return 4;}};children.sort(function(a,b){return (rank(a)-rank(b)) || (a.idx - b.idx);});}
+var f={top: dojo.html.getPixelValue(container, "padding-top", true),left: dojo.html.getPixelValue(container, "padding-left", true)
+};dojo.lang.mixin(f, dojo.html.getContentBox(container));dojo.lang.forEach(children, function(child){var elm=child.domNode;var pos=child.layoutAlign;with(elm.style){left = f.left+"px";top = f.top+"px";bottom = "auto";right = "auto";}
+dojo.html.addClass(elm, "dojoAlign" + dojo.string.capitalize(pos));if ( (pos=="top")||(pos=="bottom") ) {dojo.html.setMarginBox(elm, { width: f.width });var h = dojo.html.getMarginBox(elm).height;f.height -= h;if(pos=="top"){f.top += h;}else{elm.style.top = f.top + f.height + "px";}
+if(child.onResized){child.onResized();}}else if(pos=="left" || pos=="right"){var w = dojo.html.getMarginBox(elm).width;if(child.resizeTo){child.resizeTo(w, f.height);}else{dojo.html.setMarginBox(elm, { width: w, height: f.height });}
+f.width -= w;if(pos=="left"){f.left += w;}else{elm.style.left = f.left + f.width + "px";}} else if(pos=="flood" || pos=="client"){if(child.resizeTo){child.resizeTo(f.width, f.height);}else{dojo.html.setMarginBox(elm, { width: f.width, height: f.height });}}
+});};dojo.html.insertCssText(
+".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n" +
+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n" +
+"body .dojoAlignClient { position: absolute }\n" +
+".dojoAlignClient { overflow: auto; }\n"
+);
\ No newline at end of file