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 [13/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/Clock.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Clock.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Clock.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Clock.js Thu Dec 14 07:45:13 2006
@@ -1,18 +1,24 @@
 
 dojo.provide("dojo.widget.Clock");dojo.require("dojo.widget.*");dojo.require("dojo.gfx.*");dojo.require("dojo.uri.Uri");dojo.require("dojo.lang.common");dojo.require("dojo.lang.timing.Timer");dojo.widget.defineWidget(
-"dojo.widget.Clock",dojo.widget.HtmlWidget,function(){var self=this;this.timeZoneOffset=0;this.label="";this.date=new Date();this.handColor="#788598";this.handStroke="#6f7b8c";this.secondHandColor=[201, 4, 5, 0.8];this.topLabelColor="#efefef";this.labelColor="#fff";this.timer = new dojo.lang.timing.Timer(1000);this.center={ x:75, y:75 };this.hands={hour:null,minute:null,second:null};this.shadows={hour:{ shadow:null, shift:{ dx:2, dy:2}},minute:{ shadow:null, shift:{ dx:2, dy:3}},second:{ shadow:null, shift:{ dx:4, dy:4}}};this.image = dojo.uri.dojoUri("src/widget/templates/images/clock.png");this.surface=null;this.labelNode=null;this.topLabelNode=null;this.draw=function(){self.date=new Date();var h=(self.date.getHours()+self.timeZoneOffset) % 12;var m=self.date.getMinutes();var s=self.date.getSeconds();self.placeHour(h, m, s);self.placeMinute(m, s);self.placeSecond(s);self.topLabelNode.innerHTML=((self.date.getHours()+self.timeZoneOffset)>11)?"PM":"AM";};this.timer.onTick=se
 lf.draw;},{set:function(dt){this.date=dt;if(!this.timer.isRunning){this.draw();}},start:function(){this.timer.start(); },stop:function(){this.timer.stop(); },_initPoly:function(parent, points){var path = parent.createPath();var first = true;dojo.lang.forEach(points, function(c){if(first){path.moveTo(c.x, c.y);first=false;} else {path.lineTo(c.x, c.y);}});return path;},_placeHand:function(shape, angle, shift){var move = { dx:this.center.x + (shift?shift.dx:0), dy:this.center.y+(shift?shift.dy:0) };return shape.setTransform([move, dojo.gfx.matrix.rotateg(-angle)]);},placeHour:function(h, m, s){var angle=30 *(h + m/60 + s/3600);this._placeHand(this.hands.hour, angle);this._placeHand(this.shadows.hour.shadow, angle, this.shadows.hour.shift);},placeMinute:function(m, s){var angle=6 * (m + s/60);this._placeHand(this.hands.minute, angle);this._placeHand(this.shadows.minute.shadow, angle, this.shadows.minute.shift);},placeSecond:function(s){var angle=6 * s;this._placeHand(this.hands
 .second, angle);this._placeHand(this.shadows.second.shadow, angle, this.shadows.second.shift);},init:function(){if(this.domNode.style.position != "absolute"){this.domNode.style.position = "relative";}
+"dojo.widget.Clock",dojo.widget.HtmlWidget,function(){var self=this;this.timeZoneOffset=0;this.label="";this.date=new Date();this.handColor="#788598";this.handStroke="#6f7b8c";this.secondHandColor=[201, 4, 5, 0.8];this.topLabelColor="#efefef";this.labelColor="#fff";this.timer = new dojo.lang.timing.Timer(1000);this.center={ x:75, y:75 };this.hands={hour:null,minute:null,second:null
+};this.shadows={hour:{ shadow:null, shift:{ dx:2, dy:2}},minute:{ shadow:null, shift:{ dx:2, dy:3}},second:{ shadow:null, shift:{ dx:4, dy:4}}
+};this.image = dojo.uri.dojoUri("src/widget/templates/images/clock.png");this.surface=null;this.labelNode=null;this.topLabelNode=null;this.draw=function(){self.date=new Date();var h=(self.date.getHours()+self.timeZoneOffset) % 12;var m=self.date.getMinutes();var s=self.date.getSeconds();self.placeHour(h, m, s);self.placeMinute(m, s);self.placeSecond(s);self.topLabelNode.innerHTML=((self.date.getHours()+self.timeZoneOffset)>11)?"PM":"AM";};this.timer.onTick=self.draw;},{set:function(dt){this.date=dt;if(!this.timer.isRunning){this.draw();}},start:function(){this.timer.start(); 
+},stop:function(){this.timer.stop(); 
+},_initPoly:function(parent, points){var path = parent.createPath();var first = true;dojo.lang.forEach(points, function(c){if(first){path.moveTo(c.x, c.y);first=false;} else {path.lineTo(c.x, c.y);}});return path;},_placeHand:function(shape, angle, shift){var move = { dx:this.center.x + (shift?shift.dx:0), dy:this.center.y+(shift?shift.dy:0) };return shape.setTransform([move, dojo.gfx.matrix.rotateg(-angle)]);},placeHour:function(h, m, s){var angle=30 *(h + m/60 + s/3600);this._placeHand(this.hands.hour, angle);this._placeHand(this.shadows.hour.shadow, angle, this.shadows.hour.shift);},placeMinute:function(m, s){var angle=6 * (m + s/60);this._placeHand(this.hands.minute, angle);this._placeHand(this.shadows.minute.shadow, angle, this.shadows.minute.shift);},placeSecond:function(s){var angle=6 * s;this._placeHand(this.hands.second, angle);this._placeHand(this.shadows.second.shadow, angle, this.shadows.second.shift);},init:function(){if(this.domNode.style.position != "absolute"
 ){this.domNode.style.position = "relative";}
 while(this.domNode.childNodes.length>0){this.domNode.removeChild(this.domNode.childNodes[0]);}
 this.domNode.style.width="150px";this.domNode.style.height="150px";this.surface=dojo.gfx.createSurface(this.domNode, 150, 150);this.surface.createRect({width: 150, height: 150});this.surface.createImage({width: 150, height: 150, src: this.image+""});var hP=[ {x: -3, y: -4}, {x: 3, y: -4}, {x: 1, y: -27}, { x:-1, y:-27}, {x: -3, y: -4} ];var mP=[ {x: -3, y: -4}, {x: 3, y: -4}, {x: 1, y: -38}, {x:-1, y:-38}, {x: -3, y: -4} ];var sP=[ {x: -2, y: -2}, {x: 2, y: -2}, {x: 1, y: -45}, {x: -1, y: -45}, {x: -2, y: -2} ];this.shadows.hour.shadow = this._initPoly(this.surface, hP)
 .setFill([0, 0, 0, 0.1]);this.hands.hour = this._initPoly(this.surface, hP)
 .setStroke({color: this.handStroke, width:1 })
 .setFill({type:"linear", 
 x1:0, y1:0, x2:0, y2:-27, 
-colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]});this.shadows.minute.shadow = this._initPoly(this.surface, mP)
+colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]
+});this.shadows.minute.shadow = this._initPoly(this.surface, mP)
 .setFill([0, 0, 0, 0.1]);this.hands.minute = this._initPoly(this.surface, mP)
 .setStroke({color: this.handStroke, width:1 })
 .setFill({type:"linear", 
 x1:0, y1:0, x2:0, y2:-38, 
-colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]});this.surface.createCircle({r: 6})
+colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]
+});this.surface.createCircle({r: 6})
 .setStroke({color: this.handStroke, width:2 })
 .setFill("#fff")
 .setTransform({dx: 75, dy: 75});this.shadows.second.shadow = this._initPoly(this.surface, sP)

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ColorPalette.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ColorPalette.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ColorPalette.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ColorPalette.js Thu Dec 14 07:45:13 2006
@@ -1,8 +1,10 @@
 
 dojo.provide("dojo.widget.ColorPalette");dojo.require("dojo.widget.*");dojo.require("dojo.html.layout");dojo.require("dojo.html.display");dojo.require("dojo.html.selection");dojo.widget.defineWidget(
-"dojo.widget.ColorPalette",dojo.widget.HtmlWidget,{palette: "7x10",_palettes: {"7x10": [["fff", "fcc", "fc9", "ff9", "ffc", "9f9", "9ff", "cff", "ccf", "fcf"],["ccc", "f66", "f96", "ff6", "ff3", "6f9", "3ff", "6ff", "99f", "f9f"],["c0c0c0", "f00", "f90", "fc6", "ff0", "3f3", "6cc", "3cf", "66c", "c6c"],["999", "c00", "f60", "fc3", "fc0", "3c0", "0cc", "36f", "63f", "c3c"],["666", "900", "c60", "c93", "990", "090", "399", "33f", "60c", "939"],["333", "600", "930", "963", "660", "060", "366", "009", "339", "636"],["000", "300", "630", "633", "330", "030", "033", "006", "309", "303"]],"3x4": [["ffffff", "00ff00", "008000", "0000ff"],["c0c0c0", "ffff00", "ff00ff", "000080"],["808080", "ff0000", "800080", "000000"]]},buildRendering: function () {this.domNode = document.createElement("table");dojo.html.disableSelection(this.domNode);dojo.event.connect(this.domNode, "onmousedown", function (e) {e.preventDefault();});with (this.domNode) {cellPadding = "0"; cellSpacing = "1"; border 
 = "1";style.backgroundColor = "white";}
+"dojo.widget.ColorPalette",dojo.widget.HtmlWidget,{palette: "7x10",_palettes: {"7x10": [["fff", "fcc", "fc9", "ff9", "ffc", "9f9", "9ff", "cff", "ccf", "fcf"],["ccc", "f66", "f96", "ff6", "ff3", "6f9", "3ff", "6ff", "99f", "f9f"],["c0c0c0", "f00", "f90", "fc6", "ff0", "3f3", "6cc", "3cf", "66c", "c6c"],["999", "c00", "f60", "fc3", "fc0", "3c0", "0cc", "36f", "63f", "c3c"],["666", "900", "c60", "c93", "990", "090", "399", "33f", "60c", "939"],["333", "600", "930", "963", "660", "060", "366", "009", "339", "636"],["000", "300", "630", "633", "330", "030", "033", "006", "309", "303"]],"3x4": [["ffffff", "00ff00", "008000", "0000ff"],["c0c0c0", "ffff00", "ff00ff", "000080"],["808080", "ff0000", "800080", "000000"]]
+},buildRendering: function () {this.domNode = document.createElement("table");dojo.html.disableSelection(this.domNode);dojo.event.connect(this.domNode, "onmousedown", function (e) {e.preventDefault();});with (this.domNode) {cellPadding = "0"; cellSpacing = "1"; border = "1";style.backgroundColor = "white";}
 var colors = this._palettes[this.palette];for (var i = 0; i < colors.length; i++) {var tr = this.domNode.insertRow(-1);for (var j = 0; j < colors[i].length; j++) {if (colors[i][j].length == 3) {colors[i][j] = colors[i][j].replace(/(.)(.)(.)/, "$1$1$2$2$3$3");}
 var td = tr.insertCell(-1);with (td.style) {backgroundColor = "#" + colors[i][j];border = "1px solid gray";width = height = "15px";fontSize = "1px";}
 td.color = "#" + colors[i][j];td.onmouseover = function (e) { this.style.borderColor = "white"; }
 td.onmouseout = function (e) { this.style.borderColor = "gray"; }
-dojo.event.connect(td, "onmousedown", this, "onClick");td.innerHTML = "&nbsp;";}}},onClick: function( e) {this.onColorSelect(e.currentTarget.color);e.currentTarget.style.borderColor = "gray";},onColorSelect: function(color){}});
\ No newline at end of file
+dojo.event.connect(td, "onmousedown", this, "onClick");td.innerHTML = "&nbsp;";}}
+},onClick: function( e) {this.onColorSelect(e.currentTarget.color);e.currentTarget.style.borderColor = "gray";},onColorSelect: function(color){}});
\ No newline at end of file

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ComboBox.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ComboBox.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ComboBox.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ComboBox.js Thu Dec 14 07:45:13 2006
@@ -3,23 +3,29 @@
 "dojo.widget.incrementalComboBoxDataProvider",null,function(options){this.searchUrl = options.dataUrl;this._cache = {};this._inFlight = false;this._lastRequest = null;this.allowCache = false;},{_addToCache: function( keyword,  data){if(this.allowCache){this._cache[keyword] = data;}},startSearch: function( searchStr,  callback){if(this._inFlight){}
 var tss = encodeURIComponent(searchStr);var realUrl = dojo.string.substituteParams(this.searchUrl, {"searchString": tss});var _this = this;var request = this._lastRequest = dojo.io.bind({url: realUrl,method: "get",mimetype: "text/json",load: function(type, data, evt){_this._inFlight = false;if(!dojo.lang.isArray(data)){var arrData = [];for(var key in data){arrData.push([data[key], key]);}
 data = arrData;}
-_this._addToCache(searchStr, data);if (request == _this._lastRequest){callback(data);}}});this._inFlight = true;}}
+_this._addToCache(searchStr, data);if (request == _this._lastRequest){callback(data);}}
+});this._inFlight = true;}}
 );dojo.declare(
 "dojo.widget.basicComboBoxDataProvider",null,function( options,  node){this._data = [];this.searchLimit = 30;this.searchType = "STARTSTRING";this.caseSensitive = false;if(!dj_undef("dataUrl", options) && !dojo.string.isBlank(options.dataUrl)){this._getData(options.dataUrl);}else{if((node)&&(node.nodeName.toLowerCase() == "select")){var opts = node.getElementsByTagName("option");var ol = opts.length;var data = [];for(var x=0; x<ol; x++){var text = opts[x].textContent || opts[x].innerText || opts[x].innerHTML;var keyValArr = [String(text), String(opts[x].value)];data.push(keyValArr);if(opts[x].selected){options.setAllValues(keyValArr[0], keyValArr[1]);}}
-this.setData(data);}}},{_getData: function( url){dojo.io.bind({url: url,load: dojo.lang.hitch(this, function(type, data, evt){if(!dojo.lang.isArray(data)){var arrData = [];for(var key in data){arrData.push([data[key], key]);}
+this.setData(data);}}
+},{_getData: function( url){dojo.io.bind({url: url,load: dojo.lang.hitch(this, function(type, data, evt){if(!dojo.lang.isArray(data)){var arrData = [];for(var key in data){arrData.push([data[key], key]);}
 data = arrData;}
-this.setData(data);}),mimetype: "text/json"});},startSearch: function( searchStr,  callback){this._performSearch(searchStr, callback);},_performSearch: function( searchStr,  callback){var st = this.searchType;var ret = [];if(!this.caseSensitive){searchStr = searchStr.toLowerCase();}
+this.setData(data);}),mimetype: "text/json"
+});},startSearch: function( searchStr,  callback){this._performSearch(searchStr, callback);},_performSearch: function( searchStr,  callback){var st = this.searchType;var ret = [];if(!this.caseSensitive){searchStr = searchStr.toLowerCase();}
 for(var x=0; x<this._data.length; x++){if((this.searchLimit > 0)&&(ret.length >= this.searchLimit)){break;}
 var dataLabel = new String((!this.caseSensitive) ? this._data[x][0].toLowerCase() : this._data[x][0]);if(dataLabel.length < searchStr.length){continue;}
 if(st == "STARTSTRING"){if(searchStr == dataLabel.substr(0, searchStr.length)){ret.push(this._data[x]);}}else if(st == "SUBSTRING"){if(dataLabel.indexOf(searchStr) >= 0){ret.push(this._data[x]);}}else if(st == "STARTWORD"){var idx = dataLabel.indexOf(searchStr);if(idx == 0){ret.push(this._data[x]);}
 if(idx <= 0){continue;}
 var matches = false;while(idx!=-1){if(" ,/(".indexOf(dataLabel.charAt(idx-1)) != -1){matches = true; break;}
 idx = dataLabel.indexOf(searchStr, idx+1);}
-if(!matches){continue;}else{ret.push(this._data[x]);}}}
+if(!matches){continue;}else{ret.push(this._data[x]);}}
+}
 callback(ret);},setData: function( pdata){this._data = pdata;}}
 );dojo.widget.defineWidget(
-"dojo.widget.ComboBox",dojo.widget.HtmlWidget,{forceValidOption: false,searchType: "stringstart",dataProvider: null,autoComplete: true,searchDelay: 100,dataUrl: "",fadeTime: 200,maxListLength: 8,mode: "local",selectedResult: null,dataProviderClass: "",buttonSrc: dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"),dropdownToggle: "fade",templatePath: dojo.uri.dojoUri("src/widget/templates/ComboBox.html"),templateCssPath: dojo.uri.dojoUri("src/widget/templates/ComboBox.css"),setValue: function( value){this.comboBoxValue.value = value;if (this.textInputNode.value != value){this.textInputNode.value = value;dojo.widget.html.stabile.setState(this.widgetId, this.getState(), true);this.onValueChanged(value);}},onValueChanged: function( value){},getValue: function(){return this.comboBoxValue.value;},getState: function(){return {value: this.getValue()};},setState: function( state){this.setValue(state.value);},enable:function(){this.disabled=false;this.textInputNode.rem
 oveAttribute("disabled");},disable: function(){this.disabled = true;this.textInputNode.setAttribute("disabled",true);},_getCaretPos: function( element){if(dojo.lang.isNumber(element.selectionStart)){return element.selectionStart;}else if(dojo.render.html.ie){var tr = document.selection.createRange().duplicate();var ntr = element.createTextRange();tr.move("character",0);ntr.move("character",0);try {ntr.setEndPoint("EndToEnd", tr);return String(ntr.text).replace(/\r/g,"").length;} catch (e){return 0;}}},_setCaretPos: function( element,  location){location = parseInt(location);this._setSelectedRange(element, location, location);},_setSelectedRange: function( element,  start,  end){if(!end){ end = element.value.length; }
-if(element.setSelectionRange){element.focus();element.setSelectionRange(start, end);}else if(element.createTextRange){var range = element.createTextRange();with(range){collapse(true);moveEnd('character', end);moveStart('character', start);select();}}else{element.value = element.value;element.blur();element.focus();var dist = parseInt(element.value.length)-end;var tchar = String.fromCharCode(37);var tcc = tchar.charCodeAt(0);for(var x = 0; x < dist; x++){var te = document.createEvent("KeyEvents");te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc);element.dispatchEvent(te);}}},_handleKeyEvents: function( evt){if(evt.ctrlKey || evt.altKey || !evt.key){ return; }
+"dojo.widget.ComboBox",dojo.widget.HtmlWidget,{forceValidOption: false,searchType: "stringstart",dataProvider: null,autoComplete: true,searchDelay: 100,dataUrl: "",fadeTime: 200,maxListLength: 8,mode: "local",selectedResult: null,dataProviderClass: "",buttonSrc: dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"),dropdownToggle: "fade",templatePath: dojo.uri.dojoUri("src/widget/templates/ComboBox.html"),templateCssPath: dojo.uri.dojoUri("src/widget/templates/ComboBox.css"),setValue: function( value){this.comboBoxValue.value = value;if (this.textInputNode.value != value){this.textInputNode.value = value;dojo.widget.html.stabile.setState(this.widgetId, this.getState(), true);this.onValueChanged(value);}},onValueChanged: function( value){},getValue: function(){return this.comboBoxValue.value;},getState: function(){return {value: this.getValue()};},setState: function( state){this.setValue(state.value);},enable:function(){this.disabled=false;this.textInputNode.rem
 oveAttribute("disabled");},disable: function(){this.disabled = true;this.textInputNode.setAttribute("disabled",true);},_getCaretPos: function( element){if(dojo.lang.isNumber(element.selectionStart)){return element.selectionStart;}else if(dojo.render.html.ie){var tr = document.selection.createRange().duplicate();var ntr = element.createTextRange();tr.move("character",0);ntr.move("character",0);try {ntr.setEndPoint("EndToEnd", tr);return String(ntr.text).replace(/\r/g,"").length;} catch (e){return 0;}}
+},_setCaretPos: function( element,  location){location = parseInt(location);this._setSelectedRange(element, location, location);},_setSelectedRange: function( element,  start,  end){if(!end){ end = element.value.length; }
+if(element.setSelectionRange){element.focus();element.setSelectionRange(start, end);}else if(element.createTextRange){var range = element.createTextRange();with(range){collapse(true);moveEnd('character', end);moveStart('character', start);select();}}else{element.value = element.value;element.blur();element.focus();var dist = parseInt(element.value.length)-end;var tchar = String.fromCharCode(37);var tcc = tchar.charCodeAt(0);for(var x = 0; x < dist; x++){var te = document.createEvent("KeyEvents");te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc);element.dispatchEvent(te);}}
+},_handleKeyEvents: function( evt){if(evt.ctrlKey || evt.altKey || !evt.key){ return; }
 this._prev_key_backspace = false;this._prev_key_esc = false;var k = dojo.event.browser.keys;var doSearch = true;switch(evt.key){case k.KEY_DOWN_ARROW:
 if(!this.popupWidget.isShowingNow){this._startSearchFromInput();}
 this._highlightNextOption();dojo.event.browser.stopEvent(evt);return;case k.KEY_UP_ARROW:
@@ -45,10 +51,11 @@
 this._blurOptionNode();},onResize: function(){var inputSize = dojo.html.getContentBox(this.textInputNode);if( inputSize.height <= 0 ){dojo.lang.setTimeout(this, "onResize", 100);return;}
 var buttonSize = { width: inputSize.height, height: inputSize.height};dojo.html.setContentBox(this.downArrowNode, buttonSize);},fillInTemplate: function( args,  frag){dojo.html.applyBrowserClass(this.domNode);var source = this.getFragNodeRef(frag);if (! this.name && source.name){ this.name = source.name; }
 this.comboBoxValue.name = this.name;this.comboBoxSelectionValue.name = this.name+"_selected";dojo.html.copyStyle(this.domNode, source);dojo.html.copyStyle(this.textInputNode, source);dojo.html.copyStyle(this.downArrowNode, source);with (this.downArrowNode.style){width = "0px";height = "0px";}
-var dpClass;if(this.dataProviderClass){if(typeof this.dataProviderClass == "string"){dpClass = dojo.evalObjPath(this.dataProviderClass)}else{dpClass = this.dataProviderClass;}}else{if(this.mode == "remote"){dpClass = dojo.widget.incrementalComboBoxDataProvider;}else{dpClass = dojo.widget.basicComboBoxDataProvider;}}
+var dpClass;if(this.dataProviderClass){if(typeof this.dataProviderClass == "string"){dpClass = dojo.evalObjPath(this.dataProviderClass)
+}else{dpClass = this.dataProviderClass;}}else{if(this.mode == "remote"){dpClass = dojo.widget.incrementalComboBoxDataProvider;}else{dpClass = dojo.widget.basicComboBoxDataProvider;}}
 this.dataProvider = new dpClass(this, this.getFragNodeRef(frag));this.popupWidget = new dojo.widget.createWidget("PopupContainer",{toggle: this.dropdownToggle, toggleDuration: this.toggleDuration});dojo.event.connect(this, 'destroy', this.popupWidget, 'destroy');this.optionsListNode = this.popupWidget.domNode;this.domNode.appendChild(this.optionsListNode);dojo.html.addClass(this.optionsListNode, 'dojoComboBoxOptions');dojo.event.connect(this.optionsListNode, 'onclick', this, '_selectOption');dojo.event.connect(this.optionsListNode, 'onmouseover', this, '_onMouseOver');dojo.event.connect(this.optionsListNode, 'onmouseout', this, '_onMouseOut');dojo.event.connect(this.optionsListNode, "onmouseover", this, "_itemMouseOver");dojo.event.connect(this.optionsListNode, "onmouseout", this, "_itemMouseOut");},_openResultList: function( results){if (this.disabled){return;}
 this._clearResultList();if(!results.length){this._hideResultList();}
-if(	(this.autoComplete)&&
+if((this.autoComplete)&&
 (results.length)&&
 (!this._prev_key_backspace)&&
 (this.textInputNode.value.length > 0)){var cpos = this._getCaretPos(this.textInputNode);if((cpos+1) > this.textInputNode.value.length){this.textInputNode.value += results[0][0].substr(cpos);this._setSelectedRange(this.textInputNode, cpos, this.textInputNode.value.length);}}
@@ -58,7 +65,8 @@
 return (input == result);},_isValidOption: function(){var tgt = dojo.html.firstElement(this.optionsListNode);var isValidOption = false;while(!isValidOption && tgt){if(this._isInputEqualToResult(tgt.getAttribute("resultName"))){isValidOption = true;}else{tgt = dojo.html.nextElement(tgt);}}
 return isValidOption;},_checkBlurred: function(){if(!this._hasFocus && !this._mouseover_list){this._hideResultList();if(!this.textInputNode.value.length){this.setAllValues("", "");return;}
 var isValidOption = this._isValidOption();if(this.forceValidOption && !isValidOption){this.setAllValues("", "");return;}
-if(!isValidOption){this.setSelectedValue("");}}},_selectOption: function( evt){var tgt = null;if(!evt){evt = { target: this._highlighted_option };}
+if(!isValidOption){this.setSelectedValue("");}}
+},_selectOption: function( evt){var tgt = null;if(!evt){evt = { target: this._highlighted_option };}
 if(!dojo.html.isDescendantOf(evt.target, this.optionsListNode)){if(!this.textInputNode.value.length){return;}
 tgt = dojo.html.firstElement(this.optionsListNode);if(!tgt || !this._isInputEqualToResult(tgt.getAttribute("resultName"))){return;}}else{tgt = evt.target;}
 while((tgt.nodeType!=1)||(!tgt.getAttribute("resultName"))){tgt = tgt.parentNode;if(tgt === dojo.body()){return false;}}
@@ -67,5 +75,6 @@
 {display = "";if(visibleCount == childs.length){height = "";}else{height = visibleCount * dojo.html.getMarginBox(childs[0]).height +"px";}
 width = (dojo.html.getMarginBox(this.domNode).width-2)+"px";}
 this.popupWidget.open(this.domNode, this, this.downArrowNode);}else{this._hideResultList();}},handleArrowClick: function(){this._handleBlurTimer(true, 0);this._tryFocus();if(this.popupWidget.isShowingNow){this._hideResultList();}else{this._startSearch("");}},_tryFocus: function(){try {this.textInputNode.focus();} catch (e){};},_startSearchFromInput: function(){this._startSearch(this.textInputNode.value);},_startSearch: function( key){this.dataProvider.startSearch(key, dojo.lang.hitch(this, "_openResultList"));},postCreate: function(){this.onResize();dojo.event.connect(this.textInputNode, "onblur", this, "_onBlurInput");dojo.event.connect(this.textInputNode, "onfocus", this, "_onFocusInput");if (this.disabled){this.disable();}
-var s = dojo.widget.html.stabile.getState(this.widgetId);if (s){this.setState(s);}}}
+var s = dojo.widget.html.stabile.getState(this.widgetId);if (s){this.setState(s);}}
+}
 );

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ContentPane.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ContentPane.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ContentPane.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ContentPane.js Thu Dec 14 07:45:13 2006
@@ -1,11 +1,13 @@
 
 dojo.provide("dojo.widget.ContentPane");dojo.require("dojo.widget.*");dojo.require("dojo.io.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.string");dojo.require("dojo.string.extras");dojo.require("dojo.html.style");dojo.widget.defineWidget(
-"dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){this._styleNodes =  [];this._onLoadStack = [];this._onUnloadStack = [];this._callOnUnload = false;this._ioBindObj;this.scriptScope;this.bindArgs = {};}, {isContainer: true,adjustPaths: true,href: "",extractContent: true,parseContent:	true,cacheContent:	true,preload: false,refreshOnShow: false,handler: "",executeScripts: false,scriptSeparation: true,loadingMessage: "Loading...",isLoaded: false,postCreate: function(args, frag, parentComp){if (this.handler!==""){this.setHandler(this.handler);}
+"dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){this._styleNodes =  [];this._onLoadStack = [];this._onUnloadStack = [];this._callOnUnload = false;this._ioBindObj;this.scriptScope;this.bindArgs = {};}, {isContainer: true,adjustPaths: true,href: "",extractContent: true,parseContent:true,cacheContent:true,preload: false,refreshOnShow: false,handler: "",executeScripts: false,scriptSeparation: true,loadingMessage: "Loading...",isLoaded: false,postCreate: function(args, frag, parentComp){if (this.handler!==""){this.setHandler(this.handler);}
 if(this.isShowing() || this.preload){this.loadContents();}},show: function(){if(this.refreshOnShow){this.refresh();}else{this.loadContents();}
 dojo.widget.ContentPane.superclass.show.call(this);},refresh: function(){this.isLoaded=false;this.loadContents();},loadContents: function() {if ( this.isLoaded ){return;}
 if ( dojo.lang.isFunction(this.handler)) {this._runHandler();} else if ( this.href != "" ) {this._downloadExternalContent(this.href, this.cacheContent && !this.refreshOnShow);}},setUrl: function( url) {this.href = url;this.isLoaded = false;if ( this.preload || this.isShowing() ){this.loadContents();}},abort: function(){var bind = this._ioBindObj;if(!bind || !bind.abort){ return; }
 bind.abort();delete this._ioBindObj;},_downloadExternalContent: function(url, useCache) {this.abort();this._handleDefaults(this.loadingMessage, "onDownloadStart");var self = this;this._ioBindObj = dojo.io.bind(
-this._cacheSetting({url: url,mimetype: "text/html",handler: function(type, data, xhr){delete self._ioBindObj;if(type=="load"){self.onDownloadEnd.call(self, url, data);}else{var e = {responseText: xhr.responseText,status: xhr.status,statusText: xhr.statusText,responseHeaders: xhr.getAllResponseHeaders(),text: "Error loading '" + url + "' (" + xhr.status + " "+  xhr.statusText + ")"};self._handleDefaults.call(self, e, "onDownloadError");self.onLoad();}}}, useCache)
+this._cacheSetting({url: url,mimetype: "text/html",handler: function(type, data, xhr){delete self._ioBindObj;if(type=="load"){self.onDownloadEnd.call(self, url, data);}else{var e = {responseText: xhr.responseText,status: xhr.status,statusText: xhr.statusText,responseHeaders: xhr.getAllResponseHeaders(),text: "Error loading '" + url + "' (" + xhr.status + " "+  xhr.statusText + ")"
+};self._handleDefaults.call(self, e, "onDownloadError");self.onLoad();}}
+}, useCache)
 );},_cacheSetting: function(bindObj, useCache){for(var x in this.bindArgs){if(dojo.lang.isUndefined(bindObj[x])){bindObj[x] = this.bindArgs[x];}}
 if(dojo.lang.isUndefined(bindObj.useCache)){ bindObj.useCache = useCache; }
 if(dojo.lang.isUndefined(bindObj.preventCache)){ bindObj.preventCache = !useCache; }
@@ -21,7 +23,8 @@
 alert(e.toString()); break;case "debug":
 dojo.debug(e.toString()); break;default:
 if(this._callOnUnload){ this.onUnload(); }
-this._callOnUnload = false;if(arguments.callee._loopStop){dojo.debug(e.toString());}else{arguments.callee._loopStop = true;this._setContent(e.toString());}}}
+this._callOnUnload = false;if(arguments.callee._loopStop){dojo.debug(e.toString());}else{arguments.callee._loopStop = true;this._setContent(e.toString());}}
+}
 arguments.callee._loopStop = false;},splitAndFixPaths: function(s, url){var titles = [], scripts = [],tmp = [];var match = [], requires = [], attr = [], styles = [];var str = '', path = '', fix = '', tagFix = '', tag = '', origPath = '';if(!url) { url = "./"; }
 if(s){var regex = /<title[^>]*>([\s\S]*?)<\/title>/i;while(match = regex.exec(s)){titles.push(match[1]);s = s.substring(0, match.index) + s.substr(match.index + match[0].length);};if(this.adjustPaths){var regexFindTag = /<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;var regexFindAttr = /\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;var regexProtocols = /^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;while(tag = regexFindTag.exec(s)){str += s.substring(0, tag.index);s = s.substring((tag.index + tag[0].length), s.length);tag = tag[0];tagFix = '';while(attr = regexFindAttr.exec(tag)){path = ""; origPath = attr[3];switch(attr[1].toLowerCase()){case "src":// falltrough
 case "href":
@@ -33,7 +36,8 @@
 str += tagFix + tag;}
 s = str+s;}
 regex = /(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;while(match = regex.exec(s)){if(match[1] && match[1].toLowerCase() == "style"){styles.push(dojo.html.fixPathsInCssText(match[2],url));}else if(attr = match[3].match(/href=(['"]?)([^'">]*)\1/i)){styles.push({path: attr[2]});}
-s = s.substring(0, match.index) + s.substr(match.index + match[0].length);};var regex = /<script([^>]*)>([\s\S]*?)<\/script>/i;var regexSrc = /src=(['"]?)([^"']*)\1/i;var regexDojoJs = /.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;var regexInvalid = /(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;var regexRequires = /dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;while(match = regex.exec(s)){if(this.executeScripts && match[1]){if(attr = regexSrc.exec(match[1])){if(regexDojoJs.exec(attr[2])){dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");}else{scripts.push({path: attr[2]});}}}
+s = s.substring(0, match.index) + s.substr(match.index + match[0].length);};var regex = /<script([^>]*)>([\s\S]*?)<\/script>/i;var regexSrc = /src=(['"]?)([^"']*)\1/i;var regexDojoJs = /.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;var regexInvalid = /(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;var regexRequires = /dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;while(match = regex.exec(s)){if(this.executeScripts && match[1]){if(attr = regexSrc.exec(match[1])){if(regexDojoJs.exec(attr[2])){dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");}else{scripts.push({path: attr[2]});}}
+}
 if(match[2]){var sc = match[2].replace(regexInvalid, "");if(!sc){ continue; }
 while(tmp = regexRequires.exec(sc)){requires.push(tmp[0]);sc = sc.substring(0, tmp.index) + sc.substr(tmp.index + tmp[0].length);}
 if(this.executeScripts){scripts.push(sc);}}
@@ -42,17 +46,22 @@
 if(this.executeScripts && this.scriptSeparation){var regex = /(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;var regexAttr = /([\s'";:\(])scriptScope(.*)/;str = "";while(tag = regex.exec(s)){tmp = ((tag[3]=="'") ? '"': "'");fix= "";str += s.substring(0, tag.index) + tag[1];while(attr = regexAttr.exec(tag[2])){tag[2] = tag[2].substring(0, attr.index) + attr[1] + "dojo.widget.byId("+ tmp + this.widgetId + tmp + ").scriptScope" + attr[2];}
 str += tag[2];s = s.substr(tag.index + tag[0].length);}
 s = str + s;}}
-return {"xml": 		s,"styles":		styles,"titles": 		titles,"requires": 	requires,"scripts": 		scripts,"url": 			url};},_setContent: function(cont){this.destroyChildren();for(var i = 0; i < this._styleNodes.length; i++){if(this._styleNodes[i] && this._styleNodes[i].parentNode){this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);}}
+return {"xml": s,"styles":styles,"titles": titles,"requires": requires,"scripts": scripts,"url": url};},_setContent: function(cont){this.destroyChildren();for(var i = 0; i < this._styleNodes.length; i++){if(this._styleNodes[i] && this._styleNodes[i].parentNode){this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);}}
 this._styleNodes = [];try{var node = this.containerNode || this.domNode;while(node.firstChild){dojo.html.destroyNode(node.firstChild);}
 if(typeof cont != "string"){node.appendChild(cont);}else{node.innerHTML = cont;}}catch(e){e.text = "Couldn't load content:"+e.description;this._handleDefaults(e, "onContentError");}},setContent: function(data){this.abort();if(this._callOnUnload){ this.onUnload(); }
 this._callOnUnload = true;if(!data || dojo.html.isNode(data)){this._setContent(data);this.onResized();this.onLoad();}else{if(typeof data.xml != "string"){this.href = "";data = this.splitAndFixPaths(data);}
 this._setContent(data.xml);for(var i = 0; i < data.styles.length; i++){if(data.styles[i].path){this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path, dojo.doc(), false, true));}else{this._styleNodes.push(dojo.html.insertCssText(data.styles[i]));}}
-if(this.parseContent){for(var i = 0; i < data.requires.length; i++){try{eval(data.requires[i]);} catch(e){e.text = "ContentPane: error in package loading calls, " + (e.description||e);this._handleDefaults(e, "onContentError", "debug");}}}
+if(this.parseContent){for(var i = 0; i < data.requires.length; i++){try{eval(data.requires[i]);} catch(e){e.text = "ContentPane: error in package loading calls, " + (e.description||e);this._handleDefaults(e, "onContentError", "debug");}}
+}
 var _self = this;function asyncParse(){if(_self.executeScripts){_self._executeScripts(data.scripts);}
 if(_self.parseContent){var node = _self.containerNode || _self.domNode;var parser = new dojo.xml.Parse();var frag = parser.parseElement(node, null, true);dojo.widget.getParser().createSubComponents(frag, _self);}
 _self.onResized();_self.onLoad();}
-if(dojo.hostenv.isXDomain && data.requires.length){dojo.addOnLoad(asyncParse);}else{asyncParse();}}},setHandler: function( handler) {var fcn = dojo.lang.isFunction(handler) ? handler : window[handler];if(!dojo.lang.isFunction(fcn)) {this._handleDefaults("Unable to set handler, '" + handler + "' not a function.", "onExecError", true);return;}
+if(dojo.hostenv.isXDomain && data.requires.length){dojo.addOnLoad(asyncParse);}else{asyncParse();}}
+},setHandler: function( handler) {var fcn = dojo.lang.isFunction(handler) ? handler : window[handler];if(!dojo.lang.isFunction(fcn)) {this._handleDefaults("Unable to set handler, '" + handler + "' not a function.", "onExecError", true);return;}
 this.handler = function() {return fcn.apply(this, arguments);}},_runHandler: function() {var ret = true;if(dojo.lang.isFunction(this.handler)) {this.handler(this, this.domNode);ret = false;}
-this.onLoad();return ret;},_executeScripts: function(scripts) {var self = this;var tmp = "", code = "";for(var i = 0; i < scripts.length; i++){if(scripts[i].path){dojo.io.bind(this._cacheSetting({"url": 		scripts[i].path,"load":     function(type, scriptStr){dojo.lang.hitch(self, tmp = ";"+scriptStr);},"error":    function(type, error){error.text = type + " downloading remote script";self._handleDefaults.call(self, error, "onExecError", "debug");},"mimetype": "text/plain","sync":     true}, this.cacheContent));code += tmp;}else{code += scripts[i];}}
-try{if(this.scriptSeparation){delete this.scriptScope;this.scriptScope = new (new Function('_container_', code+'; return this;'))(self);}else{var djg = dojo.global();if(djg.execScript){djg.execScript(code);}else{var djd = dojo.doc();var sc = djd.createElement("script");sc.appendChild(djd.createTextNode(code));(this.containerNode||this.domNode).appendChild(sc);}}}catch(e){e.text = "Error running scripts from content:\n"+e.description;this._handleDefaults(e, "onExecError", "debug");}}}
+this.onLoad();return ret;},_executeScripts: function(scripts) {var self = this;var tmp = "", code = "";for(var i = 0; i < scripts.length; i++){if(scripts[i].path){dojo.io.bind(this._cacheSetting({"url": scripts[i].path,"load":     function(type, scriptStr){dojo.lang.hitch(self, tmp = ";"+scriptStr);},"error":    function(type, error){error.text = type + " downloading remote script";self._handleDefaults.call(self, error, "onExecError", "debug");},"mimetype": "text/plain","sync":     true
+}, this.cacheContent));code += tmp;}else{code += scripts[i];}}
+try{if(this.scriptSeparation){delete this.scriptScope;this.scriptScope = new (new Function('_container_', code+'; return this;'))(self);}else{var djg = dojo.global();if(djg.execScript){djg.execScript(code);}else{var djd = dojo.doc();var sc = djd.createElement("script");sc.appendChild(djd.createTextNode(code));(this.containerNode||this.domNode).appendChild(sc);}}
+}catch(e){e.text = "Error running scripts from content:\n"+e.description;this._handleDefaults(e, "onExecError", "debug");}}
+}
 );

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DatePicker.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DatePicker.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DatePicker.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DatePicker.js Thu Dec 14 07:45:13 2006
@@ -1,7 +1,8 @@
 
 dojo.provide("dojo.widget.DatePicker");dojo.require("dojo.date.common");dojo.require("dojo.date.format");dojo.require("dojo.date.serialize");dojo.require("dojo.widget.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.event.*");dojo.require("dojo.dom");dojo.require("dojo.html.style");dojo.widget.defineWidget(
-"dojo.widget.DatePicker",dojo.widget.HtmlWidget,{value: "",name: "",displayWeeks: 6,adjustWeeks: false,startDate: "1492-10-12",endDate: "2941-10-12",weekStartsOn: "",staticDisplay: false,dayWidth: 'narrow',classNames: {previous: "previousMonth",disabledPrevious: "previousMonthDisabled",current: "currentMonth",disabledCurrent: "currentMonthDisabled",next: "nextMonth",disabledNext: "nextMonthDisabled",currentDate: "currentDate",selectedDate: "selectedItem"},templatePath:  dojo.uri.dojoUri("src/widget/templates/DatePicker.html"),templateCssPath:  dojo.uri.dojoUri("src/widget/templates/DatePicker.css"),postMixInProperties: function(){dojo.widget.DatePicker.superclass.postMixInProperties.apply(this, arguments);this.startDate = dojo.date.fromRfc3339(this.startDate);this.endDate = dojo.date.fromRfc3339(this.endDate);this.startDate.setHours(0,0,0,0);this.endDate.setHours(24,0,0,-1);if(!this.weekStartsOn){this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang);}
-this.today = new Date();this.today.setHours(0,0,0,0);if(typeof(this.value)=='string'&&this.value.toLowerCase()=='today'){this.value = new Date();}else if(this.value && (typeof this.value=="string") && (this.value.split("-").length > 2)) {this.value = dojo.date.fromRfc3339(this.value);this.value.setHours(0,0,0,0);}},fillInTemplate: function(args, frag) {dojo.widget.DatePicker.superclass.fillInTemplate.apply(this, arguments);var source = this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode, source);this.weekTemplate = dojo.dom.removeNode(this.calendarWeekTemplate);this._preInitUI(this.value ? this.value : this.today, false, true);var dayLabels = dojo.lang.unnest(dojo.date.getNames('days', this.dayWidth, 'standAlone', this.lang));if(this.weekStartsOn > 0){for(var i=0;i<this.weekStartsOn;i++){dayLabels.push(dayLabels.shift());}}
+"dojo.widget.DatePicker",dojo.widget.HtmlWidget,{value: "",name: "",displayWeeks: 6,adjustWeeks: false,startDate: "1492-10-12",endDate: "2941-10-12",weekStartsOn: "",staticDisplay: false,dayWidth: 'narrow',classNames: {previous: "previousMonth",disabledPrevious: "previousMonthDisabled",current: "currentMonth",disabledCurrent: "currentMonthDisabled",next: "nextMonth",disabledNext: "nextMonthDisabled",currentDate: "currentDate",selectedDate: "selectedItem"
+},templatePath:  dojo.uri.dojoUri("src/widget/templates/DatePicker.html"),templateCssPath:  dojo.uri.dojoUri("src/widget/templates/DatePicker.css"),postMixInProperties: function(){dojo.widget.DatePicker.superclass.postMixInProperties.apply(this, arguments);this.startDate = dojo.date.fromRfc3339(this.startDate);this.endDate = dojo.date.fromRfc3339(this.endDate);this.startDate.setHours(0,0,0,0);this.endDate.setHours(24,0,0,-1);if(!this.weekStartsOn){this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang);}
+this.today = new Date();this.today.setHours(0,0,0,0);if(typeof(this.value)=='string'&&this.value.toLowerCase()=='today'){this.value = new Date();}else if(this.value && (typeof this.value=="string") && (this.value.split("-").length > 2)) {this.value = dojo.date.fromRfc3339(this.value);this.value.setHours(0,0,0,0);}},fillInTemplate: function(args, frag) {dojo.widget.DatePicker.superclass.fillInTemplate.apply(this, arguments);var source = this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode, source);this.weekTemplate = dojo.dom.removeNode(this.calendarWeekTemplate);this._preInitUI(this.value ? this.value : this.today, false, true);var dayLabels = dojo.lang.unnest(dojo.date.getNames('days', this.dayWidth, 'standAlone', this.lang));if(this.weekStartsOn>0){for(var i=0;i<this.weekStartsOn;i++){dayLabels.push(dayLabels.shift());}}
 var dayLabelNodes = this.dayLabelsRow.getElementsByTagName("td");for(i=0; i<7; i++) {dayLabelNodes.item(i).innerHTML = dayLabels[i];}
 if(this.value){this.setValue(this.value);}},getValue: function() {return dojo.date.toRfc3339(new Date(this.value),'dateOnly');},getDate: function() {return this.value;},setValue: function(rfcDate) {this.setDate(rfcDate);},setDate: function(dateObj) {if(typeof dateObj=="string"){this.value = dojo.date.fromRfc3339(dateObj);}else{this.value = new Date(dateObj);}
 this.value.setHours(0,0,0,0);if(this.selectedNode!=null){dojo.html.removeClass(this.selectedNode,this.classNames.selectedDate);}
@@ -11,7 +12,7 @@
 var days = this.displayWeeks*7;if(dojo.date.diff(this.startDate,this.endDate, dojo.date.dateParts.DAY) < days){this.staticDisplay = true;if(dojo.date.diff(nextDate,this.endDate, dojo.date.dateParts.DAY) > days){this._preInitUI(this.startDate,true,false);nextDate = new Date(this.firstDay);}
 this.curMonth = new Date(nextDate);this.curMonth.setDate(nextDate.getDate()+6);this.curMonth.setDate(1);var curClass = (nextDate.getMonth() == this.curMonth.getMonth())?'current':'previous';}
 if(initUI){this._initUI(days);}},_initUI: function(days) {dojo.dom.removeChildren(this.calendarDatesContainerNode);for(var i=0;i<this.displayWeeks;i++){this.calendarDatesContainerNode.appendChild(this.weekTemplate.cloneNode(true));}
-var nextDate = new Date(this.firstDay);this._setMonthLabel(this.curMonth.getMonth());this._setYearLabels(this.curMonth.getFullYear());var calendarNodes = this.calendarDatesContainerNode.getElementsByTagName("td");var calendarRows = this.calendarDatesContainerNode.getElementsByTagName("tr");var currentCalendarNode;for(i=0;i<days;i++){currentCalendarNode = calendarNodes.item(i);currentCalendarNode.innerHTML = nextDate.getDate();var curClass = (nextDate.getMonth()<this.curMonth.getMonth())?'previous':(nextDate.getMonth()==this.curMonth.getMonth())?'current':'next';var mappedClass = curClass;if(this._isDisabledDate(nextDate)){var classMap={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};mappedClass=classMap[curClass];}
+var nextDate = new Date(this.firstDay);this._setMonthLabel(this.curMonth.getMonth());this._setYearLabels(this.curMonth.getFullYear());var calendarNodes = this.calendarDatesContainerNode.getElementsByTagName("td");var calendarRows = this.calendarDatesContainerNode.getElementsByTagName("tr");var currentCalendarNode;for(i=0;i<days;i++){currentCalendarNode = calendarNodes.item(i);currentCalendarNode.innerHTML = nextDate.getDate();currentCalendarNode.setAttribute("djDateValue",nextDate.valueOf());var curClass = (nextDate.getMonth() != this.curMonth.getMonth() && Number(nextDate) < Number(this.curMonth))?'previous':(nextDate.getMonth()==this.curMonth.getMonth())?'current':'next';var mappedClass = curClass;if(this._isDisabledDate(nextDate)){var classMap={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};mappedClass=classMap[curClass];}
 dojo.html.setClass(currentCalendarNode, this._getDateClassName(nextDate, mappedClass));if(dojo.html.hasClass(currentCalendarNode,this.classNames.selectedDate)){this.selectedNode = currentCalendarNode;}
 nextDate = dojo.date.add(nextDate, dojo.date.dateParts.DAY, 1);}
 this.lastDay = dojo.date.add(nextDate,dojo.date.dateParts.DAY,-1);this._initControls();},_initControls: function(){var d = this.firstDay;var d2 = this.lastDay;var decWeek, incWeek, decMonth, incMonth, decYear, incYear;decWeek = incWeek = decMonth = incMonth = decYear = incYear = !this.staticDisplay;with(dojo.date.dateParts){var add = dojo.date.add;if(decWeek && add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){decWeek = decMonth = decYear = false;}
@@ -47,8 +48,8 @@
 f("previous");f("current");f("next");},_getDateClassName: function(date, monthState) {var currentClassName = this.classNames[monthState];if ((!this.selectedIsUsed && this.value) && (Number(date) == Number(this.value))) {currentClassName = this.classNames.selectedDate + " " + currentClassName;this.selectedIsUsed = true;}
 if((!this.currentIsUsed) && (Number(date) == Number(this.today))) {currentClassName = currentClassName + " "  + this.classNames.currentDate;this.currentIsUsed = true;}
 return currentClassName;},onClick: function(evt) {dojo.event.browser.stopEvent(evt);},_handleUiClick: function(evt) {var eventTarget = evt.target;if(eventTarget.nodeType != dojo.dom.ELEMENT_NODE){eventTarget = eventTarget.parentNode;}
-dojo.event.browser.stopEvent(evt);this.selectedIsUsed = this.todayIsUsed = false;var month = this.curMonth.getMonth();var year = this.curMonth.getFullYear();if(dojo.html.hasClass(eventTarget, this.classNames["disabledPrevious"])||dojo.html.hasClass(eventTarget, this.classNames["disabledCurrent"])||dojo.html.hasClass(eventTarget, this.classNames["disabledNext"])){return;}else if (dojo.html.hasClass(eventTarget, this.classNames["next"])) {month = ++month % 12;if(month===0){++year;}} else if (dojo.html.hasClass(eventTarget, this.classNames["previous"])) {month = --month % 12;if(month==11){--year;}}
-this.clickedNode = eventTarget;this.setDate(new Date(year, month, eventTarget.innerHTML));},onValueChanged: function(date) {},_isDisabledDate: function(dateObj){if(dateObj<this.startDate||dateObj>this.endDate){return true;}
+dojo.event.browser.stopEvent(evt);this.selectedIsUsed = this.todayIsUsed = false;var tmp = dojo.html.getAttribute(eventTarget,'djDateValue');var tmpDate = new Date(Number(tmp));var month = tmpDate.getMonth();var year = tmpDate.getFullYear();if(dojo.html.hasClass(eventTarget, this.classNames["disabledPrevious"])||dojo.html.hasClass(eventTarget, this.classNames["disabledCurrent"])||dojo.html.hasClass(eventTarget, this.classNames["disabledNext"])){return;}else if (dojo.html.hasClass(eventTarget, this.classNames["next"])) {month = ++month % 12;if(month===0){++year;}} else if (dojo.html.hasClass(eventTarget, this.classNames["previous"])) {month = --month % 12;if(month==11){--year;}}
+this.clickedNode = eventTarget;this.setDate(new Date(tmpDate));},onValueChanged: function(date) {},_isDisabledDate: function(dateObj){if(dateObj<this.startDate||dateObj>this.endDate){return true;}
 return this.isDisabledDate(dateObj, this.lang);},isDisabledDate: function(dateObj, locale){return false;},_initFirstDay: function(dateObj, adj){var d = new Date(dateObj);if(!adj){d.setDate(1);}
 d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));d.setHours(0,0,0,0);return d;},_getAdjustedDay: function(dateObj){var days = [0,1,2,3,4,5,6];if(this.weekStartsOn>0){for(var i=0;i<this.weekStartsOn;i++){days.unshift(days.pop());}}
 return days[dateObj.getDay()];},destroy: function(){dojo.widget.DatePicker.superclass.destroy.apply(this, arguments);dojo.html.destroyNode(this.weekTemplate);}}

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js Thu Dec 14 07:45:13 2006
@@ -1,6 +1,7 @@
 
 dojo.provide("dojo.widget.Dialog");dojo.require("dojo.widget.*");dojo.require("dojo.widget.ContentPane");dojo.require("dojo.event.*");dojo.require("dojo.gfx.color");dojo.require("dojo.html.layout");dojo.require("dojo.html.display");dojo.require("dojo.html.iframe");dojo.declare(
-"dojo.widget.ModalDialogBase",null,{isContainer: true,focusElement: "",bgColor: "black",bgOpacity: 0.4,followScroll: true,closeOnBackgroundClick: false,trapTabs: function( e){if(e.target == this.tabStartOuter) {if(this._fromTrap) {this.tabStart.focus();this._fromTrap = false;} else {this._fromTrap = true;this.tabEnd.focus();}} else if (e.target == this.tabStart) {if(this._fromTrap) {this._fromTrap = false;} else {this._fromTrap = true;this.tabEnd.focus();}} else if(e.target == this.tabEndOuter) {if(this._fromTrap) {this.tabEnd.focus();this._fromTrap = false;} else {this._fromTrap = true;this.tabStart.focus();}} else if(e.target == this.tabEnd) {if(this._fromTrap) {this._fromTrap = false;} else {this._fromTrap = true;this.tabStart.focus();}}},clearTrap: function( e) {var _this = this;setTimeout(function() {_this._fromTrap = false;}, 100);},postCreate: function() {with(this.domNode.style){position = "absolute";zIndex = 999;display = "none";overflow = "visible";}
+"dojo.widget.ModalDialogBase",null,{isContainer: true,focusElement: "",bgColor: "black",bgOpacity: 0.4,followScroll: true,closeOnBackgroundClick: false,trapTabs: function( e){if(e.target == this.tabStartOuter) {if(this._fromTrap) {this.tabStart.focus();this._fromTrap = false;} else {this._fromTrap = true;this.tabEnd.focus();}} else if (e.target == this.tabStart) {if(this._fromTrap) {this._fromTrap = false;} else {this._fromTrap = true;this.tabEnd.focus();}} else if(e.target == this.tabEndOuter) {if(this._fromTrap) {this.tabEnd.focus();this._fromTrap = false;} else {this._fromTrap = true;this.tabStart.focus();}} else if(e.target == this.tabEnd) {if(this._fromTrap) {this._fromTrap = false;} else {this._fromTrap = true;this.tabStart.focus();}}
+},clearTrap: function( e) {var _this = this;setTimeout(function() {_this._fromTrap = false;}, 100);},postCreate: function() {with(this.domNode.style){position = "absolute";zIndex = 999;display = "none";overflow = "visible";}
 var b = dojo.body();b.appendChild(this.domNode);this.bg = document.createElement("div");this.bg.className = "dialogUnderlay";with(this.bg.style){position = "absolute";left = top = "0px";zIndex = 998;display = "none";}
 b.appendChild(this.bg);this.setBackgroundColor(this.bgColor);this.bgIframe = new dojo.html.BackgroundIframe();if(this.bgIframe.iframe){with(this.bgIframe.iframe.style){position = "absolute";left = top = "0px";zIndex = 90;display = "none";}}
 if(this.closeOnBackgroundClick){dojo.event.kwConnect({srcObj: this.bg, srcFunc: "onclick",adviceObj: this, adviceFunc: "onBackgroundClick", once: true});}},uninitialize: function(){this.bgIframe.remove();dojo.html.removeNode(this.bg, true);},setBackgroundColor: function( color) {if(arguments.length >= 3) {color = new dojo.gfx.color.Color(arguments[0], arguments[1], arguments[2]);} else {color = new dojo.gfx.color.Color(color);}
@@ -13,7 +14,8 @@
 if(this.bgIframe.iframe){this.bgIframe.iframe.style.display = "block";}},placeModalDialog: function() {var scroll_offset = dojo.html.getScroll().offset;var viewport_size = dojo.html.getViewport();var mb;if(this.isShowing()){mb = dojo.html.getMarginBox(this.domNode);}else{dojo.html.setVisibility(this.domNode, false);dojo.html.show(this.domNode);mb = dojo.html.getMarginBox(this.domNode);dojo.html.hide(this.domNode);dojo.html.setVisibility(this.domNode, true);}
 var x = scroll_offset.x + (viewport_size.width - mb.width)/2;var y = scroll_offset.y + (viewport_size.height - mb.height)/2;with(this.domNode.style){left = x + "px";top = y + "px";}},_onKey: function( evt){if (evt.key){var node = evt.target;while (node != null){if (node == this.domNode){return;}
 node = node.parentNode;}
-if (evt.key != evt.KEY_TAB){dojo.event.browser.stopEvent(evt);}else if (!dojo.render.html.opera){try {this.tabStart.focus();} catch(e){}}}},showModalDialog: function() {if (this.followScroll && !this._scrollConnected){this._scrollConnected = true;dojo.event.connect(window, "onscroll", this, "_onScroll");}
+if (evt.key != evt.KEY_TAB){dojo.event.browser.stopEvent(evt);}else if (!dojo.render.html.opera){try {this.tabStart.focus();} catch(e){}}
+}},showModalDialog: function() {if (this.followScroll && !this._scrollConnected){this._scrollConnected = true;dojo.event.connect(window, "onscroll", this, "_onScroll");}
 dojo.event.connect("around", document.documentElement, "onkey", this, "_onKey");this.placeModalDialog();this.setBackgroundOpacity();this._sizeBackground();this._showBackground();this._fromTrap = true;setTimeout(dojo.lang.hitch(this, function(){try{this.tabStart.focus();}catch(e){}}), 50);},hideModalDialog: function(){if (this.focusElement) {dojo.byId(this.focusElement).focus();dojo.byId(this.focusElement).blur();}
 this.bg.style.display = "none";this.bg.style.width = this.bg.style.height = "1px";if(this.bgIframe.iframe){this.bgIframe.iframe.style.display = "none";}
 dojo.event.disconnect("around", document.documentElement, "onkey", this, "_onKey");if (this._scrollConnected){this._scrollConnected = false;dojo.event.disconnect(window, "onscroll", this, "_onScroll");}},_onScroll: function(){var scroll_offset = dojo.html.getScroll().offset;this.bg.style.top = scroll_offset.y + "px";this.bg.style.left = scroll_offset.x + "px";this.placeModalDialog();},checkSize: function() {if(this.isShowing()){this._sizeBackground();this.placeModalDialog();this.onResized();}},onBackgroundClick: function(){if(this.lifetime - this.timeRemaining >= this.blockDuration){ return; }
@@ -23,5 +25,6 @@
 if (this.timer) {clearInterval(this.timer);}
 this.timer = setInterval(dojo.lang.hitch(this, "_onTick"), 100);}
 this.showModalDialog();dojo.widget.Dialog.superclass.show.call(this);},onLoad: function(){this.placeModalDialog();dojo.widget.Dialog.superclass.onLoad.call(this);},fillInTemplate: function(){},hide: function(){this.hideModalDialog();dojo.widget.Dialog.superclass.hide.call(this);if(this.timer){clearInterval(this.timer);}},setTimerNode: function(node){this.timerNode = node;},setCloseControl: function( node) {this.closeNode = dojo.byId(node);dojo.event.connect(this.closeNode, "onclick", this, "hide");},setShowControl: function( node) {node = dojo.byId(node);dojo.event.connect(node, "onclick", this, "show");},_onTick: function(){if(this.timer){this.timeRemaining -= 100;if(this.lifetime - this.timeRemaining >= this.blockDuration){if(this.closeNode){this.closeNode.style.visibility = "visible";}}
-if(!this.timeRemaining){clearInterval(this.timer);this.hide();}else if(this.timerNode){this.timerNode.innerHTML = Math.ceil(this.timeRemaining/1000);}}}}
+if(!this.timeRemaining){clearInterval(this.timer);this.hide();}else if(this.timerNode){this.timerNode.innerHTML = Math.ceil(this.timeRemaining/1000);}}
+}}
 );

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DocPane.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DocPane.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DocPane.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DocPane.js Thu Dec 14 07:45:13 2006
@@ -1,7 +1,9 @@
 
 dojo.provide("dojo.widget.DocPane");dojo.require("dojo.widget.*");dojo.require("dojo.io.*");dojo.require("dojo.event.*");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.widget.Editor2");dojo.require("dojo.widget.Dialog");dojo.require("dojo.html.common");dojo.require("dojo.html.display");dojo.widget.DocPane = function(){dojo.event.topic.subscribe("/docs/function/results", this, "onDocResults");dojo.event.topic.subscribe("/docs/package/results", this, "onPkgResults");dojo.event.topic.subscribe("/docs/function/detail", this, "onDocSelectFunction");}
 dojo.widget.defineWidget(
-"dojo.widget.DocPane",dojo.widget.HtmlWidget,{dialog: null,dialogBg: null,dialogFg: null,logIn: null,edit: null,save: null,cancel: null,detail: null,result: null,packag: null,fn: null,fnLink: null,count: null,row: null,summary: null,description: null,variables: null,vRow: null,vLink: null,vDesc: null,methods: null,mRow: null,mLink: null,mDesc: null,requires: null,rRow: null,rRow2: null,rH3: null,rLink: null,parameters: null,pRow: null,pLink: null,pDesc: null,pOpt: null,pType: null,sType: null,sName: null,sParams: null,sPType: null,sPTypeSave: null,sPName: null,sPNameSave: null,pkgDescription: null,_appends: [],templatePath: dojo.uri.dojoUri("src/widget/templates/DocPane.html"),templateCssPath: dojo.uri.dojoUri("src/widget/templates/DocPane.css"),isContainer: true,fillInTemplate: function(){this.requires = dojo.html.removeNode(this.requires);this.rRow.style.display = "none";this.rRow2.style.display = "none";this.methods = dojo.html.removeNode(this.methods);this.mRow.style.dis
 play = "none";this.dialog = dojo.widget.createWidget("dialog", {}, this.dialog);this.dialog.setCloseControl(this.cancel);dojo.html.setOpacity(this.dialogBg, 0.8);dojo.html.setOpacity(this.dialogFg, 1);dojo.event.connect(this.edit, "onclick", dojo.lang.hitch(this, function(){if(!this._isLoggedIn){this.dialog.show();}}));dojo.event.connect(this.logIn, "onclick", this, "_logIn");dojo.event.connect(this.save, "onclick", this, "_save");dojo.event.connect(dojo.docs, "logInSuccess", this, "_loggedIn");this.homeSave = this.containerNode.cloneNode(true);this.detailSave = dojo.html.removeNode(this.detail);this.resultSave = dojo.html.removeNode(this.result);this.packageSave = dojo.html.removeNode(this.packag);this.results = dojo.html.removeNode(this.results);this.rowParent = this.row.parentNode;this.rowSave = dojo.html.removeNode(this.row);this.vParent = this.vRow.parentNode;this.vSave = dojo.html.removeNode(this.vRow);this.pParent = this.pRow.parentNode;this.pSave = dojo.html.removeNo
 de(this.pRow);this.sPTypeSave = dojo.html.removeNode(this.sPType);this.sPNameSave = dojo.html.removeNode(this.sPName);this.navSave = dojo.html.removeNode(this.nav);},_logIn: function(){dojo.docs.setUserName(this.userName.value);dojo.docs.setPassword(this.password.value);},_loggedIn: function(){this._isLoggedIn = true;this.dialog.hide();this.pkgEditor = dojo.widget.createWidget("editor2", {toolbarAlwaysVisible: true}, this.pkgDescription);},_save: function(){if(this.pkgEditor){dojo.docs.savePackage(this._pkgPath, {description: this.pkgEditor.getEditorContent()});}},onDocSelectFunction: function(message){dojo.debug("onDocSelectFunction()");for(var key in message){dojo.debug(key + ": " + dojo.json.serialize(message[key]));}
+"dojo.widget.DocPane",dojo.widget.HtmlWidget,{dialog: null,dialogBg: null,dialogFg: null,logIn: null,edit: null,save: null,cancel: null,detail: null,result: null,packag: null,fn: null,fnLink: null,count: null,row: null,summary: null,description: null,variables: null,vRow: null,vLink: null,vDesc: null,methods: null,mRow: null,mLink: null,mDesc: null,requires: null,rRow: null,rRow2: null,rH3: null,rLink: null,parameters: null,pRow: null,pLink: null,pDesc: null,pOpt: null,pType: null,sType: null,sName: null,sParams: null,sPType: null,sPTypeSave: null,sPName: null,sPNameSave: null,pkgDescription: null,_appends: [],templatePath: dojo.uri.dojoUri("src/widget/templates/DocPane.html"),templateCssPath: dojo.uri.dojoUri("src/widget/templates/DocPane.css"),isContainer: true,fillInTemplate: function(){this.requires = dojo.html.removeNode(this.requires);this.rRow.style.display = "none";this.rRow2.style.display = "none";this.methods = dojo.html.removeNode(this.methods);this.mRow.style.dis
 play = "none";this.dialog = dojo.widget.createWidget("dialog", {}, this.dialog);this.dialog.setCloseControl(this.cancel);dojo.html.setOpacity(this.dialogBg, 0.8);dojo.html.setOpacity(this.dialogFg, 1);dojo.event.connect(this.edit, "onclick", dojo.lang.hitch(this, function(){if(!this._isLoggedIn){this.dialog.show();}}));dojo.event.connect(this.logIn, "onclick", this, "_logIn");dojo.event.connect(this.save, "onclick", this, "_save");dojo.event.connect(dojo.docs, "logInSuccess", this, "_loggedIn");this.homeSave = this.containerNode.cloneNode(true);this.detailSave = dojo.html.removeNode(this.detail);this.resultSave = dojo.html.removeNode(this.result);this.packageSave = dojo.html.removeNode(this.packag);this.results = dojo.html.removeNode(this.results);this.rowParent = this.row.parentNode;this.rowSave = dojo.html.removeNode(this.row);this.vParent = this.vRow.parentNode;this.vSave = dojo.html.removeNode(this.vRow);this.pParent = this.pRow.parentNode;this.pSave = dojo.html.removeNo
 de(this.pRow);this.sPTypeSave = dojo.html.removeNode(this.sPType);this.sPNameSave = dojo.html.removeNode(this.sPName);this.navSave = dojo.html.removeNode(this.nav);},_logIn: function(){dojo.docs.setUserName(this.userName.value);dojo.docs.setPassword(this.password.value);},_loggedIn: function(){this._isLoggedIn = true;this.dialog.hide();this.pkgEditor = dojo.widget.createWidget("editor2", {toolbarAlwaysVisible: true
+}, this.pkgDescription);},_save: function(){if(this.pkgEditor){dojo.docs.savePackage(this._pkgPath, {description: this.pkgEditor.getEditorContent()
+});}},onDocSelectFunction: function(message){dojo.debug("onDocSelectFunction()");for(var key in message){dojo.debug(key + ": " + dojo.json.serialize(message[key]));}
 var meta = message.meta;if(meta){var variables = meta.variables;var this_variables = meta.this_variables;var child_variables = meta.child_variables;var parameters = meta.parameters;}
 var doc = message.doc;dojo.debug(dojo.json.serialize(doc));var appends = this._appends;dojo.html.removeChildren(this.domNode);this.fn.innerHTML = message.name;this.variables.style.display = "block";var all = [];if(variables){all = variables;}
 if(this_variables){all = all.concat(this_variables);}
@@ -12,23 +14,27 @@
 this.pDesc.parentNode.style.display = "none";if(paramSummary){this.pDesc.parentNode.style.display = "inline";this.pDesc.innerHTML = paramSummary;}
 appends.push(this.pParent.appendChild(this.pSave.cloneNode(true)));if(!first) {this.sParams.appendChild(document.createTextNode(", "));}
 first = false;if(paramType){dojo.debug(this.sPTypeSave);this.sPTypeSave.innerHTML = paramType;this.sParams.appendChild(this.sPTypeSave.cloneNode(true));this.sParams.appendChild(document.createTextNode(" "));}
-dojo.debug(this.sPNameSave);this.sPNameSave.innerHTML = paramName;this.sParams.appendChild(this.sPNameSave.cloneNode(true))}
+dojo.debug(this.sPNameSave);this.sPNameSave.innerHTML = paramName;this.sParams.appendChild(this.sPNameSave.cloneNode(true))
+}
 if(message.returns){this.sType.innerHTML = message.returns;}else{this.sType.innerHTML = "void";}
 this.sName.innerHTML = message.name;this.domNode.appendChild(this.navSave);this.domNode.appendChild(this.detailSave.cloneNode(true));for(var i = 0, append; append = appends[i]; i++){dojo.html.removeNode(append);}},onPkgResult: function( results){if(this.pkgEditor){this.pkgEditor.close(true);dojo.debug(this.pkgDescription);}
 var methods = results.methods;var requires = results.requires;var description = results.description;this._pkgPath = results.path;var requireLinks = [];var appends = this._appends;while(appends.length){dojo.html.removeNode(appends.shift());}
 dojo.html.removeChildren(this.domNode);this.pkg.innerHTML = results.pkg;var hasRequires = false;for(var env in requires){hasRequires = true;this.rH3.style.display = "none";if(env != "common"){this.rH3.style.display = "";this.rH3.innerHTML = env;}
-for(var i = 0, require; require = requires[env][i]; i++){requireLinks.push({name: require});this.rLink.innerHTML = require;this.rLink.href = "#" + require;var rRow2 = this.rRow2.parentNode.insertBefore(this.rRow2.cloneNode(true), this.rRow2);rRow2.style.display = "";appends.push(rRow2);}
+for(var i = 0, require; require = requires[env][i]; i++){requireLinks.push({name: require
+});this.rLink.innerHTML = require;this.rLink.href = "#" + require;var rRow2 = this.rRow2.parentNode.insertBefore(this.rRow2.cloneNode(true), this.rRow2);rRow2.style.display = "";appends.push(rRow2);}
 var rRow = this.rRow.parentNode.insertBefore(this.rRow.cloneNode(true), this.rRow);rRow.style.display = "";appends.push(rRow);}
 if(hasRequires){appends.push(this.packageSave.appendChild(this.requires.cloneNode(true)));}
 if(results.size){for(var i = 0, method; method = methods[i]; i++){this.mLink.innerHTML = method.name;this.mLink.href = "#" + method.name;this.mDesc.parentNode.style.display = "none";if(method.summary){this.mDesc.parentNode.style.display = "inline";this.mDesc.innerHTML = method.summary;}
 var mRow = this.mRow.parentNode.insertBefore(this.mRow.cloneNode(true), this.mRow);mRow.style.display = "";appends.push(mRow);}
 appends.push(this.packageSave.appendChild(this.methods.cloneNode(true)));}
 this.domNode.appendChild(this.packageSave);this.pkgDescription.innerHTML = description;function makeSelect(fOrP, x){return function(e) {dojo.event.topic.publish("/docs/" + fOrP + "/select", x);}}
-var as = this.domNode.getElementsByTagName("a");for(var i = 0, a; a = as[i]; i++){if(a.className == "docMLink"){dojo.event.connect(a, "onclick", makeSelect("function", methods[i]));}else if(a.className == "docRLink"){dojo.event.connect(a, "onclick", makeSelect("package", requireLinks[i]));}}},onDocResults: function(fns){dojo.debug("onDocResults(): called");if(fns.length == 1){dojo.event.topic.publish("/docs/function/select", fns[0]);return;}
+var as = this.domNode.getElementsByTagName("a");for(var i = 0, a; a = as[i]; i++){if(a.className == "docMLink"){dojo.event.connect(a, "onclick", makeSelect("function", methods[i]));}else if(a.className == "docRLink"){dojo.event.connect(a, "onclick", makeSelect("package", requireLinks[i]));}}
+},onDocResults: function(fns){dojo.debug("onDocResults(): called");if(fns.length == 1){dojo.event.topic.publish("/docs/function/select", fns[0]);return;}
 dojo.html.removeChildren(this.domNode);this.count.innerHTML = fns.length;var appends = [];for(var i = 0, fn; fn = fns[i]; i++){this.fnLink.innerHTML = fn.name;this.fnLink.href = "#" + fn.name;if(fn.id){this.fnLink.href = this.fnLink.href + "," + fn.id;}
 this.summary.parentNode.style.display = "none";if(fn.summary){this.summary.parentNode.style.display = "inline";this.summary.innerHTML = fn.summary;}
 appends.push(this.rowParent.appendChild(this.rowSave.cloneNode(true)));}
 function makeSelect(x){return function(e) {dojo.event.topic.publish("/docs/function/select", x);}}
 this.domNode.appendChild(this.resultSave.cloneNode(true));var as = this.domNode.getElementsByTagName("a");for(var i = 0, a; a = as[i]; i++){dojo.event.connect(a, "onclick", makeSelect(fns[i]));}
-for(var i = 0, append; append = appends[i]; i++){this.rowParent.removeChild(append);}}}
+for(var i = 0, append; append = appends[i]; i++){this.rowParent.removeChild(append);}}
+}
 );

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DomWidget.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DomWidget.js?view=diff&rev=487242&r1=487241&r2=487242
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DomWidget.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/DomWidget.js Thu Dec 14 07:45:13 2006
@@ -1,12 +1,15 @@
 
-dojo.provide("dojo.widget.DomWidget");dojo.require("dojo.event.*");dojo.require("dojo.widget.Widget");dojo.require("dojo.dom");dojo.require("dojo.html.style");dojo.require("dojo.xml.Parse");dojo.require("dojo.uri.*");dojo.require("dojo.lang.func");dojo.require("dojo.lang.extras");dojo.widget._cssFiles = {};dojo.widget._cssStrings = {};dojo.widget._templateCache = {};dojo.widget.defaultStrings = {dojoRoot: dojo.hostenv.getBaseScriptUri(),baseScriptUri: dojo.hostenv.getBaseScriptUri()};dojo.widget.fillFromTemplateCache = function(obj, templatePath, templateString, avoidCache){var tpath = templatePath || obj.templatePath;var tmplts = dojo.widget._templateCache;if(!tpath && !obj["widgetType"]) {do {var dummyName = "__dummyTemplate__" + dojo.widget._templateCache.dummyCount++;} while(tmplts[dummyName]);obj.widgetType = dummyName;}
+dojo.provide("dojo.widget.DomWidget");dojo.require("dojo.event.*");dojo.require("dojo.widget.Widget");dojo.require("dojo.dom");dojo.require("dojo.html.style");dojo.require("dojo.xml.Parse");dojo.require("dojo.uri.*");dojo.require("dojo.lang.func");dojo.require("dojo.lang.extras");dojo.widget._cssFiles = {};dojo.widget._cssStrings = {};dojo.widget._templateCache = {};dojo.widget.defaultStrings = {dojoRoot: dojo.hostenv.getBaseScriptUri(),baseScriptUri: dojo.hostenv.getBaseScriptUri()
+};dojo.widget.fillFromTemplateCache = function(obj, templatePath, templateString, avoidCache){var tpath = templatePath || obj.templatePath;var tmplts = dojo.widget._templateCache;if(!tpath && !obj["widgetType"]) {do {var dummyName = "__dummyTemplate__" + dojo.widget._templateCache.dummyCount++;} while(tmplts[dummyName]);obj.widgetType = dummyName;}
 var wt = tpath?tpath.toString():obj.widgetType;var ts = tmplts[wt];if(!ts){tmplts[wt] = {"string": null, "node": null};if(avoidCache){ts = {};}else{ts = tmplts[wt];}}
 if((!obj.templateString)&&(!avoidCache)){obj.templateString = templateString || ts["string"];}
 if((!obj.templateNode)&&(!avoidCache)){obj.templateNode = ts["node"];}
 if((!obj.templateNode)&&(!obj.templateString)&&(tpath)){var tstring = dojo.hostenv.getText(tpath);if(tstring){tstring = tstring.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, "");var matches = tstring.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(matches){tstring = matches[1];}}else{tstring = "";}
 obj.templateString = tstring;if(!avoidCache){tmplts[wt]["string"] = tstring;}}
 if((!ts["string"])&&(!avoidCache)){ts.string = obj.templateString;}}
-dojo.widget._templateCache.dummyCount = 0;dojo.widget.attachProperties = ["dojoAttachPoint", "id"];dojo.widget.eventAttachProperty = "dojoAttachEvent";dojo.widget.onBuildProperty = "dojoOnBuild";dojo.widget.waiNames  = ["waiRole", "waiState"];dojo.widget.wai = {waiRole: {name: "waiRole","namespace": "http://www.w3.org/TR/xhtml2",alias: "x2",prefix: "wairole:"},waiState: {name: "waiState","namespace": "http://www.w3.org/2005/07/aaa",alias: "aaa",prefix: ""},setAttr: function(node,  ns,  attr, value){if(dojo.render.html.ie){node.setAttribute(this[ns].alias+":"+ attr, this[ns].prefix+value);}else{node.setAttributeNS(this[ns]["namespace"], attr, this[ns].prefix+value);}},getAttr: function( node,  ns,  attr){if(dojo.render.html.ie){return node.getAttribute(this[ns].alias+":"+attr);}else{return node.getAttributeNS(this[ns]["namespace"], attr);}},removeAttr: function( node,  ns,  attr){var success = true;if(dojo.render.html.ie){success = node.removeAttribute(this[ns].alias+":"+attr
 );}else{node.removeAttributeNS(this[ns]["namespace"], attr);}
+dojo.widget._templateCache.dummyCount = 0;dojo.widget.attachProperties = ["dojoAttachPoint", "id"];dojo.widget.eventAttachProperty = "dojoAttachEvent";dojo.widget.onBuildProperty = "dojoOnBuild";dojo.widget.waiNames  = ["waiRole", "waiState"];dojo.widget.wai = {waiRole: {name: "waiRole","namespace": "http://www.w3.org/TR/xhtml2",alias: "x2",prefix: "wairole:"
+},waiState: {name: "waiState","namespace": "http://www.w3.org/2005/07/aaa",alias: "aaa",prefix: ""
+},setAttr: function(node,  ns,  attr, value){if(dojo.render.html.ie){node.setAttribute(this[ns].alias+":"+ attr, this[ns].prefix+value);}else{node.setAttributeNS(this[ns]["namespace"], attr, this[ns].prefix+value);}},getAttr: function( node,  ns,  attr){if(dojo.render.html.ie){return node.getAttribute(this[ns].alias+":"+attr);}else{return node.getAttributeNS(this[ns]["namespace"], attr);}},removeAttr: function( node,  ns,  attr){var success = true;if(dojo.render.html.ie){success = node.removeAttribute(this[ns].alias+":"+attr);}else{node.removeAttributeNS(this[ns]["namespace"], attr);}
 return success;}};dojo.widget.attachTemplateNodes = function(rootNode,  targetObj, events ){var elementNodeType = dojo.dom.ELEMENT_NODE;function trim(str){return str.replace(/^\s+|\s+$/g, "");}
 if(!rootNode){rootNode = targetObj.domNode;}
 if(rootNode.nodeType != elementNodeType){return;}
@@ -18,20 +21,25 @@
 var tf = function(){var ntf = new String(thisFunc);return function(evt){if(_this[ntf]){_this[ntf](dojo.event.browser.fixEvent(evt, this));}};}();dojo.event.browser.addListener(baseNode, tevt, tf, false, true);}}
 for(var y=0; y<events.length; y++){var evtVal = baseNode.getAttribute(events[y]);if((evtVal)&&(evtVal.length)){var thisFunc = null;var domEvt = events[y].substr(4);thisFunc = trim(evtVal);var funcs = [thisFunc];if(thisFunc.indexOf(";")>=0){funcs = dojo.lang.map(thisFunc.split(";"), trim);}
 for(var z=0; z<funcs.length; z++){if(!funcs[z].length){ continue; }
-var tf = function(){var ntf = new String(funcs[z]);return function(evt){if(_this[ntf]){_this[ntf](dojo.event.browser.fixEvent(evt, this));}}}();dojo.event.browser.addListener(baseNode, domEvt, tf, false, true);}}}}
+var tf = function(){var ntf = new String(funcs[z]);return function(evt){if(_this[ntf]){_this[ntf](dojo.event.browser.fixEvent(evt, this));}}
+}();dojo.event.browser.addListener(baseNode, domEvt, tf, false, true);}}
+}}
 var tmpltPoint = baseNode.getAttribute(this.templateProperty);if(tmpltPoint){targetObj[tmpltPoint]=baseNode;}
-dojo.lang.forEach(dojo.widget.waiNames, function(name){var wai = dojo.widget.wai[name];var val = baseNode.getAttribute(wai.name);if(val){if(val.indexOf('-') == -1){dojo.widget.wai.setAttr(baseNode, wai.name, "role", val);}else{var statePair = val.split('-');dojo.widget.wai.setAttr(baseNode, wai.name, statePair[0], statePair[1]);}}}, this);var onBuild = baseNode.getAttribute(this.onBuildProperty);if(onBuild){eval("var node = baseNode; var widget = targetObj; "+onBuild);}}}
+dojo.lang.forEach(dojo.widget.waiNames, function(name){var wai = dojo.widget.wai[name];var val = baseNode.getAttribute(wai.name);if(val){if(val.indexOf('-') == -1){dojo.widget.wai.setAttr(baseNode, wai.name, "role", val);}else{var statePair = val.split('-');dojo.widget.wai.setAttr(baseNode, wai.name, statePair[0], statePair[1]);}}
+}, this);var onBuild = baseNode.getAttribute(this.onBuildProperty);if(onBuild){eval("var node = baseNode; var widget = targetObj; "+onBuild);}}
+}
 dojo.widget.getDojoEventsFromStr = function(str){var re = /(dojoOn([a-z]+)(\s?))=/gi;var evts = str ? str.match(re)||[] : [];var ret = [];var lem = {};for(var x=0; x<evts.length; x++){if(evts[x].length < 1){ continue; }
 var cm = evts[x].replace(/\s/, "");cm = (cm.slice(0, cm.length-1));if(!lem[cm]){lem[cm] = true;ret.push(cm);}}
 return ret;}
-dojo.declare("dojo.widget.DomWidget",dojo.widget.Widget,function(){if((arguments.length>0)&&(typeof arguments[0] == "object")){this.create(arguments[0]);}},{templateNode: null,templateString: null,templateCssString: null,preventClobber: false,domNode: null,containerNode: null,widgetsInTemplate: false,addChild: function(	widget, overrideContainerNode, pos, ref, insertIndex){if(!this.isContainer){dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");return null;}else{if(insertIndex == undefined){insertIndex = this.children.length;}
+dojo.declare("dojo.widget.DomWidget",dojo.widget.Widget,function(){if((arguments.length>0)&&(typeof arguments[0] == "object")){this.create(arguments[0]);}},{templateNode: null,templateString: null,templateCssString: null,preventClobber: false,domNode: null,containerNode: null,widgetsInTemplate: false,addChild: function(widget, overrideContainerNode, pos, ref, insertIndex){if(!this.isContainer){dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");return null;}else{if(insertIndex == undefined){insertIndex = this.children.length;}
 this.addWidgetAsDirectChild(widget, overrideContainerNode, pos, ref, insertIndex);this.registerChild(widget, insertIndex);}
-return widget;},addWidgetAsDirectChild: function(	widget, overrideContainerNode, pos, ref, insertIndex){if((!this.containerNode)&&(!overrideContainerNode)){this.containerNode = this.domNode;}
+return widget;},addWidgetAsDirectChild: function(widget, overrideContainerNode, pos, ref, insertIndex){if((!this.containerNode)&&(!overrideContainerNode)){this.containerNode = this.domNode;}
 var cn = (overrideContainerNode) ? overrideContainerNode : this.containerNode;if(!pos){ pos = "after"; }
 if(!ref){if(!cn){ cn = dojo.body(); }
 ref = cn.lastChild;}
 if(!insertIndex) { insertIndex = 0; }
-widget.domNode.setAttribute("dojoinsertionindex", insertIndex);if(!ref){cn.appendChild(widget.domNode);}else{if (pos == 'insertAtIndex'){dojo.dom.insertAtIndex(widget.domNode, ref.parentNode, insertIndex);}else{if((pos == "after")&&(ref === cn.lastChild)){cn.appendChild(widget.domNode);}else{dojo.dom.insertAtPosition(widget.domNode, cn, pos);}}}},registerChild: function(widget, insertionIndex){widget.dojoInsertionIndex = insertionIndex;var idx = -1;for(var i=0; i<this.children.length; i++){if (this.children[i].dojoInsertionIndex <= insertionIndex){idx = i;}}
+widget.domNode.setAttribute("dojoinsertionindex", insertIndex);if(!ref){cn.appendChild(widget.domNode);}else{if (pos == 'insertAtIndex'){dojo.dom.insertAtIndex(widget.domNode, ref.parentNode, insertIndex);}else{if((pos == "after")&&(ref === cn.lastChild)){cn.appendChild(widget.domNode);}else{dojo.dom.insertAtPosition(widget.domNode, cn, pos);}}
+}},registerChild: function(widget, insertionIndex){widget.dojoInsertionIndex = insertionIndex;var idx = -1;for(var i=0; i<this.children.length; i++){if (this.children[i].dojoInsertionIndex <= insertionIndex){idx = i;}}
 this.children.splice(idx+1, 0, widget);widget.parent = this;widget.addedTo(this, idx+1);delete dojo.widget.manager.topWidgets[widget.widgetId];},removeChild: function( widget){dojo.dom.removeNode(widget.domNode);return dojo.widget.DomWidget.superclass.removeChild.call(this, widget);},getFragNodeRef: function(frag){if(!frag){return null;}
 if(!frag[this.getNamespacedType()]){dojo.raise("Error: no frag for widget type " + this.getNamespacedType()
 + ", id " + this.widgetId
@@ -42,12 +50,16 @@
 if(subnodes[i].getAttribute('dojoType')){subnodes[i].setAttribute('isSubWidget', true);}}
 if (this.isContainer && !this.containerNode){if(subContainerNode){var src = this.getFragNodeRef(frag);if (src){dojo.dom.moveChildren(src, subContainerNode);frag['dojoDontFollow'] = true;}}else{dojo.debug("No subContainerWidget node can be found in template file for widget "+this);}}
 var templatefrag = parser.parseElement(this.domNode, null, true);dojo.widget.getParser().createSubComponents(templatefrag, this);var subwidgets = [];var stack = [this];var w;while((w = stack.pop())){for(var i = 0; i < w.children.length; i++){var cwidget = w.children[i];if(cwidget._processedSubWidgets || !cwidget.extraArgs['issubwidget']){ continue; }
-subwidgets.push(cwidget);if(cwidget.isContainer){stack.push(cwidget);}}}
+subwidgets.push(cwidget);if(cwidget.isContainer){stack.push(cwidget);}}
+}
 for(var i = 0; i < subwidgets.length; i++){var widget = subwidgets[i];if(widget._processedSubWidgets){dojo.debug("This should not happen: widget._processedSubWidgets is already true!");return;}
 widget._processedSubWidgets = true;if(widget.extraArgs['dojoattachevent']){var evts = widget.extraArgs['dojoattachevent'].split(";");for(var j=0; j<evts.length; j++){var thisFunc = null;var tevt = dojo.string.trim(evts[j]);if(tevt.indexOf(":") >= 0){var funcNameArr = tevt.split(":");tevt = dojo.string.trim(funcNameArr[0]);thisFunc = dojo.string.trim(funcNameArr[1]);}
 if(!thisFunc){thisFunc = tevt;}
-if(dojo.lang.isFunction(widget[tevt])){dojo.event.kwConnect({srcObj: widget,srcFunc: tevt,targetObj: this,targetFunc: thisFunc});}else{alert(tevt+" is not a function in widget "+widget);}}}
-if(widget.extraArgs['dojoattachpoint']){this[widget.extraArgs['dojoattachpoint']] = widget;}}}
+if(dojo.lang.isFunction(widget[tevt])){dojo.event.kwConnect({srcObj: widget,srcFunc: tevt,targetObj: this,targetFunc: thisFunc
+});}else{alert(tevt+" is not a function in widget "+widget);}}
+}
+if(widget.extraArgs['dojoattachpoint']){this[widget.extraArgs['dojoattachpoint']] = widget;}}
+}
 if(this.isContainer && !frag["dojoDontFollow"]){dojo.widget.getParser().createSubComponents(frag, this);}},buildRendering: function( args,  frag){var ts = dojo.widget._templateCache[this.widgetType];if(args["templatecsspath"]){args["templateCssPath"] = args["templatecsspath"];}
 var cpath = args["templateCssPath"] || this.templateCssPath;if(cpath && !dojo.widget._cssFiles[cpath.toString()]){if((!this.templateCssString)&&(cpath)){this.templateCssString = dojo.hostenv.getText(cpath);this.templateCssPath = null;}
 dojo.widget._cssFiles[cpath.toString()] = true;}
@@ -65,14 +77,18 @@
 )
 ){this.buildFromTemplate(args, frag);}else{this.domNode = this.getFragNodeRef(frag);}
 this.fillInTemplate(args, frag);},buildFromTemplate: function( args,  frag){var avoidCache = false;if(args["templatepath"]){args["templatePath"] = args["templatepath"];}
-dojo.widget.fillFromTemplateCache(	this,args["templatePath"],null,avoidCache);var ts = dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];if((ts)&&(!avoidCache)){if(!this.templateString.length){this.templateString = ts["string"];}
+dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,avoidCache);var ts = dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];if((ts)&&(!avoidCache)){if(!this.templateString.length){this.templateString = ts["string"];}
 if(!this.templateNode){this.templateNode = ts["node"];}}
 var matches = false;var node = null;var tstr = this.templateString;if((!this.templateNode)&&(this.templateString)){matches = this.templateString.match(/\$\{([^\}]+)\}/g);if(matches) {var hash = this.strings || {};for(var key in dojo.widget.defaultStrings) {if(dojo.lang.isUndefined(hash[key])) {hash[key] = dojo.widget.defaultStrings[key];}}
 for(var i = 0; i < matches.length; i++) {var key = matches[i];key = key.substring(2, key.length-1);var kval = (key.substring(0, 5) == "this.") ? dojo.lang.getObjPathValue(key.substring(5), this) : hash[key];var value;if((kval)||(dojo.lang.isString(kval))){value = new String((dojo.lang.isFunction(kval)) ? kval.call(this, key, this.templateString) : kval);while (value.indexOf("\"") > -1) {value=value.replace("\"","&quot;");}
-tstr = tstr.replace(matches[i], value);}}}else{this.templateNode = this.createNodesFromText(this.templateString, true)[0];if(!avoidCache){ts.node = this.templateNode;}}}
+tstr = tstr.replace(matches[i], value);}}
+}else{this.templateNode = this.createNodesFromText(this.templateString, true)[0];if(!avoidCache){ts.node = this.templateNode;}}
+}
 if((!this.templateNode)&&(!matches)){dojo.debug("DomWidget.buildFromTemplate: could not create template");return false;}else if(!matches){node = this.templateNode.cloneNode(true);if(!node){ return false; }}else{node = this.createNodesFromText(tstr, true)[0];}
-this.domNode = node;this.attachTemplateNodes();if (this.isContainer && this.containerNode){var src = this.getFragNodeRef(frag);if (src){dojo.dom.moveChildren(src, this.containerNode);}}},attachTemplateNodes: function(baseNode, targetObj){if(!baseNode){ baseNode = this.domNode; }
+this.domNode = node;this.attachTemplateNodes();if (this.isContainer && this.containerNode){var src = this.getFragNodeRef(frag);if (src){dojo.dom.moveChildren(src, this.containerNode);}}
+},attachTemplateNodes: function(baseNode, targetObj){if(!baseNode){ baseNode = this.domNode; }
 if(!targetObj){ targetObj = this; }
 return dojo.widget.attachTemplateNodes(baseNode, targetObj,dojo.widget.getDojoEventsFromStr(this.templateString));},fillInTemplate: function(){},destroyRendering: function(){try{dojo.dom.destroyNode(this.domNode);delete this.domNode;}catch(e){  }
-if(this._sourceNodeRef){try{dojo.dom.destroyNode(this._sourceNodeRef);}catch(e){  }}},createNodesFromText: function(){dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");}}
+if(this._sourceNodeRef){try{dojo.dom.destroyNode(this._sourceNodeRef);}catch(e){  }}
+},createNodesFromText: function(){dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");}}
 );