Changeset 7029 for CKEditor/trunk
- Timestamp:
- 06/09/11 16:45:58 (2 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 5 edited
-
CHANGES.html (modified) (1 diff)
-
_source/plugins/dialog/dialogDefinition.js (modified) (11 diffs)
-
_source/plugins/dialogui/plugin.js (modified) (8 diffs)
-
_source/plugins/docprops/dialogs/docprops.js (modified) (6 diffs)
-
_source/plugins/table/dialogs/table.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r7027 r7029 49 49 <li><a href="http://dev.ckeditor.com/ticket/7959">#7959</a> : The cursor will now blink in the first cell after a table is inserted.</li> 50 50 <li><a href="http://dev.ckeditor.com/ticket/7885">#7885</a> : New <code>editor::removeMenuItem</code> API for removing plugin context menu items introduced.</li> 51 <li><a href="http://dev.ckeditor.com/ticket/7991">#7991</a> : Introduce the <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.labeledElement#controlStyle">controlStyle</a> and <a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.labeledElement#inputStyle">inputStyle</a> definitions to allow fine-graded controlling of dialog element styles.</li> 51 52 </ul> 52 53 <p> -
CKEditor/trunk/_source/plugins/dialog/dialogDefinition.js
r6942 r7029 501 501 */ 502 502 503 // ----- labeled element ------ 504 505 /** 506 * The definition of labeled user interface element (textarea, textInput etc). 507 * <div class="notapi">This class is not really part of the API. It just illustrates the properties 508 * that developers can use to define and create dialog UI elements.</div> 509 * @name CKEDITOR.dialog.definition.labeledElement 510 * @extends CKEDITOR.dialog.definition.uiElement 511 * @constructor 512 * @see CKEDITOR.ui.dialog.labeledElement 513 * @example 514 * // There is no constructor for this class, the user just has to define an 515 * // object with the appropriate properties. 516 */ 517 518 /** 519 * The label of the UI element. 520 * @name CKEDITOR.dialog.definition.labeledElement.prototype.label 521 * @type String 522 * @field 523 * @example 524 * { 525 * type : 'text', 526 * label : 'My Label ' 527 * } 528 */ 529 530 /** 531 * (Optional) Specify the layout of the label. Set to 'horizontal' for horizontal layout. 532 * The default layout is vertical. 533 * @name CKEDITOR.dialog.definition.labeledElement.prototype.labelLayout 534 * @type String 535 * @field 536 * @example 537 * { 538 * type : 'text', 539 * label : 'My Label ', 540 * <strong> labelLayout : 'horizontal',</strong> 541 * } 542 */ 543 544 /** 545 * (Optional) Applies only to horizontal layouts: a two elements array of lengths to specify the widths of the 546 * label and the content element. See also {@link CKEDITOR.dialog.definition.labeledElement#labelLayout}. 547 * @name CKEDITOR.dialog.definition.labeledElement.prototype.widths 548 * @type Array 549 * @field 550 * @example 551 * { 552 * type : 'text', 553 * label : 'My Label ', 554 * labelLayout : 'horizontal', 555 * <strong> widths : [100, 200],</strong> 556 * } 557 */ 558 559 /** 560 * Specify the inline style of the uiElement label. 561 * @name CKEDITOR.dialog.definition.labeledElement.prototype.labelStyle 562 * @type String 563 * @field 564 * @example 565 * { 566 * type : 'text', 567 * label : 'My Label ', 568 * <strong> labelStyle : 'color: red',</strong> 569 * } 570 */ 571 572 573 /** 574 * Specify the inline style of the input element. 575 * @name CKEDITOR.dialog.definition.labeledElement.prototype.inputStyle 576 * @type String 577 * @field 578 * @example 579 * { 580 * type : 'text', 581 * label : 'My Label ', 582 * <strong> inputStyle : 'text-align:center',</strong> 583 * } 584 */ 585 586 /** 587 * Specify the inline style of the input element container . 588 * @name CKEDITOR.dialog.definition.labeledElement.prototype.controlStyle 589 * @type String 590 * @field 591 * @example 592 * { 593 * type : 'text', 594 * label : 'My Label ', 595 * <strong> controlStyle : 'width:3em',</strong> 596 * } 597 */ 598 599 503 600 // ----- button ------ 504 601 … … 614 711 * For a complete example of dialog definition, please check {@link CKEDITOR.dialog.add}. 615 712 * @name CKEDITOR.dialog.definition.file 616 * @extends CKEDITOR.dialog.definition. uiElement713 * @extends CKEDITOR.dialog.definition.labeledElement 617 714 * @constructor 618 715 * @example … … 645 742 * @field 646 743 * @type Function 647 * @example648 */649 650 /**651 * The label of the UI element.652 * @name CKEDITOR.dialog.definition.file.prototype.label653 * @type String654 * @field655 744 * @example 656 745 */ … … 829 918 * For a complete example of dialog definition, please check {@link CKEDITOR.dialog.add}. 830 919 * @name CKEDITOR.dialog.definition.radio 831 * @extends CKEDITOR.dialog.definition. uiElement920 * @extends CKEDITOR.dialog.definition.labeledElement 832 921 * @constructor 833 922 * @example … … 874 963 */ 875 964 876 /**877 * The label of the UI element.878 * @name CKEDITOR.dialog.definition.radio.prototype.label879 * @type String880 * @field881 * @example882 */883 884 965 // ----- selectElement ------ 885 966 … … 893 974 * For a complete example of dialog definition, please check {@link CKEDITOR.dialog.add}. 894 975 * @name CKEDITOR.dialog.definition.select 895 * @extends CKEDITOR.dialog.definition. uiElement976 * @extends CKEDITOR.dialog.definition.labeledElement 896 977 * @constructor 897 978 * @example … … 954 1035 */ 955 1036 956 /**957 * The label of the UI element.958 * @name CKEDITOR.dialog.definition.select.prototype.label959 * @type String960 * @field961 * @example962 */963 964 1037 // ----- textInput ----- 965 1038 … … 973 1046 * For a complete example of dialog definition, please check {@link CKEDITOR.dialog.add}. 974 1047 * @name CKEDITOR.dialog.definition.textInput 975 * @extends CKEDITOR.dialog.definition. uiElement1048 * @extends CKEDITOR.dialog.definition.labeledElement 976 1049 * @constructor 977 1050 * @example … … 1026 1099 */ 1027 1100 1028 /**1029 * The label of the UI element.1030 * @name CKEDITOR.dialog.definition.textInput.prototype.label1031 * @type String1032 * @field1033 * @example1034 */1035 1036 1101 // ----- textarea ------ 1037 1102 … … 1045 1110 * For a complete example of dialog definition, please check {@link CKEDITOR.dialog.add}. 1046 1111 * @name CKEDITOR.dialog.definition.textarea 1047 * @extends CKEDITOR.dialog.definition. uiElement1112 * @extends CKEDITOR.dialog.definition.labeledElement 1048 1113 * @constructor 1049 1114 * @example … … 1098 1163 * @example 1099 1164 */ 1100 1101 /**1102 * The label of the UI element.1103 * @name CKEDITOR.dialog.definition.textarea.prototype.label1104 * @type String1105 * @field1106 * @example1107 */ -
CKEditor/trunk/_source/plugins/dialogui/plugin.js
r6904 r7029 159 159 ' id="'+ _.labelId + '"', 160 160 ' for="' + _.inputId + '"', 161 ' style="' + elementDefinition.labelStyle + '">',161 ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +'>', 162 162 elementDefinition.label, 163 163 '</label>', 164 '<div class="cke_dialog_ui_labeled_content" role="presentation">',164 '<div class="cke_dialog_ui_labeled_content"' + ( elementDefinition.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + ' role="presentation">', 165 165 contentHtml.call( this, dialog, elementDefinition ), 166 166 '</div>' ); … … 178 178 ' id="' + _.labelId + '"' + 179 179 ' for="' + _.inputId + '"' + 180 ' style="' + elementDefinition.labelStyle + '">' +180 ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) +'>' + 181 181 CKEDITOR.tools.htmlEncode( elementDefinition.label ) + 182 182 '</span>' … … 184 184 { 185 185 type : 'html', 186 html : '<span class="cke_dialog_ui_labeled_content" >' +186 html : '<span class="cke_dialog_ui_labeled_content"' + ( elementDefinition.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + '>' + 187 187 contentHtml.call( this, dialog, elementDefinition ) + 188 188 '</span>' … … 238 238 attributes.size = elementDefinition.size; 239 239 240 if ( elementDefinition. controlStyle )241 attributes.style = elementDefinition. controlStyle;240 if ( elementDefinition.inputStyle ) 241 attributes.style = elementDefinition.inputStyle; 242 242 243 243 // If user presses Enter in a text box, it implies clicking OK for the dialog. … … 324 324 attributes.cols = elementDefinition.cols || 20; 325 325 326 if ( typeof elementDefinition.inputStyle != 'undefined' ) 327 attributes.style = elementDefinition.inputStyle; 328 329 326 330 /** @ignore */ 327 331 var innerHTML = function() … … 381 385 attributes.checked = 'checked'; 382 386 383 if ( typeof myDefinition. controlStyle != 'undefined' )384 myDefinition.style = myDefinition. controlStyle;387 if ( typeof myDefinition.inputStyle != 'undefined' ) 388 myDefinition.style = myDefinition.inputStyle; 385 389 386 390 _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes ); 387 html.push( ' <label id="', labelId, '" for="', attributes.id, '" >',391 html.push( ' <label id="', labelId, '" for="', attributes.id, '"' + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) + '>', 388 392 CKEDITOR.tools.htmlEncode( elementDefinition.label ), 389 393 '</label>' ); … … 463 467 cleanInnerDefinition( labelDefinition ); 464 468 465 if ( typeof inputDefinition. controlStyle != 'undefined' )466 inputDefinition.style = inputDefinition. controlStyle;469 if ( typeof inputDefinition.inputStyle != 'undefined' ) 470 inputDefinition.style = inputDefinition.inputStyle; 467 471 468 472 children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) ); … … 623 627 } 624 628 625 if ( typeof myDefinition. controlStyle != 'undefined' )626 myDefinition.style = myDefinition. controlStyle;629 if ( typeof myDefinition.inputStyle != 'undefined' ) 630 myDefinition.style = myDefinition.inputStyle; 627 631 628 632 _.select = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'select', null, attributes, innerHTML.join( '' ) ); -
CKEditor/trunk/_source/plugins/docprops/dialogs/docprops.js
r6932 r7029 547 547 label : lang.marginTop, 548 548 style : 'width: 80px; text-align: center; margin: 0px auto', 549 controlStyle : 'text-align: center',549 inputStyle : 'text-align: center', 550 550 setup : function( doc, html, head, body ) 551 551 { … … 566 566 label : lang.marginLeft, 567 567 style : 'width: 80px; text-align: center; margin: 0px auto', 568 controlStyle : 'text-align: center',568 inputStyle : 'text-align: center', 569 569 setup : function( doc, html, head, body ) 570 570 { … … 582 582 label : lang.marginRight, 583 583 style : 'width: 80px; text-align: center; margin: 0px auto', 584 controlStyle : 'text-align: center',584 inputStyle : 'text-align: center', 585 585 setup : function( doc, html, head, body ) 586 586 { … … 591 591 { 592 592 this.getElement().getParent().setStyle( 'text-align', 'center' ); 593 }593 } 594 594 } 595 595 ] … … 600 600 label : lang.marginBottom, 601 601 style : 'width: 80px; text-align: center; margin: 0px auto', 602 controlStyle : 'text-align: center',602 inputStyle : 'text-align: center', 603 603 setup : function( doc, html, head, body ) 604 604 { … … 609 609 { 610 610 this.getElement().getParent().setStyle( 'text-align', 'center' ); 611 }611 } 612 612 } 613 613 ] -
CKEditor/trunk/_source/plugins/table/dialogs/table.js
r7011 r7029 263 263 label : editor.lang.table.rows, 264 264 required : true, 265 style : 'width:5em',265 controlStyle : 'width:5em', 266 266 validate : function() 267 267 { … … 289 289 label : editor.lang.table.columns, 290 290 required : true, 291 style : 'width:5em',291 controlStyle : 'width:5em', 292 292 validate : function() 293 293 { … … 355 355 'default' : 1, 356 356 label : editor.lang.table.border, 357 style : 'width:3em',357 controlStyle : 'width:3em', 358 358 validate : CKEDITOR.dialog.validate['number']( editor.lang.table.invalidBorder ), 359 359 setup : function( selectedTable ) … … 408 408 type : 'text', 409 409 id : 'txtWidth', 410 style : 'width:5em',410 controlStyle : 'width:5em', 411 411 label : editor.lang.common.width, 412 412 'default' : 500, … … 435 435 type : 'text', 436 436 id : 'txtHeight', 437 style : 'width:5em',437 controlStyle : 'width:5em', 438 438 label : editor.lang.common.height, 439 439 'default' : '', … … 462 462 type : 'text', 463 463 id : 'txtCellSpace', 464 style : 'width:3em',464 controlStyle : 'width:3em', 465 465 label : editor.lang.table.cellSpace, 466 466 'default' : 1, … … 481 481 type : 'text', 482 482 id : 'txtCellPad', 483 style : 'width:3em',483 controlStyle : 'width:3em', 484 484 label : editor.lang.table.cellPad, 485 485 'default' : 1,
Note: See TracChangeset
for help on using the changeset viewer.
