Ticket #3117: 3117.patch
File 3117.patch, 4.3 KB (added by , 15 years ago) |
---|
-
_source/plugins/wsc/dialogs/tmpFrameset.html
24 24 25 25 function tryLoad () 26 26 { 27 if ( !window.opener ) 28 window.opener = window.parent ; 27 opener = window.parent; 29 28 30 29 // get access to global parameters 31 30 var oParams = window.opener.oldFramesetPageParams ; -
_source/plugins/wsc/dialogs/wsc.js
47 47 return function () 48 48 { 49 49 if ( typeof( window.doSpell ) == 'function' ) 50 { 51 //Call from window.setInteval expected at once. 52 if ( typeof( interval ) != 'undefined' ) 53 window.clearInterval( interval ); 54 50 55 initAndSpell( dialog ); 56 } 51 57 else if ( i++ == 180 ) // Timeout: 180 * 250ms = 45s. 52 58 _cancelOnError( errorMsg ); 53 59 }; 54 60 } 55 61 56 function _cancelOnError( m )62 window._cancelOnError = function( m ) 57 63 { 58 64 if ( typeof( window.WSC_Error ) == 'undefined' ) 59 65 { … … 62 68 errorBox.setStyle( 'display', 'block' ); 63 69 errorBox.setHtml( m || editor.lang.spellCheck.notAvailable ); 64 70 } 65 } 71 }; 66 72 67 73 function initAndSpell( dialog ) 68 74 { 69 //Call from window.setInteval expected at once. 70 if ( typeof( interval ) == 'undefined' ) 71 return; 72 window.clearInterval( interval ); 73 74 var sData = editor.getData(), // Get the data to be checked. 75 LangComparer = new window._SP_FCK_LangCompare(), // Language abbr standarts comparer. 75 var LangComparer = new window._SP_FCK_LangCompare(), // Language abbr standarts comparer. 76 76 pluginPath = CKEDITOR.getUrl( editor.plugins.wsc.path + 'dialogs/' ), // Service paths corecting/preparing. 77 77 framesetPath = pluginPath + 'tmpFrameset.html'; 78 78 79 // global var is used in FCK specific core 80 // change on equal var used in fckplugin.js 81 gFCKPluginName = 'wsc'; 82 79 83 LangComparer.setDefaulLangCode( editor.config.defaultLanguage ); 80 84 81 // Prepare content.82 CKEDITOR.document.getById( textareaId ).setValue( sData );83 84 // Hide user message console (if application was loaded more then after timeout).85 CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' );86 CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' );87 88 85 window.doSpell({ 89 86 ctrl : textareaId, 90 87 lang : LangComparer.getSPLangCode( editor.langCode ), … … 97 94 }, 98 95 onFinish : function( dT ) 99 96 { 97 editor.focus(); 100 98 dialog.getParentEditor().setData( dT.value ); 101 99 dialog.hide(); 102 100 }, … … 109 107 // Styles defining. 110 108 schemaURI : pluginPath + 'wsc.css' 111 109 }); 110 111 // Hide user message console (if application was loaded more then after timeout). 112 CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' ); 113 CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' ); 112 114 } 113 115 114 116 return { … … 135 137 }) 136 138 ); 137 139 } 140 141 var sData = editor.getData(); // Get the data to be checked. 142 CKEDITOR.document.getById( textareaId ).setValue( sData ); 143 138 144 interval = window.setInterval( burnSpelling( this, errorMsg ), 250 ); 139 145 }, 146 onHide : function() 147 { 148 window.ooo = undefined; 149 window.int_framsetLoaded = undefined; 150 window.framesetLoaded = undefined; 151 window.is_window_opened = false; 152 }, 140 153 contents : [ 141 154 { 142 155 id : 'general', -
_source/plugins/wsc/plugin.js
16 16 17 17 var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); 18 18 19 // SpellChecker doesn't work in Opera .20 command.modes = { wysiwyg : !( CKEDITOR.env.opera) };19 // SpellChecker doesn't work in Opera and with custom domain 20 command.modes = { wysiwyg : ( !CKEDITOR.env.opera && document.domain == window.location.hostname ) }; 21 21 22 22 editor.ui.addButton( 'SpellChecker', 23 23 {