summaryrefslogtreecommitdiff
path: root/addons/website/static/lib/ckeditor/plugins/iframe
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/lib/ckeditor/plugins/iframe')
-rw-r--r--addons/website/static/lib/ckeditor/plugins/iframe/dialogs/iframe.js218
-rw-r--r--addons/website/static/lib/ckeditor/plugins/iframe/icons/hidpi/iframe.pngbin3091 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/iframe/icons/iframe.pngbin989 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/iframe/lang/en.js11
-rw-r--r--addons/website/static/lib/ckeditor/plugins/iframe/plugin.js83
5 files changed, 0 insertions, 312 deletions
diff --git a/addons/website/static/lib/ckeditor/plugins/iframe/dialogs/iframe.js b/addons/website/static/lib/ckeditor/plugins/iframe/dialogs/iframe.js
deleted file mode 100644
index 1b90592ef02..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/iframe/dialogs/iframe.js
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-
-(function() {
- // Map 'true' and 'false' values to match W3C's specifications
- // http://www.w3.org/TR/REC-html40/present/frames.html#h-16.5
- var checkboxValues = {
- scrolling: { 'true': 'yes', 'false': 'no' },
- frameborder: { 'true': '1', 'false': '0' }
- };
-
- function loadValue( iframeNode ) {
- var isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox;
- if ( iframeNode.hasAttribute( this.id ) ) {
- var value = iframeNode.getAttribute( this.id );
- if ( isCheckbox )
- this.setValue( checkboxValues[ this.id ][ 'true' ] == value.toLowerCase() );
- else
- this.setValue( value );
- }
- }
-
- function commitValue( iframeNode ) {
- var isRemove = this.getValue() === '',
- isCheckbox = this instanceof CKEDITOR.ui.dialog.checkbox,
- value = this.getValue();
- if ( isRemove )
- iframeNode.removeAttribute( this.att || this.id );
- else if ( isCheckbox )
- iframeNode.setAttribute( this.id, checkboxValues[ this.id ][ value ] );
- else
- iframeNode.setAttribute( this.att || this.id, value );
- }
-
- CKEDITOR.dialog.add( 'iframe', function( editor ) {
- var iframeLang = editor.lang.iframe,
- commonLang = editor.lang.common,
- dialogadvtab = editor.plugins.dialogadvtab;
- return {
- title: iframeLang.title,
- minWidth: 350,
- minHeight: 260,
- onShow: function() {
- // Clear previously saved elements.
- this.fakeImage = this.iframeNode = null;
-
- var fakeImage = this.getSelectedElement();
- if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'iframe' ) {
- this.fakeImage = fakeImage;
-
- var iframeNode = editor.restoreRealElement( fakeImage );
- this.iframeNode = iframeNode;
-
- this.setupContent( iframeNode );
- }
- },
- onOk: function() {
- var iframeNode;
- if ( !this.fakeImage )
- iframeNode = new CKEDITOR.dom.element( 'iframe' );
- else
- iframeNode = this.iframeNode;
-
- // A subset of the specified attributes/styles
- // should also be applied on the fake element to
- // have better visual effect. (#5240)
- var extraStyles = {},
- extraAttributes = {};
- this.commitContent( iframeNode, extraStyles, extraAttributes );
-
- // Refresh the fake image.
- var newFakeImage = editor.createFakeElement( iframeNode, 'cke_iframe', 'iframe', true );
- newFakeImage.setAttributes( extraAttributes );
- newFakeImage.setStyles( extraStyles );
- if ( this.fakeImage ) {
- newFakeImage.replace( this.fakeImage );
- editor.getSelection().selectElement( newFakeImage );
- } else
- editor.insertElement( newFakeImage );
- },
- contents: [
- {
- id: 'info',
- label: commonLang.generalTab,
- accessKey: 'I',
- elements: [
- {
- type: 'vbox',
- padding: 0,
- children: [
- {
- id: 'src',
- type: 'text',
- label: commonLang.url,
- required: true,
- validate: CKEDITOR.dialog.validate.notEmpty( iframeLang.noUrl ),
- setup: loadValue,
- commit: commitValue
- }
- ]
- },
- {
- type: 'hbox',
- children: [
- {
- id: 'width',
- type: 'text',
- requiredContent: 'iframe[width]',
- style: 'width:100%',
- labelLayout: 'vertical',
- label: commonLang.width,
- validate: CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.width ) ),
- setup: loadValue,
- commit: commitValue
- },
- {
- id: 'height',
- type: 'text',
- requiredContent: 'iframe[height]',
- style: 'width:100%',
- labelLayout: 'vertical',
- label: commonLang.height,
- validate: CKEDITOR.dialog.validate.htmlLength( commonLang.invalidHtmlLength.replace( '%1', commonLang.height ) ),
- setup: loadValue,
- commit: commitValue
- },
- {
- id: 'align',
- type: 'select',
- requiredContent: 'iframe[align]',
- 'default': '',
- items: [
- [ commonLang.notSet, '' ],
- [ commonLang.alignLeft, 'left' ],
- [ commonLang.alignRight, 'right' ],
- [ commonLang.alignTop, 'top' ],
- [ commonLang.alignMiddle, 'middle' ],
- [ commonLang.alignBottom, 'bottom' ]
- ],
- style: 'width:100%',
- labelLayout: 'vertical',
- label: commonLang.align,
- setup: function( iframeNode, fakeImage ) {
- loadValue.apply( this, arguments );
- if ( fakeImage ) {
- var fakeImageAlign = fakeImage.getAttribute( 'align' );
- this.setValue( fakeImageAlign && fakeImageAlign.toLowerCase() || '' );
- }
- },
- commit: function( iframeNode, extraStyles, extraAttributes ) {
- commitValue.apply( this, arguments );
- if ( this.getValue() )
- extraAttributes.align = this.getValue();
- }
- }
- ]
- },
- {
- type: 'hbox',
- widths: [ '50%', '50%' ],
- children: [
- {
- id: 'scrolling',
- type: 'checkbox',
- requiredContent: 'iframe[scrolling]',
- label: iframeLang.scrolling,
- setup: loadValue,
- commit: commitValue
- },
- {
- id: 'frameborder',
- type: 'checkbox',
- requiredContent: 'iframe[frameborder]',
- label: iframeLang.border,
- setup: loadValue,
- commit: commitValue
- }
- ]
- },
- {
- type: 'hbox',
- widths: [ '50%', '50%' ],
- children: [
- {
- id: 'name',
- type: 'text',
- requiredContent: 'iframe[name]',
- label: commonLang.name,
- setup: loadValue,
- commit: commitValue
- },
- {
- id: 'title',
- type: 'text',
- requiredContent: 'iframe[title]',
- label: commonLang.advisoryTitle,
- setup: loadValue,
- commit: commitValue
- }
- ]
- },
- {
- id: 'longdesc',
- type: 'text',
- requiredContent: 'iframe[longdesc]',
- label: commonLang.longDescr,
- setup: loadValue,
- commit: commitValue
- }
- ]
- },
- dialogadvtab && dialogadvtab.createAdvancedTab( editor, { id:1,classes:1,styles:1 }, 'iframe' )
- ]
- };
- });
-})();
diff --git a/addons/website/static/lib/ckeditor/plugins/iframe/icons/hidpi/iframe.png b/addons/website/static/lib/ckeditor/plugins/iframe/icons/hidpi/iframe.png
deleted file mode 100644
index ff17604da22..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/iframe/icons/hidpi/iframe.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/iframe/icons/iframe.png b/addons/website/static/lib/ckeditor/plugins/iframe/icons/iframe.png
deleted file mode 100644
index f72d191553f..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/iframe/icons/iframe.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/iframe/lang/en.js b/addons/website/static/lib/ckeditor/plugins/iframe/lang/en.js
deleted file mode 100644
index 95c12de56fb..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/iframe/lang/en.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
-For licensing, see LICENSE.md or http://ckeditor.com/license
-*/
-CKEDITOR.plugins.setLang( 'iframe', 'en', {
- border: 'Show frame border',
- noUrl: 'Please type the iframe URL',
- scrolling: 'Enable scrollbars',
- title: 'IFrame Properties',
- toolbar: 'IFrame'
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/iframe/plugin.js b/addons/website/static/lib/ckeditor/plugins/iframe/plugin.js
deleted file mode 100644
index 2ae1f064b57..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/iframe/plugin.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-
-(function() {
- CKEDITOR.plugins.add( 'iframe', {
- requires: 'dialog,fakeobjects',
- lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
- icons: 'iframe', // %REMOVE_LINE_CORE%
- hidpi: true, // %REMOVE_LINE_CORE%
- onLoad: function() {
- CKEDITOR.addCss( 'img.cke_iframe' +
- '{' +
- 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
- 'background-position: center center;' +
- 'background-repeat: no-repeat;' +
- 'border: 1px solid #a9a9a9;' +
- 'width: 80px;' +
- 'height: 80px;' +
- '}'
- );
- },
- init: function( editor ) {
- var pluginName = 'iframe',
- lang = editor.lang.iframe,
- allowed = 'iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]';
-
- if ( editor.plugins.dialogadvtab )
- allowed += ';iframe' + editor.plugins.dialogadvtab.allowedContent( { id:1,classes:1,styles:1 } );
-
- CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/iframe.js' );
- editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName, {
- allowedContent: allowed,
- requiredContent: 'iframe'
- } ) );
-
- editor.ui.addButton && editor.ui.addButton( 'Iframe', {
- label: lang.toolbar,
- command: pluginName,
- toolbar: 'insert,80'
- });
-
- editor.on( 'doubleclick', function( evt ) {
- var element = evt.data.element;
- if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' )
- evt.data.dialog = 'iframe';
- });
-
- if ( editor.addMenuItems ) {
- editor.addMenuItems({
- iframe: {
- label: lang.title,
- command: 'iframe',
- group: 'image'
- }
- });
- }
-
- // If the "contextmenu" plugin is loaded, register the listeners.
- if ( editor.contextMenu ) {
- editor.contextMenu.addListener( function( element, selection ) {
- if ( element && element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' )
- return { iframe: CKEDITOR.TRISTATE_OFF };
- });
- }
- },
- afterInit: function( editor ) {
- var dataProcessor = editor.dataProcessor,
- dataFilter = dataProcessor && dataProcessor.dataFilter;
-
- if ( dataFilter ) {
- dataFilter.addRules({
- elements: {
- iframe: function( element ) {
- return editor.createFakeParserElement( element, 'cke_iframe', 'iframe', true );
- }
- }
- });
- }
- }
- });
-})();