roojs-bootstrap.js
authorEdward <edward@roojs.com>
Tue, 3 Jun 2014 12:17:48 +0000 (20:17 +0800)
committerEdward <edward@roojs.com>
Tue, 3 Jun 2014 12:17:48 +0000 (20:17 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index a45a053..f4f4623 100644 (file)
@@ -14055,7 +14055,8 @@ Roo.extend(Roo.bootstrap.HtmlEditor, Roo.bootstrap.TextArea,  {
         }
         this.createToolbar(this);
        
-        
+        Roo.log('size1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11');
+        Roo.log(this.wrap.getSize());
         if(!this.width){
             this.setSize(this.wrap.getSize());
         }
index ce8fd7a..20f3099 100644 (file)
@@ -305,7 +305,7 @@ this.cleanUpChildren(A);}});Roo.HtmlEditorCore.white=['area','br','img','input',
 //Roo/bootstrap/HtmlEditor.js
 Roo.bootstrap.HtmlEditor=function(A){Roo.bootstrap.HtmlEditor.superclass.constructor.call(this,A);if(!this.toolbars){this.toolbars=[];}
 this.editorcore=new Roo.HtmlEditorCore(Roo.apply({owner:this},A));this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editmodechange:true,editorevent:true,firstfocus:true,autosave:true,savedpreview:true});};Roo.extend(Roo.bootstrap.HtmlEditor,Roo.bootstrap.TextArea,{toolbars:false,resizable:false,height:300,width:500,stylesheets:false,frameId:false,validationEvent:false,deferHeight:true,initialized:false,activated:false,onFocus:Roo.emptyFn,iframePad:3,hideMode:'offsets',tbContainer:false,toolbarContainer:function(){return this.wrap.select('.x-html-editor-tb',true).first();},createToolbar:function(){this.toolbars=[new Roo.bootstrap.HtmlEditor.ToolbarStandard({editor:this})];this.toolbars[0].render(this.toolbarContainer());Roo.log("create toolbars");return;if(!editor.toolbars||!editor.toolbars.length){editor.toolbars=[new Roo.bootstrap.HtmlEditor.ToolbarStandard()];}for(var i=0;i<editor.toolbars.length;i++){editor.toolbars[i]=Roo.factory(typeof(editor.toolbars[i])=='string'?{xtype:editor.toolbars[i]}:editor.toolbars[i],Roo.bootstrap.HtmlEditor);editor.toolbars[i].init(editor);}},onRender:function(ct,A){var _t=this;Roo.bootstrap.HtmlEditor.superclass.onRender.call(this,ct,A);this.wrap=this.inputEl().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.log('resize: '+w+','+h);Roo.bootstrap.HtmlEditor.superclass.onResize.apply(this,arguments);var ew=false;var eh=false;if(this.inputEl()){if(typeof w=='number'){var aw=w-this.wrap.getFrameWidth('lr');this.inputEl().setWidth(this.adjustWidth('textarea',aw));ew=aw;}if(typeof h=='number'){var A=-11;for(var i=0;i<this.toolbars.length;i++){A+=this.toolbars[i].el.getHeight();}var ah=h-this.wrap.getFrameWidth('tb')-A;ah-=5;this.inputEl().setHeight(this.adjustWidth('textarea',ah));var eh=ah;}}
+this.createToolbar(this);Roo.log('size1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11');Roo.log(this.wrap.getSize());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.log('resize: '+w+','+h);Roo.bootstrap.HtmlEditor.superclass.onResize.apply(this,arguments);var ew=false;var eh=false;if(this.inputEl()){if(typeof w=='number'){var aw=w-this.wrap.getFrameWidth('lr');this.inputEl().setWidth(this.adjustWidth('textarea',aw));ew=aw;}if(typeof h=='number'){var A=-11;for(var i=0;i<this.toolbars.length;i++){A+=this.toolbars[i].el.getHeight();}var ah=h-this.wrap.getFrameWidth('tb')-A;ah-=5;this.inputEl().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.inputEl().removeClass('hide');this.inputEl().dom.removeAttribute('tabIndex');this.inputEl().focus();}else {Roo.log('editor - hiding textarea');this.editorcore.pushValue();this.inputEl().addClass('hide');this.inputEl().dom.setAttribute('tabIndex',-1);}
 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.bootstrap.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();}});