Ticket #7991: 7991_5.patch
File 7991_5.patch, 11.1 KB (added by , 13 years ago) |
---|
-
_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 /** 520 * Specify the inline style of the input element. 521 * @name CKEDITOR.dialog.definition.labeledElement.prototype.inputStyle 522 * @type String 523 * @field 524 * @example 525 * { 526 * type : 'text', 527 * label : 'My Label ', 528 * <strong> inputStyle : 'text-align:center',</strong> 529 * } 530 */ 531 532 /** 533 * Specify the inline style of the input element container . 534 * @name CKEDITOR.dialog.definition.labeledElement.prototype.controlStyle 535 * @type String 536 * @field 537 * @example 538 * { 539 * type : 'text', 540 * label : 'My Label ', 541 * <strong> controlStyle : 'width:3em',</strong> 542 * } 543 */ 544 545 503 546 // ----- button ------ 504 547 505 548 /** -
_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 controlStyle : '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 controlStyle : '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 controlStyle : '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 controlStyle : '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 controlStyle : '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 controlStyle : '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 controlStyle : '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/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.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + ' 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.controlStyle ? ' style="' + elementDefinition.controlStyle + '"' : '' ) + '>' + 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;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. 244 244 var me = this, keyPressedOnMe = false; … … 323 323 attributes.rows = elementDefinition.rows || 5; 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() 328 332 { … … 380 384 if ( elementDefinition[ 'default' ] ) 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>' ); 390 394 return html.join( '' ); … … 462 466 cleanInnerDefinition( inputDefinition ); 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 ) ); 469 473 inputHtml.push( ' ' ); … … 622 626 CKEDITOR.tools.htmlEncode( item[0] ) ); 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( '' ) ); 629 633 return html.join( '' ); -
_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',549 inputStyle : 'text-align: center', 550 550 setup : function( doc, html, head, body ) 551 551 { 552 552 this.setValue( body.getStyle( 'margin-top' ) || body.getAttribute( 'margintop' ) || '' ); 553 553 }, 554 commit : commitMargin( 'top' ), 555 onLoad : function() 556 { 557 this.getElement().getParent().setStyle( 'text-align', 'center' ); 558 } 554 commit : commitMargin( 'top' ) 559 555 }, 560 556 { 561 557 type : 'hbox', … … 565 561 id : 'marginLeft', 566 562 label : lang.marginLeft, 567 563 style : 'width: 80px; text-align: center; margin: 0px auto', 568 controlStyle : 'text-align: center',564 inputStyle : 'text-align: center', 569 565 setup : function( doc, html, head, body ) 570 566 { 571 567 this.setValue( body.getStyle( 'margin-left' ) || body.getAttribute( 'marginleft' ) || '' ); 572 568 }, 573 commit : commitMargin( 'left' ), 574 onLoad : function() 575 { 576 this.getElement().getParent().setStyle( 'text-align', 'center' ); 577 } 569 commit : commitMargin( 'left' ) 578 570 }, 579 571 { 580 572 type : 'text', 581 573 id : 'marginRight', 582 574 label : lang.marginRight, 583 575 style : 'width: 80px; text-align: center; margin: 0px auto', 584 controlStyle : 'text-align: center',576 inputStyle : 'text-align: center', 585 577 setup : function( doc, html, head, body ) 586 578 { 587 579 this.setValue( body.getStyle( 'margin-right' ) || body.getAttribute( 'marginright' ) || '' ); 588 580 }, 589 commit : commitMargin( 'right' ), 590 onLoad : function() 591 { 592 this.getElement().getParent().setStyle( 'text-align', 'center' ); 593 } 594 } 581 commit : commitMargin( 'right' ) 582 } 595 583 ] 596 584 }, 597 585 { … … 599 587 id : 'marginBottom', 600 588 label : lang.marginBottom, 601 589 style : 'width: 80px; text-align: center; margin: 0px auto', 602 controlStyle : 'text-align: center',590 inputStyle : 'text-align: center', 603 591 setup : function( doc, html, head, body ) 604 592 { 605 593 this.setValue( body.getStyle( 'margin-bottom' ) || body.getAttribute( 'marginbottom' ) || '' ); 606 594 }, 607 commit : commitMargin( 'bottom' ), 608 onLoad : function() 609 { 610 this.getElement().getParent().setStyle( 'text-align', 'center' ); 611 } 612 } 595 commit : commitMargin( 'bottom' ) 596 } 613 597 ] 614 598 } 615 599 ]