Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html (revision 7028)
+++ /CKEditor/trunk/CHANGES.html (revision 7029)
@@ -49,4 +49,5 @@
Index: /CKEditor/trunk/_source/plugins/dialog/dialogDefinition.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialog/dialogDefinition.js (revision 7028)
+++ /CKEditor/trunk/_source/plugins/dialog/dialogDefinition.js (revision 7029)
@@ -501,4 +501,101 @@
*/
+// ----- labeled element ------
+
+/**
+ * The definition of labeled user interface element (textarea, textInput etc).
+ *
This class is not really part of the API. It just illustrates the properties
+ * that developers can use to define and create dialog UI elements.
+ * @name CKEDITOR.dialog.definition.labeledElement
+ * @extends CKEDITOR.dialog.definition.uiElement
+ * @constructor
+ * @see CKEDITOR.ui.dialog.labeledElement
+ * @example
+ * // There is no constructor for this class, the user just has to define an
+ * // object with the appropriate properties.
+ */
+
+/**
+ * The label of the UI element.
+ * @name CKEDITOR.dialog.definition.labeledElement.prototype.label
+ * @type String
+ * @field
+ * @example
+ * {
+ * type : 'text',
+ * label : 'My Label '
+ * }
+ */
+
+/**
+ * (Optional) Specify the layout of the label. Set to 'horizontal' for horizontal layout.
+ * The default layout is vertical.
+ * @name CKEDITOR.dialog.definition.labeledElement.prototype.labelLayout
+ * @type String
+ * @field
+ * @example
+ * {
+ * type : 'text',
+ * label : 'My Label ',
+ * ',
+ '
',
contentHtml.call( this, dialog, elementDefinition ),
'
' );
@@ -178,5 +178,5 @@
' id="' + _.labelId + '"' +
' for="' + _.inputId + '"' +
- ' style="' + elementDefinition.labelStyle + '">' +
+ ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +'>' +
CKEDITOR.tools.htmlEncode( elementDefinition.label ) +
''
@@ -184,5 +184,5 @@
{
type : 'html',
- html : '
' +
+ html : '' +
contentHtml.call( this, dialog, elementDefinition ) +
''
@@ -238,6 +238,6 @@
attributes.size = elementDefinition.size;
- if ( elementDefinition.controlStyle )
- attributes.style = elementDefinition.controlStyle;
+ if ( elementDefinition.inputStyle )
+ attributes.style = elementDefinition.inputStyle;
// If user presses Enter in a text box, it implies clicking OK for the dialog.
@@ -324,4 +324,8 @@
attributes.cols = elementDefinition.cols || 20;
+ if ( typeof elementDefinition.inputStyle != 'undefined' )
+ attributes.style = elementDefinition.inputStyle;
+
+
/** @ignore */
var innerHTML = function()
@@ -381,9 +385,9 @@
attributes.checked = 'checked';
- if ( typeof myDefinition.controlStyle != 'undefined' )
- myDefinition.style = myDefinition.controlStyle;
+ if ( typeof myDefinition.inputStyle != 'undefined' )
+ myDefinition.style = myDefinition.inputStyle;
_.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes );
- html.push( '