Ticket #6812: 6812.patch
File 6812.patch, 1.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/scayt/plugin.js
595 595 label : lang.title, 596 596 title : CKEDITOR.env.opera ? lang.opera_title : lang.title, 597 597 className : 'cke_button_scayt', 598 modes : { wysiwyg : 1 }, 598 599 onRender: function() 599 600 { 600 601 command.on( 'state', function() -
_source/plugins/button/plugin.js
137 137 138 138 instance.index = index = CKEDITOR.ui.button._.instances.push( instance ) - 1; 139 139 140 // Indicate a mode sensitive button. 140 141 if ( this.modes ) 141 142 { 143 var modeStates = {}; 144 145 editor.on( 'beforeModeUnload', function() 146 { 147 modeStates[ editor.mode ] = this._.state; 148 }, this ); 149 142 150 editor.on( 'mode', function() 143 151 { 144 this.setState( this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); 152 var mode = editor.mode; 153 154 // Restore saved button state. 155 this.setState( this.modes[ mode ] ? modeStates[ mode ] != undefined ? modeStates[ mode ] : CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); 145 156 }, this); 146 157 } 147 158 else if ( command )