Changeset 8629 for trunk/src/widget
- Timestamp:
- 05/16/07 07:45:46 (20 months ago)
- Location:
- trunk/src/widget
- Files:
-
- 2 modified
-
Editor2Plugin/DropDownList.js (modified) (5 diffs)
-
Editor2Toolbar.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/widget/Editor2Plugin/DropDownList.js
r8175 r8629 42 42 43 43 dojo.declare("dojo.widget.Editor2ToolbarComboItem", dojo.widget.Editor2ToolbarDropDownButton,{ 44 // summary: dojo.widget.Editor2ToolbarComboItem provides a n external loaded dropdown list44 // summary: dojo.widget.Editor2ToolbarComboItem provides a realonly combobox in the toolbar 45 45 46 46 onMouseOver: function(e){ … … 68 68 if(this._parentToolbar.checkAvailability()){ 69 69 var name = e.currentTarget.getAttribute("dropDownItemName"); 70 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();70 var curInst = this.getMainComponent(); 71 71 if(curInst){ 72 72 var _command = curInst.getCommand(this._name); … … 143 143 dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.refreshState.call(this); 144 144 if(this._lastState != dojo.widget.Editor2Manager.commandState.Disabled){ 145 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();145 var curInst = this.getMainComponent(); 146 146 if(curInst){ 147 147 var _command = curInst.getCommand(this._name); … … 213 213 dojo.widget.Editor2ToolbarFontSizeSelect.superclass.refreshState.call(this); 214 214 if(this._lastState != dojo.widget.Editor2Manager.commandState.Disabled){ 215 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();215 var curInst = this.getMainComponent(); 216 216 if(curInst){ 217 217 var _command = curInst.getCommand(this._name); … … 338 338 onChange: function(e){ 339 339 if(this._parentToolbar.checkAvailability()){ 340 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();340 var curInst = this.getMainComponent(); 341 341 curInst.execCommand('inserthtml',e.target.getAttribute('dojoETDropDownItem'),'inserthtml');//'specialchar' 342 342 } -
trunk/src/widget/Editor2Toolbar.js
r8139 r8629 138 138 } 139 139 }, 140 getMainComponent: function(){ 141 return dojo.widget.Editor2Manager.getCurrentInstance(); 142 }, 140 143 onMouseOver: function(){ 141 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();144 var curInst = this.getMainComponent(); 142 145 if(curInst){ 143 146 var _command = curInst.getCommand(this._name); … … 160 163 e.preventDefault(); 161 164 e.stopPropagation(); 162 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();165 var curInst = this.getMainComponent(); 163 166 if(curInst){ 164 167 var _command = curInst.getCommand(this._name); … … 171 174 refreshState: function(){ 172 175 // summary: update the state of the toolbar item 173 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();176 var curInst = this.getMainComponent(); 174 177 var em = dojo.widget.Editor2Manager; 175 178 if(curInst){ … … 250 253 if(this._parentToolbar.checkAvailability()){ 251 254 var sv = this._domNode.value.toLowerCase(); 252 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();255 var curInst = this.getMainComponent(); 253 256 if(curInst){ 254 257 var _command = curInst.getCommand(this._name); … … 263 266 if(this._domNode){ 264 267 dojo.widget.Editor2ToolbarFormatBlockPlainSelect.superclass.refreshState.call(this); 265 var curInst = dojo.widget.Editor2Manager.getCurrentInstance();268 var curInst = this.getMainComponent(); 266 269 if(curInst){ 267 270 var _command = curInst.getCommand(this._name); … … 298 301 299 302 // itemNodeType: 'span', //all the items (with attribute dojoETItemName set) defined in the toolbar should be a of this type 300 303 itemManager: dojo.widget.Editor2ToolbarItemManager, 301 304 postCreate: function(){ 302 305 var i=0,node,nodes = dojo.html.getElementsByClass("dojoEditorToolbarItem", this.domNode/*, this.itemNodeType*/); … … 306 309 var itemname = node.getAttribute("dojoETItemName"); 307 310 if(itemname){ 308 var item = dojo.widget.Editor2ToolbarItemManager.getToolbarItem(itemname);311 var item = this.itemManager.getToolbarItem(itemname); 309 312 if(item){ 310 313 item.create(node, this);