[gen] Integrated ckeditor 4.1.
This commit is contained in:
parent
c87db8d167
commit
e1e1b90921
184 changed files with 2708 additions and 40 deletions
49
gen/ui/ckeditor/plugins/wsc/dialogs/ciframe.html
Normal file
49
gen/ui/ckeditor/plugins/wsc/dialogs/ciframe.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<!--
|
||||
Copyright (c) 2003-2012, 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 onLoad()
|
||||
{
|
||||
interval = window.setInterval( sendData2Master, 100 );
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="onLoad()"><p></p></body>
|
||||
</html>
|
52
gen/ui/ckeditor/plugins/wsc/dialogs/tmpFrameset.html
Normal file
52
gen/ui/ckeditor/plugins/wsc/dialogs/tmpFrameset.html
Normal 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-2012, 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
gen/ui/ckeditor/plugins/wsc/dialogs/wsc.css
Normal file
82
gen/ui/ckeditor/plugins/wsc/dialogs/wsc.css
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
Copyright (c) 2003-2012, 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;
|
||||
}
|
11
gen/ui/ckeditor/plugins/wsc/dialogs/wsc.js
Normal file
11
gen/ui/ckeditor/plugins/wsc/dialogs/wsc.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("checkspell",function(a){function c(a,c){var d=0;return function(){"function"==typeof window.doSpell?("undefined"!=typeof e&&window.clearInterval(e),j(a)):180==d++&&window._cancelOnError(c)}}function j(c){var f=new window._SP_FCK_LangCompare,b=CKEDITOR.getUrl(a.plugins.wsc.path+"dialogs/"),e=b+"tmpFrameset.html";window.gFCKPluginName="wsc";f.setDefaulLangCode(a.config.defaultLanguage);window.doSpell({ctrl:g,lang:a.config.wsc_lang||f.getSPLangCode(a.langCode),intLang:a.config.wsc_uiLang||
|
||||
f.getSPLangCode(a.langCode),winType:d,onCancel:function(){c.hide()},onFinish:function(b){a.focus();c.getParentEditor().setData(b.value);c.hide()},staticFrame:e,framesetPath:e,iframePath:b+"ciframe.html",schemaURI:b+"wsc.css",userDictionaryName:a.config.wsc_userDictionaryName,customDictionaryName:a.config.wsc_customDictionaryIds&&a.config.wsc_customDictionaryIds.split(","),domainName:a.config.wsc_domainName});CKEDITOR.document.getById(h).setStyle("display","none");CKEDITOR.document.getById(d).setStyle("display",
|
||||
"block")}var b=CKEDITOR.tools.getNextNumber(),d="cke_frame_"+b,g="cke_data_"+b,h="cke_error_"+b,e,b=document.location.protocol||"http:",i=a.lang.wsc.notAvailable,k='<textarea style="display: none" id="'+g+'" rows="10" cols="40"> </textarea><div id="'+h+'" 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="'+d+'" id="'+d+'" allowtransparency="1"></iframe>',
|
||||
l=a.config.wsc_customLoaderScript||b+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin=fck2&customerid="+a.config.wsc_customerId+"&cmd=script&doc=wsc&schema=22";a.config.wsc_customLoaderScript&&(i+='<p style="color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px">'+a.lang.wsc.errorLoading.replace(/%s/g,a.config.wsc_customLoaderScript)+"</p>");window._cancelOnError=function(c){if("undefined"==typeof window.WSC_Error){CKEDITOR.document.getById(d).setStyle("display",
|
||||
"none");var b=CKEDITOR.document.getById(h);b.setStyle("display","block");b.setHtml(c||a.lang.wsc.notAvailable)}};return{title:a.config.wsc_dialogTitle||a.lang.wsc.title,minWidth:485,minHeight:380,buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var b=this.getContentElement("general","content").getElement();b.setHtml(k);b.getChild(2).setStyle("height",this._.contentSize.height+"px");"function"!=typeof window.doSpell&&CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",
|
||||
{attributes:{type:"text/javascript",src:l}}));b=a.getData();CKEDITOR.document.getById(g).setValue(b);e=window.setInterval(c(this,i),250)},onHide:function(){window.ooo=void 0;window.int_framsetLoaded=void 0;window.framesetLoaded=void 0;window.is_window_opened=!1},contents:[{id:"general",label:a.config.wsc_dialogTitle||a.lang.wsc.title,padding:0,elements:[{type:"html",id:"content",html:""}]}]}});
|
||||
CKEDITOR.dialog.on("resize",function(a){var a=a.data,c=a.dialog;"checkspell"==c._.name&&((c=(c=c.getContentElement("general","content").getElement())&&c.getChild(2))&&c.setSize("height",a.height),c&&c.setSize("width",a.width))});
|
Loading…
Add table
Add a link
Reference in a new issue