Ticket #5700: 5700.2.patch
File 5700.2.patch, 4.2 KB (added by , 14 years ago) |
---|
-
_source/plugins/scayt/dialogs/options.js
179 179 onOk : function() 180 180 { 181 181 var scayt_control = this.data.scayt_control; 182 scayt_control.option( this.options );183 // Setup languge if it was changed.184 182 var csLang = this.chosed_lang; 185 scayt_control.setLang( csLang ); 186 scayt_control.refresh(); 183 var options = this.options; 184 window.setTimeout(function(){ 185 scayt_control.option( options ); 186 // Setup languge if it was changed. 187 188 if(scayt_control.sLang != csLang) 189 scayt_control.setLang( csLang ); 190 else 191 scayt_control.refresh(); 192 }, 50); 187 193 }, 188 194 onCancel: function() 189 195 { -
_source/plugins/scayt/plugin.js
184 184 }, 10 ); 185 185 } 186 186 }); 187 editor.on( 'insertHTML', function() 188 { 189 var scayt_instance = plugin.getScayt( editor ); 190 if ( plugin.isScaytEnabled( editor ) ) 191 { 192 // Unlock the selection before reload, SCAYT will take 193 // care selection update. 194 if ( CKEDITOR.env.ie ) 195 editor.getSelection().unlock( true ); 187 196 188 // Reload spell-checking for current word after insertion completed. 189 editor.on( 'insertElement', function() 190 { 191 var scayt_instance = plugin.getScayt( editor ); 192 if ( plugin.isScaytEnabled( editor ) ) 197 // Return focus to the editor and refresh SCAYT markup (#5573). 198 window.setTimeout( function() 193 199 { 194 // Unlock the selection before reload, SCAYT will take 195 // care selection update. 196 if ( CKEDITOR.env.ie ) 197 editor.getSelection().unlock( true ); 198 199 // Return focus to the editor and refresh SCAYT markup (#5573). 200 window.setTimeout( function() 201 { 202 scayt_instance.focus(); 203 scayt_instance.refresh(); 204 }, 10 ); 200 scayt_instance.focus(); 201 scayt_instance.refresh(); 202 }, 10 ); 203 } 204 }, this, null, 50 ); 205 206 // Reload spell-checking for current word after insertion completed. 207 editor.on( 'insertElement', function() 208 { 209 var scayt_instance = plugin.getScayt( editor ); 210 if ( plugin.isScaytEnabled( editor ) ) 211 { 212 // Unlock the selection before reload, SCAYT will take 213 // care selection update. 214 if ( CKEDITOR.env.ie ) 215 editor.getSelection().unlock( true ); 216 217 // Return focus to the editor and refresh SCAYT markup (#5573). 218 window.setTimeout( function() 219 { 220 scayt_instance.focus(); 221 scayt_instance.refresh(); 222 }, 10 ); 205 223 } 206 }, this, null, 50 );207 208 editor.on( ' insertHtml', function()224 }, this, null, 50 ); 225 226 editor.on( 'dialogShow', function( ev ) 209 227 { 210 var scayt_instance = plugin.getScayt( editor ); 211 if ( plugin.isScaytEnabled( editor ) ) 212 { 213 // Unlock the selection before reload, SCAYT will take 214 // care selection update. 215 if ( CKEDITOR.env.ie ) 216 editor.getSelection().unlock( true ); 217 218 // Return focus to the editor (#5573) 219 // Refresh SCAYT markup 228 var editor = ev.editor; 229 if ( plugin.isScaytEnabled( editor ) ) { 230 var instance = plugin.getScayt( editor ); 231 instance.setPaused(true); 232 } 233 }); 234 235 editor.on( 'dialogHide', function( ev ) 236 { 237 var editor = ev.editor; 238 if ( plugin.isScaytEnabled( editor ) ) { 220 239 window.setTimeout( function() 221 { 222 scayt_instance.focus(); 223 scayt_instance.refresh(); 224 }, 10 ); 240 { 241 var instance = plugin.getScayt( editor ); 242 243 instance.setPaused(false); 244 instance && instance.refresh(); 245 }, 1 ); 225 246 } 226 } , this, null, 50);247 }); 227 248 228 249 editor.on( 'scaytDialog', function( ev ) // Communication with dialog. 229 250 {