roojs-core.js
authorEdward <edward@roojs.com>
Mon, 8 Jun 2015 04:30:31 +0000 (12:30 +0800)
committerEdward <edward@roojs.com>
Mon, 8 Jun 2015 04:30:31 +0000 (12:30 +0800)
roojs-core-debug.js
roojs-ui.js
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 71410df..af01bbb 100644 (file)
@@ -930,7 +930,7 @@ this.cblack.push(A);},this);}});Roo.HtmlEditorCore.white=['area','br','img','inp
 Roo.form.HtmlEditor=function(A){Roo.form.HtmlEditor.superclass.constructor.call(this,A);if(!this.toolbars){this.toolbars=[];}
 this.editorcore=new Roo.HtmlEditorCore(Roo.apply({owner:this},A));};Roo.extend(Roo.form.HtmlEditor,Roo.form.Field,{clearUp:true,toolbars:false,resizable:false,height:300,width:500,stylesheets:false,cblack:false,cwhite:false,black:false,white:false,frameId:false,validationEvent:false,deferHeight:true,initialized:false,activated:false,onFocus:Roo.emptyFn,iframePad:3,hideMode:'offsets',actionMode:'container',defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editmodechange:true,editorevent:true,firstfocus:true,autosave:true,savedpreview:true});this.defaultAutoCreate={tag:"textarea",style:'width: '+this.width+'px;height: '+this.height+'px;',autocomplete:"off"};},createToolbar:function(A){Roo.log("create toolbars");if(!A.toolbars||!A.toolbars.length){A.toolbars=[new Roo.form.HtmlEditor.ToolbarStandard()];}for(var i=0;i<A.toolbars.length;i++){A.toolbars[i]=Roo.factory(typeof(A.toolbars[i])=='string'?{xtype:A.toolbars[i]}:A.toolbars[i],Roo.form.HtmlEditor);A.toolbars[i].init(A);}},onRender:function(ct,A){var _t=this;Roo.form.HtmlEditor.superclass.onRender.call(this,ct,A);this.wrap=this.el.wrap({cls:'x-html-editor-wrap',cn:{cls:'x-html-editor-tb'}});this.editorcore.onRender(ct,A);if(this.resizable){this.resizeEl=new Roo.Resizable(this.wrap,{pinned:true,wrap:true,dynamic:true,minHeight:this.height,height:this.height,handles:this.resizable,width:this.width,listeners:{resize:function(r,w,h){_t.onResize(w,h);}}});}
 this.createToolbar(this);if(!this.width){this.setSize(this.wrap.getSize());}if(this.resizeEl){this.resizeEl.resizeTo.defer(100,this.resizeEl,[this.width,this.height]);}},onResize:function(w,h){Roo.form.HtmlEditor.superclass.onResize.apply(this,arguments);var ew=false;var eh=false;if(this.el){if(typeof w=='number'){var aw=w-this.wrap.getFrameWidth('lr');this.el.setWidth(this.adjustWidth('textarea',aw));ew=aw;}if(typeof h=='number'){var A=0;for(var i=0;i<this.toolbars.length;i++){A+=this.toolbars[i].tb.el.getHeight();if(this.toolbars[i].footer){A+=this.toolbars[i].footer.el.getHeight();}}var ah=h-this.wrap.getFrameWidth('tb')-A;ah-=5;this.el.setHeight(this.adjustWidth('textarea',ah));var eh=ah;}}
-Roo.log('onResize:'+[w,h,ew,eh].join(','));this.editorcore.onResize(ew,eh);},toggleSourceEdit:function(A){this.editorcore.toggleSourceEdit(A);if(this.editorcore.sourceEditMode){Roo.log('editor - showing textarea');this.editorcore.syncValue();this.el.removeClass('x-hidden');this.el.dom.removeAttribute('tabIndex');this.el.focus();Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).hide();t.footer.hide();}});}else {Roo.log('editor - hiding textarea');this.editorcore.pushValue();this.el.addClass('x-hidden');this.el.dom.setAttribute('tabIndex',-1);Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).show();t.footer.show();}});}
+Roo.log('onResize:'+[w,h,ew,eh].join(','));this.editorcore.onResize(ew,eh);},toggleSourceEdit:function(A){this.editorcore.toggleSourceEdit(A);if(this.editorcore.sourceEditMode){Roo.log('editor - showing textarea');this.editorcore.syncValue();this.el.removeClass('x-hidden');this.el.dom.removeAttribute('tabIndex');this.el.focus();Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.hide();t.footer.hide();}});}else {Roo.log('editor - hiding textarea');this.editorcore.pushValue();this.el.addClass('x-hidden');this.el.dom.setAttribute('tabIndex',-1);Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.show();t.footer.show();}});}
 this.setSize(this.wrap.getSize());this.fireEvent('editmodechange',this,this.editorcore.sourceEditMode);},adjustSize:Roo.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap;},getPositionEl:function(){return this.wrap;},initEvents:function(){this.originalValue=this.getValue();},markInvalid:Roo.emptyFn,clearInvalid:Roo.emptyFn,setValue:function(v){Roo.form.HtmlEditor.superclass.setValue.call(this,v);this.editorcore.pushValue();},deferFocus:function(){this.focus.defer(10,this);},focus:function(){this.editorcore.focus();},onDestroy:function(){if(this.rendered){for(var i=0;i<this.toolbars.length;i++){this.toolbars[i].onDestroy();}
 this.wrap.dom.innerHTML='';this.wrap.remove();}},onFirstFocus:function(){this.editorcore.onFirstFocus();for(var i=0;i<this.toolbars.length;i++){this.toolbars[i].onFirstFocus();}},syncValue:function(){this.editorcore.syncValue();},pushValue:function(){this.editorcore.pushValue();}});
 //Roo/form/HtmlEditor/ToolbarStandard.js
index 444ee20..5109287 100644 (file)
@@ -42961,7 +42961,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
             
             Roo.each(this.toolbars, function(t){
                 if(t instanceof Roo.form.HtmlEditor.ToolbarContext){
-                    t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).hide();
+                    t.tb.hide();
                     t.footer.hide();
                 }
             });
@@ -42977,7 +42977,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
             
             Roo.each(this.toolbars, function(t){
                 if(t instanceof Roo.form.HtmlEditor.ToolbarContext){
-                    t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).show();
+                    t.tb.show();
                     t.footer.show();
                 }
             });
index e2bdba0..6c77291 100644 (file)
@@ -26531,7 +26531,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
             
             Roo.each(this.toolbars, function(t){
                 if(t instanceof Roo.form.HtmlEditor.ToolbarContext){
-                    t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).hide();
+                    t.tb.hide();
                     t.footer.hide();
                 }
             });
@@ -26547,7 +26547,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
             
             Roo.each(this.toolbars, function(t){
                 if(t instanceof Roo.form.HtmlEditor.ToolbarContext){
-                    t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).show();
+                    t.tb.show();
                     t.footer.show();
                 }
             });
index ac018c8..ad61890 100644 (file)
@@ -595,7 +595,7 @@ this.cblack.push(A);},this);}});Roo.HtmlEditorCore.white=['area','br','img','inp
 Roo.form.HtmlEditor=function(A){Roo.form.HtmlEditor.superclass.constructor.call(this,A);if(!this.toolbars){this.toolbars=[];}
 this.editorcore=new Roo.HtmlEditorCore(Roo.apply({owner:this},A));};Roo.extend(Roo.form.HtmlEditor,Roo.form.Field,{clearUp:true,toolbars:false,resizable:false,height:300,width:500,stylesheets:false,cblack:false,cwhite:false,black:false,white:false,frameId:false,validationEvent:false,deferHeight:true,initialized:false,activated:false,onFocus:Roo.emptyFn,iframePad:3,hideMode:'offsets',actionMode:'container',defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editmodechange:true,editorevent:true,firstfocus:true,autosave:true,savedpreview:true});this.defaultAutoCreate={tag:"textarea",style:'width: '+this.width+'px;height: '+this.height+'px;',autocomplete:"off"};},createToolbar:function(A){Roo.log("create toolbars");if(!A.toolbars||!A.toolbars.length){A.toolbars=[new Roo.form.HtmlEditor.ToolbarStandard()];}for(var i=0;i<A.toolbars.length;i++){A.toolbars[i]=Roo.factory(typeof(A.toolbars[i])=='string'?{xtype:A.toolbars[i]}:A.toolbars[i],Roo.form.HtmlEditor);A.toolbars[i].init(A);}},onRender:function(ct,A){var _t=this;Roo.form.HtmlEditor.superclass.onRender.call(this,ct,A);this.wrap=this.el.wrap({cls:'x-html-editor-wrap',cn:{cls:'x-html-editor-tb'}});this.editorcore.onRender(ct,A);if(this.resizable){this.resizeEl=new Roo.Resizable(this.wrap,{pinned:true,wrap:true,dynamic:true,minHeight:this.height,height:this.height,handles:this.resizable,width:this.width,listeners:{resize:function(r,w,h){_t.onResize(w,h);}}});}
 this.createToolbar(this);if(!this.width){this.setSize(this.wrap.getSize());}if(this.resizeEl){this.resizeEl.resizeTo.defer(100,this.resizeEl,[this.width,this.height]);}},onResize:function(w,h){Roo.form.HtmlEditor.superclass.onResize.apply(this,arguments);var ew=false;var eh=false;if(this.el){if(typeof w=='number'){var aw=w-this.wrap.getFrameWidth('lr');this.el.setWidth(this.adjustWidth('textarea',aw));ew=aw;}if(typeof h=='number'){var A=0;for(var i=0;i<this.toolbars.length;i++){A+=this.toolbars[i].tb.el.getHeight();if(this.toolbars[i].footer){A+=this.toolbars[i].footer.el.getHeight();}}var ah=h-this.wrap.getFrameWidth('tb')-A;ah-=5;this.el.setHeight(this.adjustWidth('textarea',ah));var eh=ah;}}
-Roo.log('onResize:'+[w,h,ew,eh].join(','));this.editorcore.onResize(ew,eh);},toggleSourceEdit:function(A){this.editorcore.toggleSourceEdit(A);if(this.editorcore.sourceEditMode){Roo.log('editor - showing textarea');this.editorcore.syncValue();this.el.removeClass('x-hidden');this.el.dom.removeAttribute('tabIndex');this.el.focus();Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).hide();t.footer.hide();}});}else {Roo.log('editor - hiding textarea');this.editorcore.pushValue();this.el.addClass('x-hidden');this.el.dom.setAttribute('tabIndex',-1);Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.el.setVisibilityMode(Roo.Element.DISPLAY).show();t.footer.show();}});}
+Roo.log('onResize:'+[w,h,ew,eh].join(','));this.editorcore.onResize(ew,eh);},toggleSourceEdit:function(A){this.editorcore.toggleSourceEdit(A);if(this.editorcore.sourceEditMode){Roo.log('editor - showing textarea');this.editorcore.syncValue();this.el.removeClass('x-hidden');this.el.dom.removeAttribute('tabIndex');this.el.focus();Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.hide();t.footer.hide();}});}else {Roo.log('editor - hiding textarea');this.editorcore.pushValue();this.el.addClass('x-hidden');this.el.dom.setAttribute('tabIndex',-1);Roo.each(this.toolbars,function(t){if(t instanceof Roo.form.HtmlEditor.ToolbarContext){t.tb.show();t.footer.show();}});}
 this.setSize(this.wrap.getSize());this.fireEvent('editmodechange',this,this.editorcore.sourceEditMode);},adjustSize:Roo.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap;},getPositionEl:function(){return this.wrap;},initEvents:function(){this.originalValue=this.getValue();},markInvalid:Roo.emptyFn,clearInvalid:Roo.emptyFn,setValue:function(v){Roo.form.HtmlEditor.superclass.setValue.call(this,v);this.editorcore.pushValue();},deferFocus:function(){this.focus.defer(10,this);},focus:function(){this.editorcore.focus();},onDestroy:function(){if(this.rendered){for(var i=0;i<this.toolbars.length;i++){this.toolbars[i].onDestroy();}
 this.wrap.dom.innerHTML='';this.wrap.remove();}},onFirstFocus:function(){this.editorcore.onFirstFocus();for(var i=0;i<this.toolbars.length;i++){this.toolbars[i].onFirstFocus();}},syncValue:function(){this.editorcore.syncValue();},pushValue:function(){this.editorcore.pushValue();}});
 //Roo/form/HtmlEditor/ToolbarStandard.js