Bootstrap version 4
Bootstrap Version 4
This commit is contained in:
66
4/ckeditor/plugins/wsc/dialogs/ciframe.html
Executable file
66
4/ckeditor/plugins/wsc/dialogs/ciframe.html
Executable file
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript">
|
||||
|
||||
function gup( name )
|
||||
{
|
||||
name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ;
|
||||
var regexS = '[\\?&]' + name + '=([^&#]*)' ;
|
||||
var regex = new RegExp( regexS ) ;
|
||||
var results = regex.exec( window.location.href ) ;
|
||||
|
||||
if ( results )
|
||||
return results[ 1 ] ;
|
||||
else
|
||||
return '' ;
|
||||
}
|
||||
|
||||
var interval;
|
||||
|
||||
function sendData2Master()
|
||||
{
|
||||
var destination = window.parent.parent ;
|
||||
try
|
||||
{
|
||||
if ( destination.XDTMaster )
|
||||
{
|
||||
var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ;
|
||||
window.clearInterval( interval ) ;
|
||||
}
|
||||
}
|
||||
catch (e) {}
|
||||
}
|
||||
|
||||
function OnMessage (event) {
|
||||
var message = event.data;
|
||||
var destination = window.parent.parent;
|
||||
destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ;
|
||||
}
|
||||
|
||||
function listenPostMessage() {
|
||||
if (window.addEventListener) { // all browsers except IE before version 9
|
||||
window.addEventListener ("message", OnMessage, false);
|
||||
}else {
|
||||
if (window.attachEvent) { // IE before version 9
|
||||
window.attachEvent("onmessage", OnMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
interval = window.setInterval( sendData2Master, 100 );
|
||||
listenPostMessage();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="onLoad()"><p></p></body>
|
||||
</html>
|
||||
118
4/ckeditor/plugins/wsc/dialogs/tmp.html
Executable file
118
4/ckeditor/plugins/wsc/dialogs/tmp.html
Executable file
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>iframe</title>
|
||||
|
||||
<style>
|
||||
html,body{
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
font: 13px/1.555 "Trebuchet MS", sans-serif;
|
||||
}
|
||||
a{
|
||||
color: #888;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid #888;
|
||||
}
|
||||
.main-box {
|
||||
color:#252525;
|
||||
padding: 3px 5px;
|
||||
text-align: justify;
|
||||
}
|
||||
.main-box p{margin: 0 0 14px;}
|
||||
.main-box .cerr{
|
||||
color: #f00000;
|
||||
border-bottom-color: #f00000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content" class="main-box"></div>
|
||||
<iframe src="" frameborder="0" id="spelltext" name="spelltext" style="display:none; width: 100%" ></iframe>
|
||||
<iframe src="" frameborder="0" id="loadsuggestfirst" name="loadsuggestfirst" style="display:none; width: 100%" ></iframe>
|
||||
<iframe src="" frameborder="0" id="loadspellsuggestall" name="loadspellsuggestall" style="display:none; width: 100%" ></iframe>
|
||||
<iframe src="" frameborder="0" id="loadOptionsForm" name="loadOptionsForm" style="display:none; width: 100%" ></iframe>
|
||||
<script>
|
||||
(function(window) {
|
||||
// Constructor Manager PostMessage
|
||||
|
||||
var ManagerPostMessage = function() {
|
||||
var _init = function(handler) {
|
||||
if (document.addEventListener) {
|
||||
window.addEventListener('message', handler, false);
|
||||
} else {
|
||||
window.attachEvent("onmessage", handler);
|
||||
};
|
||||
};
|
||||
var _sendCmd = function(o) {
|
||||
var str,
|
||||
type = Object.prototype.toString,
|
||||
fn = o.fn || null,
|
||||
id = o.id || '',
|
||||
target = o.target || window,
|
||||
message = o.message || { 'id': id };
|
||||
|
||||
if (type.call(o.message) == "[object Object]") {
|
||||
(o.message['id']) ? o.message['id'] : o.message['id'] = id;
|
||||
message = o.message;
|
||||
};
|
||||
|
||||
str = JSON.stringify(message, fn);
|
||||
target.postMessage(str, '*');
|
||||
};
|
||||
|
||||
return {
|
||||
init: _init,
|
||||
send: _sendCmd
|
||||
};
|
||||
};
|
||||
|
||||
var manageMessageTmp = new ManagerPostMessage;
|
||||
|
||||
|
||||
var appString = (function(){
|
||||
var spell = parent.CKEDITOR.config.wsc.DefaultParams.scriptPath;
|
||||
var serverUrl = parent.CKEDITOR.config.wsc.DefaultParams.serviceHost;
|
||||
return serverUrl + spell;
|
||||
})();
|
||||
|
||||
function loadScript(src, callback) {
|
||||
var scriptTag = document.createElement("script");
|
||||
scriptTag.type = "text/javascript";
|
||||
callback ? callback : callback = function() {};
|
||||
if(scriptTag.readyState) {
|
||||
//IE
|
||||
scriptTag.onreadystatechange = function() {
|
||||
if (scriptTag.readyState == "loaded" ||
|
||||
scriptTag.readyState == "complete") {
|
||||
scriptTag.onreadystatechange = null;
|
||||
setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1)
|
||||
callback();
|
||||
}
|
||||
};
|
||||
}else{
|
||||
//Others
|
||||
scriptTag.onload = function() {
|
||||
setTimeout(function(){scriptTag.parentNode.removeChild(scriptTag)},1);
|
||||
callback();
|
||||
};
|
||||
};
|
||||
scriptTag.src = src;
|
||||
document.getElementsByTagName("head")[0].appendChild(scriptTag);
|
||||
};
|
||||
|
||||
|
||||
window.onload = function(){
|
||||
loadScript(appString, function(){
|
||||
manageMessageTmp.send({
|
||||
'id': 'iframeOnload',
|
||||
'target': window.parent
|
||||
});
|
||||
});
|
||||
}
|
||||
})(this);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
52
4/ckeditor/plugins/wsc/dialogs/tmpFrameset.html
Executable file
52
4/ckeditor/plugins/wsc/dialogs/tmpFrameset.html
Executable file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript">
|
||||
|
||||
function doLoadScript( url )
|
||||
{
|
||||
if ( !url )
|
||||
return false ;
|
||||
|
||||
var s = document.createElement( "script" ) ;
|
||||
s.type = "text/javascript" ;
|
||||
s.src = url ;
|
||||
document.getElementsByTagName( "head" )[ 0 ].appendChild( s ) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
var opener;
|
||||
function tryLoad()
|
||||
{
|
||||
opener = window.parent;
|
||||
|
||||
// get access to global parameters
|
||||
var oParams = window.opener.oldFramesetPageParams;
|
||||
|
||||
// make frameset rows string prepare
|
||||
var sFramesetRows = ( parseInt( oParams.firstframeh, 10 ) || '30') + ",*," + ( parseInt( oParams.thirdframeh, 10 ) || '150' ) + ',0' ;
|
||||
document.getElementById( 'itFrameset' ).rows = sFramesetRows ;
|
||||
|
||||
// dynamic including init frames and crossdomain transport code
|
||||
// from config sproxy_js_frameset url
|
||||
var addScriptUrl = oParams.sproxy_js_frameset ;
|
||||
doLoadScript( addScriptUrl ) ;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<frameset id="itFrameset" onload="tryLoad();" border="0" rows="30,*,*,0">
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="2" src="" name="navbar"></frame>
|
||||
<frame scrolling="auto" framespacing="0" frameborder="0" noresize="noresize" marginheight="0" marginwidth="0" src="" name="mid"></frame>
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="bot"></frame>
|
||||
<frame scrolling="no" framespacing="0" frameborder="0" noresize="noresize" marginheight="1" marginwidth="1" src="" name="spellsuggestall"></frame>
|
||||
</frameset>
|
||||
</html>
|
||||
82
4/ckeditor/plugins/wsc/dialogs/wsc.css
Executable file
82
4/ckeditor/plugins/wsc/dialogs/wsc.css
Executable file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
html, body
|
||||
{
|
||||
background-color: transparent;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
body, td, input, select, textarea
|
||||
{
|
||||
font-size: 11px;
|
||||
font-family: 'Microsoft Sans Serif' , Arial, Helvetica, Verdana;
|
||||
}
|
||||
|
||||
.midtext
|
||||
{
|
||||
padding:0px;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.midtext p
|
||||
{
|
||||
padding:0px;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.Button
|
||||
{
|
||||
border: #737357 1px solid;
|
||||
color: #3b3b1f;
|
||||
background-color: #c7c78f;
|
||||
}
|
||||
|
||||
.PopupTabArea
|
||||
{
|
||||
color: #737357;
|
||||
background-color: #e3e3c7;
|
||||
}
|
||||
|
||||
.PopupTitleBorder
|
||||
{
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
}
|
||||
.PopupTabEmptyArea
|
||||
{
|
||||
padding-left: 10px;
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
}
|
||||
|
||||
.PopupTab, .PopupTabSelected
|
||||
{
|
||||
border-right: #d5d59d 1px solid;
|
||||
border-top: #d5d59d 1px solid;
|
||||
border-left: #d5d59d 1px solid;
|
||||
padding: 3px 5px 3px 5px;
|
||||
color: #737357;
|
||||
}
|
||||
|
||||
.PopupTab
|
||||
{
|
||||
margin-top: 1px;
|
||||
border-bottom: #d5d59d 1px solid;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.PopupTabSelected
|
||||
{
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
padding-top: 4px;
|
||||
border-bottom: #f1f1e3 1px solid;
|
||||
background-color: #f1f1e3;
|
||||
}
|
||||
3154
4/ckeditor/plugins/wsc/dialogs/wsc.js
Executable file
3154
4/ckeditor/plugins/wsc/dialogs/wsc.js
Executable file
File diff suppressed because it is too large
Load Diff
176
4/ckeditor/plugins/wsc/dialogs/wsc_ie.js
Executable file
176
4/ckeditor/plugins/wsc/dialogs/wsc_ie.js
Executable file
@@ -0,0 +1,176 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.dialog.add( 'checkspell', function( editor ) {
|
||||
var number = CKEDITOR.tools.getNextNumber(),
|
||||
iframeId = 'cke_frame_' + number,
|
||||
textareaId = 'cke_data_' + number,
|
||||
errorBoxId = 'cke_error_' + number,
|
||||
interval,
|
||||
protocol = document.location.protocol || 'http:',
|
||||
errorMsg = editor.lang.wsc.notAvailable;
|
||||
|
||||
var pasteArea =
|
||||
'<textarea' +
|
||||
' style="display: none"' +
|
||||
' id="' + textareaId + '"' +
|
||||
' rows="10"' +
|
||||
' cols="40">' +
|
||||
' </textarea><div' +
|
||||
' id="' + errorBoxId + '"' +
|
||||
' style="display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;">' +
|
||||
'</div><iframe' +
|
||||
' src=""' +
|
||||
' style="width:100%;background-color:#f1f1e3;"' +
|
||||
' frameborder="0"' +
|
||||
' name="' + iframeId + '"' +
|
||||
' id="' + iframeId + '"' +
|
||||
' allowtransparency="1">' +
|
||||
'</iframe>';
|
||||
|
||||
var wscCoreUrl = editor.config.wsc_customLoaderScript || ( protocol + '//loader.webspellchecker.net/sproxy_fck/sproxy.php' + '?plugin=fck2'
|
||||
+ '&customerid=' + editor.config.wsc_customerId
|
||||
+ '&cmd=script&doc=wsc&schema=22'
|
||||
);
|
||||
|
||||
if ( editor.config.wsc_customLoaderScript ) {
|
||||
errorMsg += '<p style="color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px">' +
|
||||
editor.lang.wsc.errorLoading.replace( /%s/g, editor.config.wsc_customLoaderScript ) + '</p>';
|
||||
}
|
||||
|
||||
function burnSpelling( dialog, errorMsg ) {
|
||||
var i = 0;
|
||||
return function() {
|
||||
if ( typeof( window.doSpell ) == 'function' ) {
|
||||
//Call from window.setInteval expected at once.
|
||||
if ( typeof( interval ) != 'undefined' )
|
||||
window.clearInterval( interval );
|
||||
|
||||
initAndSpell( dialog );
|
||||
} else if ( i++ == 180 ) // Timeout: 180 * 250ms = 45s.
|
||||
window._cancelOnError( errorMsg );
|
||||
};
|
||||
}
|
||||
|
||||
window._cancelOnError = function( m ) {
|
||||
if ( typeof( window.WSC_Error ) == 'undefined' ) {
|
||||
CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'none' );
|
||||
var errorBox = CKEDITOR.document.getById( errorBoxId );
|
||||
errorBox.setStyle( 'display', 'block' );
|
||||
errorBox.setHtml( m || editor.lang.wsc.notAvailable );
|
||||
}
|
||||
};
|
||||
|
||||
function initAndSpell( dialog ) {
|
||||
var LangComparer = new window._SP_FCK_LangCompare(),
|
||||
// Language abbr standarts comparer.
|
||||
pluginPath = CKEDITOR.getUrl( editor.plugins.wsc.path + 'dialogs/' ),
|
||||
// Service paths corecting/preparing.
|
||||
framesetPath = pluginPath + 'tmpFrameset.html';
|
||||
|
||||
// global var is used in FCK specific core
|
||||
// change on equal var used in fckplugin.js
|
||||
window.gFCKPluginName = 'wsc';
|
||||
|
||||
LangComparer.setDefaulLangCode( editor.config.defaultLanguage );
|
||||
|
||||
window.doSpell({
|
||||
ctrl: textareaId,
|
||||
|
||||
lang: editor.config.wsc_lang || LangComparer.getSPLangCode( editor.langCode ),
|
||||
intLang: editor.config.wsc_uiLang || LangComparer.getSPLangCode( editor.langCode ),
|
||||
winType: iframeId, // If not defined app will run on winpopup.
|
||||
|
||||
// Callback binding section.
|
||||
onCancel: function() {
|
||||
dialog.hide();
|
||||
},
|
||||
onFinish: function( dT ) {
|
||||
editor.focus();
|
||||
dialog.getParentEditor().setData( dT.value );
|
||||
dialog.hide();
|
||||
},
|
||||
|
||||
// Some manipulations with client static pages.
|
||||
staticFrame: framesetPath,
|
||||
framesetPath: framesetPath,
|
||||
iframePath: pluginPath + 'ciframe.html',
|
||||
|
||||
// Styles defining.
|
||||
schemaURI: pluginPath + 'wsc.css',
|
||||
|
||||
userDictionaryName: editor.config.wsc_userDictionaryName,
|
||||
customDictionaryName: editor.config.wsc_customDictionaryIds && editor.config.wsc_customDictionaryIds.split( "," ),
|
||||
domainName: editor.config.wsc_domainName
|
||||
|
||||
});
|
||||
|
||||
// Hide user message console (if application was loaded more then after timeout).
|
||||
CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' );
|
||||
CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' );
|
||||
}
|
||||
|
||||
return {
|
||||
title: editor.config.wsc_dialogTitle || editor.lang.wsc.title,
|
||||
minWidth: 485,
|
||||
minHeight: 380,
|
||||
buttons: [ CKEDITOR.dialog.cancelButton ],
|
||||
onShow: function() {
|
||||
var contentArea = this.getContentElement( 'general', 'content' ).getElement();
|
||||
contentArea.setHtml( pasteArea );
|
||||
contentArea.getChild( 2 ).setStyle( 'height', this._.contentSize.height + 'px' );
|
||||
|
||||
if ( typeof( window.doSpell ) != 'function' ) {
|
||||
// Load script.
|
||||
CKEDITOR.document.getHead().append( CKEDITOR.document.createElement( 'script', {
|
||||
attributes: {
|
||||
type: 'text/javascript',
|
||||
src: wscCoreUrl
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
var sData = editor.getData(); // Get the data to be checked.
|
||||
|
||||
CKEDITOR.document.getById( textareaId ).setValue( sData );
|
||||
|
||||
interval = window.setInterval( burnSpelling( this, errorMsg ), 250 );
|
||||
},
|
||||
onHide: function() {
|
||||
window.ooo = undefined;
|
||||
window.int_framsetLoaded = undefined;
|
||||
window.framesetLoaded = undefined;
|
||||
window.is_window_opened = false;
|
||||
},
|
||||
contents: [
|
||||
{
|
||||
id: 'general',
|
||||
label: editor.config.wsc_dialogTitle || editor.lang.wsc.title,
|
||||
padding: 0,
|
||||
elements: [
|
||||
{
|
||||
type: 'html',
|
||||
id: 'content',
|
||||
html: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
// Expand the spell-check frame when dialog resized. (#6829)
|
||||
CKEDITOR.dialog.on( 'resize', function( evt ) {
|
||||
var data = evt.data,
|
||||
dialog = data.dialog;
|
||||
|
||||
if ( dialog._.name == 'checkspell' ) {
|
||||
var content = dialog.getContentElement( 'general', 'content' ).getElement(),
|
||||
iframe = content && content.getChild( 2 );
|
||||
|
||||
iframe && iframe.setSize( 'height', data.height );
|
||||
iframe && iframe.setSize( 'width', data.width );
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user