for (Required) The file input's page and element Id
@@ -765,7 +765,7 @@ CKEDITOR.plugins.add( 'dialogui' );
* @extends CKEDITOR.ui.dialog.uiElement
* @name CKEDITOR.ui.dialog.html
* @param {CKEDITOR.dialog} dialog Parent dialog object.
- * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition Element definition.
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element definition.
* Accepted fields:
*
*
html (Required) HTML code of this element.
@@ -837,7 +837,7 @@ CKEDITOR.plugins.add( 'dialogui' );
* objects in childObjList.
* @param {Array} htmlList
* Array of HTML code that this element will output to.
- * @param {CKEDITOR.dialog.uiElementDefinition} elementDefinition
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition
* The element definition. Accepted fields:
*
*
label (Optional) The legend of the this fieldset.
@@ -931,7 +931,7 @@ CKEDITOR.plugins.add( 'dialogui' );
{
this._.disabled = false;
var element = this.getElement();
- element && element.removeClass( 'disabled' );
+ element && element.removeClass( 'cke_disabled' );
},
/**
@@ -941,7 +941,7 @@ CKEDITOR.plugins.add( 'dialogui' );
disable : function()
{
this._.disabled = true;
- this.getElement().addClass( 'disabled' );
+ this.getElement().addClass( 'cke_disabled' );
},
isVisible : function()
@@ -1061,7 +1061,7 @@ CKEDITOR.plugins.add( 'dialogui' );
setValue : function( value )
{
!value && ( value = '' );
- return CKEDITOR.ui.dialog.uiElement.prototype.setValue.call( this, value );
+ return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply( this, arguments );
},
keyboardFocusable : true
@@ -1156,11 +1156,12 @@ CKEDITOR.plugins.add( 'dialogui' );
* Sets the state of the checkbox.
* @example
* @param {Boolean} true to tick the checkbox, false to untick it.
+ * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element.
*/
- setValue : function( checked )
+ setValue : function( checked, noChangeEvent )
{
this.getInputElement().$.checked = checked;
- this.fire( 'change', { value : checked } );
+ !noChangeEvent && this.fire( 'change', { value : checked } );
},
/**
@@ -1222,14 +1223,15 @@ CKEDITOR.plugins.add( 'dialogui' );
* Checks one of the radio buttons in this button group.
* @example
* @param {String} value The value of the button to be chcked.
+ * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element.
*/
- setValue : function( value )
+ setValue : function( value, noChangeEvent )
{
var children = this._.children,
item;
for ( var i = 0 ; ( i < children.length ) && ( item = children[i] ) ; i++ )
item.getElement().$.checked = ( item.getValue() == value );
- this.fire( 'change', { value : value } );
+ !noChangeEvent && this.fire( 'change', { value : value } );
},
/**
@@ -1382,18 +1384,19 @@ CKEDITOR.plugins.add( 'dialogui' );
*/
reset : function()
{
- var frameElement = CKEDITOR.document.getById( this._.frameId ),
+ var _ = this._,
+ frameElement = CKEDITOR.document.getById( _.frameId ),
frameDocument = frameElement.getFrameDocument(),
- elementDefinition = this._.definition,
- buttons = this._.buttons,
+ elementDefinition = _.definition,
+ buttons = _.buttons,
callNumber = this.formLoadedNumber,
unloadNumber = this.formUnloadNumber,
- langDir = this._.dialog._.editor.lang.dir,
- langCode = this._.dialog._.editor.langCode;
+ langDir = _.dialog._.editor.lang.dir,
+ langCode = _.dialog._.editor.langCode;
// The callback function for the iframe, but we must call tools.addFunction only once
// so we store the function number in this.formLoadedNumber
- if (!callNumber)
+ if ( !callNumber )
{
callNumber = this.formLoadedNumber = CKEDITOR.tools.addFunction(
function()
@@ -1457,7 +1460,7 @@ CKEDITOR.plugins.add( 'dialogui' );
getValue : function()
{
- return this.getInputElement().$.value;
+ return this.getInputElement().$.value || '';
},
/***
@@ -1518,3 +1521,17 @@ CKEDITOR.plugins.add( 'dialogui' );
CKEDITOR.dialog.addUIElement( 'html', commonBuilder );
CKEDITOR.dialog.addUIElement( 'fieldset', containerBuilder );
})();
+
+/**
+ * Fired when the value of the uiElement is changed
+ * @name CKEDITOR.ui.dialog.uiElement#change
+ * @event
+ */
+
+/**
+ * Fired when the inner frame created by the element is ready.
+ * Each time the button is used or the dialog is loaded a new
+ * form might be created.
+ * @name CKEDITOR.ui.dialog.fileButton#formLoaded
+ * @event
+ */