Ticket #7991: 7991_3.patch
File 7991_3.patch, 9.8 KB (added by , 13 years ago) |
---|
-
_source/plugins/dialogui/plugin.js
158 158 html.push( '<label class="cke_dialog_ui_labeled_label' + requiredClass + '" ', 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.inputStyle ? ' style="' + elementDefinition.inputStyle + '"' : '' ) + ' role="presentation">', 165 165 contentHtml.call( this, dialog, elementDefinition ), 166 166 '</div>' ); 167 167 else … … 177 177 html : '<label class="cke_dialog_ui_labeled_label' + requiredClass + '"' + 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>' 183 183 }, 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.inputStyle ? ' style="' + elementDefinition.inputStyle + '"' : '' ) + '>' + 187 187 contentHtml.call( this, dialog, elementDefinition ) + 188 188 '</span>' 189 189 } … … 237 237 if ( elementDefinition.size ) 238 238 attributes.size = elementDefinition.size; 239 239 240 if ( elementDefinition.controlStyle )241 attributes.style = elementDefinition.controlStyle;242 240 243 241 // If user presses Enter in a text box, it implies clicking OK for the dialog. 244 242 var me = this, keyPressedOnMe = false; … … 380 378 if ( elementDefinition[ 'default' ] ) 381 379 attributes.checked = 'checked'; 382 380 383 if ( typeof myDefinition.controlStyle != 'undefined' )384 myDefinition.style = myDefinition.controlStyle;385 386 381 _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes ); 387 382 html.push( ' <label id="', labelId, '" for="', attributes.id, '">', 388 383 CKEDITOR.tools.htmlEncode( elementDefinition.label ), … … 462 457 cleanInnerDefinition( inputDefinition ); 463 458 cleanInnerDefinition( labelDefinition ); 464 459 465 if ( typeof inputDefinition.controlStyle != 'undefined' )466 inputDefinition.style = inputDefinition.controlStyle;467 468 460 children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) ); 469 461 inputHtml.push( ' ' ); 470 462 new CKEDITOR.ui.dialog.uiElement( dialog, labelDefinition, inputHtml, 'label', null, { id : labelId, 'for' : inputAttributes.id }, … … 622 614 CKEDITOR.tools.htmlEncode( item[0] ) ); 623 615 } 624 616 625 if ( typeof myDefinition.controlStyle != 'undefined' )626 myDefinition.style = myDefinition.controlStyle;627 628 617 _.select = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'select', null, attributes, innerHTML.join( '' ) ); 629 618 return html.join( '' ); 630 619 }; -
_source/plugins/dialog/dialogDefinition.js
500 500 * @example 501 501 */ 502 502 503 // ----- labeled element ------ 504 505 /** 506 * Specify the inline style of the uiElement label. 507 * @name CKEDITOR.dialog.definition.labeledElement.prototype.labelStyle 508 * @type String 509 * @field 510 * @example 511 * { 512 * type : 'text', 513 * label : 'My Label ', 514 * <strong> labelStyle : 'color: red',</strong> 515 * } 516 */ 517 518 /** 519 * Specify the inline style of the input element. 520 * @name CKEDITOR.dialog.definition.labeledElement.prototype.inputStyle 521 * @type String 522 * @field 523 * @example 524 * { 525 * type : 'text', 526 * label : 'My Label ', 527 * <strong> inputStyle : 'width:3em',</strong> 528 * } 529 */ 530 531 503 532 // ----- button ------ 504 533 505 534 /** -
_source/plugins/table/dialogs/table.js
262 262 'default' : 3, 263 263 label : editor.lang.table.rows, 264 264 required : true, 265 style : 'width:5em',265 inputStyle : 'width:5em', 266 266 validate : function() 267 267 { 268 268 var pass = true, … … 288 288 'default' : 2, 289 289 label : editor.lang.table.columns, 290 290 required : true, 291 style : 'width:5em',291 inputStyle : 'width:5em', 292 292 validate : function() 293 293 { 294 294 var pass = true, … … 354 354 id : 'txtBorder', 355 355 'default' : 1, 356 356 label : editor.lang.table.border, 357 style : 'width:3em',357 inputStyle : 'width:3em', 358 358 validate : CKEDITOR.dialog.validate['number']( editor.lang.table.invalidBorder ), 359 359 setup : function( selectedTable ) 360 360 { … … 407 407 { 408 408 type : 'text', 409 409 id : 'txtWidth', 410 style : 'width:5em',410 inputStyle : 'width:5em', 411 411 label : editor.lang.common.width, 412 412 'default' : 500, 413 413 getValue : defaultToPixel, … … 434 434 { 435 435 type : 'text', 436 436 id : 'txtHeight', 437 style : 'width:5em',437 inputStyle : 'width:5em', 438 438 label : editor.lang.common.height, 439 439 'default' : '', 440 440 getValue : defaultToPixel, … … 461 461 { 462 462 type : 'text', 463 463 id : 'txtCellSpace', 464 style : 'width:3em',464 inputStyle : 'width:3em', 465 465 label : editor.lang.table.cellSpace, 466 466 'default' : 1, 467 467 validate : CKEDITOR.dialog.validate.number( editor.lang.table.invalidCellSpacing ), … … 480 480 { 481 481 type : 'text', 482 482 id : 'txtCellPad', 483 style : 'width:3em',483 inputStyle : 'width:3em', 484 484 label : editor.lang.table.cellPad, 485 485 'default' : 1, 486 486 validate : CKEDITOR.dialog.validate.number( editor.lang.table.invalidCellPadding ), -
_source/plugins/docprops/dialogs/docprops.js
546 546 id : 'marginTop', 547 547 label : lang.marginTop, 548 548 style : 'width: 80px; text-align: center; margin: 0px auto', 549 controlStyle : 'text-align: center',550 549 setup : function( doc, html, head, body ) 551 550 { 552 551 this.setValue( body.getStyle( 'margin-top' ) || body.getAttribute( 'margintop' ) || '' ); 553 552 }, 554 commit : commitMargin( 'top' ), 555 onLoad : function() 556 { 557 this.getElement().getParent().setStyle( 'text-align', 'center' ); 558 } 553 commit : commitMargin( 'top' ) 559 554 }, 560 555 { 561 556 type : 'hbox', … … 565 560 id : 'marginLeft', 566 561 label : lang.marginLeft, 567 562 style : 'width: 80px; text-align: center; margin: 0px auto', 568 controlStyle : 'text-align: center',569 563 setup : function( doc, html, head, body ) 570 564 { 571 565 this.setValue( body.getStyle( 'margin-left' ) || body.getAttribute( 'marginleft' ) || '' ); 572 566 }, 573 commit : commitMargin( 'left' ), 574 onLoad : function() 575 { 576 this.getElement().getParent().setStyle( 'text-align', 'center' ); 577 } 567 commit : commitMargin( 'left' ) 578 568 }, 579 569 { 580 570 type : 'text', 581 571 id : 'marginRight', 582 572 label : lang.marginRight, 583 573 style : 'width: 80px; text-align: center; margin: 0px auto', 584 controlStyle : 'text-align: center',585 574 setup : function( doc, html, head, body ) 586 575 { 587 576 this.setValue( body.getStyle( 'margin-right' ) || body.getAttribute( 'marginright' ) || '' ); 588 577 }, 589 commit : commitMargin( 'right' ), 590 onLoad : function() 591 { 592 this.getElement().getParent().setStyle( 'text-align', 'center' ); 593 } 594 } 578 commit : commitMargin( 'right' ) 579 } 595 580 ] 596 581 }, 597 582 { … … 599 584 id : 'marginBottom', 600 585 label : lang.marginBottom, 601 586 style : 'width: 80px; text-align: center; margin: 0px auto', 602 controlStyle : 'text-align: center',603 587 setup : function( doc, html, head, body ) 604 588 { 605 589 this.setValue( body.getStyle( 'margin-bottom' ) || body.getAttribute( 'marginbottom' ) || '' ); 606 590 }, 607 commit : commitMargin( 'bottom' ), 608 onLoad : function() 609 { 610 this.getElement().getParent().setStyle( 'text-align', 'center' ); 611 } 612 } 591 commit : commitMargin( 'bottom' ) 592 } 613 593 ] 614 594 } 615 595 ]