tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r498423 [22/30] - in /tapestry/tapestry4/trunk: .settings/ eclipse/ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-examples/TimeTracker/src/java/org/apache/tapestry/timetracker/dao/ tapestry-examples/TimeTracker/src/java/org/ap...
Date Sun, 21 Jan 2007 18:26:26 GMT
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,12 @@
+
+dojo.provide("dojo.widget.Repeater");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.string");dojo.require("dojo.event.*");dojo.require("dojo.experimental");dojo.experimental("dojo.widget.Repeater");dojo.widget.defineWidget("dojo.widget.Repeater", dojo.widget.HtmlWidget,{name: "",rowTemplate: "",myObject: null,pattern: "",useDnd: false,isContainer: true,initialize: function(args,frag) {var node = this.getFragNodeRef(frag);node.removeAttribute("dojotype");this.setRow(dojo.string.trim(node.innerHTML), {});node.innerHTML="";frag=null;},postCreate: function(args,frag){if (this.useDnd) {dojo.require("dojo.dnd.*");var dnd = new dojo.dnd.HtmlDropTarget(this.domNode, [this.widgetId]);}},_reIndexRows: function() {for(var i=0,len=this.domNode.childNodes.length; i<len;i++) {var elems = ["INPUT", "SELECT", "TEXTAREA"];for (var k=0; k < elems.length; k++) {var list = this.domNode.childNodes[i].getElementsByTagName(elems[k]);for (var j=0,len2=list.length; j<len2; j++) {var name 
 = list[j].name;var index=dojo.string.escape("regexp", this.pattern);index = index.replace(/(%\\\{index\\\})/g,"%{index}");var nameRegexp = dojo.string.substituteParams(index, {"index": "[0-9]*"});var newName= dojo.string.substituteParams(this.pattern, {"index": "" + i});var re=new RegExp(nameRegexp,"g");list[j].name = name.replace(re,newName);}}
+}},onDeleteRow: function(e) {var index=dojo.string.escape("regexp", this.pattern);index = index.replace(/%\\\{index\\\}/g,"\%{index}");var nameRegexp = dojo.string.substituteParams(index, {"index": "([0-9]*)"});var re=new RegExp(nameRegexp,"g");this.deleteRow(re.exec(e.target.name)[1]);},hasRows: function() {if (this.domNode.childNodes.length > 0) {return true;}
+return false;},getRowCount: function() {return this.domNode.childNodes.length;},deleteRow: function(idx) {this.domNode.removeChild(this.domNode.childNodes[idx]);this._reIndexRows();},_changeRowPosition: function(e) {if (e.dragStatus == "dropFailure") {this.domNode.removeChild(e["dragSource"].domNode);} else if (e.dragStatus == "dropSuccess") {}
+this._reIndexRows();},setRow: function(template, myObject) {template= template.replace(/\%\{(index)\}/g, "0");this.rowTemplate=template;this.myObject = myObject;},getRow: function() {return this.rowTemplate;},_initRow: function(node) {if (typeof(node) == "number") {node=this.domNode.childNodes[node];}
+var elems = ["INPUT", "SELECT", "IMG"];for (var k=0; k < elems.length; k++) {var list = node.getElementsByTagName(elems[k]);for(var i=0, len=list.length; i<len; i++) {var child = list[i];if(child.nodeType != 1) {continue};if (child.getAttribute("rowFunction") != null) {if(typeof(this.myObject[child.getAttribute("rowFunction")]) == "undefined") {dojo.debug("Function " + child.getAttribute("rowFunction") + " not found");} else {this.myObject[child.getAttribute("rowFunction")](child);}} else if (child.getAttribute("rowAction") != null) {if(child.getAttribute("rowAction") == "delete") {child.name=dojo.string.substituteParams(this.pattern, {"index": "" + (this.getRowCount() - 1)});dojo.event.connect(child, "onclick", this, "onDeleteRow");}}
+}}
+},onAddRow: function(e) {},addRow: function(doInit) {if (typeof(doInit) == "undefined") {doInit=true;}
+var node = document.createElement('span');node.innerHTML=this.getRow();if (node.childNodes.length == 1) {node=node.childNodes[0];}
+this.domNode.appendChild(node);var parser = new dojo.xml.Parse();var frag = parser.parseElement(node, null, true);dojo.widget.getParser().createSubComponents(frag, this);this._reIndexRows();if (doInit) {this._initRow(node);}
+if (this.useDnd) {node=new dojo.dnd.HtmlDragSource(node, this.widgetId);dojo.event.connect(node, "onDragEnd", this, "_changeRowPosition");}
+this.onAddRow(node);}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Repeater.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,17 @@
+
+dojo.provide("dojo.widget.ResizableTextarea");dojo.require("dojo.widget.*");dojo.require("dojo.widget.LayoutContainer");dojo.require("dojo.widget.ResizeHandle");dojo.require("dojo.i18n.common");dojo.requireLocalization("dojo.widget", "ResizableTextarea", null, "ROOT");dojo.widget.defineWidget(
+"dojo.widget.ResizableTextarea",dojo.widget.HtmlWidget,{templatePath: dojo.uri.moduleUri("dojo", "widget/templates/ResizableTextarea.html"),templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/ResizableTextarea.css"),postMixInProperties: function(){dojo.widget.HtmlWidget.superclass.postMixInProperties.apply(this, arguments);this.messages = dojo.i18n.getLocalization("dojo.widget", "ResizableTextarea", this.lang);},fillInTemplate: function(args, frag){this.textAreaNode = this.getFragNodeRef(frag).cloneNode(true);dojo.body().appendChild(this.domNode);this.rootLayout = dojo.widget.createWidget(
+"LayoutContainer",{minHeight: 50,minWidth: 100
+},this.rootLayoutNode
+);this.textAreaContainer = dojo.widget.createWidget(
+"LayoutContainer",{ layoutAlign: "client" },this.textAreaContainerNode
+);this.rootLayout.addChild(this.textAreaContainer);this.textAreaContainer.domNode.appendChild(this.textAreaNode);with(this.textAreaNode.style){width="100%";height="100%";}
+this.statusBar = dojo.widget.createWidget(
+"LayoutContainer",{layoutAlign: "bottom",minHeight: 28
+},this.statusBarContainerNode
+);this.rootLayout.addChild(this.statusBar);this.statusLabel = dojo.widget.createWidget(
+"LayoutContainer",{layoutAlign: "client",minWidth: 50
+},this.statusLabelNode
+);this.statusBar.addChild(this.statusLabel);this.resizeHandle = dojo.widget.createWidget(
+"ResizeHandle",{ targetElmId: this.rootLayout.widgetId },this.resizeHandleNode
+);this.statusBar.addChild(this.resizeHandle);}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizableTextarea.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,10 @@
+
+dojo.provide("dojo.widget.ResizeHandle");dojo.require("dojo.widget.*");dojo.require("dojo.html.layout");dojo.require("dojo.event.*");dojo.widget.defineWidget(
+"dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId: '',templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/ResizeHandle.css"),templateString: '<div class="dojoHtmlResizeHandle"><div></div></div>',postCreate: function(){dojo.event.connect(this.domNode, "onmousedown", this, "_beginSizing");},_beginSizing: function( e){if (this._isSizing){ return false; }
+this.targetWidget = dojo.widget.byId(this.targetElmId);this.targetDomNode = this.targetWidget ? this.targetWidget.domNode : dojo.byId(this.targetElmId);if (!this.targetDomNode){ return; }
+this._isSizing = true;this.startPoint  = {'x':e.clientX, 'y':e.clientY};var mb = dojo.html.getMarginBox(this.targetDomNode);this.startSize  = {'w':mb.width, 'h':mb.height};dojo.event.kwConnect({srcObj: dojo.body(),srcFunc: "onmousemove",targetObj: this,targetFunc: "_changeSizing",rate: 25
+});dojo.event.connect(dojo.body(), "onmouseup", this, "_endSizing");e.preventDefault();},_changeSizing: function( e){try{if(!e.clientX  || !e.clientY){ return; }}catch(e){return;}
+var dx = this.startPoint.x - e.clientX;var dy = this.startPoint.y - e.clientY;var newW = this.startSize.w - dx;var newH = this.startSize.h - dy;if (this.minSize) {var mb = dojo.html.getMarginBox(this.targetDomNode);if (newW < this.minSize.w) {newW = mb.width;}
+if (newH < this.minSize.h) {newH = mb.height;}}
+if(this.targetWidget){this.targetWidget.resizeTo(newW, newH);}else{dojo.html.setMarginBox(this.targetDomNode, { width: newW, height: newH});}
+e.preventDefault();},_endSizing: function( e){dojo.event.disconnect(dojo.body(), "onmousemove", this, "_changeSizing");dojo.event.disconnect(dojo.body(), "onmouseup", this, "_endSizing");this._isSizing = false;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ResizeHandle.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,236 @@
+
+dojo.provide("dojo.widget.RichText");dojo.require("dojo.widget.*");dojo.require("dojo.html.*");dojo.require("dojo.html.layout");dojo.require("dojo.html.selection");dojo.require("dojo.event.*");dojo.require("dojo.string.extras");dojo.require("dojo.uri.Uri");dojo.require("dojo.Deferred");if(!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]){if(dojo.hostenv.post_load_){(function(){var savetextarea = dojo.doc().createElement('textarea');savetextarea.id = "dojo.widget.RichText.savedContent";savetextarea.style = "display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;";dojo.body().appendChild(savetextarea);})();}else{try {dojo.doc().write('<textarea id="dojo.widget.RichText.savedContent" ' +
+'style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"></textarea>');}catch(e){ }}
+}
+dojo.widget.defineWidget(
+"dojo.widget.RichText",dojo.widget.HtmlWidget,function(){this.contentPreFilters = [];this.contentPostFilters = [];this.contentDomPreFilters = [];this.contentDomPostFilters = [];this.editingAreaStyleSheets=[];this.contentPreFilters.push(dojo.lang.hitch(this,this._preFixUrlAttributes));if(dojo.render.html.moz){this.contentPreFilters.push(this._fixContentForMoz);}
+this._keyHandlers = {};if(dojo.Deferred){this.onLoadDeferred = new dojo.Deferred();}},{inheritWidth: false,focusOnLoad: false,saveName: "",styleSheets: "",_content: "",height: "",minHeight: "1em",isClosed: true,isLoaded: false,useActiveX: false,_SEPARATOR: "@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred: null,postCreate: function(){dojo.event.topic.publish("dojo.widget.RichText::init", this);this.open();dojo.event.connect(this, "onKeyPressed", this, "afterKeyPress");dojo.event.connect(this, "onKeyPress", this, "keyPress");dojo.event.connect(this, "onKeyDown", this, "keyDown");dojo.event.connect(this, "onKeyUp", this, "keyUp");this.setupDefaultShortcuts();},setupDefaultShortcuts: function(){var ctrl = this.KEY_CTRL;var exec = function (cmd, arg) {return arguments.length == 1 ? function () { this.execCommand(cmd); } :
+function () { this.execCommand(cmd, arg); }}
+this.addKeyHandler("b", ctrl, exec("bold"));this.addKeyHandler("i", ctrl, exec("italic"));this.addKeyHandler("u", ctrl, exec("underline"));this.addKeyHandler("a", ctrl, exec("selectall"));this.addKeyHandler("s", ctrl, function () { this.save(true); });this.addKeyHandler("1", ctrl, exec("formatblock", "h1"));this.addKeyHandler("2", ctrl, exec("formatblock", "h2"));this.addKeyHandler("3", ctrl, exec("formatblock", "h3"));this.addKeyHandler("4", ctrl, exec("formatblock", "h4"));this.addKeyHandler("\\", ctrl, exec("insertunorderedlist"));if(!dojo.render.html.ie){this.addKeyHandler("Z", ctrl, exec("redo"));}},events: ["onBlur", "onFocus", "onKeyPress", "onKeyDown", "onKeyUp", "onClick"],open: function (element) {if(this.onLoadDeferred.fired >= 0){this.onLoadDeferred = new dojo.Deferred();}
+var h = dojo.render.html;if (!this.isClosed) { this.close(); }
+dojo.event.topic.publish("dojo.widget.RichText::open", this);this._content = "";if((arguments.length == 1)&&(element["nodeName"])){ this.domNode = element; }
+if((this.domNode["nodeName"])&&
+(this.domNode.nodeName.toLowerCase() == "textarea")){this.textarea = this.domNode;var html = this._preFilterContent(this.textarea.value);this.domNode = dojo.doc().createElement("div");dojo.html.copyStyle(this.domNode, this.textarea);if(!h.safari){dojo.html.insertBefore(this.domNode, this.textarea);}
+var tmpFunc = dojo.lang.hitch(this, function(){with(this.textarea.style){display = "block";position = "absolute";left = top = "-1000px";if(h.ie){this.__overflow = overflow;overflow = "hidden";}}
+});if(h.ie){setTimeout(tmpFunc, 10);}else{tmpFunc();}
+if(this.textarea.form){dojo.event.connect('before', this.textarea.form, "onsubmit",dojo.lang.hitch(this, function(){this.textarea.value = this.getEditorContent();})
+);}}else{var html = this._preFilterContent(this.getNodeChildrenHtml(this.domNode));this.domNode.innerHTML = '';}
+if(html == ""){ html = "&nbsp;"; }
+var content = dojo.html.getContentBox(this.domNode);this._oldHeight = content.height;this._oldWidth = content.width;this._firstChildContributingMargin = this.height?0:this._getContributingMargin(this.domNode, "top");this._lastChildContributingMargin = this.height?0:this._getContributingMargin(this.domNode, "bottom");this.savedContent = html;if((this.domNode["nodeName"])&&
+(this.domNode.nodeName == "LI")){this.domNode.innerHTML = " <br>";}
+this.editingArea = dojo.doc().createElement("div");this.domNode.appendChild(this.editingArea);if(this.saveName != "" && (!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"])){var saveTextarea = dojo.doc().getElementById("dojo.widget.RichText.savedContent");if (saveTextarea.value != "") {var datas = saveTextarea.value.split(this._SEPARATOR);for (var i = 0; i < datas.length; i++) {var data = datas[i].split(":");if (data[0] == this.saveName) {html = data[1];datas.splice(i, 1);break;}}
+}
+dojo.event.connect("before", window, "onunload", this, "_saveContent");}
+if(h.ie70 && this.useActiveX){dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now.");this.useActiveX = false;}
+if(this.useActiveX && h.ie){var self = this;setTimeout(function(){self._drawObject(html);}, 0);}else if(h.ie || this._safariIsLeopard() || h.opera){this.iframe = dojo.doc().createElement( 'iframe' ) ;this.iframe.src = 'javascript:void(0)';this.editorObject = this.iframe;with(this.iframe.style){border = '0';width = "100%";}
+this.iframe.frameBorder = 0;this.editingArea.appendChild(this.iframe)
+this.window = this.iframe.contentWindow;this.document = this.window.document;this.document.open();this.document.write('<html><head><style>body{margin:0;padding:0;border:0;overflow:hidden;}</style>'+
+this._applyEditingAreaStyleSheets()+ "</head><body></body></html>");this.document.close();if(this.height){this.editNode = this.document.body;}else{this.document.body.appendChild(this.document.createElement("div"));this.editNode = this.document.body.firstChild;}
+this.editNode.contentEditable = true;with (this.iframe.style) {if(h.ie70){if(this.height){height = this.height;}
+if(this.minHeight){minHeight = this.minHeight;}}else{height = this.height ? this.height : this.minHeight;}}
+var formats = ['p', 'pre', 'address', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'div', 'ul'];var localhtml = "";for(var i in formats){if(formats[i].charAt(1) != 'l'){localhtml += "<"+formats[i]+"><span>content</span></"+formats[i]+">";}else{localhtml += "<"+formats[i]+"><li>content</li></"+formats[i]+">";}}
+with(this.iframe.style){position = "absolute";left = "-2000px";top = "-2000px";}
+this.editNode.innerHTML = localhtml;var node = this.editNode.firstChild;while(node){dojo.withGlobal(this.window, "selectElement", dojo.html.selection, [node.firstChild]);var nativename = node.tagName.toLowerCase();this._local2NativeFormatNames[nativename] = this.queryCommandValue("formatblock");this._native2LocalFormatNames[this._local2NativeFormatNames[nativename]] = nativename;node = node.nextSibling;}
+with(this.iframe.style){position = "";left = "";top = "";}
+this.editNode.innerHTML = html;if(this.contentDomPreFilters.length>0){this._preDomFilterContent(this.editNode);}
+if(this.height){ this.document.body.style.overflowY="scroll"; }
+dojo.lang.forEach(this.events, function(e){dojo.event.connect(this.editNode, e.toLowerCase(), this, e);}, this);this.onLoad();} else {this._drawIframe(html);this.editorObject = this.iframe;}
+if (this.domNode.nodeName == "LI") { this.domNode.lastChild.style.marginTop = "-1.2em"; }
+dojo.html.addClass(this.domNode, "RichTextEditable");this.isClosed = false;},_hasCollapseableMargin: function(element, side) {if (dojo.html.getPixelValue(element,'border-'+side+'-width',false)) {return false;} else if (dojo.html.getPixelValue(element,'padding-'+side,false)) {return false;} else {return true;}},_getContributingMargin:function(element, topOrBottom) {if (topOrBottom == "top") {var siblingAttr = "previousSibling";var childSiblingAttr = "nextSibling";var childAttr = "firstChild";var marginProp = "margin-top";var siblingMarginProp = "margin-bottom";} else {var siblingAttr = "nextSibling";var childSiblingAttr = "previousSibling";var childAttr = "lastChild";var marginProp = "margin-bottom";var siblingMarginProp = "margin-top";}
+var elementMargin = dojo.html.getPixelValue(element, marginProp, false);function isSignificantNode(element) {return !(element.nodeType==3 && dojo.string.isBlank(element.data))
+&& dojo.html.getStyle(element, "display") != "none"
+&& !dojo.html.isPositionAbsolute(element);}
+var childMargin = 0;var child = element[childAttr];while (child) {while ((!isSignificantNode(child)) && child[childSiblingAttr]) {child = child[childSiblingAttr];}
+childMargin = Math.max(childMargin, dojo.html.getPixelValue(child, marginProp, false));if (!this._hasCollapseableMargin(child, topOrBottom)) break;child = child[childAttr];}
+if (!this._hasCollapseableMargin(element, topOrBottom)){ return parseInt(childMargin); }
+var contextMargin = 0;var sibling = element[siblingAttr];while (sibling) {if (isSignificantNode(sibling)) {contextMargin = dojo.html.getPixelValue(sibling,siblingMarginProp,false);break;}
+sibling = sibling[siblingAttr];}
+if (!sibling) {contextMargin = dojo.html.getPixelValue(element.parentNode,marginProp, false);}
+if (childMargin > elementMargin) {return parseInt(Math.max((childMargin-elementMargin)-contextMargin, 0));} else {return 0;}},_drawIframe: function (html){var oldMoz = Boolean(dojo.render.html.moz && (
+typeof window.XML == 'undefined'))
+if(!this.iframe){this.iframe = dojo.doc().createElement("iframe");with(this.iframe){style.border = "none";style.lineHeight = "0";style.verticalAlign = "bottom";scrolling = this.height ? "auto" : "no";}}
+this.iframe.width = this.inheritWidth ? this._oldWidth : "100%";if(this.height){this.iframe.style.height = this.height;}else{var height = this._oldHeight;if(this._hasCollapseableMargin(this.domNode, 'top')){height += this._firstChildContributingMargin;}
+if(this._hasCollapseableMargin(this.domNode, 'bottom')){height += this._lastChildContributingMargin;}
+this.iframe.height = height;}
+var tmpContent = dojo.doc().createElement('div');tmpContent.innerHTML = html;this.editingArea.appendChild(tmpContent);this.domNode.appendChild(this.iframe);if(!this.height){var firstChild = dojo.html.firstElement(tmpContent);var lastChild = dojo.html.lastElement(tmpContent);if(firstChild){firstChild.style.marginTop = this._firstChildContributingMargin+"px";}
+if(lastChild){lastChild.style.marginBottom = this._lastChildContributingMargin+"px";}}
+if(dojo.render.html.safari){this.iframe.src = this.iframe.src;}
+var _iframeInitialized = false;var getStyle = (function (domNode) { return function (style) {return dojo.html.getStyle(domNode, style);}; })(this.domNode);var font =
+getStyle('font-weight') + " " +
+getStyle('font-size') + " " +
+getStyle('font-family');var lineHeight = "1.0";var lineHeightStyle = dojo.html.getUnitValue(this.domNode, 'line-height');if (lineHeightStyle.value && lineHeightStyle.units=="") {lineHeight = lineHeightStyle.value;}
+var contentDoc = this.iframe.contentWindow.document;contentDoc.open();var fulldoc = '<html><head><style>'+
+'body,html{background:transparent;padding:0;margin:0;}' +
+'body{top:0;left:0;right:0;' +
+(((this.height)||(dojo.render.html.opera)) ? '' : 'position:fixed;') +
+'font:' + font + ';' +
+'min-height:' + this.minHeight + ';' +
+'line-height:' + lineHeight + '}' +
+'p{margin: 1em 0 !important;}' +
+(this.height?'':
+'body > *:first-child{padding-top:0 !important;margin-top:' + this._firstChildContributingMargin + 'px !important;}' +
+'body > *:last-child{padding-bottom:0 !important;margin-bottom:' + this._lastChildContributingMargin + 'px !important;}') +
+'li > ul:-moz-first-node, li > ol:-moz-first-node{padding-top:1.2em;}\n' +
+'li{min-height:1.2em;}' +
+'</style>' + this._applyEditingAreaStyleSheets()+
+'</head><body></body></html>';contentDoc.write(fulldoc);contentDoc.close();var ifrFunc = dojo.lang.hitch(this, function(){if(!_iframeInitialized){_iframeInitialized = true;}else{ return; }
+if(!this.editNode){if(this.iframe.contentWindow){this.window = this.iframe.contentWindow;this.document = this.iframe.contentWindow.document
+}else if(this.iframe.contentDocument){this.window = this.iframe.contentDocument.window;this.document = this.iframe.contentDocument;}
+dojo.html.removeNode(tmpContent);this.document.body.innerHTML = html;this.document.designMode = "on";try{var currentDomain = (new dojo.uri.Uri(dojo.doc().location)).host;if(dojo.doc().domain!=currentDomain){this.document.domain = dojo.doc().domain;}}catch(e){}
+this.onLoad();}else{dojo.html.removeNode(tmpContent);this.editNode.innerHTML = html;this.onDisplayChanged();}});if(this.editNode){ifrFunc();}else if(dojo.render.html.moz){setTimeout(ifrFunc, 250);}else{ifrFunc();}},_applyEditingAreaStyleSheets: function(){var files = [];if(this.styleSheets){files = this.styleSheets.split(';');this.styleSheets = '';}
+files = files.concat(this.editingAreaStyleSheets);this.editingAreaStyleSheets = [];var text='';if(files.length>0){for(var i=0;i<files.length;i++){var url = files[i];if(url){var abstring = (new dojo.uri.Uri(dojo.global().location, url)).toString();this.editingAreaStyleSheets.push(abstring);text += '<link rel="stylesheet" type="text/css" href="'+abstring+'"/>'
+}}
+}
+return text;},addStyleSheet: function(uri) {var url=uri.toString();if(dojo.lang.find(this.editingAreaStyleSheets, url) > -1){dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");return;}
+if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){url = (new dojo.uri.Uri(dojo.global().location, url)).toString();}
+this.editingAreaStyleSheets.push(url);if(this.document.createStyleSheet){this.document.createStyleSheet(url);}else{var head = this.document.getElementsByTagName("head")[0];var stylesheet = this.document.createElement("link");with(stylesheet){rel="stylesheet";type="text/css";href=url;}
+head.appendChild(stylesheet);}},removeStyleSheet: function (uri) {var url=uri.toString();if(url.charAt(0) == '.' || (url.charAt(0) != '/' && !uri.host)){url = (new dojo.uri.Uri(dojo.global().location, url)).toString();}
+var index = dojo.lang.find(this.editingAreaStyleSheets, url);if(index == -1){dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!");return;}
+delete this.editingAreaStyleSheets[index];var links = this.document.getElementsByTagName("link");for(var i=0;i<links.length;i++){if(links[i].href == url){if(dojo.render.html.ie){links[i].href="";}
+dojo.html.removeNode(links[i]);break;}}
+},_drawObject: function (html) {this.object = dojo.html.createExternalElement(dojo.doc(), "object");with (this.object) {classid = "clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";width = this.inheritWidth ? this._oldWidth : "100%";style.height = this.height ? this.height : (this._oldHeight+"px");Scrollbars = this.height ? true : false;Appearance = this._activeX.appearance.flat;}
+this.editorObject = this.object;this.editingArea.appendChild(this.object);this.object.attachEvent("DocumentComplete", dojo.lang.hitch(this, "onLoad"));dojo.lang.forEach(this.events, function(e){this.object.attachEvent(e.toLowerCase(), dojo.lang.hitch(this, e));}, this);this.object.DocumentHTML = '<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' +
+'<html><head><title></title>' +
+'<style type="text/css">' +
+'    body,html { padding: 0; margin: 0; }' +
+(this.height ? '' : '    body,  { overflow: hidden; }') +
+'</style>' + this._applyEditingAreaStyleSheets()+
+'</head><body><div>' + html + '<div></body></html>';this._cacheLocalBlockFormatNames();},_local2NativeFormatNames: {},_native2LocalFormatNames: {},_cacheLocalBlockFormatNames: function(){if(!this._native2LocalFormatNames['p']){var obj = this.object;var error = false;if(!obj){try{obj = dojo.html.createExternalElement(dojo.doc(), "object");obj.classid = "clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";dojo.body().appendChild(obj);obj.DocumentHTML = "<html><head></head><body></body></html>";}catch(e){ error = true; }}
+try{var oNamesParm = new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");obj.ExecCommand(this._activeX.command['getblockformatnames'], 0, oNamesParm);var vbNamesArray = new VBArray(oNamesParm.Names);var localFormats = vbNamesArray.toArray();var nativeFormats = ['p', 'pre', 'address', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', '', '', '','','div'];for(var i=0;i<nativeFormats.length;++i){if(nativeFormats[i].length>0){this._local2NativeFormatNames[localFormats[i]] = nativeFormats[i];this._native2LocalFormatNames[nativeFormats[i]] = localFormats[i];}}
+}catch(e){ error = true; }
+if(obj && !this.object){dojo.body().removeChild(obj);}}
+return !error;},_isResized: function(){ return false; },onLoad: function(e){this.isLoaded = true;if (this.object){this.document = this.object.DOM;this.window = this.document.parentWindow;this.editNode = this.document.body.firstChild;this.editingArea.style.height = this.height ? this.height : this.minHeight;if(!this.height){this.connect(this, "onDisplayChanged", "_updateHeight");}
+this.window._frameElement = this.object;}else if (this.iframe && !dojo.render.html.ie){this.editNode = this.document.body;if(!this.height){this.connect(this, "onDisplayChanged", "_updateHeight");}
+try {this.document.execCommand("useCSS", false, true);this.document.execCommand("styleWithCSS", false, false);}catch(e2){ }
+if (dojo.render.html.safari) {this.connect(this.editNode, "onblur", "onBlur");this.connect(this.editNode, "onfocus", "onFocus");this.connect(this.editNode, "onclick", "onFocus");this.interval = setInterval(dojo.lang.hitch(this, "onDisplayChanged"), 750);} else if (dojo.render.html.mozilla || dojo.render.html.opera) {var doc = this.document;var addListener = dojo.event.browser.addListener;var self = this;dojo.lang.forEach(this.events, function(e){var l = addListener(self.document, e.substr(2).toLowerCase(), dojo.lang.hitch(self, e));if(e=="onBlur"){var unBlur = { unBlur: function(e){dojo.event.browser.removeListener(doc, "blur", l);}};dojo.event.connect("before", self, "close", unBlur, "unBlur");}});}}else if(dojo.render.html.ie){if(!this.height){this.connect(this, "onDisplayChanged", "_updateHeight");}
+this.editNode.style.zoom = 1.0;}
+if(this.focusOnLoad){this.focus();}
+this.onDisplayChanged(e);if(this.onLoadDeferred){this.onLoadDeferred.callback(true);}},onKeyDown: function(e){if((!e)&&(this.object)){e = dojo.event.browser.fixEvent(this.window.event);}
+if((dojo.render.html.ie)&&(e.keyCode == e.KEY_TAB)){e.preventDefault();e.stopPropagation();this.execCommand((e.shiftKey ? "outdent" : "indent"));}else if(dojo.render.html.ie){if((65 <= e.keyCode)&&(e.keyCode <= 90)){e.charCode = e.keyCode;this.onKeyPress(e);}}
+},onKeyUp: function(e){return;},KEY_CTRL: 1,onKeyPress: function(e){if((!e)&&(this.object)){e = dojo.event.browser.fixEvent(this.window.event);}
+var modifiers = e.ctrlKey ? this.KEY_CTRL : 0;if (this._keyHandlers[e.key]) {var handlers = this._keyHandlers[e.key], i = 0, handler;while (handler = handlers[i++]) {if (modifiers == handler.modifiers) {e.preventDefault();handler.handler.call(this);break;}}
+}
+dojo.lang.setTimeout(this, this.onKeyPressed, 1, e);},addKeyHandler: function (key, modifiers, handler) {if (!(this._keyHandlers[key] instanceof Array)) { this._keyHandlers[key] = []; }
+this._keyHandlers[key].push({modifiers: modifiers || 0,handler: handler
+});},onKeyPressed: function (e) {this.onDisplayChanged();},onClick: function(e){ this.onDisplayChanged(e); },onBlur: function(e){ },_initialFocus: true,onFocus: function(e){if( (dojo.render.html.mozilla)&&(this._initialFocus) ){this._initialFocus = false;if(dojo.string.trim(this.editNode.innerHTML) == "&nbsp;"){this.placeCursorAtStart();}}
+},blur: function () {if(this.iframe) { this.window.blur(); }
+else if(this.object) { this.document.body.blur(); }
+else if(this.editNode) { this.editNode.blur(); }},focus: function () {if(this.iframe && !dojo.render.html.ie) { this.window.focus(); }
+else if(this.object) { this.document.focus(); }
+else if(this.editNode && this.editNode.focus) { this.editNode.focus(); }
+else{dojo.debug("Have no idea how to focus into the editor!");}},onDisplayChanged: function (e){ },_activeX: {command: {bold: 5000,italic: 5023,underline: 5048,justifycenter: 5024,justifyleft: 5025,justifyright: 5026,cut: 5003,copy: 5002,paste: 5032,"delete": 5004,undo: 5049,redo: 5033,removeformat: 5034,selectall: 5035,unlink: 5050,indent: 5018,outdent: 5031,insertorderedlist: 5030,insertunorderedlist: 5051,inserttable: 5022,insertcell: 5019,insertcol: 5020,insertrow: 5021,deletecells: 5005,deletecols: 5006,deleterows: 5007,mergecells: 5029,splitcell: 5047,setblockformat: 5043,getblockformat: 5011,getblockformatnames: 5012,setfontname: 5044,getfontname: 5013,setfontsize: 5045,getfontsize: 5014,setbackcolor: 5042,getbackcolor: 5010,setforecolor: 5046,getforecolor: 5015,findtext: 5008,font: 5009,hyperlink: 5016,image: 5017,lockelement: 5027,makeabsolute: 5028,sendbackward: 5036,bringforward: 5037,sendbelowtext: 5038,bringabovetext: 5039,sendtoback: 5040,bringtofront: 5041,pro
 perties: 5052
+},ui: {"default": 0,prompt: 1,noprompt: 2
+},status: {notsupported: 0,disabled: 1,enabled: 3,latched: 7,ninched: 11
+},appearance: {flat: 0,inset: 1
+},state: {unchecked: 0,checked: 1,gray: 2
+}},_normalizeCommand: function (cmd){var drh = dojo.render.html;var command = cmd.toLowerCase();if(command == "formatblock"){if(drh.safari){ command = "heading"; }}else if(this.object){switch(command){case "createlink":
+command = "hyperlink";break;case "insertimage":
+command = "image";break;}}else if(command == "hilitecolor" && !drh.mozilla){command = "backcolor";}
+return command;},_safariIsLeopard: function(){var gt420 = false;if(dojo.render.html.safari){var tmp = dojo.render.html.UA.split("AppleWebKit/")[1];var ver = parseFloat(tmp.split(" ")[0]);if(ver >= 420){ gt420 = true; }}
+return gt420;},queryCommandAvailable: function (command) {var ie = 1;var mozilla = 1 << 1;var safari = 1 << 2;var opera = 1 << 3;var safari420 = 1 << 4;var gt420 = this._safariIsLeopard();function isSupportedBy (browsers) {return {ie: Boolean(browsers & ie),mozilla: Boolean(browsers & mozilla),safari: Boolean(browsers & safari),safari420: Boolean(browsers & safari420),opera: Boolean(browsers & opera)
+}}
+var supportedBy = null;switch (command.toLowerCase()) {case "bold": case "italic": case "underline":
+case "subscript": case "superscript":
+case "fontname": case "fontsize":
+case "forecolor": case "hilitecolor":
+case "justifycenter": case "justifyfull": case "justifyleft":
+case "justifyright": case "delete": case "selectall":
+supportedBy = isSupportedBy(mozilla | ie | safari | opera);break;case "createlink": case "unlink": case "removeformat":
+case "inserthorizontalrule": case "insertimage":
+case "insertorderedlist": case "insertunorderedlist":
+case "indent": case "outdent": case "formatblock":
+case "inserthtml": case "undo": case "redo": case "strikethrough":
+supportedBy = isSupportedBy(mozilla | ie | opera | safari420);break;case "blockdirltr": case "blockdirrtl":
+case "dirltr": case "dirrtl":
+case "inlinedirltr": case "inlinedirrtl":
+supportedBy = isSupportedBy(ie);break;case "cut": case "copy": case "paste":
+supportedBy = isSupportedBy( ie | mozilla | safari420);break;case "inserttable":
+supportedBy = isSupportedBy(mozilla | (this.object ? ie : 0));break;case "insertcell": case "insertcol": case "insertrow":
+case "deletecells": case "deletecols": case "deleterows":
+case "mergecells": case "splitcell":
+supportedBy = isSupportedBy(this.object ? ie : 0);break;default: return false;}
+return (dojo.render.html.ie && supportedBy.ie) ||
+(dojo.render.html.mozilla && supportedBy.mozilla) ||
+(dojo.render.html.safari && supportedBy.safari) ||
+(gt420 && supportedBy.safari420) ||
+(dojo.render.html.opera && supportedBy.opera);},execCommand: function (command, argument){var returnValue;this.focus();command = this._normalizeCommand(command);if (argument != undefined) {if(command == "heading") { throw new Error("unimplemented"); }
+else if(command == "formatblock"){if(this.object){argument = this._native2LocalFormatNames[argument];}
+else if(dojo.render.html.ie){ argument = '<'+argument+'>'; }}
+}
+if(this.object){switch (command) {case "hilitecolor":
+command = "setbackcolor";break;case "forecolor":
+case "backcolor":
+case "fontsize":
+case "fontname":
+command = "set" + command;break;case "formatblock":
+command = "setblockformat";}
+if(command == "strikethrough"){command = "inserthtml";var range = this.document.selection.createRange();if(!range.htmlText){return;}
+argument=range.htmlText.strike();}else if(command == "inserthorizontalrule"){command = "inserthtml";argument="<hr>";}
+if(command == "inserthtml"){var range = this.document.selection.createRange();if(this.document.selection.type.toUpperCase() == "CONTROL"){if(range.length>0){range.item(0).outerHTML = argument;for(var i=1;i<range.length;i++){range.item(i).outerHTML = '';}}
+}else{range.pasteHTML(argument);range.select();}
+returnValue = true;}else if(arguments.length == 1){returnValue = this.object.ExecCommand(this._activeX.command[command],this._activeX.ui.noprompt);}else{returnValue = this.object.ExecCommand(this._activeX.command[command],this._activeX.ui.noprompt, argument);}}else if(command == "inserthtml"){if(dojo.render.html.ie){var insertRange = this.document.selection.createRange();insertRange.pasteHTML(argument);insertRange.select();return true;}else{return this.document.execCommand(command, false, argument);}}else if((command == "unlink")&&
+(this.queryCommandEnabled("unlink"))&&
+(dojo.render.html.mozilla)){var selection = this.window.getSelection();var selectionRange = selection.getRangeAt(0);var selectionStartContainer = selectionRange.startContainer;var selectionStartOffset = selectionRange.startOffset;var selectionEndContainer = selectionRange.endContainer;var selectionEndOffset = selectionRange.endOffset;var a = dojo.withGlobal(this.window, "getAncestorElement", dojo.html.selection, ['a']);dojo.withGlobal(this.window, "selectElement", dojo.html.selection, [a]);returnValue = this.document.execCommand("unlink", false, null);var selectionRange = this.document.createRange();selectionRange.setStart(selectionStartContainer, selectionStartOffset);selectionRange.setEnd(selectionEndContainer, selectionEndOffset);selection.removeAllRanges();selection.addRange(selectionRange);return returnValue;}else if((command == "hilitecolor")&&(dojo.render.html.mozilla)){this.document.execCommand("useCSS", false, false);returnValue = this.document.execCommand(command, 
 false, argument);this.document.execCommand("useCSS", false, true);}else if((dojo.render.html.ie)&&( (command == "backcolor")||(command == "forecolor") )){argument = arguments.length > 1 ? argument : null;returnValue = this.document.execCommand(command, false, argument);}else{argument = arguments.length > 1 ? argument : null;if(argument || command!="createlink") {returnValue = this.document.execCommand(command, false, argument);}}
+this.onDisplayChanged();return returnValue;},queryCommandEnabled: function(command){command = this._normalizeCommand(command);if(this.object){switch (command) {case "hilitecolor":
+command = "setbackcolor";break;case "forecolor":
+case "backcolor":
+case "fontsize":
+case "fontname":
+command = "set" + command;break;case "formatblock":
+command = "setblockformat";break;case "strikethrough":
+command = "bold";break;case "inserthorizontalrule":
+return true;}
+if(typeof this._activeX.command[command] == "undefined"){ return false; }
+var status = this.object.QueryStatus(this._activeX.command[command]);return ((status != this._activeX.status.notsupported)&&
+(status != this._activeX.status.disabled));}else{if(dojo.render.html.mozilla){if(command == "unlink"){return dojo.withGlobal(this.window, "hasAncestorElement", dojo.html.selection, ['a']);} else if (command == "inserttable") {return true;}}
+var elem = (dojo.render.html.ie) ? this.document.selection.createRange() : this.document;return elem.queryCommandEnabled(command);}},queryCommandState: function(command){command = this._normalizeCommand(command);if(this.object){if(command == "forecolor"){command = "setforecolor";}else if(command == "backcolor"){command = "setbackcolor";}else if(command == "strikethrough"){return dojo.withGlobal(this.window, "hasAncestorElement", dojo.html.selection, ['strike']);}else if(command == "inserthorizontalrule"){return false;}
+if(typeof this._activeX.command[command] == "undefined"){ return null; }
+var status = this.object.QueryStatus(this._activeX.command[command]);return ((status == this._activeX.status.latched)||
+(status == this._activeX.status.ninched));}else{return this.document.queryCommandState(command);}},queryCommandValue: function (command) {command = this._normalizeCommand(command);if (this.object) {switch (command) {case "forecolor":
+case "backcolor":
+case "fontsize":
+case "fontname":
+command = "get" + command;return this.object.execCommand(
+this._activeX.command[command],this._activeX.ui.noprompt);case "formatblock":
+var retvalue = this.object.execCommand(
+this._activeX.command["getblockformat"],this._activeX.ui.noprompt);if(retvalue){return this._local2NativeFormatNames[retvalue];}}
+} else {if(dojo.render.html.ie && command == "formatblock"){return this._local2NativeFormatNames[this.document.queryCommandValue(command)] || this.document.queryCommandValue(command);}
+return this.document.queryCommandValue(command);}},placeCursorAtStart: function(){this.focus();if(dojo.render.html.moz && this.editNode.firstChild &&
+this.editNode.firstChild.nodeType != dojo.dom.TEXT_NODE){dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode.firstChild]);}else{dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode]);}
+dojo.withGlobal(this.window, "collapse", dojo.html.selection, [true]);},placeCursorAtEnd: function(){this.focus();if(dojo.render.html.moz && this.editNode.lastChild &&
+this.editNode.lastChild.nodeType != dojo.dom.TEXT_NODE){dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode.lastChild]);}else{dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode]);}
+dojo.withGlobal(this.window, "collapse", dojo.html.selection, [false]);},getValue: function(){if(this.isClosed){if(this.textarea){return this.textarea.value;}else{return this.getNodeChildrenHtml(this.domNode);}}else{return this._postFilterContent();}},setValue: function(html){if(this.isClosed){if(this.textarea){this.textarea.value=html;}else{this.editNode.innerHTML = html;}}else{html = this._preFilterContent(html);this.editNode.innerHTML = html;}},replaceEditorContent: function(html){dojo.deprecated("replaceEditorContent", "is deprecated in favor of replaceValue", "0.6");this.replaceValue(html);},replaceValue: function(html){html = this._preFilterContent(html);if(this.isClosed){this.domNode.innerHTML = html;}else if(this.window && this.window.getSelection && !dojo.render.html.moz){this.editNode.innerHTML = html;}else if((this.window && this.window.getSelection) || (this.document && this.document.selection)){this.execCommand("selectall");if(dojo.render.html.moz && !html){ htm
 l = "&nbsp;" }
+this.execCommand("inserthtml", html);}},_preFilterContent: function(html){var ec = html;dojo.lang.forEach(this.contentPreFilters, function(ef){ec = ef(ec);});return ec;},_preDomFilterContent: function(dom){dom = dom || this.editNode;dojo.lang.forEach(this.contentDomPreFilters, function(ef){ef(dom);}, this);},_postFilterContent: function(dom){dom = dom || this.editNode;if(this.contentDomPostFilters.length>0){dojo.lang.forEach(this.contentDomPostFilters, function(ef){dom = ef(dom);});}
+var ec = this.getNodeChildrenHtml(dom);if(dojo.string.trim(ec) == "&nbsp;"){ ec = ""; }
+if(dojo.render.html.ie && !this.object){var re = new RegExp("(?:<p>&nbsp;</p>[\n\r]*)+$", "i");ec = ec.replace(re,"");}
+dojo.lang.forEach(this.contentPostFilters, function(ef){ec = ef(ec);});return ec;},_lastHeight: 0,_updateHeight: function(){if(!this.isLoaded){ return; }
+if(this.height){ return; }
+var height = dojo.html.getBorderBox(this.editNode).height;if(!height){height = dojo.html.getBorderBox(this.document.body).height;}
+if(height == 0){dojo.debug("Can not figure out the height of the editing area!");return;}
+this._lastHeight = height;this.editorObject.style.height = this._lastHeight + "px";this.window.scrollTo(0, 0);},_saveContent: function(e){var saveTextarea = dojo.doc().getElementById("dojo.widget.RichText.savedContent");saveTextarea.value += this._SEPARATOR + this.saveName + ":" + this.getEditorContent();},getEditorContent: function(){dojo.deprecated("getEditorContent", "is deprecated in favor of getValue", "0.6");return this.getValue();},getNodeHtml: function(node){switch(node.nodeType){case 1:
+var output = '<'+node.tagName.toLowerCase();if(dojo.render.html.moz){if(node.getAttribute('type')=='_moz'){node.removeAttribute('type');}
+if(node.getAttribute('_moz_dirty') != undefined){node.removeAttribute('_moz_dirty');}}
+var attrarray = [];if(dojo.render.html.ie){var s = node.outerHTML;s = s.substr(0,s.indexOf('>'));s = s.replace(/(?:['"])[^"']*\1/g, '');var reg = /([^\s=]+)=/g;var m;while((m = reg.exec(s)) != undefined){if(m[1].substr(0,3) != '_dj'){if(m[1] == 'src' || m[1] == 'href'){if(node.getAttribute('_djrealurl')){attrarray[attrarray.length]=[m[1],node.getAttribute('_djrealurl')];continue;}}
+attrarray[attrarray.length]=[m[1],node.getAttribute(m[1])];}}
+}else{var attrs = node.attributes;for(var i=0; i<attrs.length; i++) {if(attrs[i].name.substr(0,3) != '_dj' ){var v = attrs[i].value;if(attrs[i].name == 'src' || attrs[i].name == 'href'){if(node.getAttribute('_djrealurl')){v = node.getAttribute('_djrealurl');}}
+attrarray.push([attrs[i].name,v]);}}
+}
+attrarray.sort(function(a,b){return a[0]<b[0]?-1:(a[0]==b[0]?0:1);});for(var i=0; i<attrarray.length; i++){output += ' '+attrarray[i][0]+'="'+attrarray[i][1]+'"';}
+if(node.childNodes.length>0){output += '>' + this.getNodeChildrenHtml(node)+'</'+node.tagName.toLowerCase()+'>';}else{output += ' />';}
+break;case 3:
+var output = node.nodeValue;break;case 8:
+var output = '<!--'+node.nodeValue+'-->';break;default:
+var output = "Element not recognized - Type: " + node.nodeType + " Name: " + node.nodeName;}
+return output;},getNodeChildrenHtml: function(dom){var output='';var nodes = dom.childNodes||dom;for(var i=0;i<nodes.length;i++){output += this.getNodeHtml(nodes[i]);}
+return output;},close: function(save, force){if(this.isClosed){return false; }
+if (arguments.length == 0) { save = true; }
+this._content = this.getEditorContent();var changed = (this.savedContent != this._content);if(this.interval){ clearInterval(this.interval); }
+if(dojo.render.html.ie && !this.object){dojo.event.browser.clean(this.editNode);}
+if (this.iframe) {dojo.html.destroyNode(this.iframe);delete this.iframe;}
+if(this.textarea){with(this.textarea.style){position = "";left = top = "";if(dojo.render.html.ie){overflow = this.__overflow;this.__overflow = null;}}
+if(save){this.textarea.value = this._content;}else{this.textarea.value = this.savedContent;}
+dojo.html.removeNode(this.domNode);this.domNode = this.textarea;}else{if(save){if(dojo.render.html.moz){var nc = dojo.doc().createElement("span");this.domNode.appendChild(nc);nc.innerHTML = this.editNode.innerHTML;}else{this.domNode.innerHTML = this._content;}}else{this.domNode.innerHTML = this.savedContent;}}
+dojo.html.removeClass(this.domNode, "RichTextEditable");this.isClosed = true;this.isLoaded = false;delete this.editNode;if(this.window._frameElement){this.window._frameElement = null;}
+this.window = null;this.document = null;this.object = null;this.editingArea = null;this.editorObject = null;return changed;},destroyRendering: function(){},destroy: function (){this.destroyRendering();if(!this.isClosed){ this.close(false); }
+dojo.widget.RichText.superclass.destroy.call(this);},connect: function (targetObj, targetFunc, thisFunc) {dojo.event.connect(targetObj, targetFunc, this, thisFunc);},disconnect: function (targetObj, targetFunc, thisFunc) {dojo.event.disconnect(targetObj, targetFunc, this, thisFunc);},_fixContentForMoz: function(html){html = html.replace(/<strong([ \>])/gi, '<b$1' );html = html.replace(/<\/strong>/gi, '<\/b>' );html = html.replace(/<em([ \>])/gi, '<i$1' );html = html.replace(/<\/em>/gi, '<\/i>' );return html;},_srcInImgRegex: /(?:(<img(?=\s).*?\ssrc=)("|')(.*?)\2)|(?:(<img\s.*?src=)([^"'][^ >]+))/gi ,_hrefInARegex: /(?:(<a(?=\s).*?\shref=)("|')(.*?)\2)|(?:(<a\s.*?href=)([^"'][^ >]+))/gi ,_preFixUrlAttributes: function(html){html = html.replace(this._hrefInARegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') ;html = html.replace(this._srcInImgRegex, '$1$4$2$3$5$2 _djrealurl=$2$3$5$2') ;return html;}}
+);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/RichText.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.widget.Select");dojo.require("dojo.widget.ComboBox");dojo.require("dojo.widget.*");dojo.require("dojo.widget.html.stabile");dojo.widget.defineWidget(
+"dojo.widget.Select",dojo.widget.ComboBox,{forceValidOption: true,setValue: function(value) {this.comboBoxValue.value = value;dojo.widget.html.stabile.setState(this.widgetId, this.getState(), true);this.onValueChanged(value);},setLabel: function(value){this.comboBoxSelectionValue.value = value;if (this.textInputNode.value != value) {this.textInputNode.value = value;}},getLabel: function(){return this.comboBoxSelectionValue.value;},getState: function() {return {value: this.getValue(),label: this.getLabel()
+};},onKeyUp: function( evt){this.setLabel(this.textInputNode.value);},setState: function( state) {this.setValue(state.value);this.setLabel(state.label);},setAllValues: function( value1,  value2){this.setLabel(value1);this.setValue(value2);}}
+);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Select.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,68 @@
+
+dojo.provide("dojo.widget.Show");dojo.require("dojo.lang.common");dojo.require("dojo.widget.HtmlWidget");dojo.require("dojo.uri.Uri");dojo.require("dojo.event.*");dojo.require("dojo.lfx.*");dojo.require("dojo.math.curves");dojo.require("dojo.lang.common");dojo.require("dojo.lang.func");dojo.require("dojo.html.display");dojo.require("dojo.html.layout");dojo.require("dojo.gfx.color");dojo.widget.defineWidget(
+"dojo.widget.Show",dojo.widget.HtmlWidget,function(){this._slides=[];},{isContainer: true,_slide: -1,body: null,nav: null,hider: null,select: null,option: null,inNav: false,debugPane: null,noClick: false,templatePath: dojo.uri.moduleUri("dojo", "widget/templates/Show.html"),templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/Show.css"),fillInTemplate: function(args, frag){if(args.debugPane){var dp = this.debugPane = dojo.widget.byId(args.debugPane);dp.hide();dojo.event.connect(dp, "closeWindow", dojo.lang.hitch(this, function(){ this.debugPane = false; }));}
+var source = this.getFragNodeRef(frag);this.sourceNode = dojo.body().appendChild(source.cloneNode(true));for(var i = 0, child; child = this.sourceNode.childNodes[i]; i++){if((child.tagName) &&
+(child.elementType == 1) &&
+(child.getAttribute("dojotype").toLowerCase() == "showslide")){child.className = "dojoShowPrintSlide";child.innerHTML = "<h1>" + child.title + "</h1>" + child.innerHTML;}}
+this.sourceNode.className = "dojoShowPrint";this.sourceNode.style.display = "none";dojo.event.connect(document, "onclick", this, "gotoSlideByEvent");if(dojo.render.html.ie) {dojo.event.connect(document,"onkeydown",this, "gotoSlideByEvent");} else {dojo.event.connect(document,"onkeypress",this, "gotoSlideByEvent");}
+dojo.event.connect(window, "onresize", this, "resizeWindow");dojo.event.connect(this.nav, "onmousemove", this, "popUpNav");},postCreate: function(){this._slides = [];for(var i = 0, child; child = this.children[i]; i++){if(child.widgetType == "ShowSlide"){this._slides.push(child);this.option.text = child.title+" ("+(i+1)+")";this.option.parentNode.insertBefore(this.option.cloneNode(true), this.option);}}
+this.option.parentNode.removeChild(this.option);this.domNode.style.display = "block";this.resizeWindow();this.gotoSlide(0, true);dojo.addOnLoad(dojo.lang.hitch(this,function(){var th = window.location.hash;if(th.length){var parts = (""+window.location).split(this.widgetId+"_SlideNo_");if(parts.length > 1){setTimeout(dojo.lang.hitch(this, function(){this.gotoSlide(parseInt(parts[1]), true);}), 300);}}
+})
+);},gotoSlide: function( slide, preventSetHash){if(slide == this._slide){return;}
+if(!this._slides[slide]){for(var i = 0, child; child = this._slides[i]; i++){if(child.title == slide){slide = i;break;}}
+}
+if(!this._slides[slide]){return;}
+if(this.debugPane){if(this._slides[slide].debug){this.debugPane.show();}else{this.debugPane.hide();}}
+if(this._slide != -1){while(this._slides[this._slide].previousAction()){}}
+if(!preventSetHash){window.location.href = "#"+this.widgetId+"_SlideNo_"+slide;}
+if(this._slides[this._slide]){this._slides[this._slide].hide();}
+this._slide = slide;this.select.selectedIndex = slide;var cn = this.contentNode;while(cn.firstChild){ cn.removeChild(cn.firstChild); }
+cn.appendChild(this._slides[slide].domNode);this._slides[slide].show();},gotoSlideByEvent: function( event){var node = event.target;var type = event.type;if(type == "click"){if(node.tagName == "OPTION" && node.parentNode == this.select){this.gotoSlide(node.index);}else if(node == this.select){this.gotoSlide(node.selectedIndex);}else{this.nextSlide(event);}}else if (type=="keydown" || type=="keypress") {var key = event.keyCode;var ch = event.charCode;if(key == 63234 || key == 37){this.previousSlide(event);}else if(key == 63235 || key == 39 || ch == 32){this.nextSlide(event);}}
+},nextSlide: function( event){if(!this.stopEvent(event)){return false;}
+if(!this._slides[this._slide].nextAction(event)){if((this._slide + 1) != this._slides.length){this.gotoSlide(this._slide + 1);return true;}
+return false;}},previousSlide: function( event){if(!this.stopEvent(event)){return false;}
+if(!this._slides[this._slide].previousAction(event)){if((this._slide - 1) != -1){this.gotoSlide(this._slide - 1);return true;}
+return false;}},stopEvent: function( ev){if(!ev){return true;}
+if (ev.type == "click" && (this._slides[this._slide].noClick || this.noClick)) {return false;}
+var target = ev.target;while(target != null){if(target == this.domNode){target = ev.target;break;}
+target = target.parentNode;}
+if(!dojo.dom.isDescendantOf(target, this.nav)){while(target && target != this.domNode){if(target.tagName == "A" || target.tagName == "INPUT" || target.tagName == "TEXTAREA" || target.tagName == "SELECT"){return false;}
+if(typeof target.onclick == "function" || typeof target.onkeypress == "function"){return false;}
+target = target.parentNode;}}
+if(window.event){ev.returnValue = false;ev.cancelBubble = true;}else{ev.preventDefault();ev.stopPropagation();}
+return true;},popUpNav: function(){if(!this.inNav){dojo.lfx.propertyAnimation(this.nav, {"height": { start: 5, end: 30 }}, 250).play();}
+clearTimeout(this.inNav);this.inNav = setTimeout(dojo.lang.hitch(this, "hideNav"), 2000);},hideNav: function(){clearTimeout(this.inNav);this.inNav = false;dojo.lfx.propertyAnimation(this.nav, {"height": { start: 30, end: 5 }}, 250).play();},resizeWindow: function( ev){dojo.body().style.height = "auto";var h = Math.max(
+document.documentElement.scrollHeight || dojo.body().scrollHeight,dojo.html.getViewport().height);dojo.body().style.height = h + "px";}});dojo.widget.defineWidget(
+"dojo.widget.ShowAction",dojo.widget.HtmlWidget,{on: "",action: "fade",duration: 350,from: "",to: "",auto: "false",postMixInProperties: function(){if(dojo.render.html.opera){this.action = this.action.split("/").pop();}}
+});dojo.widget.defineWidget(
+"dojo.widget.ShowSlide",dojo.widget.HtmlWidget,{title: "",_action: -1,isContainer: true,_components: {},_actions: [],gotoAction: function( action){this._action = action;},_nextAction: function( event){if((this._action + 1) != this._actions.length){++this._action;return true;}
+return false;},_previousAction: function( event){if((this._action - 1) != -1){--this._action;return true;}
+return false;},htmlTitle: null,debug: false,noClick: false,templatePath: dojo.uri.moduleUri("dojo", "widget/templates/ShowSlide.html"),templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/ShowSlide.css"),postCreate: function(){this.htmlTitle.innerHTML = this.title;var actions = this.getChildrenOfType("ShowAction", false);var atypes = {};dojo.lang.forEach(actions, function(act){ atypes[act.on] = true; });this._components = {};var cn = this.containerNode;var nodes = dojo.render.html.ie ? cn.all : cn.getElementsByTagName('*');dojo.lang.forEach(nodes, function(node){var as = node.getAttribute("as");if(as){if(!this._components[as]){this._components[as] = [];}
+this._components[as].push(node);if(!atypes[as]){var tmpAction = dojo.widget.createWidget("ShowAction", { on: as });this.addChild(tmpAction);atypes[as] = true;}}
+}, this);this._actions = [];actions = this.getChildrenOfType("ShowAction", false);dojo.lang.forEach(actions, function(child){this._actions.push(child);var components = this._components[child.on];for(var j = 0, component; component = components[j]; j++){if(child["action"] && (
+(child.action != "remove")&&
+(child.action != "fadeout")&&
+(child.action != "wipeout")
+) ){this.hideComponent(component);}}
+}, this);},previousAction: function( event){if(!this.parent.stopEvent(event)){return false;}
+var action = this._actions[this._action];if(!action){return false;}
+var on = action.on;while(action.on == on){var components = this._components[on];for(var i = 0, component; component = components[i]; i++){if(
+(action.action == "remove")||
+(action.action == "fadeout")||
+(action.action == "wipeout")
+){if(component.style.display == "none"){component.style.display = "";component.style.visibility = "visible";var exits = true;}
+dojo.html.setOpacity(component, 1);}else if(action.action){this.hideComponent(component);}}
+--this._action;if(exits){return true;}
+if(action.auto == "true"){on = this._actions[this._action].on;}
+action = this._actions[this._action];if(!action){return false;}}
+return true;},hideComponent: function( component){component.style.visibility = "hidden";component.style.backgroundColor = "transparent";var parent = component.parentNode;if((parent)&&(parent.tagName.toLowerCase() == "li")){parent.oldType = parent.style.listStyleType;parent.style.listStyleType = "none";}},nextAction: function( event){if(!this.parent.stopEvent(event)){return false;}
+if(!this._nextAction(this)){return false;}
+var action = this._actions[this._action];if(!action){return false;}
+var tmpAction = action["action"];var components = this._components[action.on];for(var i = 0, component; component = components[i]; i++){if(tmpAction){var duration = action.duration || 1000;if((tmpAction == "fade")||(tmpAction == "fadeIn")){dojo.html.setOpacity(component, 0);dojo.lfx.html.fadeShow(component, duration).play(true);}else if(tmpAction == "fadeout"){dojo.lfx.html.fadeHide(component, duration).play(true);}else if(tmpAction == "fly"){var width = dojo.html.getMarginBox(component).width;var position = dojo.html.getAbsolutePosition(component);component.style.position = "relative";component.style.left = -(width + position.x) + "px";dojo.lfx.html.slideBy(component, { top: 0, left: (width + position.x)}, duration, -1, this.callWith).play(true);}else if((tmpAction == "wipe")||(tmpAction == "wipein")){dojo.lfx.html.wipeIn(component, duration).play();}else if(tmpAction == "wipeout"){dojo.lfx.html.wipeOut(component, duration).play();}else if(tmpAction == "color"){var from = n
 ew dojo.gfx.color.Color(action.from).toRgb();var to = new dojo.gfx.color.Color(action.to).toRgb();var anim = new dojo.animation.Animation(new dojo.math.curves.Line(from, to), duration, 0);var node = component;dojo.event.connect(anim, "onAnimate", function(e) {node.style.color = "rgb(" + e.coordsAsInts().join(",") + ")";});anim.play(true);}else if(tmpAction == "bgcolor"){dojo.lfx.html.unhighlight(component, action.to, duration).play();}else if(tmpAction == "remove"){component.style.display = "none";}
+if(tmpAction == "hide"){component.style.visibility = "hidden";}else{component.style.visibility = "visible";}}
+}
+action = this._actions[this._action + 1];if(action && action.auto == "true"){this.nextAction();}
+return true;},callWith: function( node){if(!node){ return; }
+if(dojo.lang.isArray(node)){dojo.lang.forEach(node, arguments.callee);return;}
+var parent = node.parentNode;if((parent)&&(parent.tagName.toLowerCase() == "li")){parent.style.listStyleType = parent.oldType;}}
+});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Show.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.widget.ShowAction");dojo.deprecated("dojo.widget.ShowAction", "just do dojo.require('dojo.widget.Show')", "0.6");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowAction.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.widget.ShowSlide");dojo.deprecated("dojo.widget.ShowAction", "just do dojo.require('dojo.widget.Show')", "0.6");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/ShowSlide.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,11 @@
+
+dojo.provide("dojo.widget.SlideShow");dojo.require("dojo.event.*");dojo.require("dojo.widget.*");dojo.require("dojo.lfx.*");dojo.require("dojo.html.display");dojo.widget.defineWidget(
+"dojo.widget.SlideShow",dojo.widget.HtmlWidget,{templatePath: dojo.uri.moduleUri("dojo", "widget/templates/SlideShow.html"),templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/SlideShow.css"),imgUrls: [],imgUrlBase: "",delay: 4000,transitionInterval: 2000,imgWidth: 800,imgHeight: 600,preventCache: false,stopped: false,_urlsIdx: 0,_background: "img2",_foreground: "img1",fadeAnim: null,startStopButton: null,img1: null,img2: null,postMixInProperties: function(){this.width = this.imgWidth + "px";this.height = this.imgHeight + "px";},fillInTemplate: function(){if(dojo.render.html.safari && this.imgUrls.length == 2) {this.preventCache = true;}
+dojo.html.setOpacity(this.img1, 0.9999);dojo.html.setOpacity(this.img2, 0.9999);if(this.imgUrls.length>1){this.img2.src = this.imgUrlBase+this.imgUrls[this._urlsIdx++] + this._getUrlSuffix();this._endTransition();}else{this.img1.src = this.imgUrlBase+this.imgUrls[this._urlsIdx++] + this._getUrlSuffix();}},_getUrlSuffix: function() {if(this.preventCache) {return "?ts=" + (new Date()).getTime();} else {return "";}},togglePaused: function(){if(this.stopped){this.stopped = false;this._backgroundImageLoaded();this.startStopButton.value= "pause";}else{this.stopped = true;this.startStopButton.value= "play";}},_backgroundImageLoaded: function(){if(this.stopped){ return; }
+if(this.fadeAnim) {this.fadeAnim.stop();}
+this.fadeAnim = dojo.lfx.fadeOut(this[this._foreground],this.transitionInterval, null);dojo.event.connect(this.fadeAnim,"onEnd",this,"_endTransition");this.fadeAnim.play();},_endTransition: function(){with(this[this._background].style){ zIndex = parseInt(zIndex)+1; }
+with(this[this._foreground].style){ zIndex = parseInt(zIndex)-1; }
+var tmp = this._foreground;this._foreground = this._background;this._background = tmp;this._loadNextImage();},_loadNextImage: function(){dojo.event.kwConnect({srcObj: this[this._background],srcFunc: "onload",adviceObj: this,adviceFunc: "_backgroundImageLoaded",once: true,delay: this.delay
+});dojo.html.setOpacity(this[this._background], 1.0);this[this._background].src = this.imgUrlBase+this.imgUrls[this._urlsIdx++];if(this._urlsIdx>(this.imgUrls.length-1)){this._urlsIdx = 0;}}
+}
+);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/SlideShow.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js?view=auto&rev=498423
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js Sun Jan 21 10:25:59 2007
@@ -0,0 +1,105 @@
+
+dojo.provide("dojo.widget.Slider");dojo.require("dojo.event.*");dojo.require("dojo.dnd.*");dojo.require("dojo.dnd.HtmlDragMove");dojo.require("dojo.widget.*");dojo.require("dojo.html.layout");dojo.widget.defineWidget (
+"dojo.widget.Slider",dojo.widget.HtmlWidget,{minimumX: 0,minimumY: 0,maximumX: 10,maximumY: 10,snapValuesX: 0,snapValuesY: 0,_snapToGrid: true,isEnableX: true,isEnableY: true,_valueSizeX: 0.0,_valueSizeY: 0.0,_minX: 0,_minY: 0,_constraintWidth: 0,_constraintHeight: 0,_clipLeft: 0,_clipRight: 0,_clipTop: 0,_clipBottom: 0,_clipXdelta: 0,_clipYdelta: 0,initialValueX: 0,initialValueY: 0,flipX: false,flipY: false,clickSelect: true,activeDrag: false,templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/Slider.css"),templatePath: dojo.uri.moduleUri("dojo", "widget/templates/Slider.html"),_isDragInProgress: false,bottomButtonSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/slider_down_arrow.png"),topButtonSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/slider_up_arrow.png"),leftButtonSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/slider_left_arrow.png"),rightButtonSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/slider_right_arrow.png"),bac
 kgroundSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/blank.gif"),progressBackgroundSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/blank.gif"),backgroundSize: "width:200px;height:200px;",backgroundStyle: "",buttonStyleX: "",buttonStyleY: "",handleStyle: "",handleSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/slider-button.png"),showButtons: true,_eventCount: 0,_typamaticTimer: null,_typamaticFunction: null,defaultTimeout: 500,timeoutChangeRate: 0.90,_currentTimeout: this.defaultTimeout,_handleKeyEvents: function( evt){if(!evt.key){ return; }
+if(!evt.ctrlKey && !evt.altKey){var isXOnly = this.isEnableX && !this.isEnableY;var isYOnly = this.isEnableY && !this.isEnableX;switch(evt.key){case evt.KEY_LEFT_ARROW:
+dojo.event.browser.stopEvent(evt);if (isYOnly){this._bottomButtonPressed(evt);}else{this._leftButtonPressed(evt);}
+return;case evt.KEY_RIGHT_ARROW:
+dojo.event.browser.stopEvent(evt);if (isYOnly){this._topButtonPressed(evt);}else{this._rightButtonPressed(evt);}
+return;case evt.KEY_DOWN_ARROW:
+dojo.event.browser.stopEvent(evt);if (isXOnly){this._leftButtonPressed(evt);}else{this._bottomButtonPressed(evt);}
+return;case evt.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(evt);if (isXOnly){this._rightButtonPressed(evt);}else{this._topButtonPressed(evt);}
+return;}}
+this._eventCount++;},_pressButton: function( buttonNode){buttonNode.className = buttonNode.className.replace("Outset","Inset");},_releaseButton: function( buttonNode){buttonNode.className = buttonNode.className.replace("Inset","Outset");},_buttonPressed: function( evt,  buttonNode){this._setFocus();if(typeof evt == "object"){if(this._typamaticTimer != null){if(this._typamaticNode == buttonNode){return;}
+clearTimeout(this._typamaticTimer);}
+this._buttonReleased(null);this._eventCount++;this._typamaticTimer = null;this._currentTimeout = this.defaultTimeout;dojo.event.browser.stopEvent(evt);}else if (evt != this._eventCount){this._buttonReleased(null);return false;}
+if (buttonNode == this.leftButtonNode && this.isEnableX){this._snapX(dojo.html.getPixelValue (this.sliderHandleNode,"left") - this._valueSizeX);}
+else if (buttonNode == this.rightButtonNode && this.isEnableX){this._snapX(dojo.html.getPixelValue (this.sliderHandleNode,"left") + this._valueSizeX);}
+else if (buttonNode == this.topButtonNode && this.isEnableY){this._snapY(dojo.html.getPixelValue (this.sliderHandleNode,"top") - this._valueSizeY);}
+else if (buttonNode == this.bottomButtonNode && this.isEnableY){this._snapY(dojo.html.getPixelValue (this.sliderHandleNode,"top") + this._valueSizeY);}
+else {return false;}
+this._pressButton(buttonNode);this.notifyListeners();this._typamaticNode = buttonNode;this._typamaticTimer = dojo.lang.setTimeout(this, "_buttonPressed", this._currentTimeout, this._eventCount, buttonNode);this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate);return false;},_bottomButtonPressed: function( evt){return this._buttonPressed(evt,this.bottomButtonNode);},_bottomButtonDoubleClicked: function( evt){var rc = this._bottomButtonPressed(evt);dojo.lang.setTimeout( this, "_buttonReleased", 50, null);return rc;},_topButtonPressed: function( evt){return this._buttonPressed(evt,this.topButtonNode);},_topButtonDoubleClicked: function( evt){var rc = this._topButtonPressed(evt);dojo.lang.setTimeout( this, "_buttonReleased", 50, null);return rc;},_leftButtonPressed: function( evt){return this._buttonPressed(evt,this.leftButtonNode);},_leftButtonDoubleClicked: function( evt){var rc = this._leftButtonPressed(evt);dojo.lang.setTimeout( this, "_buttonRelea
 sed", 50, null);return rc;},_rightButtonPressed: function( evt){return this._buttonPressed(evt,this.rightButtonNode);},_rightButtonDoubleClicked: function( evt){var rc = this._rightButtonPressed(evt);dojo.lang.setTimeout( this, "_buttonReleased", 50, null);return rc;},_buttonReleased: function( evt){if(typeof evt == "object" && evt != null && typeof evt.keyCode != "undefined" && evt.keyCode != null){var keyCode = evt.keyCode;switch(keyCode){case evt.KEY_LEFT_ARROW:
+case evt.KEY_RIGHT_ARROW:
+case evt.KEY_DOWN_ARROW:
+case evt.KEY_UP_ARROW:
+dojo.event.browser.stopEvent(evt);break;}}
+this._releaseButton(this.topButtonNode);this._releaseButton(this.bottomButtonNode);this._releaseButton(this.leftButtonNode);this._releaseButton(this.rightButtonNode);this._eventCount++;if(this._typamaticTimer != null){clearTimeout(this._typamaticTimer);}
+this._typamaticTimer = null;this._currentTimeout = this.defaultTimeout;},_mouseWheeled: function( evt){var scrollAmount = 0;if(typeof evt.wheelDelta == 'number'){scrollAmount = evt.wheelDelta;}else if (typeof evt.detail == 'number'){scrollAmount = -evt.detail;}
+if (this.isEnableY){if(scrollAmount > 0){this._topButtonPressed(evt);this._buttonReleased(evt);}else if (scrollAmount < 0){this._bottomButtonPressed(evt);this._buttonReleased(evt);}} else if (this.isEnableX){if(scrollAmount > 0){this._rightButtonPressed(evt);this._buttonReleased(evt);}else if (scrollAmount < 0){this._leftButtonPressed(evt);this._buttonReleased(evt);}}
+},_discardEvent: function( evt){dojo.event.browser.stopEvent(evt);},_setFocus: function(){if (this.focusNode.focus){this.focusNode.focus();}},fillInTemplate: function ( args,  frag)
+{var source = this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode, source);var padding = this.domNode.style.padding;if (dojo.lang.isString(padding) && padding != "" && padding != "0px" && padding != "0px 0px 0px 0px"){this.topBorderNode.style.padding =
+this.bottomBorderNode.style.padding = padding;this.topBorderNode.style.paddingBottom = "0px";this.bottomBorderNode.style.paddingTop = "0px";this.rightBorderNode.style.paddingRight = this.domNode.style.paddingRight;this.leftBorderNode.style.paddingLeft= this.domNode.style.paddingLeft;this.domNode.style.padding = "0px 0px 0px 0px";}
+var borderWidth = this.domNode.style.borderWidth;if (dojo.lang.isString(borderWidth) && borderWidth != "" && borderWidth != "0px" && borderWidth != "0px 0px 0px 0px"){this.topBorderNode.style.borderStyle =
+this.rightBorderNode.style.borderStyle =
+this.bottomBorderNode.style.borderStyle =
+this.leftBorderNode.style.borderStyle =
+this.domNode.style.borderStyle;this.topBorderNode.style.borderColor =
+this.rightBorderNode.style.borderColor =
+this.bottomBorderNode.style.borderColor =
+this.leftBorderNode.style.borderColor =
+this.domNode.style.borderColor;this.topBorderNode.style.borderWidth =
+this.bottomBorderNode.style.borderWidth = borderWidth;this.topBorderNode.style.borderBottomWidth = "0px";this.bottomBorderNode.style.borderTopWidth = "0px";this.rightBorderNode.style.borderRightWidth = this.domNode.style.borderRightWidth;this.leftBorderNode.style.borderLeftWidth = this.domNode.style.borderLeftWidth;this.domNode.style.borderWidth = "0px 0px 0px 0px";}
+this._handleMove = new dojo.widget._SliderDragMoveSource (this.sliderHandleNode);this._handleMove.setParent (this);if (this.clickSelect){dojo.event.connect (this.constrainingContainerNode, "onmousedown", this, "_onClick");}
+if (this.isEnableX){this.setValueX (!isNaN(this.initialValueX) ? this.initialValueX : (!isNaN(this.minimumX) ? this.minimumX : 0));}
+if (!this.isEnableX || !this.showButtons){this.rightButtonNode.style.width = "1px";this.rightButtonNode.style.visibility = "hidden";this.leftButtonNode.style.width = "1px";this.leftButtonNode.style.visibility = "hidden";}
+if (this.isEnableY){this.setValueY (!isNaN(this.initialValueY) ? this.initialValueY : (!isNaN(this.minimumY) ? this.minimumY : 0));}
+if (!this.isEnableY || !this.showButtons){this.bottomButtonNode.style.width = "1px";this.bottomButtonNode.style.visibility = "hidden";this.topButtonNode.style.width = "1px";this.topButtonNode.style.visibility = "hidden";}
+if(this.focusNode.addEventListener){this.focusNode.addEventListener('DOMMouseScroll', dojo.lang.hitch(this, "_mouseWheeled"), false);}},_snapX: function( x){if (x < 0){ x = 0; }
+else if (x > this._constraintWidth){ x = this._constraintWidth; }
+else {var selectedValue = Math.round (x / this._valueSizeX);x = Math.round (selectedValue * this._valueSizeX);}
+this.sliderHandleNode.style.left = x + "px";if (this.flipX){this._clipLeft = x + this._clipXdelta;} else {this._clipRight = x + this._clipXdelta;}
+this.progressBackgroundNode.style.clip = "rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";},_calc_valueSizeX: function (){var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);if (isNaN(constrainingCtrBox.width) || isNaN(sliderHandleBox.width) || constrainingCtrBox.width <= 0 || sliderHandleBox.width <= 0){return false;}
+this._constraintWidth = constrainingCtrBox.width
++ dojo.html.getPadding(this.constrainingContainerNode).width
+- sliderHandleBox.width;if (this.flipX){this._clipLeft = this._clipRight = constrainingCtrBox.width;} else {this._clipLeft = this._clipRight = 0;}
+this._clipXdelta = sliderHandleBox.width >> 1;if (!this.isEnableY){this._clipTop = 0;this._clipBottom = constrainingCtrBox.height;}
+if (this._constraintWidth <= 0){ return false; }
+if (this.snapValuesX == 0){this.snapValuesX = this._constraintWidth + 1;}
+this._valueSizeX = this._constraintWidth / (this.snapValuesX - 1);return true;},setValueX: function ( value){if (0.0 == this._valueSizeX){if (this._calc_valueSizeX () == false){dojo.lang.setTimeout(this, "setValueX", 100, value);return;}}
+if (isNaN(value)){value = 0;}
+if (value > this.maximumX){value = this.maximumX;}
+else if (value < this.minimumX){value = this.minimumX;}
+var pixelPercent = (value-this.minimumX) / (this.maximumX-this.minimumX);if (this.flipX){pixelPercent = 1.0 - pixelPercent;}
+this._snapX (pixelPercent * this._constraintWidth);this.notifyListeners();},getValueX: function (){var pixelPercent = dojo.html.getPixelValue (this.sliderHandleNode,"left") / this._constraintWidth;if (this.flipX){pixelPercent = 1.0 - pixelPercent;}
+return Math.round (pixelPercent * (this.snapValuesX-1)) * ((this.maximumX-this.minimumX) / (this.snapValuesX-1)) + this.minimumX;},_snapY: function ( y){if (y < 0){ y = 0; }
+else if (y > this._constraintHeight){ y = this._constraintHeight; }
+else {var selectedValue = Math.round (y / this._valueSizeY);y = Math.round (selectedValue * this._valueSizeY);}
+this.sliderHandleNode.style.top = y + "px";if (this.flipY){this._clipTop = y + this._clipYdelta;} else {this._clipBottom = y + this._clipYdelta;}
+this.progressBackgroundNode.style.clip = "rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";},_calc_valueSizeY: function (){var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode);var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode);if (isNaN(constrainingCtrBox.height) || isNaN(sliderHandleBox.height) || constrainingCtrBox.height <= 0 || sliderHandleBox.height <= 0){return false;}
+this._constraintHeight = constrainingCtrBox.height
++ dojo.html.getPadding(this.constrainingContainerNode).height
+- sliderHandleBox.height;if (this.flipY){this._clipTop = this._clipBottom = constrainingCtrBox.height;} else {this._clipTop = this._clipBottom = 0;}
+this._clipYdelta = sliderHandleBox.height >> 1;if (!this.isEnableX){this._clipLeft = 0;this._clipRight = constrainingCtrBox.width;}
+if (this._constraintHeight <= 0){ return false; }
+if (this.snapValuesY == 0){this.snapValuesY = this._constraintHeight + 1;}
+this._valueSizeY = this._constraintHeight / (this.snapValuesY - 1);return true;},setValueY: function ( value){if (0.0 == this._valueSizeY){if (this._calc_valueSizeY () == false){dojo.lang.setTimeout(this, "setValueY", 100, value);return;}}
+if (isNaN(value)){value = 0;}
+if (value > this.maximumY){value = this.maximumY;}
+else if (value < this.minimumY){value = this.minimumY;}
+var pixelPercent = (value-this.minimumY) / (this.maximumY-this.minimumY);if (this.flipY){pixelPercent = 1.0 - pixelPercent;}
+this._snapY (pixelPercent * this._constraintHeight);this.notifyListeners();},getValueY: function (){var pixelPercent = dojo.html.getPixelValue (this.sliderHandleNode,"top") / this._constraintHeight;if (this.flipY){pixelPercent = 1.0 - pixelPercent;}
+return Math.round (pixelPercent * (this.snapValuesY-1)) * ((this.maximumY-this.minimumY) / (this.snapValuesY-1)) + this.minimumY;},_onClick: function( evt){if (this._isDragInProgress){return;}
+var parent = dojo.html.getAbsolutePosition(this.constrainingContainerNode, true, dojo.html.boxSizing.MARGIN_BOX);var content = dojo.html.getContentBox(this._handleMove.domNode);if (this.isEnableX){var x = evt.pageX - parent.x - (content.width >> 1);this._snapX(x);}
+if (this.isEnableY){var y = evt.pageY - parent.y - (content.height >> 1);this._snapY(y);}
+this.notifyListeners();},notifyListeners: function(){this.onValueChanged(this.getValueX(), this.getValueY());},onValueChanged: function( x,  y){}}
+);dojo.widget.defineWidget (
+"dojo.widget.SliderHorizontal",dojo.widget.Slider,{isEnableX: true,isEnableY: false,initialValue: "",snapValues: "",minimum: "",maximum: "",buttonStyle: "",backgroundSize: "height:10px;width:200px;",backgroundSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/slider-bg.gif"),flip: false,postMixInProperties: function(){dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this, arguments);if (!isNaN(parseFloat(this.initialValue))){this.initialValueX = parseFloat(this.initialValue);}
+if (!isNaN(parseFloat(this.minimum))){this.minimumX = parseFloat(this.minimum);}
+if (!isNaN(parseFloat(this.maximum))){this.maximumX = parseFloat(this.maximum);}
+if (!isNaN(parseInt(this.snapValues))){this.snapValuesX = parseInt(this.snapValues);}
+if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != ""){this.buttonStyleX = this.buttonStyle;}
+if (dojo.lang.isBoolean(this.flip)){this.flipX = this.flip;}},notifyListeners: function(){this.onValueChanged(this.getValueX());},getValue: function (){return this.getValueX ();},setValue: function ( value){this.setValueX (value);},onValueChanged: function( value){}}
+);dojo.widget.defineWidget (
+"dojo.widget.SliderVertical",dojo.widget.Slider,{isEnableX: false,isEnableY: true,initialValue: "",snapValues: "",minimum: "",maximum: "",buttonStyle: "",backgroundSize: "width:10px;height:200px;",backgroundSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/slider-bg-vert.gif"),flip: false,postMixInProperties: function(){dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this, arguments);if (!isNaN(parseFloat(this.initialValue))){this.initialValueY = parseFloat(this.initialValue);}
+if (!isNaN(parseFloat(this.minimum))){this.minimumY = parseFloat(this.minimum);}
+if (!isNaN(parseFloat(this.maximum))){this.maximumY = parseFloat(this.maximum);}
+if (!isNaN(parseInt(this.snapValues))){this.snapValuesY = parseInt(this.snapValues);}
+if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != ""){this.buttonStyleY = this.buttonStyle;}
+if (dojo.lang.isBoolean(this.flip)){this.flipY = this.flip;}},notifyListeners: function(){this.onValueChanged(this.getValueY());},getValue: function (){return this.getValueY ();},setValue: function ( value){this.setValueY (value);},onValueChanged: function( value){}}
+);dojo.declare (
+"dojo.widget._SliderDragMoveSource",dojo.dnd.HtmlDragMoveSource,{slider: null,onDragStart: function( evt){this.slider._isDragInProgress = true;var dragObj = this.createDragMoveObject ();this.slider.notifyListeners();return dragObj;},onDragEnd: function( evt){this.slider._isDragInProgress = false;this.slider.notifyListeners();},createDragMoveObject: function (){var dragObj = new dojo.widget._SliderDragMoveObject (this.dragObject, this.type);dragObj.slider = this.slider;if (this.dragClass){dragObj.dragClass = this.dragClass;}
+return dragObj;},setParent: function ( slider){this.slider = slider;}});dojo.declare (
+"dojo.widget._SliderDragMoveObject",dojo.dnd.HtmlDragMoveObject,{slider: null,onDragMove: function( evt){this.updateDragOffset ();if (this.slider.isEnableX){var x = this.dragOffset.x + evt.pageX;this.slider._snapX(x);}
+if (this.slider.isEnableY){var y = this.dragOffset.y + evt.pageY;this.slider._snapY(y);}
+if(this.slider.activeDrag){this.slider.notifyListeners();}}
+});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Slider.js
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message