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 2008/02/04 23:08:37 UTC

svn commit: r618461 [29/43] - in /tapestry/tapestry4/trunk/tapestry-framework/src/js: dojo-0.4.3-custom-4.1.5/ dojo-0.4.3-custom-4.1.5/nls/ dojo-0.4.3-custom-4.1.5/src/ dojo-0.4.3-custom-4.1.5/src/animation/ dojo-0.4.3-custom-4.1.5/src/cal/ dojo-0.4.3-...

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/DropdownTimePicker.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/DropdownTimePicker.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/DropdownTimePicker.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/DropdownTimePicker.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,143 @@
+dojo.provide("dojo.widget.DropdownTimePicker");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.DropdownContainer");
+dojo.require("dojo.widget.TimePicker");
+dojo.require("dojo.event.*");
+dojo.require("dojo.html.*");
+dojo.require("dojo.date.format");
+dojo.require("dojo.date.serialize");
+dojo.require("dojo.i18n.common");
+dojo.requireLocalization("dojo.widget","DropdownTimePicker",null,"ROOT");
+dojo.widget.defineWidget("dojo.widget.DropdownTimePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/timeIcon.gif"),formatLength:"short",displayFormat:"",timeFormat:"",saveFormat:"",value:"",name:"",postMixInProperties:function(){
+dojo.widget.DropdownTimePicker.superclass.postMixInProperties.apply(this,arguments);
+var _1=dojo.i18n.getLocalization("dojo.widget","DropdownTimePicker",this.lang);
+this.iconAlt=_1.selectTime;
+if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
+this.value=new Date();
+}
+if(this.value&&isNaN(this.value)){
+var _2=this.value;
+this.value=dojo.date.fromRfc3339(this.value);
+if(!this.value){
+var d=dojo.date.format(new Date(),{selector:"dateOnly",datePattern:"yyyy-MM-dd"});
+var c=_2.split(":");
+for(var i=0;i<c.length;++i){
+if(c[i].length==1){
+c[i]="0"+c[i];
+}
+}
+_2=c.join(":");
+this.value=dojo.date.fromRfc3339(d+"T"+_2);
+dojo.deprecated("dojo.widget.DropdownTimePicker","time attributes must be passed in Rfc3339 format","0.5");
+}
+}
+if(this.value&&!isNaN(this.value)){
+this.value=new Date(this.value);
+}
+},fillInTemplate:function(){
+dojo.widget.DropdownTimePicker.superclass.fillInTemplate.apply(this,arguments);
+var _6="";
+if(this.value instanceof Date){
+_6=this.value;
+}else{
+if(this.value){
+var _7=this.value;
+var d=dojo.date.format(new Date(),{selector:"dateOnly",datePattern:"yyyy-MM-dd"});
+var c=_7.split(":");
+for(var i=0;i<c.length;++i){
+if(c[i].length==1){
+c[i]="0"+c[i];
+}
+}
+_7=c.join(":");
+_6=dojo.date.fromRfc3339(d+"T"+_7);
+}
+}
+var _b={widgetContainerId:this.widgetId,lang:this.lang,value:_6};
+this.timePicker=dojo.widget.createWidget("TimePicker",_b,this.containerNode,"child");
+dojo.event.connect(this.timePicker,"onValueChanged",this,"_updateText");
+if(this.value){
+this._updateText();
+}
+this.containerNode.style.zIndex=this.zIndex;
+this.containerNode.explodeClassName="timeContainer";
+this.valueNode.name=this.name;
+},getValue:function(){
+return this.valueNode.value;
+},getTime:function(){
+return this.timePicker.storedTime;
+},setValue:function(_c){
+this.setTime(_c);
+},setTime:function(_d){
+var _e="";
+if(_d instanceof Date){
+_e=_d;
+}else{
+if(this.value){
+var _f=this.value;
+var d=dojo.date.format(new Date(),{selector:"dateOnly",datePattern:"yyyy-MM-dd"});
+var c=_f.split(":");
+for(var i=0;i<c.length;++i){
+if(c[i].length==1){
+c[i]="0"+c[i];
+}
+}
+_f=c.join(":");
+_e=dojo.date.fromRfc3339(d+"T"+_f);
+}
+}
+this.timePicker.setTime(_e);
+this._syncValueNode();
+},_updateText:function(){
+if(this.timePicker.selectedTime.anyTime){
+this.inputNode.value="";
+}else{
+if(this.timeFormat){
+dojo.deprecated("dojo.widget.DropdownTimePicker","Must use displayFormat attribute instead of timeFormat.  See dojo.date.format for specification.","0.5");
+this.inputNode.value=dojo.date.strftime(this.timePicker.time,this.timeFormat,this.lang);
+}else{
+this.inputNode.value=dojo.date.format(this.timePicker.time,{formatLength:this.formatLength,timePattern:this.displayFormat,selector:"timeOnly",locale:this.lang});
+}
+}
+this._syncValueNode();
+this.onValueChanged(this.getTime());
+this.hideContainer();
+},onValueChanged:function(_13){
+},onInputChange:function(){
+if(this.dateFormat){
+dojo.deprecated("dojo.widget.DropdownTimePicker","Cannot parse user input.  Must use displayFormat attribute instead of dateFormat.  See dojo.date.format for specification.","0.5");
+}else{
+var _14=dojo.string.trim(this.inputNode.value);
+if(_14){
+var _15=dojo.date.parse(_14,{formatLength:this.formatLength,timePattern:this.displayFormat,selector:"timeOnly",locale:this.lang});
+if(_15){
+this.setTime(_15);
+}
+}else{
+this.valueNode.value=_14;
+}
+}
+if(_14){
+this._updateText();
+}
+},_syncValueNode:function(){
+var _16=this.timePicker.time;
+var _17;
+switch(this.saveFormat.toLowerCase()){
+case "rfc":
+case "iso":
+case "":
+_17=dojo.date.toRfc3339(_16,"timeOnly");
+break;
+case "posix":
+case "unix":
+_17=Number(_16);
+break;
+default:
+_17=dojo.date.format(_16,{datePattern:this.saveFormat,selector:"timeOnly",locale:this.lang});
+}
+this.valueNode.value=_17;
+},destroy:function(_18){
+this.timePicker.destroy(_18);
+dojo.widget.DropdownTimePicker.superclass.destroy.apply(this,arguments);
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/DropdownTimePicker.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/DropdownTimePicker.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/DropdownTimePicker.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,377 @@
+dojo.provide("dojo.widget.Editor");
+dojo.deprecated("dojo.widget.Editor","is replaced by dojo.widget.Editor2","0.5");
+dojo.require("dojo.io.*");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.Toolbar");
+dojo.require("dojo.widget.RichText");
+dojo.require("dojo.widget.ColorPalette");
+dojo.require("dojo.string.extras");
+dojo.widget.tags.addParseTreeHandler("dojo:Editor");
+dojo.widget.Editor=function(){
+dojo.widget.HtmlWidget.call(this);
+this.contentFilters=[];
+this._toolbars=[];
+};
+dojo.inherits(dojo.widget.Editor,dojo.widget.HtmlWidget);
+dojo.widget.Editor.itemGroups={textGroup:["bold","italic","underline","strikethrough"],blockGroup:["formatBlock","fontName","fontSize"],justifyGroup:["justifyleft","justifycenter","justifyright"],commandGroup:["save","cancel"],colorGroup:["forecolor","hilitecolor"],listGroup:["insertorderedlist","insertunorderedlist"],indentGroup:["outdent","indent"],linkGroup:["createlink","insertimage","inserthorizontalrule"]};
+dojo.widget.Editor.formatBlockValues={"Normal":"p","Main heading":"h2","Sub heading":"h3","Sub sub heading":"h4","Preformatted":"pre"};
+dojo.widget.Editor.fontNameValues={"Arial":"Arial, Helvetica, sans-serif","Verdana":"Verdana, sans-serif","Times New Roman":"Times New Roman, serif","Courier":"Courier New, monospace"};
+dojo.widget.Editor.fontSizeValues={"1 (8 pt)":"1","2 (10 pt)":"2","3 (12 pt)":"3","4 (14 pt)":"4","5 (18 pt)":"5","6 (24 pt)":"6","7 (36 pt)":"7"};
+dojo.widget.Editor.defaultItems=["commandGroup","|","blockGroup","|","textGroup","|","colorGroup","|","justifyGroup","|","listGroup","indentGroup","|","linkGroup"];
+dojo.widget.Editor.supportedCommands=["save","cancel","|","-","/"," "];
+dojo.lang.extend(dojo.widget.Editor,{widgetType:"Editor",saveUrl:"",saveMethod:"post",saveArgName:"editorContent",closeOnSave:false,items:dojo.widget.Editor.defaultItems,formatBlockItems:dojo.lang.shallowCopy(dojo.widget.Editor.formatBlockValues),fontNameItems:dojo.lang.shallowCopy(dojo.widget.Editor.fontNameValues),fontSizeItems:dojo.lang.shallowCopy(dojo.widget.Editor.fontSizeValues),getItemProperties:function(_1){
+var _2={};
+switch(_1.toLowerCase()){
+case "bold":
+case "italic":
+case "underline":
+case "strikethrough":
+_2.toggleItem=true;
+break;
+case "justifygroup":
+_2.defaultButton="justifyleft";
+_2.preventDeselect=true;
+_2.buttonGroup=true;
+break;
+case "listgroup":
+_2.buttonGroup=true;
+break;
+case "save":
+case "cancel":
+_2.label=dojo.string.capitalize(_1);
+break;
+case "forecolor":
+case "hilitecolor":
+_2.name=_1;
+_2.toggleItem=true;
+_2.icon=this.getCommandImage(_1);
+break;
+case "formatblock":
+_2.name="formatBlock";
+_2.values=this.formatBlockItems;
+break;
+case "fontname":
+_2.name="fontName";
+_2.values=this.fontNameItems;
+case "fontsize":
+_2.name="fontSize";
+_2.values=this.fontSizeItems;
+}
+return _2;
+},validateItems:true,focusOnLoad:true,minHeight:"1em",_richText:null,_richTextType:"RichText",_toolbarContainer:null,_toolbarContainerType:"ToolbarContainer",_toolbars:[],_toolbarType:"Toolbar",_toolbarItemType:"ToolbarItem",buildRendering:function(_3,_4){
+var _5=_4["dojo:"+this.widgetType.toLowerCase()]["nodeRef"];
+var _6=dojo.widget.createWidget(this._richTextType,{focusOnLoad:this.focusOnLoad,minHeight:this.minHeight},_5);
+var _7=this;
+setTimeout(function(){
+_7.setRichText(_6);
+_7.initToolbar();
+_7.fillInTemplate(_3,_4);
+},0);
+},setRichText:function(_8){
+if(this._richText&&this._richText==_8){
+dojo.debug("Already set the richText to this richText!");
+return;
+}
+if(this._richText&&!this._richText.isClosed){
+dojo.debug("You are switching richTexts yet you haven't closed the current one. Losing reference!");
+}
+this._richText=_8;
+dojo.event.connect(this._richText,"close",this,"onClose");
+dojo.event.connect(this._richText,"onLoad",this,"onLoad");
+dojo.event.connect(this._richText,"onDisplayChanged",this,"updateToolbar");
+if(this._toolbarContainer){
+this._toolbarContainer.enable();
+this.updateToolbar(true);
+}
+},initToolbar:function(){
+if(this._toolbarContainer){
+return;
+}
+this._toolbarContainer=dojo.widget.createWidget(this._toolbarContainerType);
+var tb=this.addToolbar();
+var _a=true;
+for(var i=0;i<this.items.length;i++){
+if(this.items[i]=="\n"){
+tb=this.addToolbar();
+}else{
+if((this.items[i]=="|")&&(!_a)){
+_a=true;
+}else{
+_a=this.addItem(this.items[i],tb);
+}
+}
+}
+this.insertToolbar(this._toolbarContainer.domNode,this._richText.domNode);
+},insertToolbar:function(_c,_d){
+dojo.html.insertBefore(_c,_d);
+},addToolbar:function(_e){
+this.initToolbar();
+if(!(_e instanceof dojo.widget.Toolbar)){
+_e=dojo.widget.createWidget(this._toolbarType);
+}
+this._toolbarContainer.addChild(_e);
+this._toolbars.push(_e);
+return _e;
+},addItem:function(_f,tb,_11){
+if(!tb){
+tb=this._toolbars[0];
+}
+var cmd=((_f)&&(!dojo.lang.isUndefined(_f["getValue"])))?cmd=_f["getValue"]():_f;
+var _13=dojo.widget.Editor.itemGroups;
+if(_f instanceof dojo.widget.ToolbarItem){
+tb.addChild(_f);
+}else{
+if(_13[cmd]){
+var _14=_13[cmd];
+var _15=true;
+if(cmd=="justifyGroup"||cmd=="listGroup"){
+var _16=[cmd];
+for(var i=0;i<_14.length;i++){
+if(_11||this.isSupportedCommand(_14[i])){
+_16.push(this.getCommandImage(_14[i]));
+}else{
+_15=false;
+}
+}
+if(_16.length){
+var btn=tb.addChild(_16,null,this.getItemProperties(cmd));
+dojo.event.connect(btn,"onClick",this,"_action");
+dojo.event.connect(btn,"onChangeSelect",this,"_action");
+}
+return _15;
+}else{
+for(var i=0;i<_14.length;i++){
+if(!this.addItem(_14[i],tb)){
+_15=false;
+}
+}
+return _15;
+}
+}else{
+if((!_11)&&(!this.isSupportedCommand(cmd))){
+return false;
+}
+if(_11||this.isSupportedCommand(cmd)){
+cmd=cmd.toLowerCase();
+if(cmd=="formatblock"){
+var _19=dojo.widget.createWidget("ToolbarSelect",{name:"formatBlock",values:this.formatBlockItems});
+tb.addChild(_19);
+var _1a=this;
+dojo.event.connect(_19,"onSetValue",function(_1b,_1c){
+_1a.onAction("formatBlock",_1c);
+});
+}else{
+if(cmd=="fontname"){
+var _19=dojo.widget.createWidget("ToolbarSelect",{name:"fontName",values:this.fontNameItems});
+tb.addChild(_19);
+dojo.event.connect(_19,"onSetValue",dojo.lang.hitch(this,function(_1d,_1e){
+this.onAction("fontName",_1e);
+}));
+}else{
+if(cmd=="fontsize"){
+var _19=dojo.widget.createWidget("ToolbarSelect",{name:"fontSize",values:this.fontSizeItems});
+tb.addChild(_19);
+dojo.event.connect(_19,"onSetValue",dojo.lang.hitch(this,function(_1f,_20){
+this.onAction("fontSize",_20);
+}));
+}else{
+if(dojo.lang.inArray(cmd,["forecolor","hilitecolor"])){
+var btn=tb.addChild(dojo.widget.createWidget("ToolbarColorDialog",this.getItemProperties(cmd)));
+dojo.event.connect(btn,"onSetValue",this,"_setValue");
+}else{
+var btn=tb.addChild(this.getCommandImage(cmd),null,this.getItemProperties(cmd));
+if(cmd=="save"){
+dojo.event.connect(btn,"onClick",this,"_save");
+}else{
+if(cmd=="cancel"){
+dojo.event.connect(btn,"onClick",this,"_close");
+}else{
+dojo.event.connect(btn,"onClick",this,"_action");
+dojo.event.connect(btn,"onChangeSelect",this,"_action");
+}
+}
+}
+}
+}
+}
+}
+}
+}
+return true;
+},enableToolbar:function(){
+if(this._toolbarContainer){
+this._toolbarContainer.domNode.style.display="";
+this._toolbarContainer.enable();
+}
+},disableToolbar:function(_21){
+if(_21){
+if(this._toolbarContainer){
+this._toolbarContainer.domNode.style.display="none";
+}
+}else{
+if(this._toolbarContainer){
+this._toolbarContainer.disable();
+}
+}
+},_updateToolbarLastRan:null,_updateToolbarTimer:null,_updateToolbarFrequency:500,updateToolbar:function(_22){
+if(!this._toolbarContainer){
+return;
+}
+var _23=new Date()-this._updateToolbarLastRan;
+if(!_22&&this._updateToolbarLastRan&&(_23<this._updateToolbarFrequency)){
+clearTimeout(this._updateToolbarTimer);
+var _24=this;
+this._updateToolbarTimer=setTimeout(function(){
+_24.updateToolbar();
+},this._updateToolbarFrequency/2);
+return;
+}else{
+this._updateToolbarLastRan=new Date();
+}
+var _25=this._toolbarContainer.getItems();
+for(var i=0;i<_25.length;i++){
+var _27=_25[i];
+if(_27 instanceof dojo.widget.ToolbarSeparator){
+continue;
+}
+var cmd=_27._name;
+if(cmd=="save"||cmd=="cancel"){
+continue;
+}else{
+if(cmd=="justifyGroup"){
+try{
+if(!this._richText.queryCommandEnabled("justifyleft")){
+_27.disable(false,true);
+}else{
+_27.enable(false,true);
+var _29=_27.getItems();
+for(var j=0;j<_29.length;j++){
+var _2b=_29[j]._name;
+var _2c=this._richText.queryCommandValue(_2b);
+if(typeof _2c=="boolean"&&_2c){
+_2c=_2b;
+break;
+}else{
+if(typeof _2c=="string"){
+_2c="justify"+_2c;
+}else{
+_2c=null;
+}
+}
+}
+if(!_2c){
+_2c="justifyleft";
+}
+_27.setValue(_2c,false,true);
+}
+}
+catch(err){
+}
+}else{
+if(cmd=="listGroup"){
+var _2d=_27.getItems();
+for(var j=0;j<_2d.length;j++){
+this.updateItem(_2d[j]);
+}
+}else{
+this.updateItem(_27);
+}
+}
+}
+}
+},updateItem:function(_2e){
+try{
+var cmd=_2e._name;
+var _30=this._richText.queryCommandEnabled(cmd);
+_2e.setEnabled(_30,false,true);
+var _31=this._richText.queryCommandState(cmd);
+if(_31&&cmd=="underline"){
+_31=!this._richText.queryCommandEnabled("unlink");
+}
+_2e.setSelected(_31,false,true);
+return true;
+}
+catch(err){
+return false;
+}
+},supportedCommands:dojo.widget.Editor.supportedCommands.concat(),isSupportedCommand:function(cmd){
+var yes=dojo.lang.inArray(cmd,this.supportedCommands);
+if(!yes){
+try{
+var _34=this._richText||dojo.widget.HtmlRichText.prototype;
+yes=_34.queryCommandAvailable(cmd);
+}
+catch(E){
+}
+}
+return yes;
+},getCommandImage:function(cmd){
+if(cmd=="|"){
+return cmd;
+}else{
+return dojo.uri.moduleUri("dojo.widget","templates/buttons/"+cmd+".gif");
+}
+},_action:function(e){
+this._fire("onAction",e.getValue());
+},_setValue:function(a,b){
+this._fire("onAction",a.getValue(),b);
+},_save:function(e){
+if(!this._richText.isClosed){
+if(this.saveUrl.length){
+var _3a={};
+_3a[this.saveArgName]=this.getHtml();
+dojo.io.bind({method:this.saveMethod,url:this.saveUrl,content:_3a});
+}else{
+dojo.debug("please set a saveUrl for the editor");
+}
+if(this.closeOnSave){
+this._richText.close(e.getName().toLowerCase()=="save");
+}
+}
+},_close:function(e){
+if(!this._richText.isClosed){
+this._richText.close(e.getName().toLowerCase()=="save");
+}
+},onAction:function(cmd,_3d){
+switch(cmd){
+case "createlink":
+if(!(_3d=prompt("Please enter the URL of the link:","http://"))){
+return;
+}
+break;
+case "insertimage":
+if(!(_3d=prompt("Please enter the URL of the image:","http://"))){
+return;
+}
+break;
+}
+this._richText.execCommand(cmd,_3d);
+},fillInTemplate:function(_3e,_3f){
+},_fire:function(_40){
+if(dojo.lang.isFunction(this[_40])){
+var _41=[];
+if(arguments.length==1){
+_41.push(this);
+}else{
+for(var i=1;i<arguments.length;i++){
+_41.push(arguments[i]);
+}
+}
+this[_40].apply(this,_41);
+}
+},getHtml:function(){
+this._richText.contentFilters=this._richText.contentFilters.concat(this.contentFilters);
+return this._richText.getEditorContent();
+},getEditorContent:function(){
+return this.getHtml();
+},onClose:function(_43,_44){
+this.disableToolbar(_44);
+if(_43){
+this._fire("onSave");
+}else{
+this._fire("onCancel");
+}
+},onLoad:function(){
+},onSave:function(){
+},onCancel:function(){
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,399 @@
+dojo.provide("dojo.widget.Editor2");
+dojo.require("dojo.io.*");
+dojo.require("dojo.widget.RichText");
+dojo.require("dojo.widget.Editor2Toolbar");
+dojo.require("dojo.uri.cache");
+dojo.widget.Editor2Manager=new dojo.widget.HandlerManager;
+dojo.lang.mixin(dojo.widget.Editor2Manager,{_currentInstance:null,commandState:{Disabled:0,Latched:1,Enabled:2},getCurrentInstance:function(){
+return this._currentInstance;
+},setCurrentInstance:function(_1){
+this._currentInstance=_1;
+},getCommand:function(_2,_3){
+var _4;
+_3=_3.toLowerCase();
+for(var i=0;i<this._registeredHandlers.length;i++){
+_4=this._registeredHandlers[i](_2,_3);
+if(_4){
+return _4;
+}
+}
+switch(_3){
+case "htmltoggle":
+_4=new dojo.widget.Editor2BrowserCommand(_2,_3);
+break;
+case "formatblock":
+_4=new dojo.widget.Editor2FormatBlockCommand(_2,_3);
+break;
+case "anchor":
+_4=new dojo.widget.Editor2Command(_2,_3);
+break;
+case "createlink":
+_4=new dojo.widget.Editor2DialogCommand(_2,_3,{contentFile:"dojo.widget.Editor2Plugin.CreateLinkDialog",contentClass:"Editor2CreateLinkDialog",title:"Insert/Edit Link",width:"300px",height:"200px"});
+break;
+case "insertimage":
+_4=new dojo.widget.Editor2DialogCommand(_2,_3,{contentFile:"dojo.widget.Editor2Plugin.InsertImageDialog",contentClass:"Editor2InsertImageDialog",title:"Insert/Edit Image",width:"400px",height:"270px"});
+break;
+default:
+var _6=this.getCurrentInstance();
+if((_6&&_6.queryCommandAvailable(_3))||(!_6&&dojo.widget.Editor2.prototype.queryCommandAvailable(_3))){
+_4=new dojo.widget.Editor2BrowserCommand(_2,_3);
+}else{
+dojo.debug("dojo.widget.Editor2Manager.getCommand: Unknown command "+_3);
+return;
+}
+}
+return _4;
+},destroy:function(){
+this._currentInstance=null;
+dojo.widget.HandlerManager.prototype.destroy.call(this);
+}});
+dojo.addOnUnload(dojo.widget.Editor2Manager,"destroy");
+dojo.lang.declare("dojo.widget.Editor2Command",null,function(_7,_8){
+this._editor=_7;
+this._updateTime=0;
+this._name=_8;
+},{_text:"Unknown",execute:function(_9){
+dojo.unimplemented("dojo.widget.Editor2Command.execute");
+},getText:function(){
+return this._text;
+},getState:function(){
+return dojo.widget.Editor2Manager.commandState.Enabled;
+},destroy:function(){
+}});
+dojo.widget.Editor2BrowserCommandNames={"bold":"Bold","copy":"Copy","cut":"Cut","Delete":"Delete","indent":"Indent","inserthorizontalrule":"Horizental Rule","insertorderedlist":"Numbered List","insertunorderedlist":"Bullet List","italic":"Italic","justifycenter":"Align Center","justifyfull":"Justify","justifyleft":"Align Left","justifyright":"Align Right","outdent":"Outdent","paste":"Paste","redo":"Redo","removeformat":"Remove Format","selectall":"Select All","strikethrough":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline","undo":"Undo","unlink":"Remove Link","createlink":"Create Link","insertimage":"Insert Image","htmltoggle":"HTML Source","forecolor":"Foreground Color","hilitecolor":"Background Color","plainformatblock":"Paragraph Style","formatblock":"Paragraph Style","fontsize":"Font Size","fontname":"Font Name"};
+dojo.lang.declare("dojo.widget.Editor2BrowserCommand",dojo.widget.Editor2Command,function(_a,_b){
+var _c=dojo.widget.Editor2BrowserCommandNames[_b.toLowerCase()];
+if(_c){
+this._text=_c;
+}
+},{execute:function(_d){
+this._editor.execCommand(this._name,_d);
+},getState:function(){
+if(this._editor._lastStateTimestamp>this._updateTime||this._state==undefined){
+this._updateTime=this._editor._lastStateTimestamp;
+try{
+if(this._editor.queryCommandEnabled(this._name)){
+if(this._editor.queryCommandState(this._name)){
+this._state=dojo.widget.Editor2Manager.commandState.Latched;
+}else{
+this._state=dojo.widget.Editor2Manager.commandState.Enabled;
+}
+}else{
+this._state=dojo.widget.Editor2Manager.commandState.Disabled;
+}
+}
+catch(e){
+this._state=dojo.widget.Editor2Manager.commandState.Enabled;
+}
+}
+return this._state;
+},getValue:function(){
+try{
+return this._editor.queryCommandValue(this._name);
+}
+catch(e){
+}
+}});
+dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand",dojo.widget.Editor2BrowserCommand,{});
+dojo.require("dojo.widget.FloatingPane");
+dojo.widget.defineWidget("dojo.widget.Editor2Dialog",[dojo.widget.HtmlWidget,dojo.widget.FloatingPaneBase,dojo.widget.ModalDialogBase],{templateString:"<div id=\"${this.widgetId}\" class=\"dojoFloatingPane\">\n\t<span dojoattachpoint=\"tabStartOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\"\ttabindex=\"0\"></span>\n\t<span dojoattachpoint=\"tabStart\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<div dojoAttachPoint=\"titleBar\" class=\"dojoFloatingPaneTitleBar\"  style=\"display:none\">\n\t  \t<img dojoAttachPoint=\"titleBarIcon\"  class=\"dojoFloatingPaneTitleBarIcon\">\n\t\t<div dojoAttachPoint=\"closeAction\" dojoAttachEvent=\"onClick:hide\"\n   \t  \t\tclass=\"dojoFloatingPaneCloseIcon\"></div>\n\t\t<div dojoAttachPoint=\"restoreAction\" dojoAttachEvent=\"onClick:restoreWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneRestoreIcon\"></div>\n\t\t<div dojoAttachPoint=\"maximizeAction\" dojoAttachEvent=\"onClick:maximizeWindow\"\n   \t  
 \t\tclass=\"dojoFloatingPaneMaximizeIcon\"></div>\n\t\t<div dojoAttachPoint=\"minimizeAction\" dojoAttachEvent=\"onClick:minimizeWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneMinimizeIcon\"></div>\n\t  \t<div dojoAttachPoint=\"titleBarText\" class=\"dojoFloatingPaneTitleText\">${this.title}</div>\n\t</div>\n\n\t<div id=\"${this.widgetId}_container\" dojoAttachPoint=\"containerNode\" class=\"dojoFloatingPaneClient\"></div>\n\t<span dojoattachpoint=\"tabEnd\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<span dojoattachpoint=\"tabEndOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<div dojoAttachPoint=\"resizeBar\" class=\"dojoFloatingPaneResizebar\" style=\"display:none\"></div>\n</div>\n",modal:true,width:"",height:"",windowState:"minimized",displayCloseAction:true,contentFile:"",contentClass:"",fillInTemplate:function(_e,_f){
+this.fillInFloatingPaneTemplate(_e,_f);
+dojo.widget.Editor2Dialog.superclass.fillInTemplate.call(this,_e,_f);
+},postCreate:function(){
+if(this.contentFile){
+dojo.require(this.contentFile);
+}
+if(this.modal){
+dojo.widget.ModalDialogBase.prototype.postCreate.call(this);
+}else{
+with(this.domNode.style){
+zIndex=999;
+display="none";
+}
+}
+dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments);
+dojo.widget.Editor2Dialog.superclass.postCreate.call(this);
+if(this.width&&this.height){
+with(this.domNode.style){
+width=this.width;
+height=this.height;
+}
+}
+},createContent:function(){
+if(!this.contentWidget&&this.contentClass){
+this.contentWidget=dojo.widget.createWidget(this.contentClass);
+this.addChild(this.contentWidget);
+}
+},show:function(){
+if(!this.contentWidget){
+dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments);
+this.createContent();
+dojo.widget.Editor2Dialog.superclass.hide.call(this);
+}
+if(!this.contentWidget||!this.contentWidget.loadContent()){
+return;
+}
+this.showFloatingPane();
+dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments);
+if(this.modal){
+this.showModalDialog();
+}
+if(this.modal){
+this.bg.style.zIndex=this.domNode.style.zIndex-1;
+}
+},onShow:function(){
+dojo.widget.Editor2Dialog.superclass.onShow.call(this);
+this.onFloatingPaneShow();
+},closeWindow:function(){
+this.hide();
+dojo.widget.Editor2Dialog.superclass.closeWindow.apply(this,arguments);
+},hide:function(){
+if(this.modal){
+this.hideModalDialog();
+}
+dojo.widget.Editor2Dialog.superclass.hide.call(this);
+},checkSize:function(){
+if(this.isShowing()){
+if(this.modal){
+this._sizeBackground();
+}
+this.placeModalDialog();
+this.onResized();
+}
+}});
+dojo.widget.defineWidget("dojo.widget.Editor2DialogContent",dojo.widget.HtmlWidget,{widgetsInTemplate:true,loadContent:function(){
+return true;
+},cancel:function(){
+this.parent.hide();
+}});
+dojo.lang.declare("dojo.widget.Editor2DialogCommand",dojo.widget.Editor2BrowserCommand,function(_10,_11,_12){
+this.dialogParas=_12;
+},{execute:function(){
+if(!this.dialog){
+if(!this.dialogParas.contentFile||!this.dialogParas.contentClass){
+alert("contentFile and contentClass should be set for dojo.widget.Editor2DialogCommand.dialogParas!");
+return;
+}
+this.dialog=dojo.widget.createWidget("Editor2Dialog",this.dialogParas);
+dojo.body().appendChild(this.dialog.domNode);
+dojo.event.connect(this,"destroy",this.dialog,"destroy");
+}
+this.dialog.show();
+},getText:function(){
+return this.dialogParas.title||dojo.widget.Editor2DialogCommand.superclass.getText.call(this);
+}});
+dojo.widget.Editor2ToolbarGroups={};
+dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,function(){
+this._loadedCommands={};
+},{toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget","templates/EditorToolbarOneline.html"),"<div class=\"EditorToolbarDomNode EditorToolbarSmallBg\">\n\t<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\">\n\t\t<tbody>\n\t\t\t<tr valign=\"top\" align=\"left\">\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"htmltoggle\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon\" \n\t\t\t\t\t\tstyle=\"background-image: none; width: 30px;\" >&lt;h&gt;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"copy\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Copy\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"paste\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Paste\
 ">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"undo\">\n\t\t\t\t\t\t<!-- FIXME: should we have the text \"undo\" here? -->\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Undo\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"redo\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Redo\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\"\tstyle=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"createlink\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Link\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t
 \t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertimage\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Image\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"inserthorizontalrule\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_HorizontalLine \">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"bold\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Bold\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"italic\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Italic\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"underline\">\n\t\t\t\t\t\t<span class
 =\"dojoE2TBIcon dojoE2TBIcon_Underline\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"strikethrough\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_StrikeThrough\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" \n\t\t\t\t\t\t\tstyle=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertunorderedlist\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_BulletedList\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertorderedlist\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2T
 BIcon_NumberedList\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"indent\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Indent\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"outdent\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Outdent\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t
 \t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"forecolor\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_TextColor\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"hilitecolor\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_BackgroundColor\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyleft\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_LeftJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\
 t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifycenter\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_CenterJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyright\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_RightJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyfull\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_BlockJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\t\n\t\t\t\t<td>\n\t\t\t\t\t<select class=\"dojoEditorToolbarItem\" dojoETItemName=\"plainformatblock\">\n\t\t\t\t\t\t<!-- FIXME: using \"p\" here inserts a paragraph in most cases! -->\n\t\t\t\t\t\t<option value=\"\">-- format --</option>\n\t\t\t\t\t\t<option value=\"p\">Normal</option>\n\t\t\t\t\t\t<option value=\"pre\">Fixed Font<
 /option>\n\t\t\t\t\t\t<option value=\"h1\">Main Heading</option>\n\t\t\t\t\t\t<option value=\"h2\">Section Heading</option>\n\t\t\t\t\t\t<option value=\"h3\">Sub-Heading</option>\n\t\t\t\t\t\t<!-- <option value=\"blockquote\">Block Quote</option> -->\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t\t<td><!-- uncomment to enable save button -->\n\t\t\t\t\t<!-- save -->\n\t\t\t\t\t<!--span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"save\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Save\">&nbsp;</span>\n\t\t\t\t\t</span-->\n\t\t\t\t</td>\n\t\t\t\t<td width=\"*\">&nbsp;</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>\n"),toolbarTemplateCssPath:null,toolbarPlaceHolder:"",_inSourceMode:false,_htmlEditNode:null,toolbarGroup:"",shareToolbar:false,contextMenuGroupSet:"",editorOnLoad:function(){
+dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar",this);
+if(this.toolbarAlwaysVisible){
+dojo.require("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
+}
+if(this.toolbarWidget){
+this.toolbarWidget.show();
+dojo.html.insertBefore(this.toolbarWidget.domNode,this.domNode.firstChild);
+}else{
+if(this.shareToolbar){
+dojo.deprecated("Editor2:shareToolbar is deprecated in favor of toolbarGroup","0.5");
+this.toolbarGroup="defaultDojoToolbarGroup";
+}
+if(this.toolbarGroup){
+if(dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]){
+this.toolbarWidget=dojo.widget.Editor2ToolbarGroups[this.toolbarGroup];
+}
+}
+if(!this.toolbarWidget){
+var _13={shareGroup:this.toolbarGroup,parent:this};
+_13.templateString=dojo.uri.cache.get(this.toolbarTemplatePath);
+if(this.toolbarTemplateCssPath){
+_13.templateCssPath=this.toolbarTemplateCssPath;
+_13.templateCssString=dojo.uri.cache.get(this.toolbarTemplateCssPath);
+}
+if(this.toolbarPlaceHolder){
+this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_13,dojo.byId(this.toolbarPlaceHolder),"after");
+}else{
+this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_13,this.domNode.firstChild,"before");
+}
+if(this.toolbarGroup){
+dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]=this.toolbarWidget;
+}
+dojo.event.connect(this,"close",this.toolbarWidget,"hide");
+this.toolbarLoaded();
+}
+}
+dojo.event.topic.registerPublisher("Editor2.clobberFocus",this,"clobberFocus");
+dojo.event.topic.subscribe("Editor2.clobberFocus",this,"setBlur");
+dojo.event.topic.publish("dojo.widget.Editor2::onLoad",this);
+},toolbarLoaded:function(){
+},registerLoadedPlugin:function(obj){
+if(!this.loadedPlugins){
+this.loadedPlugins=[];
+}
+this.loadedPlugins.push(obj);
+},unregisterLoadedPlugin:function(obj){
+for(var i in this.loadedPlugins){
+if(this.loadedPlugins[i]===obj){
+delete this.loadedPlugins[i];
+return;
+}
+}
+dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: "+obj);
+},execCommand:function(_17,_18){
+switch(_17.toLowerCase()){
+case "htmltoggle":
+this.toggleHtmlEditing();
+break;
+default:
+dojo.widget.Editor2.superclass.execCommand.apply(this,arguments);
+}
+},queryCommandEnabled:function(_19,_1a){
+switch(_19.toLowerCase()){
+case "htmltoggle":
+return true;
+default:
+if(this._inSourceMode){
+return false;
+}
+return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments);
+}
+},queryCommandState:function(_1b,_1c){
+switch(_1b.toLowerCase()){
+case "htmltoggle":
+return this._inSourceMode;
+default:
+return dojo.widget.Editor2.superclass.queryCommandState.apply(this,arguments);
+}
+},onClick:function(e){
+dojo.widget.Editor2.superclass.onClick.call(this,e);
+if(dojo.widget.PopupManager){
+if(!e){
+e=this.window.event;
+}
+dojo.widget.PopupManager.onClick(e);
+}
+},clobberFocus:function(){
+},toggleHtmlEditing:function(){
+if(this===dojo.widget.Editor2Manager.getCurrentInstance()){
+if(!this._inSourceMode){
+var _1e=this.getEditorContent();
+this._inSourceMode=true;
+if(!this._htmlEditNode){
+this._htmlEditNode=dojo.doc().createElement("textarea");
+dojo.html.insertAfter(this._htmlEditNode,this.editorObject);
+}
+this._htmlEditNode.style.display="";
+this._htmlEditNode.style.width="100%";
+this._htmlEditNode.style.height=dojo.html.getBorderBox(this.editNode).height+"px";
+this._htmlEditNode.value=_1e;
+with(this.editorObject.style){
+position="absolute";
+left="-2000px";
+top="-2000px";
+}
+}else{
+this._inSourceMode=false;
+this._htmlEditNode.blur();
+with(this.editorObject.style){
+position="";
+left="";
+top="";
+}
+var _1e=this._htmlEditNode.value;
+dojo.lang.setTimeout(this,"replaceEditorContent",1,_1e);
+this._htmlEditNode.style.display="none";
+this.focus();
+}
+this.onDisplayChanged(null,true);
+}
+},setFocus:function(){
+if(dojo.widget.Editor2Manager.getCurrentInstance()===this){
+return;
+}
+this.clobberFocus();
+dojo.widget.Editor2Manager.setCurrentInstance(this);
+},setBlur:function(){
+},saveSelection:function(){
+this._bookmark=null;
+this._bookmark=dojo.withGlobal(this.window,dojo.html.selection.getBookmark);
+},restoreSelection:function(){
+if(this._bookmark){
+this.focus();
+dojo.withGlobal(this.window,"moveToBookmark",dojo.html.selection,[this._bookmark]);
+this._bookmark=null;
+}else{
+dojo.debug("restoreSelection: no saved selection is found!");
+}
+},_updateToolbarLastRan:null,_updateToolbarTimer:null,_updateToolbarFrequency:500,updateToolbar:function(_1f){
+if((!this.isLoaded)||(!this.toolbarWidget)){
+return;
+}
+var _20=new Date()-this._updateToolbarLastRan;
+if((!_1f)&&(this._updateToolbarLastRan)&&((_20<this._updateToolbarFrequency))){
+clearTimeout(this._updateToolbarTimer);
+var _21=this;
+this._updateToolbarTimer=setTimeout(function(){
+_21.updateToolbar();
+},this._updateToolbarFrequency/2);
+return;
+}else{
+this._updateToolbarLastRan=new Date();
+}
+if(dojo.widget.Editor2Manager.getCurrentInstance()!==this){
+return;
+}
+this.toolbarWidget.update();
+},destroy:function(_22){
+this._htmlEditNode=null;
+dojo.event.disconnect(this,"close",this.toolbarWidget,"hide");
+if(!_22){
+this.toolbarWidget.destroy();
+}
+dojo.widget.Editor2.superclass.destroy.call(this);
+},_lastStateTimestamp:0,onDisplayChanged:function(e,_24){
+this._lastStateTimestamp=(new Date()).getTime();
+dojo.widget.Editor2.superclass.onDisplayChanged.call(this,e);
+this.updateToolbar(_24);
+},onLoad:function(){
+try{
+dojo.widget.Editor2.superclass.onLoad.call(this);
+}
+catch(e){
+dojo.debug(e);
+}
+this.editorOnLoad();
+},onFocus:function(){
+dojo.widget.Editor2.superclass.onFocus.call(this);
+this.setFocus();
+},getEditorContent:function(){
+if(this._inSourceMode){
+return this._htmlEditNode.value;
+}
+return dojo.widget.Editor2.superclass.getEditorContent.call(this);
+},replaceEditorContent:function(_25){
+if(this._inSourceMode){
+this._htmlEditNode.value=_25;
+return;
+}
+dojo.widget.Editor2.superclass.replaceEditorContent.apply(this,arguments);
+},getCommand:function(_26){
+if(this._loadedCommands[_26]){
+return this._loadedCommands[_26];
+}
+var cmd=dojo.widget.Editor2Manager.getCommand(this,_26);
+this._loadedCommands[_26]=cmd;
+return cmd;
+},shortcuts:[["bold"],["italic"],["underline"],["selectall","a"],["insertunorderedlist","\\"]],setupDefaultShortcuts:function(){
+var _28=function(cmd){
+return function(){
+cmd.execute();
+};
+};
+var _2a=this;
+dojo.lang.forEach(this.shortcuts,function(_2b){
+var cmd=_2a.getCommand(_2b[0]);
+if(cmd){
+_2a.addKeyHandler(_2b[1]?_2b[1]:_2b[0].charAt(0),_2b[2]==undefined?_2a.KEY_CTRL:_2b[2],_28(cmd));
+}
+});
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/AlwaysShowToolbar.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/AlwaysShowToolbar.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/AlwaysShowToolbar.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/AlwaysShowToolbar.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,105 @@
+dojo.provide("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
+dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad",function(_1){
+if(_1.toolbarAlwaysVisible){
+var p=new dojo.widget.Editor2Plugin.AlwaysShowToolbar(_1);
+}
+});
+dojo.declare("dojo.widget.Editor2Plugin.AlwaysShowToolbar",null,function(_3){
+this.editor=_3;
+this.editor.registerLoadedPlugin(this);
+this.setup();
+},{_scrollSetUp:false,_fixEnabled:false,_scrollThreshold:false,_handleScroll:true,setup:function(){
+var _4=this.editor.toolbarWidget;
+if(!_4.tbBgIframe){
+_4.tbBgIframe=new dojo.html.BackgroundIframe(_4.domNode);
+_4.tbBgIframe.onResized();
+}
+this.scrollInterval=setInterval(dojo.lang.hitch(this,"globalOnScrollHandler"),100);
+dojo.event.connect("before",this.editor.toolbarWidget,"destroy",this,"destroy");
+},globalOnScrollHandler:function(){
+var _5=dojo.render.html.ie;
+if(!this._handleScroll){
+return;
+}
+var dh=dojo.html;
+var _7=this.editor.toolbarWidget.domNode;
+var db=dojo.body();
+if(!this._scrollSetUp){
+this._scrollSetUp=true;
+var _9=dh.getMarginBox(this.editor.domNode).width;
+this._scrollThreshold=dh.abs(_7,true).y;
+if((_5)&&(db)&&(dh.getStyle(db,"background-image")=="none")){
+with(db.style){
+backgroundImage="url("+dojo.uri.moduleUri("dojo.widget","templates/images/blank.gif")+")";
+backgroundAttachment="fixed";
+}
+}
+}
+var _a=(window["pageYOffset"])?window["pageYOffset"]:(document["documentElement"]||document["body"]).scrollTop;
+if(_a>this._scrollThreshold){
+if(!this._fixEnabled){
+var _b=dojo.html.getMarginBox(_7);
+this.editor.editorObject.style.marginTop=_b.height+"px";
+if(_5){
+_7.style.left=dojo.html.abs(_7,dojo.html.boxSizing.MARGIN_BOX).x;
+if(_7.previousSibling){
+this._IEOriginalPos=["after",_7.previousSibling];
+}else{
+if(_7.nextSibling){
+this._IEOriginalPos=["before",_7.nextSibling];
+}else{
+this._IEOriginalPos=["",_7.parentNode];
+}
+}
+dojo.body().appendChild(_7);
+dojo.html.addClass(_7,"IEFixedToolbar");
+}else{
+with(_7.style){
+position="fixed";
+top="0px";
+}
+}
+_7.style.width=_b.width+"px";
+_7.style.zIndex=1000;
+this._fixEnabled=true;
+}
+if(!dojo.render.html.safari){
+var _c=(this.height)?parseInt(this.editor.height):this.editor._lastHeight;
+if(_a>(this._scrollThreshold+_c)){
+_7.style.display="none";
+}else{
+_7.style.display="";
+}
+}
+}else{
+if(this._fixEnabled){
+(this.editor.object||this.editor.iframe).style.marginTop=null;
+with(_7.style){
+position="";
+top="";
+zIndex="";
+display="";
+}
+if(_5){
+_7.style.left="";
+dojo.html.removeClass(_7,"IEFixedToolbar");
+if(this._IEOriginalPos){
+dojo.html.insertAtPosition(_7,this._IEOriginalPos[1],this._IEOriginalPos[0]);
+this._IEOriginalPos=null;
+}else{
+dojo.html.insertBefore(_7,this.editor.object||this.editor.iframe);
+}
+}
+_7.style.width="";
+this._fixEnabled=false;
+}
+}
+},destroy:function(){
+this._IEOriginalPos=null;
+this._handleScroll=false;
+clearInterval(this.scrollInterval);
+this.editor.unregisterLoadedPlugin(this);
+if(dojo.render.html.ie){
+dojo.html.removeClass(this.editor.toolbarWidget.domNode,"IEFixedToolbar");
+}
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/AlwaysShowToolbar.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/AlwaysShowToolbar.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/AlwaysShowToolbar.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/ContextMenu.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/ContextMenu.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/ContextMenu.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/ContextMenu.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,190 @@
+dojo.provide("dojo.widget.Editor2Plugin.ContextMenu");
+dojo.require("dojo.widget.Menu2");
+dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad",function(_1){
+dojo.widget.Editor2Plugin.ContextMenuManager.getContextMenu(_1);
+});
+dojo.widget.Editor2Plugin.ContextMenuManager={menuGroups:["Generic","Link","Anchor","Image","List","Table"],_contextMenuGroupSets:{},_registeredGroups:{},_menus:{},registerGroup:function(_2,_3){
+if(this._registeredGroups[_2]){
+alert("dojo.widget.Editor2Plugin.ContextMenuManager.registerGroup: menu group "+_2+"is already registered. Ignored.");
+return;
+}
+this._registeredGroups[_2]=_3;
+},removeGroup:function(_4){
+delete this._registeredGroups[_4];
+},getGroup:function(_5,_6){
+if(this._registeredGroups[_5]){
+var _7=this._registeredGroups[_5](_5,_6);
+if(_7){
+return _7;
+}
+}
+switch(_5){
+case "Generic":
+case "Link":
+case "Image":
+return new dojo.widget.Editor2Plugin[_5+"ContextMenuGroup"](_6);
+case "Anchor":
+case "List":
+}
+},registerGroupSet:function(_8,_9){
+this._contextMenuGroupSets[_8]=_9;
+},removeGroupSet:function(_a){
+var _b=this._contextMenuGroupSets[_a];
+delete this._contextMenuGroupSets[_a];
+return _b;
+},getContextMenu:function(_c){
+var _d=_c.contextMenuGroupSet||"defaultDojoEditor2MenuGroupSet";
+if(this._menus[_d]){
+this._menus[_d].bindEditor(_c);
+return this._menus[_d];
+}
+var gs=(_c.contextMenuGroupSet&&this._contextMenuGroupSets[_c.contextMenuGroupSet])||this.menuGroups;
+var _f=new dojo.widget.Editor2Plugin.ContextMenu(_c,gs);
+this._menus[_d]=_f;
+return _f;
+}};
+dojo.declare("dojo.widget.Editor2Plugin.ContextMenu",null,function(_10,gs){
+this.groups=[];
+this.separators=[];
+this.editor=_10;
+this.editor.registerLoadedPlugin(this);
+this.contextMenu=dojo.widget.createWidget("PopupMenu2",{});
+dojo.body().appendChild(this.contextMenu.domNode);
+this.bindEditor(this.editor);
+dojo.event.connect(this.contextMenu,"aboutToShow",this,"aboutToShow");
+dojo.event.connect(this.editor,"destroy",this,"destroy");
+this.setup(gs);
+},{bindEditor:function(_12){
+this.contextMenu.bindDomNode(_12.document.body);
+},setup:function(gs){
+for(var i in gs){
+var g=dojo.widget.Editor2Plugin.ContextMenuManager.getGroup(gs[i],this);
+if(g){
+this.groups.push(g);
+}
+}
+},aboutToShow:function(){
+var _16=true;
+for(var i in this.groups){
+if(i>0&&this.separators.length!=this.groups.length-1){
+this.separators.push(dojo.widget.createWidget("MenuSeparator2",{}));
+this.contextMenu.addChild(this.separators[this.separators.length-1]);
+}
+if(this.groups[i].refresh()){
+if(i>0){
+if(_16){
+this.separators[i-1].hide();
+}else{
+this.separators[i-1].show();
+}
+}
+if(_16){
+_16=false;
+}
+}else{
+if(i>0){
+this.separators[i-1].hide();
+}
+}
+}
+},destroy:function(){
+this.editor.unregisterLoadedPlugin(this);
+delete this.groups;
+delete this.separators;
+this.contextMenu.destroy();
+delete this.contextMenu;
+}});
+dojo.widget.defineWidget("dojo.widget.Editor2ContextMenuItem",dojo.widget.MenuItem2,{command:"",buildRendering:function(){
+var _18=dojo.widget.Editor2Manager.getCurrentInstance();
+this.caption=_18.getCommand(this.command).getText();
+dojo.widget.Editor2ContextMenuItem.superclass.buildRendering.apply(this,arguments);
+},onClick:function(){
+var _19=dojo.widget.Editor2Manager.getCurrentInstance();
+if(_19){
+var _1a=_19.getCommand(this.command);
+if(_1a){
+_1a.execute();
+}
+}
+},refresh:function(){
+var _1b=dojo.widget.Editor2Manager.getCurrentInstance();
+if(_1b){
+var _1c=_1b.getCommand(this.command);
+if(_1c){
+if(_1c.getState()==dojo.widget.Editor2Manager.commandState.Disabled){
+this.disable();
+return false;
+}else{
+this.enable();
+return true;
+}
+}
+}
+},hide:function(){
+this.domNode.style.display="none";
+},show:function(){
+this.domNode.style.display="";
+}});
+dojo.declare("dojo.widget.Editor2Plugin.SimpleContextMenuGroup",null,function(_1d){
+this.contextMenu=_1d.contextMenu;
+this.items=[];
+dojo.event.connect(_1d,"destroy",this,"destroy");
+},{refresh:function(){
+if(!this.items.length){
+this.createItems();
+for(var i in this.items){
+this.contextMenu.addChild(this.items[i]);
+}
+}
+return this.checkVisibility();
+},destroy:function(){
+this.contextmenu=null;
+delete this.items;
+delete this.contextMenu;
+},createItems:function(){
+},checkVisibility:function(){
+var _1f=false;
+for(var i in this.items){
+_1f=_1f||this.items[i].refresh();
+}
+var _21=_1f?"show":"hide";
+for(var i in this.items){
+this.items[i][_21]();
+}
+return _1f;
+}});
+dojo.declare("dojo.widget.Editor2Plugin.GenericContextMenuGroup",dojo.widget.Editor2Plugin.SimpleContextMenuGroup,{createItems:function(){
+this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem",{command:"cut",iconClass:"dojoE2TBIcon dojoE2TBIcon_Cut"}));
+this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem",{command:"copy",iconClass:"dojoE2TBIcon dojoE2TBIcon_Copy"}));
+this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem",{command:"paste",iconClass:"dojoE2TBIcon dojoE2TBIcon_Paste"}));
+}});
+dojo.declare("dojo.widget.Editor2Plugin.LinkContextMenuGroup",dojo.widget.Editor2Plugin.SimpleContextMenuGroup,{createItems:function(){
+this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem",{command:"createlink",iconClass:"dojoE2TBIcon dojoE2TBIcon_Link"}));
+this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem",{command:"unlink",iconClass:"dojoE2TBIcon dojoE2TBIcon_UnLink"}));
+},checkVisibility:function(){
+var _22=this.items[1].refresh();
+if(_22){
+this.items[0].refresh();
+for(var i in this.items){
+this.items[i].show();
+}
+}else{
+for(var i in this.items){
+this.items[i].hide();
+}
+}
+return _22;
+}});
+dojo.declare("dojo.widget.Editor2Plugin.ImageContextMenuGroup",dojo.widget.Editor2Plugin.SimpleContextMenuGroup,{createItems:function(){
+this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem",{command:"insertimage",iconClass:"dojoE2TBIcon dojoE2TBIcon_Image"}));
+},checkVisibility:function(){
+var _24=dojo.widget.Editor2Manager.getCurrentInstance();
+var img=dojo.withGlobal(_24.window,"getSelectedElement",dojo.html.selection);
+if(img&&img.tagName.toLowerCase()=="img"){
+this.items[0].show();
+return true;
+}else{
+this.items[0].hide();
+return false;
+}
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/ContextMenu.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/ContextMenu.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/ContextMenu.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/CreateLinkDialog.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/CreateLinkDialog.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/CreateLinkDialog.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/CreateLinkDialog.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,50 @@
+dojo.provide("dojo.widget.Editor2Plugin.CreateLinkDialog");
+dojo.widget.defineWidget("dojo.widget.Editor2CreateLinkDialog",dojo.widget.Editor2DialogContent,{templateString:"<table>\n<tr><td>URL</td><td> <input type=\"text\" dojoAttachPoint=\"link_href\" name=\"dojo_createLink_href\"/></td></tr>\n<tr><td>Target </td><td><select dojoAttachPoint=\"link_target\">\n\t<option value=\"\">Self</option>\n\t<option value=\"_blank\">New Window</option>\n\t<option value=\"_top\">Top Window</option>\n\t</select></td></tr>\n<tr><td>Class </td><td><input type=\"text\" dojoAttachPoint=\"link_class\" /></td></tr>\n<tr><td colspan=\"2\">\n\t<table><tr>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:ok'>OK</button></td>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:cancel'>Cancel</button></td>\n\t</tr></table>\n\t</td></tr>\n</table>\n",editableAttributes:["href","target","class"],loadContent:function(){
+var _1=dojo.widget.Editor2Manager.getCurrentInstance();
+_1.saveSelection();
+this.linkNode=dojo.withGlobal(_1.window,"getAncestorElement",dojo.html.selection,["a"]);
+var _2={};
+this.extraAttribText="";
+if(this.linkNode){
+var _3=this.linkNode.attributes;
+for(var i=0;i<_3.length;i++){
+if(dojo.lang.find(this.editableAttributes,_3[i].name.toLowerCase())>-1){
+_2[_3[i].name]=_3[i].value;
+}else{
+if(_3[i].specified==undefined||_3[i].specified){
+this.extraAttribText+=_3[i].name+"=\""+_3[i].value+"\" ";
+}
+}
+}
+}else{
+var _5=dojo.withGlobal(_1.window,"getSelectedText",dojo.html.selection);
+if(_5==null||_5.length==0){
+alert("Please select some text to create a link.");
+return false;
+}
+}
+for(var i=0;i<this.editableAttributes.length;++i){
+name=this.editableAttributes[i];
+this["link_"+name].value=(_2[name]==undefined)?"":_2[name];
+}
+return true;
+},ok:function(){
+var _6=dojo.widget.Editor2Manager.getCurrentInstance();
+_6.restoreSelection();
+if(!this.linkNode){
+var _7=dojo.withGlobal(_6.window,"getSelectedHtml",dojo.html.selection);
+}else{
+var _7=this.linkNode.innerHTML;
+dojo.withGlobal(_6.window,"selectElement",dojo.html.selection,[this.linkNode]);
+}
+var _8="";
+for(var i=0;i<this.editableAttributes.length;++i){
+name=this.editableAttributes[i];
+var _a=this["link_"+name].value;
+if(_a.length>0){
+_8+=name+"=\""+_a+"\" ";
+}
+}
+_6.execCommand("inserthtml","<a "+_8+this.extraAttribText+">"+_7+"</a>");
+this.cancel();
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/CreateLinkDialog.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/CreateLinkDialog.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/CreateLinkDialog.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplace.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplace.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplace.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplace.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,48 @@
+dojo.provide("dojo.widget.Editor2Plugin.FindReplace");
+dojo.require("dojo.widget.Editor2");
+dojo.declare("dojo.widget.Editor2Plugin.FindCommand",dojo.widget.Editor2DialogCommand,{SearchOption:{CaseSensitive:4,SearchBackwards:64,WholeWord:2,WrapSearch:128},find:function(_1,_2){
+this._editor.focus();
+if(window.find){
+this._editor.window.find(_1,_2&this.SearchOption.CaseSensitive?true:false,_2&this.SearchOption.SearchBackwards?true:false,_2&this.SearchOption.WrapSearch?true:false,_2&this.SearchOption.WholeWord?true:false);
+}else{
+if(dojo.body().createTextRange){
+var _3=this._editor.document.body.createTextRange();
+var _4=_3.findText(_1,(_2&this.SearchOption.SearchBackwards)?1:-1,_2);
+if(_4){
+_3.scrollIntoView();
+_3.select();
+}else{
+alert("Can not find "+_1+" in the document");
+}
+}else{
+alert("No idea how to search in this browser. Please submit patch if you know.");
+}
+}
+},getText:function(){
+return "Find";
+}});
+dojo.widget.Editor2Plugin.FindReplace={getCommand:function(_5,_6){
+var _6=_6.toLowerCase();
+var _7;
+if(_6=="find"){
+_7=new dojo.widget.Editor2Plugin.FindCommand(_5,"find",{contentFile:"dojo.widget.Editor2Plugin.FindReplaceDialog",contentClass:"Editor2FindDialog",title:"Find",width:"350px",height:"150px",modal:false});
+}else{
+if(_6=="replace"){
+_7=new dojo.widget.Editor2DialogCommand(_5,"replace",{contentFile:"dojo.widget.Editor2Plugin.FindReplaceDialog",contentClass:"Editor2ReplaceDialog",href:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget","templates/Editor2/Dialog/replace.html"),"<table style=\"white-space: nowrap;\">\n<tr><td>Find: </td><td> <input type=\"text\" dojoAttachPoint=\"replace_text\" /></td></tr>\n<tr><td>Replace with: </td><td> <input type=\"text\" dojoAttachPoint=\"replace_text\" /></td></tr>\n<tr><td colspan='2'><table><tr><td><input type=\"checkbox\" dojoType=\"CheckBox\" dojoAttachPoint=\"replace_option_casesens\" id=\"dojo_replace_option_casesens\" />\n\t\t<label for=\"dojo_replace_option_casesens\">Case Sensitive</label></td>\n\t\t\t<td><input type=\"checkbox\" dojoType=\"CheckBox\" dojoAttachPoint=\"replace_option_backwards\" id=\"dojo_replace_option_backwards\" />\n\t\t<label for=\"dojo_replace_option_backwards\">Search Backwards</label></td></tr></table></td></tr>\n<tr><td colspan=2\">\
 n\t<table><tr>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:replace'>Replace</button></td>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:replaceAll'>Replace All</button></td>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:cancel'>Close</button></td>\n\t</tr></table>\n\t</td></tr>\n</table>\n"),title:"Replace",width:"350px",height:"200px",modal:false});
+}
+}
+return _7;
+},getToolbarItem:function(_8){
+var _8=_8.toLowerCase();
+var _9;
+if(_8=="replace"){
+_9=new dojo.widget.Editor2ToolbarButton("Replace");
+}else{
+if(_8=="find"){
+_9=new dojo.widget.Editor2ToolbarButton("Find");
+}
+}
+return _9;
+}};
+dojo.widget.Editor2Manager.registerHandler(dojo.widget.Editor2Plugin.FindReplace.getCommand);
+dojo.widget.Editor2ToolbarItemManager.registerHandler(dojo.widget.Editor2Plugin.FindReplace.getToolbarItem);

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplace.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplace.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplace.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplaceDialog.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplaceDialog.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplaceDialog.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplaceDialog.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,21 @@
+dojo.provide("dojo.widget.Editor2Plugin.FindReplaceDialog");
+dojo.widget.defineWidget("dojo.widget.Editor2FindDialog",dojo.widget.Editor2DialogContent,{templateString:"<table style=\"white-space: nowrap;\">\n<tr><td colspan='2'>Find: <input type=\"text\" dojoAttachPoint=\"find_text\" /></td></tr>\n<tr><td><input type=\"checkbox\" dojoType=\"CheckBox\" dojoAttachPoint=\"find_option_casesens\" />\n\t\t<label for=\"find_option_casesens\">Case Sensitive</label></td>\n\t\t\t<td><input type=\"checkbox\" dojoType=\"CheckBox\" dojoAttachPoint=\"find_option_backwards\" />\n\t\t<label for=\"find_option_backwards\">Search Backwards</label></td></tr>\n<tr><td style=\"display: none;\"><input type=\"checkbox\" dojoType=\"CheckBox\" dojoAttachPoint=\"find_option_wholeword\" />\n\t\t<label for=\"find_option_wholeword\">Whole Word</label></td>\n<tr><td colspan=\"1\">\n\t<table><tr>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:find'>Find</button></td>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:cancel'>Close</button></td>\n\t
 </tr></table>\n\t</td></tr>\n</table>\n",find:function(){
+var _1=dojo.widget.Editor2Manager.getCurrentInstance();
+var _2=_1.getCommand("find");
+var _3=0;
+if(this["find_option_casesens"].checked){
+_3|=_2.SearchOption.CaseSensitive;
+}
+if(this["find_option_backwards"].checked){
+_3|=_2.SearchOption.SearchBackwards;
+}
+if(this["find_option_wholeword"].checked){
+_3|=_2.SearchOption.WholeWord;
+}
+_2.find(this["find_text"].value,_3);
+}});
+dojo.widget.defineWidget("dojo.widget.Editor2ReplaceDialog",dojo.widget.Editor2DialogContent,{templateString:"<table style=\"white-space: nowrap;\">\n<tr><td>Find: </td><td> <input type=\"text\" dojoAttachPoint=\"replace_text\" /></td></tr>\n<tr><td>Replace with: </td><td> <input type=\"text\" dojoAttachPoint=\"replace_text\" /></td></tr>\n<tr><td colspan='2'><table><tr><td><input type=\"checkbox\" dojoType=\"CheckBox\" dojoAttachPoint=\"replace_option_casesens\" id=\"dojo_replace_option_casesens\" />\n\t\t<label for=\"dojo_replace_option_casesens\">Case Sensitive</label></td>\n\t\t\t<td><input type=\"checkbox\" dojoType=\"CheckBox\" dojoAttachPoint=\"replace_option_backwards\" id=\"dojo_replace_option_backwards\" />\n\t\t<label for=\"dojo_replace_option_backwards\">Search Backwards</label></td></tr></table></td></tr>\n<tr><td colspan=2\">\n\t<table><tr>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:replace'>Replace</button></td>\n\t<td><button dojoType='Button' 
 dojoAttachEvent='onClick:replaceAll'>Replace All</button></td>\n\t<td><button dojoType='Button' dojoAttachEvent='onClick:cancel'>Close</button></td>\n\t</tr></table>\n\t</td></tr>\n</table>\n",replace:function(){
+alert("not implemented yet");
+},replaceAll:function(){
+alert("not implemented yet");
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplaceDialog.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplaceDialog.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/FindReplaceDialog.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertImageDialog.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertImageDialog.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertImageDialog.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertImageDialog.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,42 @@
+dojo.provide("dojo.widget.Editor2Plugin.InsertImageDialog");
+dojo.widget.defineWidget("dojo.widget.Editor2InsertImageDialog",dojo.widget.Editor2DialogContent,{templateString:"<table cellspacing=\"1\" cellpadding=\"1\" border=\"0\" width=\"100%\" height=\"100%\">\n\t<tr>\n\t\t<td>\n\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"100%\">\n\t\t\t\t\t\t<span>URL</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"display: none\" nowrap=\"nowrap\" rowspan=\"2\">\n\t\t\t\t\t\t<!--input id=\"btnBrowse\" onclick=\"BrowseServer();\" type=\"button\" value=\"Browse Server\"/-->\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign=\"top\">\n\t\t\t\t\t\t<input dojoAttachPoint=\"image_src\" style=\"width: 100%\" type=\"text\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td>\n\t\t\t<span>Alternative Text</span><br />\n\t\t\t<input dojoAttachPoint=\"image_alt\" style=\"width: 100%\" type=\"text\" /><br />\n\t\t</td>\n\t</tr>\n\t<tr>\n\
 t\t<td valign=\"top\">\n\t\t\t<table><tr><td>\n\t\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t\t\t\t\t\t\t\t<span>Width</span>&nbsp;</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" size=\"3\" dojoAttachPoint=\"image_width\" /></td>\n\n\t\t\t\t\t\t\t\t<td rowspan=\"2\">\n\t\t\t\t\t\t\t\t\t<!--div id=\"btnLockSizes\" class=\"BtnLocked\" onmouseover=\"this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' ) + ' BtnOver';\"\n\t\t\t\t\t\t\t\t\t\tonmouseout=\"this.className = (bLockRatio ? 'BtnLocked' : 'BtnUnlocked' );\" title=\"Lock Sizes\"\n\t\t\t\t\t\t\t\t\t\tonclick=\"SwitchLock(this);\">\n\t\t\t\t\t\t\t\t\t</div-->\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td rowspan=\"2\">\n\t\t\t\t\t\t\t\t\t<!--div id=\"btnResetSize\" class=\"BtnReset\" onmouseover=\"this.className='BtnReset BtnOver';\"\n\t\t\t\t\t\t\t\t\t\tonmouseout=\"this.className='BtnReset';\" title=\"Reset Siz
 e\" onclick=\"ResetSizes();\">\n\t\t\t\t\t\t\t\t\t</div-->\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t\t\t\t\t\t\t\t<span>Height</span>&nbsp;</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" size=\"3\" dojoAttachPoint=\"image_height\" /></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td><td>\n\n\t\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t\t\t<tr>\n\n\t\t\t\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t\t\t\t\t\t\t\t<span >HSpace</span>&nbsp;</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" size=\"2\" dojoAttachPoint=\"image_hspace\"/></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t\t\t\t\t\t\t\t<span >VSpace</span>&nbsp;</td>\n\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" size=\"2\" dojoAttachPoint=\"image_vspace\" /></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t
 \t\t</td></tr>\n\t\t\t\t\t<tr><td colspan=\"2\">\n\t\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t\t\t\t\t\t\t\t<span>Border</span>&nbsp;</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" size=\"2\" value=\"\" dojoAttachPoint=\"image_border\" /></td>\n\t\t\t\t\t\t\t\t<td>&nbsp;&nbsp;&nbsp;</td>\n\t\t\t\t\t\t\t\t<td nowrap=\"nowrap\">\n\t\t\t\t\t\t\t\t\t<span >Align</span>&nbsp;</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select dojoAttachPoint=\"image_align\">\n\n\t\t\t\t\t\t\t\t\t\t<option value=\"\" selected=\"selected\"></option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"left\">Left</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"absBottom\">Abs Bottom</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"absMiddle\">Abs Middle</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"baseline\">Baseline</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"bottom\">Bottom</option>\n\n\t\t\t\t\t\t\t\t\
 t\t<option value=\"middle\">Middle</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"right\">Right</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"textTop\">Text Top</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"top\">Top</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t</tr></table>\n\t\t</td>\n\t</tr>\n\t<tr><td>\n\t\t<table><tr>\n\t\t<td><button dojoType='Button' dojoAttachEvent='onClick:ok'>OK</button></td>\n\t\t<td><button dojoType='Button' dojoAttachEvent='onClick:cancel'>Cancel</button></td>\n\t\t</tr></table>\n\t</td></tr>\n</table>\n",editableAttributes:["src","alt","width","height","hspace","vspace","border","align"],loadContent:function(){
+var _1=dojo.widget.Editor2Manager.getCurrentInstance();
+this.imageNode=dojo.withGlobal(_1.window,"getSelectedElement",dojo.html.selection);
+if(!this.imageNode){
+this.imageNode=dojo.withGlobal(_1.window,"getAncestorElement",dojo.html.selection,["img"]);
+}
+var _2={};
+this.extraAttribText="";
+if(this.imageNode){
+var _3=this.imageNode.attributes;
+for(var i=0;i<_3.length;i++){
+if(dojo.lang.find(this.editableAttributes,_3[i].name.toLowerCase())>-1){
+_2[_3[i].name]=_3[i].value;
+}else{
+this.extraAttribText+=_3[i].name+"=\""+_3[i].value+"\" ";
+}
+}
+}
+for(var i=0;i<this.editableAttributes.length;++i){
+name=this.editableAttributes[i];
+this["image_"+name].value=(_2[name]==undefined)?"":_2[name];
+}
+return true;
+},ok:function(){
+var _5=dojo.widget.Editor2Manager.getCurrentInstance();
+var _6=_5.getCommand("inserthtml");
+var _7=0;
+var _8="";
+for(var i=0;i<this.editableAttributes.length;++i){
+name=this.editableAttributes[i];
+var _a=this["image_"+name].value;
+if(_a.length>0){
+_8+=name+"=\""+_a+"\" ";
+}
+}
+if(this.imageNode){
+dojo.withGlobal(_5.window,"selectElement",dojo.html.selection,[this.imageNode]);
+}
+_6.execute("<img "+_8+this.extraAttribText+"/>");
+this.cancel();
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertImageDialog.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertImageDialog.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertImageDialog.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertTableDialog.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertTableDialog.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertTableDialog.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertTableDialog.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,118 @@
+dojo.provide("dojo.widget.Editor2Plugin.InsertTableDialog");
+dojo.widget.defineWidget("dojo.widget.Editor2InsertTableDialog",dojo.widget.Editor2DialogContent,{templateString:"<div>\n<table cellSpacing=\"1\" cellPadding=\"1\" width=\"100%\" border=\"0\">\n\t<tr>\n\t\t<td valign=\"top\">\n\t\t\t<table cellSpacing=\"0\" cellPadding=\"0\" border=\"0\">\n\t\t\t\t<tr>\n\n\t\t\t\t\t<td><span>Rows</span>:</td>\n\t\t\t\t\t<td>&nbsp;<input dojoAttachPoint=\"table_rows\" type=\"text\" maxLength=\"3\" size=\"2\" value=\"3\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span>Columns</span>:</td>\n\t\t\t\t\t<td>&nbsp;<input dojoAttachPoint=\"table_cols\" type=\"text\" maxLength=\"2\" size=\"2\" value=\"2\"></td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span>Border size</span>:</td>\n\t\t\t\t\t<td>&nbsp;<INPUT dojoAttachPoint=\"table_border\" type=\"text\" maxLength=\"2\" size=\"2\" value=\"1\"></td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span>Align
 ment</span>:</td>\n\t\t\t\t\t<td>&nbsp;<select dojoAttachPoint=\"table_align\">\n\t\t\t\t\t\t\t<option value=\"\" selected>&lt;Not set&gt;</option>\n\t\t\t\t\t\t\t<option value=\"left\">Left</option>\n\t\t\t\t\t\t\t<option value=\"center\">Center</option>\n\t\t\t\t\t\t\t<option value=\"right\">Right</option>\n\t\t\t\t\t\t</select></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t\t<td>&nbsp;&nbsp;&nbsp;</td>\n\t\t<td align=\"right\" valign=\"top\">\n\t\t\t<table cellSpacing=\"0\" cellPadding=\"0\" border=\"0\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span>Width</span>:</td>\n\t\t\t\t\t<td>&nbsp;<input dojoAttachPoint=\"table_width\" type=\"text\" maxLength=\"4\" size=\"3\"></td>\n\t\t\t\t\t<td>&nbsp;<select dojoAttachPoint=\"table_widthtype\">\n\t\t\t\t\t\t\t<option value=\"percent\" selected>percent</option>\n\t\t\t\t\t\t\t<option value=\"pixels\">pixels</option>\n\t\t\t\t\t\t</select></td>\n\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><span>Height</span>:</td>\n\t\t\t\t\t<td>&nbsp;
 <INPUT dojoAttachPoint=\"table_height\" type=\"text\" maxLength=\"4\" size=\"3\"></td>\n\t\t\t\t\t<td>&nbsp;<span>pixels</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap><span>Cell spacing</span>:</td>\n\t\t\t\t\t<td>&nbsp;<input dojoAttachPoint=\"table_cellspacing\" type=\"text\" maxLength=\"2\" size=\"2\" value=\"1\"></td>\n\t\t\t\t\t<td>&nbsp;</td>\n\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap><span>Cell padding</span>:</td>\n\t\t\t\t\t<td>&nbsp;<input dojoAttachPoint=\"table_cellpadding\" type=\"text\" maxLength=\"2\" size=\"2\" value=\"1\"></td>\n\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n</table>\n<table cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" border=\"0\">\n\t<tr>\n\t\t<td nowrap><span>Caption</span>:</td>\n\t\t<td>&nbsp;</td>\n\t\t<td width=\"100%\" nowrap>&nbsp;\n\t\t\t<input dojoAttachPoint=
 \"table_caption\" type=\"text\" style=\"WIDTH: 90%\"></td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap><span>Summary</span>:</td>\n\t\t<td>&nbsp;</td>\n\t\t<td width=\"100%\" nowrap>&nbsp;\n\t\t\t<input dojoAttachPoint=\"table_summary\" type=\"text\" style=\"WIDTH: 90%\"></td>\n\t</tr>\n</table>\n<table><tr>\n<td><button dojoType='Button' dojoAttachEvent='onClick:ok'>Ok</button></td>\n<td><button dojoType='Button' dojoAttachEvent='onClick:cancel'>Cancel</button></td>\n</tr></table>\n</div>\n",editableAttributes:["summary","height","cellspacing","cellpadding","border","align"],loadContent:function(){
+var _1=dojo.widget.Editor2Manager.getCurrentInstance();
+_1.saveSelection();
+this.tableNode=dojo.withGlobal(_1.window,"getSelectedElement",dojo.html.selection);
+if(!this.tableNode||this.tableNode.tagName.toLowerCase()!="table"){
+this.tableNode=dojo.withGlobal(_1.window,"getAncestorElement",dojo.html.selection,["table"]);
+}
+var _2={};
+this.extraAttribText="";
+if(this.tableNode){
+this["table_rows"].value=this.tableNode.rows.length;
+this["table_rows"].disabled=true;
+this["table_cols"].value=this.tableNode.rows[0].cells.length;
+this["table_cols"].disabled=true;
+if(this.tableNode.caption){
+this["table_caption"].value=this.tableNode.caption.innerHTML;
+}else{
+this["table_caption"].value="";
+}
+var _3=this.tableNode.style.width||this.tableNode.width;
+if(_3){
+this["table_width"].value=parseInt(_3);
+if(_3.indexOf("%")>-1){
+this["table_widthtype"].value="percent";
+}else{
+this["table_widthtype"].value="pixels";
+}
+}else{
+this["table_width"].value="100";
+}
+var _4=this.tableNode.style.height||this.tableNode.height;
+if(_4){
+this["table_height"].value=parseInt(_3);
+}else{
+this["table_height"].value="";
+}
+var _5=this.tableNode.attributes;
+for(var i=0;i<_5.length;i++){
+if(dojo.lang.find(this.editableAttributes,_5[i].name.toLowerCase())>-1){
+_2[_5[i].name]=_5[i].value;
+}else{
+this.extraAttribText+=_5[i].name+"=\""+_5[i].value+"\" ";
+}
+}
+}else{
+this["table_rows"].value=3;
+this["table_rows"].disabled=false;
+this["table_cols"].value=2;
+this["table_cols"].disabled=false;
+this["table_width"].value=100;
+this["table_widthtype"].value="percent";
+this["table_height"].value="";
+}
+for(var i=0;i<this.editableAttributes.length;++i){
+name=this.editableAttributes[i];
+this["table_"+name].value=(_2[name]==undefined)?"":_2[name];
+if(name=="height"&&_2[name]!=undefined){
+this["table_"+name].value=_2[name];
+}
+}
+return true;
+},ok:function(){
+var _7=dojo.widget.Editor2Manager.getCurrentInstance();
+var _8={};
+_8["rows"]=this["table_rows"].value;
+_8["cols"]=this["table_cols"].value;
+_8["caption"]=this["table_caption"].value;
+_8["tableattrs"]="";
+if(this["table_widthtype"].value=="percent"){
+_8["tableattrs"]+="width=\""+this["table_width"].value+"%\" ";
+}else{
+_8["tableattrs"]+="width=\""+this["table_width"].value+"px\" ";
+}
+for(var i=0;i<this.editableAttributes.length;++i){
+var _a=this.editableAttributes[i];
+var _b=this["table_"+_a].value;
+if(_b.length>0){
+_8["tableattrs"]+=_a+"=\""+_b+"\" ";
+}
+}
+if(!_8["tableattrs"]){
+_8["tableattrs"]="";
+}
+if(dojo.render.html.ie&&!this["table_border"].value){
+_8["tableattrs"]+="class=\"dojoShowIETableBorders\" ";
+}
+var _c="<table "+_8["tableattrs"]+">";
+if(_8["caption"]){
+_c+="<caption>"+_8["caption"]+"</caption>";
+}
+var _d="<tbody>";
+if(this.tableNode){
+var _e=this.tableNode.getElementsByTagName("tbody")[0];
+_d=_e.outerHTML;
+if(!_d){
+var _f=_e.cloneNode(true);
+var _10=_e.ownerDocument.createElement("div");
+_10.appendChild(_f);
+_d=_10.innerHTML;
+}
+dojo.withGlobal(_7.window,"selectElement",dojo.html.selection,[this.tableNode]);
+}else{
+var _11="<tr>";
+for(var i=0;i<+_8.cols;i++){
+_11+="<td></td>";
+}
+_11+="</tr>";
+for(var i=0;i<_8.rows;i++){
+_d+=_11;
+}
+_d+="</tbody>";
+}
+_c+=_d+"</table>";
+_7.restoreSelection();
+_7.execCommand("inserthtml",_c);
+this.cancel();
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertTableDialog.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertTableDialog.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/InsertTableDialog.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/SimpleSignalCommands.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/SimpleSignalCommands.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/SimpleSignalCommands.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/SimpleSignalCommands.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,39 @@
+dojo.provide("dojo.widget.Editor2Plugin.SimpleSignalCommands");
+dojo.require("dojo.widget.Editor2");
+dojo.declare("dojo.widget.Editor2Plugin.SimpleSignalCommand",dojo.widget.Editor2Command,function(_1,_2){
+if(dojo.widget.Editor2.prototype[_2]==undefined){
+dojo.widget.Editor2.prototype[_2]=function(){
+};
+}
+},{execute:function(){
+this._editor[this._name]();
+}});
+if(dojo.widget.Editor2Plugin["SimpleSignalCommands"]){
+dojo.widget.Editor2Plugin["_SimpleSignalCommands"]=dojo.widget.Editor2Plugin["SimpleSignalCommands"];
+}
+dojo.widget.Editor2Plugin.SimpleSignalCommands={signals:["save","insertImage"],Handler:function(_3){
+if(_3.toLowerCase()=="save"){
+return new dojo.widget.Editor2ToolbarButton("Save");
+}else{
+if(_3.toLowerCase()=="insertimage"){
+return new dojo.widget.Editor2ToolbarButton("InsertImage");
+}
+}
+},getCommand:function(_4,_5){
+var _6;
+dojo.lang.every(this.signals,function(s){
+if(s.toLowerCase()==_5.toLowerCase()){
+_6=s;
+return false;
+}
+return true;
+});
+if(_6){
+return new dojo.widget.Editor2Plugin.SimpleSignalCommand(_4,_6);
+}
+}};
+if(dojo.widget.Editor2Plugin["_SimpleSignalCommands"]){
+dojo.lang.mixin(dojo.widget.Editor2Plugin.SimpleSignalCommands,dojo.widget.Editor2Plugin["_SimpleSignalCommands"]);
+}
+dojo.widget.Editor2Manager.registerHandler(dojo.widget.Editor2Plugin.SimpleSignalCommands,"getCommand");
+dojo.widget.Editor2ToolbarItemManager.registerHandler(dojo.widget.Editor2Plugin.SimpleSignalCommands.Handler);

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/SimpleSignalCommands.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/SimpleSignalCommands.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/widget/Editor2Plugin/SimpleSignalCommands.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain