From 36b21e3eca22f17ed63faafb96c5ce83e315892d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 20 Nov 2013 09:01:42 +0100 Subject: [REM] CKEDITOR development source, 4.3 final added to web client bzr revid: xmo@openerp.com-20131120080142-x5vewroum39jwn3g --- .../static/lib/ckeditor/plugins/adobeair/plugin.js | 188 --------------------- 1 file changed, 188 deletions(-) delete mode 100644 addons/website/static/lib/ckeditor/plugins/adobeair/plugin.js (limited to 'addons/website/static/lib/ckeditor/plugins/adobeair/plugin.js') diff --git a/addons/website/static/lib/ckeditor/plugins/adobeair/plugin.js b/addons/website/static/lib/ckeditor/plugins/adobeair/plugin.js deleted file mode 100644 index d022febe6d5..00000000000 --- a/addons/website/static/lib/ckeditor/plugins/adobeair/plugin.js +++ /dev/null @@ -1,188 +0,0 @@ -/** - * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md or http://ckeditor.com/license - */ - -(function() { - var eventNameList = [ 'click', 'keydown', 'mousedown', 'keypress', 'mouseover', 'mouseout' ]; - - // Inline event callbacks assigned via innerHTML/outerHTML, such as - // onclick/onmouseover, are ignored in AIR. - // Use DOM2 event listeners to substitue inline handlers instead. - function convertInlineHandlers( container ) { - // TODO: document.querySelectorAll is not supported in AIR. - var children = container.getElementsByTag( '*' ), - count = children.count(), - child; - - for ( var i = 0; i < count; i++ ) { - child = children.getItem( i ); - - (function( node ) { - for ( var j = 0; j < eventNameList.length; j++ ) { - (function( eventName ) { - var inlineEventHandler = node.getAttribute( 'on' + eventName ); - if ( node.hasAttribute( 'on' + eventName ) ) { - node.removeAttribute( 'on' + eventName ); - node.on( eventName, function( evt ) { - var callFunc = /(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec( inlineEventHandler ), - hasReturn = callFunc && callFunc[ 1 ], - callFuncArgs = callFunc && callFunc[ 2 ].split( ',' ), - preventDefault = /return false;/.test( inlineEventHandler ); - - if ( callFuncArgs ) { - var nums = callFuncArgs.length, - argName; - - for ( var i = 0; i < nums; i++ ) { - // Trim spaces around param. - callFuncArgs[ i ] = argName = CKEDITOR.tools.trim( callFuncArgs[ i ] ); - - // String form param. - var strPattern = argName.match( /^(["'])([^"']*?)\1$/ ); - if ( strPattern ) { - callFuncArgs[ i ] = strPattern[ 2 ]; - continue; - } - - // Integer form param. - if ( argName.match( /\d+/ ) ) { - callFuncArgs[ i ] = parseInt( argName, 10 ); - continue; - } - - // Speical variables. - switch ( argName ) { - case 'this': - callFuncArgs[ i ] = node.$; - break; - case 'event': - callFuncArgs[ i ] = evt.data.$; - break; - case 'null': - callFuncArgs[ i ] = null; - break; - } - } - - var retval = CKEDITOR.tools.callFunction.apply( window, callFuncArgs ); - if ( hasReturn && retval === false ) - preventDefault = 1; - } - - if ( preventDefault ) - evt.data.preventDefault(); - }); - } - })( eventNameList[ j ] ); - } - })( child ); - } - } - - CKEDITOR.plugins.add( 'adobeair', { - onLoad: function() { - if ( !CKEDITOR.env.air ) - return; - - CKEDITOR.dom.document.prototype.write = CKEDITOR.tools.override( CKEDITOR.dom.document.prototype.write, function( original_write ) { - function appendElement( parent, tagName, fullTag, text ) { - var node = parent.append( tagName ), - attrs = CKEDITOR.htmlParser.fragment.fromHtml( fullTag ).children[ 0 ].attributes; - attrs && node.setAttributes( attrs ); - text && node.append( parent.getDocument().createText( text ) ); - } - - return function( html, mode ) { - // document.write() or document.writeln() fail silently after - // the page load event in Adobe AIR. - // DOM manipulation could be used instead. - if ( this.getBody() ) { - // We're taking the below extra work only because innerHTML - // on element doesn't work as expected. - var doc = this, - head = this.getHead(); - - // Create style nodes for inline css. (