summaryrefslogtreecommitdiff
path: root/addons/website/static/lib/ckeditor/plugins/forms
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/lib/ckeditor/plugins/forms')
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/button.js100
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/checkbox.js130
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/form.js151
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/hiddenfield.js85
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/radio.js115
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/select.js503
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/textarea.js118
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/dialogs/textfield.js182
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/button.pngbin528 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/checkbox.pngbin756 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/form.pngbin590 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hiddenfield.pngbin823 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/button.pngbin933 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/checkbox.pngbin1780 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/form.pngbin1348 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/hiddenfield.pngbin2166 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/imagebutton.pngbin1398 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/radio.pngbin2435 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select-rtl.pngbin1451 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select.pngbin1452 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea-rtl.pngbin1732 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea.pngbin1680 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield-rtl.pngbin1324 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield.pngbin1324 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/imagebutton.pngbin680 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/radio.pngbin874 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/select-rtl.pngbin617 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/select.pngbin616 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/textarea-rtl.pngbin706 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/textarea.pngbin677 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/textfield-rtl.pngbin588 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/icons/textfield.pngbin588 -> 0 bytes
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/lang/en.js68
-rw-r--r--addons/website/static/lib/ckeditor/plugins/forms/plugin.js292
34 files changed, 0 insertions, 1744 deletions
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/button.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/button.js
deleted file mode 100644
index 921e7b55b86..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/button.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'button', function( editor ) {
- function commitAttributes( element ) {
- var val = this.getValue();
- if ( val ) {
- element.attributes[ this.id ] = val;
- if ( this.id == 'name' )
- element.attributes[ 'data-cke-saved-name' ] = val;
- } else {
- delete element.attributes[ this.id ];
- if ( this.id == 'name' )
- delete element.attributes[ 'data-cke-saved-name' ];
- }
- }
-
- return {
- title: editor.lang.forms.button.title,
- minWidth: 350,
- minHeight: 150,
- onShow: function() {
- delete this.button;
- var element = this.getParentEditor().getSelection().getSelectedElement();
- if ( element && element.is( 'input' ) ) {
- var type = element.getAttribute( 'type' );
- if ( type in { button:1,reset:1,submit:1 } ) {
- this.button = element;
- this.setupContent( element );
- }
- }
- },
- onOk: function() {
- var editor = this.getParentEditor(),
- element = this.button,
- isInsertMode = !element;
-
- var fake = element ? CKEDITOR.htmlParser.fragment.fromHtml( element.getOuterHtml() ).children[ 0 ] : new CKEDITOR.htmlParser.element( 'input' );
- this.commitContent( fake );
-
- var writer = new CKEDITOR.htmlParser.basicWriter();
- fake.writeHtml( writer );
- var newElement = CKEDITOR.dom.element.createFromHtml( writer.getHtml(), editor.document );
-
- if ( isInsertMode )
- editor.insertElement( newElement );
- else {
- newElement.replace( element );
- editor.getSelection().selectElement( newElement );
- }
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.button.title,
- title: editor.lang.forms.button.title,
- elements: [
- {
- id: 'name',
- type: 'text',
- label: editor.lang.common.name,
- 'default': '',
- setup: function( element ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- },
- commit: commitAttributes
- },
- {
- id: 'value',
- type: 'text',
- label: editor.lang.forms.button.text,
- accessKey: 'V',
- 'default': '',
- setup: function( element ) {
- this.setValue( element.getAttribute( 'value' ) || '' );
- },
- commit: commitAttributes
- },
- {
- id: 'type',
- type: 'select',
- label: editor.lang.forms.button.type,
- 'default': 'button',
- accessKey: 'T',
- items: [
- [ editor.lang.forms.button.typeBtn, 'button' ],
- [ editor.lang.forms.button.typeSbm, 'submit' ],
- [ editor.lang.forms.button.typeRst, 'reset' ]
- ],
- setup: function( element ) {
- this.setValue( element.getAttribute( 'type' ) || '' );
- },
- commit: commitAttributes
- }
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/checkbox.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/checkbox.js
deleted file mode 100644
index d5b0a934c50..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/checkbox.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'checkbox', function( editor ) {
- return {
- title: editor.lang.forms.checkboxAndRadio.checkboxTitle,
- minWidth: 350,
- minHeight: 140,
- onShow: function() {
- delete this.checkbox;
-
- var element = this.getParentEditor().getSelection().getSelectedElement();
-
- if ( element && element.getAttribute( 'type' ) == 'checkbox' ) {
- this.checkbox = element;
- this.setupContent( element );
- }
- },
- onOk: function() {
- var editor,
- element = this.checkbox,
- isInsertMode = !element;
-
- if ( isInsertMode ) {
- editor = this.getParentEditor();
- element = editor.document.createElement( 'input' );
- element.setAttribute( 'type', 'checkbox' );
- editor.insertElement( element );
- }
- this.commitContent({ element: element } );
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.checkboxAndRadio.checkboxTitle,
- title: editor.lang.forms.checkboxAndRadio.checkboxTitle,
- startupFocus: 'txtName',
- elements: [
- {
- id: 'txtName',
- type: 'text',
- label: editor.lang.common.name,
- 'default': '',
- accessKey: 'N',
- setup: function( element ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- },
- commit: function( data ) {
- var element = data.element;
-
- // IE failed to update 'name' property on input elements, protect it now.
- if ( this.getValue() )
- element.data( 'cke-saved-name', this.getValue() );
- else {
- element.data( 'cke-saved-name', false );
- element.removeAttribute( 'name' );
- }
- }
- },
- {
- id: 'txtValue',
- type: 'text',
- label: editor.lang.forms.checkboxAndRadio.value,
- 'default': '',
- accessKey: 'V',
- setup: function( element ) {
- var value = element.getAttribute( 'value' );
- // IE Return 'on' as default attr value.
- this.setValue( CKEDITOR.env.ie && value == 'on' ? '' : value );
- },
- commit: function( data ) {
- var element = data.element,
- value = this.getValue();
-
- if ( value && !( CKEDITOR.env.ie && value == 'on' ) )
- element.setAttribute( 'value', value );
- else {
- if ( CKEDITOR.env.ie ) {
- // Remove attribute 'value' of checkbox (#4721).
- var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() );
- element.copyAttributes( checkbox, { value:1 } );
- checkbox.replace( element );
- editor.getSelection().selectElement( checkbox );
- data.element = checkbox;
- } else
- element.removeAttribute( 'value' );
- }
- }
- },
- {
- id: 'cmbSelected',
- type: 'checkbox',
- label: editor.lang.forms.checkboxAndRadio.selected,
- 'default': '',
- accessKey: 'S',
- value: "checked",
- setup: function( element ) {
- this.setValue( element.getAttribute( 'checked' ) );
- },
- commit: function( data ) {
- var element = data.element;
-
- if ( CKEDITOR.env.ie ) {
- var isElementChecked = !!element.getAttribute( 'checked' ),
- isChecked = !!this.getValue();
-
- if ( isElementChecked != isChecked ) {
- var replace = CKEDITOR.dom.element.createFromHtml( '<input type="checkbox"' + ( isChecked ? ' checked="checked"' : '' )
- + '/>', editor.document );
-
- element.copyAttributes( replace, { type:1,checked:1 } );
- replace.replace( element );
- editor.getSelection().selectElement( replace );
- data.element = replace;
- }
- } else {
- var value = this.getValue();
- if ( value )
- element.setAttribute( 'checked', 'checked' );
- else
- element.removeAttribute( 'checked' );
- }
- }
- }
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/form.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/form.js
deleted file mode 100644
index 0f2a5adad4f..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/form.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'form', function( editor ) {
- var autoAttributes = { action:1,id:1,method:1,enctype:1,target:1 };
-
- return {
- title: editor.lang.forms.form.title,
- minWidth: 350,
- minHeight: 200,
- onShow: function() {
- delete this.form;
-
- var path = this.getParentEditor().elementPath(),
- form = path.contains( 'form', 1 );
-
- if ( form ) {
- this.form = form;
- this.setupContent( form );
- }
- },
- onOk: function() {
- var editor,
- element = this.form,
- isInsertMode = !element;
-
- if ( isInsertMode ) {
- editor = this.getParentEditor();
- element = editor.document.createElement( 'form' );
- !CKEDITOR.env.ie && element.append( editor.document.createElement( 'br' ) );
- }
-
- if ( isInsertMode )
- editor.insertElement( element );
- this.commitContent( element );
- },
- onLoad: function() {
- function autoSetup( element ) {
- this.setValue( element.getAttribute( this.id ) || '' );
- }
-
- function autoCommit( element ) {
- if ( this.getValue() )
- element.setAttribute( this.id, this.getValue() );
- else
- element.removeAttribute( this.id );
- }
-
- this.foreach( function( contentObj ) {
- if ( autoAttributes[ contentObj.id ] ) {
- contentObj.setup = autoSetup;
- contentObj.commit = autoCommit;
- }
- });
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.form.title,
- title: editor.lang.forms.form.title,
- elements: [
- {
- id: 'txtName',
- type: 'text',
- label: editor.lang.common.name,
- 'default': '',
- accessKey: 'N',
- setup: function( element ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.data( 'cke-saved-name', this.getValue() );
- else {
- element.data( 'cke-saved-name', false );
- element.removeAttribute( 'name' );
- }
- }
- },
- {
- id: 'action',
- type: 'text',
- label: editor.lang.forms.form.action,
- 'default': '',
- accessKey: 'T'
- },
- {
- type: 'hbox',
- widths: [ '45%', '55%' ],
- children: [
- {
- id: 'id',
- type: 'text',
- label: editor.lang.common.id,
- 'default': '',
- accessKey: 'I'
- },
- {
- id: 'enctype',
- type: 'select',
- label: editor.lang.forms.form.encoding,
- style: 'width:100%',
- accessKey: 'E',
- 'default': '',
- items: [
- [ '' ],
- [ 'text/plain' ],
- [ 'multipart/form-data' ],
- [ 'application/x-www-form-urlencoded' ]
- ]
- }
- ]
- },
- {
- type: 'hbox',
- widths: [ '45%', '55%' ],
- children: [
- {
- id: 'target',
- type: 'select',
- label: editor.lang.common.target,
- style: 'width:100%',
- accessKey: 'M',
- 'default': '',
- items: [
- [ editor.lang.common.notSet, '' ],
- [ editor.lang.common.targetNew, '_blank' ],
- [ editor.lang.common.targetTop, '_top' ],
- [ editor.lang.common.targetSelf, '_self' ],
- [ editor.lang.common.targetParent, '_parent' ]
- ]
- },
- {
- id: 'method',
- type: 'select',
- label: editor.lang.forms.form.method,
- accessKey: 'M',
- 'default': 'GET',
- items: [
- [ 'GET', 'get' ],
- [ 'POST', 'post' ]
- ]
- }
- ]
- }
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/hiddenfield.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/hiddenfield.js
deleted file mode 100644
index 736a8b6ee14..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/hiddenfield.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'hiddenfield', function( editor ) {
- return {
- title: editor.lang.forms.hidden.title,
- hiddenField: null,
- minWidth: 350,
- minHeight: 110,
- onShow: function() {
- delete this.hiddenField;
-
- var editor = this.getParentEditor(),
- selection = editor.getSelection(),
- element = selection.getSelectedElement();
-
- if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) {
- this.hiddenField = element;
- element = editor.restoreRealElement( this.hiddenField );
- this.setupContent( element );
- selection.selectElement( this.hiddenField );
- }
- },
- onOk: function() {
- var name = this.getValueOf( 'info', '_cke_saved_name' ),
- value = this.getValueOf( 'info', 'value' ),
- editor = this.getParentEditor(),
- element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ? editor.document.createElement( '<input name="' + CKEDITOR.tools.htmlEncode( name ) + '">' ) : editor.document.createElement( 'input' );
-
- element.setAttribute( 'type', 'hidden' );
- this.commitContent( element );
- var fakeElement = editor.createFakeElement( element, 'cke_hidden', 'hiddenfield' );
- if ( !this.hiddenField )
- editor.insertElement( fakeElement );
- else {
- fakeElement.replace( this.hiddenField );
- editor.getSelection().selectElement( fakeElement );
- }
- return true;
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.hidden.title,
- title: editor.lang.forms.hidden.title,
- elements: [
- {
- id: '_cke_saved_name',
- type: 'text',
- label: editor.lang.forms.hidden.name,
- 'default': '',
- accessKey: 'N',
- setup: function( element ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.setAttribute( 'name', this.getValue() );
- else {
- element.removeAttribute( 'name' );
- }
- }
- },
- {
- id: 'value',
- type: 'text',
- label: editor.lang.forms.hidden.value,
- 'default': '',
- accessKey: 'V',
- setup: function( element ) {
- this.setValue( element.getAttribute( 'value' ) || '' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.setAttribute( 'value', this.getValue() );
- else
- element.removeAttribute( 'value' );
- }
- }
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/radio.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/radio.js
deleted file mode 100644
index b984766e9fc..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/radio.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'radio', function( editor ) {
- return {
- title: editor.lang.forms.checkboxAndRadio.radioTitle,
- minWidth: 350,
- minHeight: 140,
- onShow: function() {
- delete this.radioButton;
-
- var element = this.getParentEditor().getSelection().getSelectedElement();
- if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' ) {
- this.radioButton = element;
- this.setupContent( element );
- }
- },
- onOk: function() {
- var editor,
- element = this.radioButton,
- isInsertMode = !element;
-
- if ( isInsertMode ) {
- editor = this.getParentEditor();
- element = editor.document.createElement( 'input' );
- element.setAttribute( 'type', 'radio' );
- }
-
- if ( isInsertMode )
- editor.insertElement( element );
- this.commitContent({ element: element } );
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.checkboxAndRadio.radioTitle,
- title: editor.lang.forms.checkboxAndRadio.radioTitle,
- elements: [
- {
- id: 'name',
- type: 'text',
- label: editor.lang.common.name,
- 'default': '',
- accessKey: 'N',
- setup: function( element ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- },
- commit: function( data ) {
- var element = data.element;
-
- if ( this.getValue() )
- element.data( 'cke-saved-name', this.getValue() );
- else {
- element.data( 'cke-saved-name', false );
- element.removeAttribute( 'name' );
- }
- }
- },
- {
- id: 'value',
- type: 'text',
- label: editor.lang.forms.checkboxAndRadio.value,
- 'default': '',
- accessKey: 'V',
- setup: function( element ) {
- this.setValue( element.getAttribute( 'value' ) || '' );
- },
- commit: function( data ) {
- var element = data.element;
-
- if ( this.getValue() )
- element.setAttribute( 'value', this.getValue() );
- else
- element.removeAttribute( 'value' );
- }
- },
- {
- id: 'checked',
- type: 'checkbox',
- label: editor.lang.forms.checkboxAndRadio.selected,
- 'default': '',
- accessKey: 'S',
- value: "checked",
- setup: function( element ) {
- this.setValue( element.getAttribute( 'checked' ) );
- },
- commit: function( data ) {
- var element = data.element;
-
- if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera ) ) {
- if ( this.getValue() )
- element.setAttribute( 'checked', 'checked' );
- else
- element.removeAttribute( 'checked' );
- } else {
- var isElementChecked = element.getAttribute( 'checked' );
- var isChecked = !!this.getValue();
-
- if ( isElementChecked != isChecked ) {
- var replace = CKEDITOR.dom.element.createFromHtml( '<input type="radio"' + ( isChecked ? ' checked="checked"' : '' )
- + '></input>', editor.document );
- element.copyAttributes( replace, { type:1,checked:1 } );
- replace.replace( element );
- editor.getSelection().selectElement( replace );
- data.element = replace;
- }
- }
- }
- }
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/select.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/select.js
deleted file mode 100644
index 8b7fd7b71db..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/select.js
+++ /dev/null
@@ -1,503 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'select', function( editor ) {
- // Add a new option to a SELECT object (combo or list).
- function addOption( combo, optionText, optionValue, documentObject, index ) {
- combo = getSelect( combo );
- var oOption;
- if ( documentObject )
- oOption = documentObject.createElement( "OPTION" );
- else
- oOption = document.createElement( "OPTION" );
-
- if ( combo && oOption && oOption.getName() == 'option' ) {
- if ( CKEDITOR.env.ie ) {
- if ( !isNaN( parseInt( index, 10 ) ) )
- combo.$.options.add( oOption.$, index );
- else
- combo.$.options.add( oOption.$ );
-
- oOption.$.innerHTML = optionText.length > 0 ? optionText : '';
- oOption.$.value = optionValue;
- } else {
- if ( index !== null && index < combo.getChildCount() )
- combo.getChild( index < 0 ? 0 : index ).insertBeforeMe( oOption );
- else
- combo.append( oOption );
-
- oOption.setText( optionText.length > 0 ? optionText : '' );
- oOption.setValue( optionValue );
- }
- } else
- return false;
-
- return oOption;
- }
- // Remove all selected options from a SELECT object.
- function removeSelectedOptions( combo ) {
- combo = getSelect( combo );
-
- // Save the selected index
- var iSelectedIndex = getSelectedIndex( combo );
-
- // Remove all selected options.
- for ( var i = combo.getChildren().count() - 1; i >= 0; i-- ) {
- if ( combo.getChild( i ).$.selected )
- combo.getChild( i ).remove();
- }
-
- // Reset the selection based on the original selected index.
- setSelectedIndex( combo, iSelectedIndex );
- }
- //Modify option from a SELECT object.
- function modifyOption( combo, index, title, value ) {
- combo = getSelect( combo );
- if ( index < 0 )
- return false;
- var child = combo.getChild( index );
- child.setText( title );
- child.setValue( value );
- return child;
- }
-
- function removeAllOptions( combo ) {
- combo = getSelect( combo );
- while ( combo.getChild( 0 ) && combo.getChild( 0 ).remove() ) {
- /*jsl:pass*/
- }
- }
- // Moves the selected option by a number of steps (also negative).
- function changeOptionPosition( combo, steps, documentObject ) {
- combo = getSelect( combo );
- var iActualIndex = getSelectedIndex( combo );
- if ( iActualIndex < 0 )
- return false;
-
- var iFinalIndex = iActualIndex + steps;
- iFinalIndex = ( iFinalIndex < 0 ) ? 0 : iFinalIndex;
- iFinalIndex = ( iFinalIndex >= combo.getChildCount() ) ? combo.getChildCount() - 1 : iFinalIndex;
-
- if ( iActualIndex == iFinalIndex )
- return false;
-
- var oOption = combo.getChild( iActualIndex ),
- sText = oOption.getText(),
- sValue = oOption.getValue();
-
- oOption.remove();
-
- oOption = addOption( combo, sText, sValue, ( !documentObject ) ? null : documentObject, iFinalIndex );
- setSelectedIndex( combo, iFinalIndex );
- return oOption;
- }
-
- function getSelectedIndex( combo ) {
- combo = getSelect( combo );
- return combo ? combo.$.selectedIndex : -1;
- }
-
- function setSelectedIndex( combo, index ) {
- combo = getSelect( combo );
- if ( index < 0 )
- return null;
- var count = combo.getChildren().count();
- combo.$.selectedIndex = ( index >= count ) ? ( count - 1 ) : index;
- return combo;
- }
-
- function getOptions( combo ) {
- combo = getSelect( combo );
- return combo ? combo.getChildren() : false;
- }
-
- function getSelect( obj ) {
- if ( obj && obj.domId && obj.getInputElement().$ ) // Dialog element.
- return obj.getInputElement();
- else if ( obj && obj.$ )
- return obj;
- return false;
- }
-
- return {
- title: editor.lang.forms.select.title,
- minWidth: CKEDITOR.env.ie ? 460 : 395,
- minHeight: CKEDITOR.env.ie ? 320 : 300,
- onShow: function() {
- delete this.selectBox;
- this.setupContent( 'clear' );
- var element = this.getParentEditor().getSelection().getSelectedElement();
- if ( element && element.getName() == "select" ) {
- this.selectBox = element;
- this.setupContent( element.getName(), element );
-
- // Load Options into dialog.
- var objOptions = getOptions( element );
- for ( var i = 0; i < objOptions.count(); i++ )
- this.setupContent( 'option', objOptions.getItem( i ) );
- }
- },
- onOk: function() {
- var editor = this.getParentEditor(),
- element = this.selectBox,
- isInsertMode = !element;
-
- if ( isInsertMode )
- element = editor.document.createElement( 'select' );
- this.commitContent( element );
-
- if ( isInsertMode ) {
- editor.insertElement( element );
- if ( CKEDITOR.env.ie ) {
- var sel = editor.getSelection(),
- bms = sel.createBookmarks();
- setTimeout( function() {
- sel.selectBookmarks( bms );
- }, 0 );
- }
- }
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.select.selectInfo,
- title: editor.lang.forms.select.selectInfo,
- accessKey: '',
- elements: [
- {
- id: 'txtName',
- type: 'text',
- widths: [ '25%', '75%' ],
- labelLayout: 'horizontal',
- label: editor.lang.common.name,
- 'default': '',
- accessKey: 'N',
- style: 'width:350px',
- setup: function( name, element ) {
- if ( name == 'clear' )
- this.setValue( this[ 'default' ] || '' );
- else if ( name == 'select' ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- }
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.data( 'cke-saved-name', this.getValue() );
- else {
- element.data( 'cke-saved-name', false );
- element.removeAttribute( 'name' );
- }
- }
- },
- {
- id: 'txtValue',
- type: 'text',
- widths: [ '25%', '75%' ],
- labelLayout: 'horizontal',
- label: editor.lang.forms.select.value,
- style: 'width:350px',
- 'default': '',
- className: 'cke_disabled',
- onLoad: function() {
- this.getInputElement().setAttribute( 'readOnly', true );
- },
- setup: function( name, element ) {
- if ( name == 'clear' )
- this.setValue( '' );
- else if ( name == 'option' && element.getAttribute( 'selected' ) )
- this.setValue( element.$.value );
- }
- },
- {
- type: 'hbox',
- widths: [ '175px', '170px' ],
- children: [
- {
- id: 'txtSize',
- type: 'text',
- labelLayout: 'horizontal',
- label: editor.lang.forms.select.size,
- 'default': '',
- accessKey: 'S',
- style: 'width:175px',
- validate: function() {
- var func = CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed );
- return ( ( this.getValue() === '' ) || func.apply( this ) );
- },
- setup: function( name, element ) {
- if ( name == 'select' )
- this.setValue( element.getAttribute( 'size' ) || '' );
- if ( CKEDITOR.env.webkit )
- this.getInputElement().setStyle( 'width', '86px' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.setAttribute( 'size', this.getValue() );
- else
- element.removeAttribute( 'size' );
- }
- },
- {
- type: 'html',
- html: '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.forms.select.lines ) + '</span>'
- }
- ]
- },
- {
- type: 'html',
- html: '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.forms.select.opAvail ) + '</span>'
- },
- {
- type: 'hbox',
- widths: [ '115px', '115px', '100px' ],
- children: [
- {
- type: 'vbox',
- children: [
- {
- id: 'txtOptName',
- type: 'text',
- label: editor.lang.forms.select.opText,
- style: 'width:115px',
- setup: function( name, element ) {
- if ( name == 'clear' )
- this.setValue( "" );
- }
- },
- {
- type: 'select',
- id: 'cmbName',
- label: '',
- title: '',
- size: 5,
- style: 'width:115px;height:75px',
- items: [],
- onChange: function() {
- var dialog = this.getDialog(),
- values = dialog.getContentElement( 'info', 'cmbValue' ),
- optName = dialog.getContentElement( 'info', 'txtOptName' ),
- optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
- iIndex = getSelectedIndex( this );
-
- setSelectedIndex( values, iIndex );
- optName.setValue( this.getValue() );
- optValue.setValue( values.getValue() );
- },
- setup: function( name, element ) {
- if ( name == 'clear' )
- removeAllOptions( this );
- else if ( name == 'option' )
- addOption( this, element.getText(), element.getText(), this.getDialog().getParentEditor().document );
- },
- commit: function( element ) {
- var dialog = this.getDialog(),
- optionsNames = getOptions( this ),
- optionsValues = getOptions( dialog.getContentElement( 'info', 'cmbValue' ) ),
- selectValue = dialog.getContentElement( 'info', 'txtValue' ).getValue();
-
- removeAllOptions( element );
-
- for ( var i = 0; i < optionsNames.count(); i++ ) {
- var oOption = addOption( element, optionsNames.getItem( i ).getValue(), optionsValues.getItem( i ).getValue(), dialog.getParentEditor().document );
- if ( optionsValues.getItem( i ).getValue() == selectValue ) {
- oOption.setAttribute( 'selected', 'selected' );
- oOption.selected = true;
- }
- }
- }
- }
- ]
- },
- {
- type: 'vbox',
- children: [
- {
- id: 'txtOptValue',
- type: 'text',
- label: editor.lang.forms.select.opValue,
- style: 'width:115px',
- setup: function( name, element ) {
- if ( name == 'clear' )
- this.setValue( "" );
- }
- },
- {
- type: 'select',
- id: 'cmbValue',
- label: '',
- size: 5,
- style: 'width:115px;height:75px',
- items: [],
- onChange: function() {
- var dialog = this.getDialog(),
- names = dialog.getContentElement( 'info', 'cmbName' ),
- optName = dialog.getContentElement( 'info', 'txtOptName' ),
- optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
- iIndex = getSelectedIndex( this );
-
- setSelectedIndex( names, iIndex );
- optName.setValue( names.getValue() );
- optValue.setValue( this.getValue() );
- },
- setup: function( name, element ) {
- if ( name == 'clear' )
- removeAllOptions( this );
- else if ( name == 'option' ) {
- var oValue = element.getValue();
- addOption( this, oValue, oValue, this.getDialog().getParentEditor().document );
- if ( element.getAttribute( 'selected' ) == 'selected' )
- this.getDialog().getContentElement( 'info', 'txtValue' ).setValue( oValue );
- }
- }
- }
- ]
- },
- {
- type: 'vbox',
- padding: 5,
- children: [
- {
- type: 'button',
- id: 'btnAdd',
- style: '',
- label: editor.lang.forms.select.btnAdd,
- title: editor.lang.forms.select.btnAdd,
- style: 'width:100%;',
- onClick: function() {
- //Add new option.
- var dialog = this.getDialog(),
- parentEditor = dialog.getParentEditor(),
- optName = dialog.getContentElement( 'info', 'txtOptName' ),
- optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
- names = dialog.getContentElement( 'info', 'cmbName' ),
- values = dialog.getContentElement( 'info', 'cmbValue' );
-
- addOption( names, optName.getValue(), optName.getValue(), dialog.getParentEditor().document );
- addOption( values, optValue.getValue(), optValue.getValue(), dialog.getParentEditor().document );
-
- optName.setValue( "" );
- optValue.setValue( "" );
- }
- },
- {
- type: 'button',
- id: 'btnModify',
- label: editor.lang.forms.select.btnModify,
- title: editor.lang.forms.select.btnModify,
- style: 'width:100%;',
- onClick: function() {
- //Modify selected option.
- var dialog = this.getDialog(),
- optName = dialog.getContentElement( 'info', 'txtOptName' ),
- optValue = dialog.getContentElement( 'info', 'txtOptValue' ),
- names = dialog.getContentElement( 'info', 'cmbName' ),
- values = dialog.getContentElement( 'info', 'cmbValue' ),
- iIndex = getSelectedIndex( names );
-
- if ( iIndex >= 0 ) {
- modifyOption( names, iIndex, optName.getValue(), optName.getValue() );
- modifyOption( values, iIndex, optValue.getValue(), optValue.getValue() );
- }
- }
- },
- {
- type: 'button',
- id: 'btnUp',
- style: 'width:100%;',
- label: editor.lang.forms.select.btnUp,
- title: editor.lang.forms.select.btnUp,
- onClick: function() {
- //Move up.
- var dialog = this.getDialog(),
- names = dialog.getContentElement( 'info', 'cmbName' ),
- values = dialog.getContentElement( 'info', 'cmbValue' );
-
- changeOptionPosition( names, -1, dialog.getParentEditor().document );
- changeOptionPosition( values, -1, dialog.getParentEditor().document );
- }
- },
- {
- type: 'button',
- id: 'btnDown',
- style: 'width:100%;',
- label: editor.lang.forms.select.btnDown,
- title: editor.lang.forms.select.btnDown,
- onClick: function() {
- //Move down.
- var dialog = this.getDialog(),
- names = dialog.getContentElement( 'info', 'cmbName' ),
- values = dialog.getContentElement( 'info', 'cmbValue' );
-
- changeOptionPosition( names, 1, dialog.getParentEditor().document );
- changeOptionPosition( values, 1, dialog.getParentEditor().document );
- }
- }
- ]
- }
- ]
- },
- {
- type: 'hbox',
- widths: [ '40%', '20%', '40%' ],
- children: [
- {
- type: 'button',
- id: 'btnSetValue',
- label: editor.lang.forms.select.btnSetValue,
- title: editor.lang.forms.select.btnSetValue,
- onClick: function() {
- //Set as default value.
- var dialog = this.getDialog(),
- values = dialog.getContentElement( 'info', 'cmbValue' ),
- txtValue = dialog.getContentElement( 'info', 'txtValue' );
- txtValue.setValue( values.getValue() );
- }
- },
- {
- type: 'button',
- id: 'btnDelete',
- label: editor.lang.forms.select.btnDelete,
- title: editor.lang.forms.select.btnDelete,
- onClick: function() {
- // Delete option.
- var dialog = this.getDialog(),
- names = dialog.getContentElement( 'info', 'cmbName' ),
- values = dialog.getContentElement( 'info', 'cmbValue' ),
- optName = dialog.getContentElement( 'info', 'txtOptName' ),
- optValue = dialog.getContentElement( 'info', 'txtOptValue' );
-
- removeSelectedOptions( names );
- removeSelectedOptions( values );
-
- optName.setValue( "" );
- optValue.setValue( "" );
- }
- },
- {
- id: 'chkMulti',
- type: 'checkbox',
- label: editor.lang.forms.select.chkMulti,
- 'default': '',
- accessKey: 'M',
- value: "checked",
- setup: function( name, element ) {
- if ( name == 'select' )
- this.setValue( element.getAttribute( 'multiple' ) );
- if ( CKEDITOR.env.webkit )
- this.getElement().getParent().setStyle( 'vertical-align', 'middle' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.setAttribute( 'multiple', this.getValue() );
- else
- element.removeAttribute( 'multiple' );
- }
- }
- ]
- }
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/textarea.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/textarea.js
deleted file mode 100644
index 717bc31df9c..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/textarea.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'textarea', function( editor ) {
- return {
- title: editor.lang.forms.textarea.title,
- minWidth: 350,
- minHeight: 220,
- onShow: function() {
- delete this.textarea;
-
- var element = this.getParentEditor().getSelection().getSelectedElement();
- if ( element && element.getName() == "textarea" ) {
- this.textarea = element;
- this.setupContent( element );
- }
- },
- onOk: function() {
- var editor,
- element = this.textarea,
- isInsertMode = !element;
-
- if ( isInsertMode ) {
- editor = this.getParentEditor();
- element = editor.document.createElement( 'textarea' );
- }
- this.commitContent( element );
-
- if ( isInsertMode )
- editor.insertElement( element );
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.textarea.title,
- title: editor.lang.forms.textarea.title,
- elements: [
- {
- id: '_cke_saved_name',
- type: 'text',
- label: editor.lang.common.name,
- 'default': '',
- accessKey: 'N',
- setup: function( element ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.data( 'cke-saved-name', this.getValue() );
- else {
- element.data( 'cke-saved-name', false );
- element.removeAttribute( 'name' );
- }
- }
- },
- {
- type: 'hbox',
- widths: [ '50%', '50%' ],
- children: [
- {
- id: 'cols',
- type: 'text',
- label: editor.lang.forms.textarea.cols,
- 'default': '',
- accessKey: 'C',
- style: 'width:50px',
- validate: CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
- setup: function( element ) {
- var value = element.hasAttribute( 'cols' ) && element.getAttribute( 'cols' );
- this.setValue( value || '' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.setAttribute( 'cols', this.getValue() );
- else
- element.removeAttribute( 'cols' );
- }
- },
- {
- id: 'rows',
- type: 'text',
- label: editor.lang.forms.textarea.rows,
- 'default': '',
- accessKey: 'R',
- style: 'width:50px',
- validate: CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed ),
- setup: function( element ) {
- var value = element.hasAttribute( 'rows' ) && element.getAttribute( 'rows' );
- this.setValue( value || '' );
- },
- commit: function( element ) {
- if ( this.getValue() )
- element.setAttribute( 'rows', this.getValue() );
- else
- element.removeAttribute( 'rows' );
- }
- }
- ]
- },
- {
- id: 'value',
- type: 'textarea',
- label: editor.lang.forms.textfield.value,
- 'default': '',
- setup: function( element ) {
- this.setValue( element.$.defaultValue );
- },
- commit: function( element ) {
- element.$.value = element.$.defaultValue = this.getValue();
- }
- }
-
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/textfield.js b/addons/website/static/lib/ckeditor/plugins/forms/dialogs/textfield.js
deleted file mode 100644
index c7c98814e8d..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/dialogs/textfield.js
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-CKEDITOR.dialog.add( 'textfield', function( editor ) {
- var autoAttributes = { value:1,size:1,maxLength:1 };
-
- var acceptedTypes = { email:1,password:1,search:1,tel:1,text:1,url:1 };
-
- function autoCommit( data ) {
- var element = data.element;
- var value = this.getValue();
-
- value ? element.setAttribute( this.id, value ) : element.removeAttribute( this.id );
- }
-
- function autoSetup( element ) {
- var value = element.hasAttribute( this.id ) && element.getAttribute( this.id );
- this.setValue( value || '' );
- }
-
- return {
- title: editor.lang.forms.textfield.title,
- minWidth: 350,
- minHeight: 150,
- onShow: function() {
- delete this.textField;
-
- var element = this.getParentEditor().getSelection().getSelectedElement();
- if ( element && element.getName() == "input" && ( acceptedTypes[ element.getAttribute( 'type' ) ] || !element.getAttribute( 'type' ) ) ) {
- this.textField = element;
- this.setupContent( element );
- }
- },
- onOk: function() {
- var editor = this.getParentEditor(),
- element = this.textField,
- isInsertMode = !element;
-
- if ( isInsertMode ) {
- element = editor.document.createElement( 'input' );
- element.setAttribute( 'type', 'text' );
- }
-
- var data = { element: element };
-
- if ( isInsertMode )
- editor.insertElement( data.element );
-
- this.commitContent( data );
-
- // Element might be replaced by commitment.
- if ( !isInsertMode )
- editor.getSelection().selectElement( data.element );
- },
- onLoad: function() {
- this.foreach( function( contentObj ) {
- if ( contentObj.getValue ) {
- if ( !contentObj.setup )
- contentObj.setup = autoSetup;
- if ( !contentObj.commit )
- contentObj.commit = autoCommit;
- }
- });
- },
- contents: [
- {
- id: 'info',
- label: editor.lang.forms.textfield.title,
- title: editor.lang.forms.textfield.title,
- elements: [
- {
- type: 'hbox',
- widths: [ '50%', '50%' ],
- children: [
- {
- id: '_cke_saved_name',
- type: 'text',
- label: editor.lang.forms.textfield.name,
- 'default': '',
- accessKey: 'N',
- setup: function( element ) {
- this.setValue( element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' );
- },
- commit: function( data ) {
- var element = data.element;
-
- if ( this.getValue() )
- element.data( 'cke-saved-name', this.getValue() );
- else {
- element.data( 'cke-saved-name', false );
- element.removeAttribute( 'name' );
- }
- }
- },
- {
- id: 'value',
- type: 'text',
- label: editor.lang.forms.textfield.value,
- 'default': '',
- accessKey: 'V',
- commit: function( data ) {
- if ( CKEDITOR.env.ie && !this.getValue() ) {
- var element = data.element,
- fresh = new CKEDITOR.dom.element( 'input', editor.document );
- element.copyAttributes( fresh, { value:1 } );
- fresh.replace( element );
- data.element = fresh;
- } else
- autoCommit.call( this, data );
- }
- }
- ]
- },
- {
- type: 'hbox',
- widths: [ '50%', '50%' ],
- children: [
- {
- id: 'size',
- type: 'text',
- label: editor.lang.forms.textfield.charWidth,
- 'default': '',
- accessKey: 'C',
- style: 'width:50px',
- validate: CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
- },
- {
- id: 'maxLength',
- type: 'text',
- label: editor.lang.forms.textfield.maxChars,
- 'default': '',
- accessKey: 'M',
- style: 'width:50px',
- validate: CKEDITOR.dialog.validate.integer( editor.lang.common.validateNumberFailed )
- }
- ],
- onLoad: function() {
- // Repaint the style for IE7 (#6068)
- if ( CKEDITOR.env.ie7Compat )
- this.getElement().setStyle( 'zoom', '100%' );
- }
- },
- {
- id: 'type',
- type: 'select',
- label: editor.lang.forms.textfield.type,
- 'default': 'text',
- accessKey: 'M',
- items: [
- [ editor.lang.forms.textfield.typeEmail, 'email' ],
- [ editor.lang.forms.textfield.typePass, 'password' ],
- [ editor.lang.forms.textfield.typeSearch, 'search' ],
- [ editor.lang.forms.textfield.typeTel, 'tel' ],
- [ editor.lang.forms.textfield.typeText, 'text' ],
- [ editor.lang.forms.textfield.typeUrl, 'url' ]
- ],
- setup: function( element ) {
- this.setValue( element.getAttribute( 'type' ) );
- },
- commit: function( data ) {
- var element = data.element;
-
- if ( CKEDITOR.env.ie ) {
- var elementType = element.getAttribute( 'type' );
- var myType = this.getValue();
-
- if ( elementType != myType ) {
- var replace = CKEDITOR.dom.element.createFromHtml( '<input type="' + myType + '"></input>', editor.document );
- element.copyAttributes( replace, { type:1 } );
- replace.replace( element );
- data.element = replace;
- }
- } else
- element.setAttribute( 'type', this.getValue() );
- }
- }
- ]
- }
- ]
- };
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/button.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/button.png
deleted file mode 100644
index 0bf68caaa5c..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/button.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/checkbox.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/checkbox.png
deleted file mode 100644
index 2f4eb2f40f5..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/checkbox.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/form.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/form.png
deleted file mode 100644
index 08416674e1f..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/form.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hiddenfield.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hiddenfield.png
deleted file mode 100644
index fce4fcccc6e..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hiddenfield.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/button.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/button.png
deleted file mode 100644
index bd92b165490..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/button.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/checkbox.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/checkbox.png
deleted file mode 100644
index 36be4aa0bc6..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/checkbox.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/form.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/form.png
deleted file mode 100644
index 4a02649cda7..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/form.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/hiddenfield.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/hiddenfield.png
deleted file mode 100644
index cd5f31868bb..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/hiddenfield.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/imagebutton.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/imagebutton.png
deleted file mode 100644
index d27379639b7..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/imagebutton.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/radio.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/radio.png
deleted file mode 100644
index 2f0c72d6344..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/radio.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select-rtl.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select-rtl.png
deleted file mode 100644
index 42452e19de3..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select-rtl.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select.png
deleted file mode 100644
index da2b066bea5..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/select.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea-rtl.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea-rtl.png
deleted file mode 100644
index 60618a5b598..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea-rtl.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea.png
deleted file mode 100644
index 87073d22015..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textarea.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield-rtl.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield-rtl.png
deleted file mode 100644
index d3c13582d92..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield-rtl.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield.png
deleted file mode 100644
index d3c13582d92..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/hidpi/textfield.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/imagebutton.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/imagebutton.png
deleted file mode 100644
index 162df9a38bc..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/imagebutton.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/radio.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/radio.png
deleted file mode 100644
index aaad523fa50..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/radio.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/select-rtl.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/select-rtl.png
deleted file mode 100644
index 029a0d22984..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/select-rtl.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/select.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/select.png
deleted file mode 100644
index 44b02b9d91b..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/select.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/textarea-rtl.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/textarea-rtl.png
deleted file mode 100644
index 8a15d68804b..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/textarea-rtl.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/textarea.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/textarea.png
deleted file mode 100644
index 58e0fa02030..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/textarea.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/textfield-rtl.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/textfield-rtl.png
deleted file mode 100644
index 054aab56e1c..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/textfield-rtl.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/icons/textfield.png b/addons/website/static/lib/ckeditor/plugins/forms/icons/textfield.png
deleted file mode 100644
index 054aab56e1c..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/icons/textfield.png
+++ /dev/null
Binary files differ
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/lang/en.js b/addons/website/static/lib/ckeditor/plugins/forms/lang/en.js
deleted file mode 100644
index 6063bc68ae7..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/lang/en.js
+++ /dev/null
@@ -1,68 +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( 'forms', 'en', {
- button: {
- title: 'Button Properties',
- text: 'Text (Value)',
- type: 'Type',
- typeBtn: 'Button',
- typeSbm: 'Submit',
- typeRst: 'Reset'
- },
- checkboxAndRadio: {
- checkboxTitle: 'Checkbox Properties',
- radioTitle: 'Radio Button Properties',
- value: 'Value',
- selected: 'Selected'
- },
- form: {
- title: 'Form Properties',
- menu: 'Form Properties',
- action: 'Action',
- method: 'Method',
- encoding: 'Encoding'
- },
- hidden: {
- title: 'Hidden Field Properties',
- name: 'Name',
- value: 'Value'
- },
- select: {
- title: 'Selection Field Properties',
- selectInfo: 'Select Info',
- opAvail: 'Available Options',
- value: 'Value',
- size: 'Size',
- lines: 'lines',
- chkMulti: 'Allow multiple selections',
- opText: 'Text',
- opValue: 'Value',
- btnAdd: 'Add',
- btnModify: 'Modify',
- btnUp: 'Up',
- btnDown: 'Down',
- btnSetValue: 'Set as selected value',
- btnDelete: 'Delete'
- },
- textarea: {
- title: 'Textarea Properties',
- cols: 'Columns',
- rows: 'Rows'
- },
- textfield: {
- title: 'Text Field Properties',
- name: 'Name',
- value: 'Value',
- charWidth: 'Character Width',
- maxChars: 'Maximum Characters',
- type: 'Type',
- typeText: 'Text',
- typePass: 'Password',
- typeEmail: 'Email',
- typeSearch: 'Search',
- typeTel: 'Telephone Number',
- typeUrl: 'URL'
- }
-});
diff --git a/addons/website/static/lib/ckeditor/plugins/forms/plugin.js b/addons/website/static/lib/ckeditor/plugins/forms/plugin.js
deleted file mode 100644
index dc4b554646f..00000000000
--- a/addons/website/static/lib/ckeditor/plugins/forms/plugin.js
+++ /dev/null
@@ -1,292 +0,0 @@
-/**
- * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or http://ckeditor.com/license
- */
-
-/**
- * @fileOverview Forms Plugin
- */
-
-CKEDITOR.plugins.add( 'forms', {
- 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: 'button,checkbox,form,hiddenfield,imagebutton,radio,select,select-rtl,textarea,textarea-rtl,textfield', // %REMOVE_LINE_CORE%
- hidpi: true, // %REMOVE_LINE_CORE%
- onLoad: function() {
- CKEDITOR.addCss( '.cke_editable form' +
- '{' +
- 'border: 1px dotted #FF0000;' +
- 'padding: 2px;' +
- '}\n' );
-
- CKEDITOR.addCss( 'img.cke_hidden' +
- '{' +
- 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/hiddenfield.gif' ) + ');' +
- 'background-position: center center;' +
- 'background-repeat: no-repeat;' +
- 'border: 1px solid #a9a9a9;' +
- 'width: 16px !important;' +
- 'height: 16px !important;' +
- '}' );
-
- },
- init: function( editor ) {
- var lang = editor.lang,
- order = 0,
- textfieldTypes = { email:1,password:1,search:1,tel:1,text:1,url:1 },
- allowedContent = {
- checkbox: 'input[type,name,checked]',
- radio: 'input[type,name,checked]',
- textfield: 'input[type,name,value,size,maxlength]',
- textarea: 'textarea[cols,rows,name]',
- select: 'select[name,size,multiple]; option[value,selected]',
- button: 'input[type,name,value]',
- form: 'form[action,name,id,enctype,target,method]',
- hiddenfield: 'input[type,name,value]',
- imagebutton: 'input[type,alt,src]{width,height,border,border-width,border-style,margin,float}'
- },
- requiredContent = {
- checkbox: 'input',
- radio: 'input',
- textfield: 'input',
- textarea: 'textarea',
- select: 'select',
- button: 'input',
- form: 'form',
- hiddenfield: 'input',
- imagebutton: 'input'
- };
-
- // All buttons use the same code to register. So, to avoid
- // duplications, let's use this tool function.
- var addButtonCommand = function( buttonName, commandName, dialogFile ) {
- var def = {
- allowedContent: allowedContent[ commandName ],
- requiredContent: requiredContent[ commandName ]
- };
- commandName == 'form' && ( def.context = 'form' );
-
- editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName, def ) );
-
- editor.ui.addButton && editor.ui.addButton( buttonName, {
- label: lang.common[ buttonName.charAt( 0 ).toLowerCase() + buttonName.slice( 1 ) ],
- command: commandName,
- toolbar: 'forms,' + ( order += 10 )
- });
- CKEDITOR.dialog.add( commandName, dialogFile );
- };
-
- var dialogPath = this.path + 'dialogs/';
- !editor.blockless && addButtonCommand( 'Form', 'form', dialogPath + 'form.js' );
- addButtonCommand( 'Checkbox', 'checkbox', dialogPath + 'checkbox.js' );
- addButtonCommand( 'Radio', 'radio', dialogPath + 'radio.js' );
- addButtonCommand( 'TextField', 'textfield', dialogPath + 'textfield.js' );
- addButtonCommand( 'Textarea', 'textarea', dialogPath + 'textarea.js' );
- addButtonCommand( 'Select', 'select', dialogPath + 'select.js' );
- addButtonCommand( 'Button', 'button', dialogPath + 'button.js' );
-
- // If the "image" plugin is loaded.
- var imagePlugin = CKEDITOR.plugins.get( 'image' );
- imagePlugin && addButtonCommand( 'ImageButton', 'imagebutton', CKEDITOR.plugins.getPath( 'image' ) + 'dialogs/image.js' );
-
- addButtonCommand( 'HiddenField', 'hiddenfield', dialogPath + 'hiddenfield.js' );
-
- // If the "menu" plugin is loaded, register the menu items.
- if ( editor.addMenuItems ) {
- var items = {
- checkbox: {
- label: lang.forms.checkboxAndRadio.checkboxTitle,
- command: 'checkbox',
- group: 'checkbox'
- },
-
- radio: {
- label: lang.forms.checkboxAndRadio.radioTitle,
- command: 'radio',
- group: 'radio'
- },
-
- textfield: {
- label: lang.forms.textfield.title,
- command: 'textfield',
- group: 'textfield'
- },
-
- hiddenfield: {
- label: lang.forms.hidden.title,
- command: 'hiddenfield',
- group: 'hiddenfield'
- },
-
- imagebutton: {
- label: lang.image.titleButton,
- command: 'imagebutton',
- group: 'imagebutton'
- },
-
- button: {
- label: lang.forms.button.title,
- command: 'button',
- group: 'button'
- },
-
- select: {
- label: lang.forms.select.title,
- command: 'select',
- group: 'select'
- },
-
- textarea: {
- label: lang.forms.textarea.title,
- command: 'textarea',
- group: 'textarea'
- }
- };
-
- !editor.blockless && ( items.form = {
- label: lang.forms.form.menu,
- command: 'form',
- group: 'form'
- });
-
- editor.addMenuItems( items );
-
- }
-
- // If the "contextmenu" plugin is loaded, register the listeners.
- if ( editor.contextMenu ) {
- !editor.blockless && editor.contextMenu.addListener( function( element, selection, path ) {
- var form = path.contains( 'form', 1 );
- if ( form && !form.isReadOnly() )
- return { form: CKEDITOR.TRISTATE_OFF };
- });
-
- editor.contextMenu.addListener( function( element ) {
- if ( element && !element.isReadOnly() ) {
- var name = element.getName();
-
- if ( name == 'select' )
- return { select: CKEDITOR.TRISTATE_OFF };
-
- if ( name == 'textarea' )
- return { textarea: CKEDITOR.TRISTATE_OFF };
-
- if ( name == 'input' ) {
- var type = element.getAttribute( 'type' ) || 'text';
- switch ( type ) {
- case 'button':
- case 'submit':
- case 'reset':
- return { button: CKEDITOR.TRISTATE_OFF };
-
- case 'checkbox':
- return { checkbox: CKEDITOR.TRISTATE_OFF };
-
- case 'radio':
- return { radio: CKEDITOR.TRISTATE_OFF };
-
- case 'image':
- return imagePlugin ? { imagebutton: CKEDITOR.TRISTATE_OFF } : null;
- }
-
- if ( textfieldTypes[ type ] )
- return { textfield: CKEDITOR.TRISTATE_OFF };
- }
-
- if ( name == 'img' && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
- return { hiddenfield: CKEDITOR.TRISTATE_OFF };
- }
- });
- }
-
- editor.on( 'doubleclick', function( evt ) {
- var element = evt.data.element;
-
- if ( !editor.blockless && element.is( 'form' ) )
- evt.data.dialog = 'form';
- else if ( element.is( 'select' ) )
- evt.data.dialog = 'select';
- else if ( element.is( 'textarea' ) )
- evt.data.dialog = 'textarea';
- else if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' )
- evt.data.dialog = 'hiddenfield';
- else if ( element.is( 'input' ) ) {
- var type = element.getAttribute( 'type' ) || 'text';
- switch ( type ) {
- case 'button':
- case 'submit':
- case 'reset':
- evt.data.dialog = 'button';
- break;
- case 'checkbox':
- evt.data.dialog = 'checkbox';
- break;
- case 'radio':
- evt.data.dialog = 'radio';
- break;
- case 'image':
- evt.data.dialog = 'imagebutton';
- break;
- }
- if ( textfieldTypes[ type ] )
- evt.data.dialog = 'textfield';
- }
- });
- },
-
- afterInit: function( editor ) {
- var dataProcessor = editor.dataProcessor,
- htmlFilter = dataProcessor && dataProcessor.htmlFilter,
- dataFilter = dataProcessor && dataProcessor.dataFilter;
-
- // Cleanup certain IE form elements default values.
- if ( CKEDITOR.env.ie ) {
- htmlFilter && htmlFilter.addRules({
- elements: {
- input: function( input ) {
- var attrs = input.attributes,
- type = attrs.type;
- // Old IEs don't provide type for Text inputs #5522
- if ( !type )
- attrs.type = 'text';
- if ( type == 'checkbox' || type == 'radio' )
- attrs.value == 'on' && delete attrs.value;
- }
- }
- });
- }
-
- if ( dataFilter ) {
- dataFilter.addRules({
- elements: {
- input: function( element ) {
- if ( element.attributes.type == 'hidden' )
- return editor.createFakeParserElement( element, 'cke_hidden', 'hiddenfield' );
- }
- }
- });
- }
- }
-});
-
-if ( CKEDITOR.env.ie ) {
- CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute, function( original ) {
- return function( name ) {
- var $attr = this.$.attributes.getNamedItem( name );
-
- if ( this.getName() == 'input' ) {
- switch ( name ) {
- case 'class':
- return this.$.className.length > 0;
- case 'checked':
- return !!this.$.checked;
- case 'value':
- var type = this.getAttribute( 'type' );
- return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value;
- }
- }
-
- return original.apply( this, arguments );
- };
- });
-}