Ticket #2931: 2931.patch
File 2931.patch, 14.3 KB (added by , 15 years ago) |
---|
-
_source/core/config.js
147 147 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 148 148 */ 149 149 150 plugins : 'basicstyles,blockquote,button,clipboard,elementspath,find,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,smiley,sourcearea,table,specialchar,tab,templates,toolbar,undo,wysiwygarea ',150 plugins : 'basicstyles,blockquote,button,clipboard,elementspath,find,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,smiley,sourcearea,table,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', 151 151 152 152 /** 153 153 * The theme to be used to build the UI. -
_source/lang/en.js
371 371 vSpace : 'VSpace' 372 372 }, 373 373 374 // Speller Pages Dialog 375 spellCheck : 376 { 377 toolbar : 'Check Spelling', 378 title : 'Spell Check', 379 notAvailable : 'Sorry, but service is unavailable now.', 380 errorLoading : 'Error loading application service host: %s.', 381 notInDic : 'Not in dictionary', 382 changeTo : 'Change to', 383 btnIgnore : 'Ignore', 384 btnIgnoreAll : 'Ignore All', 385 btnReplace : 'Replace', 386 btnReplaceAll : 'Replace All', 387 btnUndo : 'Undo', 388 noSuggestions : '- No suggestions -', 389 progress : 'Spell check in progress...', 390 noMispell : 'Spell check complete: No misspellings found', 391 noChanges : 'Spell check complete: No words changed', 392 oneChange : 'Spell check complete: One word changed', 393 manyChanges : 'Spell check complete: %1 words changed', 394 ieSpellDownload : 'Spell checker not installed. Do you want to download it now?' 395 }, 396 374 397 smiley : 375 398 { 376 399 toolbar : 'Smiley', -
_source/plugins/toolbar/plugin.js
207 207 [ 208 208 [ 209 209 'Source', '-', 210 'NewPage', 'Preview', 'Templates', 'Print', ' -',210 'NewPage', 'Preview', 'Templates', 'Print', 'WSC', '-', 211 211 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 212 212 'Undo', 'Redo', '-', 213 213 'Find', 'Replace', '-', -
_source/plugins/wsc/dialogs/ciframe.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 2 <!-- 3 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 4 For licensing, see LICENSE.html or http://ckeditor.com/license 5 --> 6 <html> 7 <head> 8 <title></title> 9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 10 <script type="text/javascript"> 11 12 function gup( name ) 13 { 14 name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ; 15 var regexS = '[\\?&]' + name + '=([^&#]*)' ; 16 var regex = new RegExp( regexS ) ; 17 var results = regex.exec( window.location.href ) ; 18 19 if( results == null ) 20 return '' ; 21 else 22 return results[ 1 ] ; 23 } 24 25 function sendData2Master() 26 { 27 var destination = parent.parent ; 28 try 29 { 30 if ( destination.XDTMaster ) 31 { 32 var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ; 33 window.clearInterval( interval ) ; 34 } 35 } 36 catch (e) {} 37 } 38 39 function onLoad() 40 { 41 interval = window.setInterval( sendData2Master, 100 ); 42 } 43 44 </script> 45 </head> 46 <body onload="onLoad()"><p></p></body> 47 </html> -
_source/plugins/wsc/dialogs/tmpFrameset.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> 2 <!-- 3 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 4 For licensing, see LICENSE.html or http://ckeditor.com/license 5 --> 6 <html> 7 <head> 8 <title></title> 9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 10 <script type="text/javascript"> 11 12 function doLoadScript( url ) 13 { 14 if ( !url ) 15 return false ; 16 17 var s = document.createElement( "script" ) ; 18 s.type = "text/javascript" ; 19 s.src = url ; 20 document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ; 21 22 return true ; 23 } 24 25 function tryLoad () 26 { 27 if ( typeof( opener ) == 'undefined' || !opener ) 28 opener = parent ; 29 30 // get access to global parameters 31 oParams = opener.oldFramesetPageParams ; 32 33 // make frameset rows string prepare 34 sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ; 35 document.getElementById( 'itFrameset' ).rows = sFramesetRows ; 36 37 // dynamic including init frames and crossdomain transport code 38 // from config sproxy_js_frameset url 39 var addScriptUrl = oParams.sproxy_js_frameset ; 40 doLoadScript( addScriptUrl ) ; 41 } 42 43 </script> 44 </head> 45 46 <frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0"> 47 <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame> 48 <frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame> 49 <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame> 50 <frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame> 51 </frameset> 52 </html> -
_source/plugins/wsc/dialogs/wsc.css
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 html, body 7 { 8 background-color: transparent; 9 margin: 0px; 10 padding: 0px; 11 } 12 13 body 14 { 15 padding: 10px; 16 } 17 18 body, td, input, select, textarea 19 { 20 font-size: 11px; 21 font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana; 22 } 23 24 .midtext 25 { 26 padding:0px; 27 margin:10px; 28 } 29 30 .midtext p 31 { 32 padding:0px; 33 margin:10px; 34 } 35 36 .Button 37 { 38 border: #737357 1px solid; 39 color: #3b3b1f; 40 background-color: #c7c78f; 41 } 42 43 .PopupTabArea 44 { 45 color: #737357; 46 background-color: #e3e3c7; 47 } 48 49 .PopupTitleBorder 50 { 51 border-bottom: #d5d59d 1px solid; 52 } 53 .PopupTabEmptyArea 54 { 55 padding-left: 10px; 56 border-bottom: #d5d59d 1px solid; 57 } 58 59 .PopupTab, .PopupTabSelected 60 { 61 border-right: #d5d59d 1px solid; 62 border-top: #d5d59d 1px solid; 63 border-left: #d5d59d 1px solid; 64 padding: 3px 5px 3px 5px; 65 color: #737357; 66 } 67 68 .PopupTab 69 { 70 margin-top: 1px; 71 border-bottom: #d5d59d 1px solid; 72 cursor: pointer; 73 cursor: hand; 74 } 75 76 .PopupTabSelected 77 { 78 font-weight: bold; 79 cursor: default; 80 padding-top: 4px; 81 border-bottom: #f1f1e3 1px solid; 82 background-color: #f1f1e3; 83 } -
_source/plugins/wsc/dialogs/wsc.js
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 CKEDITOR.dialog.add( 'wsc', function( editor ) 7 { 8 var number = CKEDITOR.tools.getNextNumber(), 9 iframeId = 'cke_frame_' + number, 10 textareaId = 'cke_data_' + number, 11 errorBoxId = 'cke_error_' + number, 12 interval, 13 protocol = document.location.protocol || 'http:', 14 errorMsg = editor.lang.spellCheck.notAvailable; 15 16 var pasteArea = '<textarea'+ 17 ' style="display: none"' + 18 ' id="' + textareaId + '"' + 19 ' rows="10"' + 20 ' cols="40">' + 21 ' </textarea><div' + 22 ' id="' + errorBoxId + '"' + 23 ' style="display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;">' + 24 '</div><iframe' + 25 ' src=""' + 26 ' style="width:485px;background-color:#f1f1e3;height:380px"' + 27 ' frameborder="0"' + 28 ' name="' + iframeId + '"' + 29 ' id="' + iframeId + '"' + 30 ' allowtransparency="1">' + 31 '</iframe>'; 32 33 var wscCoreUrl = editor.config.wsc_customLoaderScript || ( protocol + 34 '//loader.spellchecker.net/sproxy_fck/sproxy.php' 35 + '?plugin=fck2' 36 + '&customerid=' + editor.config.wsc_customerId 37 + '&cmd=script&doc=wsc&schema=22' 38 ); 39 40 if ( editor.config.wsc_customLoaderScript ) 41 errorMsg += '<p style="color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px">' + 42 editor.lang.spellCheck.errorLoading.replace( /%s/g, editor.config.wsc_customLoaderScript ) + '</p>'; 43 44 function burnSpelling( dialog, errorMsg ) 45 { 46 var i = 0; 47 return function () 48 { 49 if ( typeof( doSpell ) == 'function' ) 50 initAndSpell( dialog ); 51 else if ( i++ == 180 ) // Timeout: 180 * 250ms = 45s. 52 _cancelOnError( errorMsg ); 53 } 54 }; 55 56 function _cancelOnError( m ) 57 { 58 if ( typeof( WSC_Error ) == 'undefined' ) 59 { 60 CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'none' ); 61 var errorBox = CKEDITOR.document.getById( errorBoxId ); 62 errorBox.setStyle( 'display', 'block' ); 63 errorBox.setHtml( m || editor.lang.spellCheck.notAvailable ); 64 } 65 } 66 67 function initAndSpell( dialog ) 68 { 69 //Call from window.setInteval expected at once. 70 if ( typeof( interval ) == 'undefined' ) 71 return null; 72 window.clearInterval( interval ); 73 74 // Global var is used in FCK specific core. 75 gFCKPluginName = 'wsc'; 76 77 var sData = editor.getData(), // Get the data to be checked. 78 LangComparer = new _SP_FCK_LangCompare(), // Language abbr standarts comparer. 79 pluginPath = CKEDITOR.getUrl( editor.plugins.wsc.path + 'dialogs/' ), // Service paths corecting/preparing. 80 framesetPath = pluginPath + 'tmpFrameset.html'; 81 82 LangComparer.setDefaulLangCode( editor.config.defaultLanguage ); 83 84 // Prepare content. 85 CKEDITOR.document.getById( textareaId ).setValue( sData ); 86 87 // Hide user message console (if application was loaded more then after timeout). 88 CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' ); 89 CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' ); 90 91 doSpell({ 92 ctrl : textareaId, 93 lang : LangComparer.getSPLangCode( editor.langCode ), 94 winType : iframeId, // If not defined app will run on winpopup. 95 96 // Callback binding section. 97 onCancel : function() 98 { 99 dialog.hide(); 100 }, 101 onFinish : function( dT ) 102 { 103 dialog.getParentEditor().setData( dT.value ); 104 dialog.hide(); 105 }, 106 107 // Some manipulations with client static pages. 108 staticFrame : framesetPath, 109 framesetPath : framesetPath, 110 iframePath : pluginPath + 'ciframe.html', 111 112 // Styles defining. 113 schemaURI : pluginPath + 'wsc.css' 114 }); 115 }; 116 117 return { 118 title : editor.lang.spellCheck.title, 119 minWidth : 540, 120 minHeight : 480, 121 buttons : [ CKEDITOR.dialog.cancelButton ], 122 onShow : function() 123 { 124 contentArea = this.getContentElement( 'general', 'content' ).getElement(); 125 contentArea.setHtml( pasteArea ); 126 127 if ( typeof( doSpell ) != 'function' ) 128 { 129 // Load script. 130 CKEDITOR.document.getHead().append( 131 CKEDITOR.document.createElement( 'script', 132 { 133 attributes : 134 { 135 type : 'text/javascript', 136 src : wscCoreUrl 137 } 138 }) 139 ); 140 } 141 interval = window.setInterval( burnSpelling( this, errorMsg ), 250 ); 142 }, 143 contents : [ 144 { 145 id : 'general', 146 label : editor.lang.spellCheck.title, 147 elements : [ 148 { 149 type : 'html', 150 id : 'content', 151 style : 'width:500px;height:400px', 152 html : '<div></div>' 153 } 154 ] 155 } 156 ] 157 }; 158 }); 159 No newline at end of file -
_source/plugins/wsc/plugin.js
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 /** 7 * @file Spell checker 8 */ 9 10 // Register a plugin named "wsc". 11 CKEDITOR.plugins.add( 'wsc', 12 { 13 init : function( editor, pluginPath ) 14 { 15 var commandName = 'wsc'; 16 17 var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) ); 18 19 // SpellChecker doesn't work in Opera. 20 if ( CKEDITOR.env.opera ) 21 command.state = CKEDITOR.TRISTATE_DISABLED; 22 23 editor.ui.addButton( 'WSC', 24 { 25 label : editor.lang.spellCheck.title, 26 command : commandName 27 }); 28 CKEDITOR.dialog.add( commandName, this.path + 'dialogs/wsc.js' ); 29 } 30 }); 31 32 33 CKEDITOR.config.wsc_customerId = '1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk' ; 34 CKEDITOR.config.wsc_customLoaderScript = false; -
_source/skins/default/toolbar.css
281 281 background-position: 0 -176px; 282 282 } 283 283 284 .cke_skin_default a.cke_button_wsc .cke_icon 285 { 286 background-position: 0 -192px; 287 } 288 284 289 .cke_skin_default a.cke_button_pagebreak .cke_icon 285 290 { 286 291 background-position: 0 -672px;