[freeside-commits] freeside/httemplate/elements/fckeditor/editor/wsc ciframe.html, NONE, 1.1.2.2 tmpFrameset.html, NONE, 1.1.2.2 w.html, NONE, 1.1.2.2

Mark Wells mark at wavetail.420.am
Tue Mar 16 01:35:11 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/elements/fckeditor/editor/wsc
In directory wavetail.420.am:/tmp/cvs-serv23603/editor/wsc

Added Files:
      Tag: FREESIDE_1_9_BRANCH
	ciframe.html tmpFrameset.html w.html 
Log Message:
FCKeditor 2.6.6

--- NEW FILE: ciframe.html ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END 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 == null )
		return '' ;
	else
		return results[ 1 ] ;
}

function sendData2Master()
{
	var destination = 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>

--- NEW FILE: w.html ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
-->
<html>
<head>
	<title></title>
	<style>
		#wsc_frames , #errorMessage{
			position:absolute;
			top:0px;
			left:0px;
			width:500px;
			height:395px;
			margin:0px;
			padding:0px;
			border:0px;
			display:block;
			overflow: hidden;
		}
		#wsc_frames   { z-index:10;}
		#errorMessage {
			color:red;
			display:none;
			font-size:16px;
			font-weight:bold;
			padding-top:160px;
			text-align:center;
			z-index:11;
		}
		#errorMessage p {
			color:#000;
			font-size:11px;
			text-align:left;
			font-weight: normal;
			padding-left:80px;
		}

	</style>
	<script type="text/javascript">

var oEditor = window.parent.InnerDialogLoaded() ;
var FCKConfig = oEditor.FCKConfig;

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 ;
}

function Ok()
{
	return window.parent.Cancel() ;
}

function _callOnCancel( dT )
{
	window.parent.Cancel() ;
}

function _callOnFinish( dT )
{
	oEditor.FCK.SetData( dT.value ) ;
	window.parent.CloseDialog( true ) ;
}

function _cancelOnError(m)
{
	var _conId = 'errorMessage' ;
	var message = m || 'Sorry, but service is unavailable now.' ;

	if ( typeof( WSC_Error ) == 'undefined' )
	{
		var _con = document.createElement( 'div' ) ;
		_con.setAttribute( 'id', _conId ) ;
		document.body.appendChild( _con ) ;
		dom_con = document.getElementById( _conId ) ;
		dom_con.innerHTML = message ;
		dom_con.style.display = 'block' ;
	}
	//return Ok() ;
}

function URL_abs2full( uri )
{
	return uri.match( 'http' )
		? uri
		: document.location.protocol + '//' + document.location.host + uri ;
}

function clearErrorUsermessage()
{
	// empty error container
	var _con = document.getElementById( 'errorMessage' ) ;

	if ( !_con )
		return ;

	_con.innerHTML = '' ;
	_con.style.display = 'none' ;
}

var gInterval ;

function onLoad()
{
	clearErrorUsermessage() ;
	var _errorMessage = 'The SpellChecker Service is currently unavailable.' ;
	if ( 'undefined' != typeof( oEditor.FCK.Config.WSChLoaderScript ) )
	    _errorMessage = '<div>The SpellChecker Service is currently unavailable.</div><p>Error loading application<br>service host: ' + oEditor.FCK.Config.WSChLoaderScript + '</p>';

	var burnSpelling = function( oName, _eMessage )
	{
		var i = 0 ;

		return function ()
		{
			if ( typeof( window[oName] ) == 'function' )
				initAndSpell() ;
			else if ( i++ == 180 )
				_cancelOnError( _eMessage ) ;
		}
	}

	gInterval = window.setInterval( burnSpelling( 'doSpell', _errorMessage ), 250 ) ;

	// WSC CORE init section
	var protocol = document.location.protocol || 'http:' ;
	var baseUrl = protocol + '//loader.spellchecker.net/sproxy_fck/sproxy.php' ;
	var plugin = "fck2" ;
	var customerid = oEditor.FCK.Config.WSCnCustomerId
		|| "1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk" ;
	var wscCoreUrl = oEditor.FCK.Config.WSChLoaderScript
		|| ( baseUrl + '?'
			+ 'plugin='    + plugin + '&'
			+ 'customerid='+ customerid + '&'
			+ 'cmd=script&doc=wsc&schema=22' ) ;

	// load WSC core
	doLoadScript( wscCoreUrl ) ;
}

function initAndSpell()
{
	//xall from window.setInteval expected at once
	if ( typeof( gInterval ) == 'undefined' )
		return null ;
	window.clearInterval( gInterval ) ;

	// global var is used in FCK specific core
	// change on equal var used in fckplugin.js
	gFCKPluginName = 'wsc' ;

	// get the data to be checked
	var sData = oEditor.FCK.GetData() ;

	// prepare content
	var ctrlId =  'myEditor' ;
	var dCurT = document.getElementById( ctrlId ) ;
	dCurT.value = sData ;

	// service paths corecting/preparing
	var sPath2Scin = URL_abs2full( oEditor.FCK.Config.SkinDialogCSS ) ;
	var sPathCiframe = FCKConfig.BasePath + 'wsc/ciframe.html' ;
	var sPathFrameset = FCKConfig.BasePath + 'wsc/tmpFrameset.html' ;

	// language abbr standarts comparer
	var LangComparer = new _SP_FCK_LangCompare() ;
	LangComparer.setDefaulLangCode( oEditor.FCK.Language.DefaultLanguage ) ;

	// clear user message console (if application was loaded more then after 2 seconds)
	clearErrorUsermessage() ;

	doSpell( {
		ctrl : ctrlId,
		lang : LangComparer.getSPLangCode( oEditor.FCK.Language.GetActiveLanguage() ),
		winType : 'wsc_frames',// if not defined app will run on winpopup

		// callback binding section
		onCancel :window._callOnCancel,
		onFinish :window._callOnFinish,

		// @TODO: basePath assingning

		// some manipulations with client static pages
		framesetPath : sPathFrameset,
		iframePath : sPathCiframe,

		// styles defining
		schemaURI : sPath2Scin
	} ) ;

	return true ;
}

	</script>
</head>
<body onload="onLoad()" style="padding: 0px; overflow: hidden;">
	<textarea style="display: none;" id="myEditor" rows="10" cols="40"></textarea>
	<iframe src="" name="wsc_frames" id="wsc_frames"></iframe>
</body>
</html>

--- NEW FILE: tmpFrameset.html ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END 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 ;
}

function tryLoad ()
{
    if ( typeof( opener ) == 'undefined' || !opener )
        opener = parent ;

    // get access to global parameters
    oParams = opener.oldFramesetPageParams ;

    // make frameset rows string prepare
    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>



More information about the freeside-commits mailing list