Ticket #3238: 3238_2.patch
File 3238_2.patch, 3.3 KB (added by , 14 years ago) |
---|
-
_source/plugins/dialog/plugin.js
144 144 }; 145 145 146 146 this.parts = themeBuilt.parts; 147 148 // Set the startup styles for the dialog, avoiding it enlarging the 149 // page size on the dialog creation. 150 this.parts.dialog.setStyles( 151 { 152 position : 'absolute', 153 top : 0, 154 left: 0, 155 visibility : 'hidden' 156 }); 147 157 148 158 // Call the CKEDITOR.event constructor to initialize this instance. 149 159 CKEDITOR.event.call( this ); … … 506 516 507 517 element.setStyles( 508 518 { 509 'left' : x+ 'px',510 'top' : y+ 'px'519 'left' : ( x > 0 ? x : 0 ) + 'px', 520 'top' : ( y > 0 ? y : 0 ) + 'px' 511 521 }); 512 522 }; 513 523 })(), … … 541 551 // First, set the dialog to an appropriate size. 542 552 this.resize( definition.minWidth, definition.minHeight ); 543 553 544 // Rearrange the dialog to the middle of the window.545 var viewSize = CKEDITOR.document.getWindow().getViewPaneSize();546 var dialogSize = this.getSize();547 this.move( ( viewSize.width - dialogSize.width ) / 2, ( viewSize.height - dialogSize.height ) / 2 );548 549 554 // Select the first tab by default. 550 555 this.selectPage( this.definition.contents[0].id ); 551 556 … … 585 590 // Reset the hasFocus state. 586 591 this._.hasFocus = false; 587 592 588 // Execute onLoad for the first show.589 this.fireOnce( 'load', {} );590 this.fire( 'show', {} );591 592 593 // Save the initial values of the dialog. 593 594 this.foreach( function( contentObj ) { contentObj.setInitValue && contentObj.setInitValue(); } ); 595 596 // Rearrange the dialog to the middle of the window. 597 CKEDITOR.tools.setTimeout( function() 598 { 599 var viewSize = CKEDITOR.document.getWindow().getViewPaneSize(); 600 var dialogSize = this.getSize(); 601 602 this.move( ( viewSize.width - dialogSize.width ) / 2, ( viewSize.height - dialogSize.height ) / 2 ); 603 604 this.parts.dialog.setStyle( 'visibility', '' ); 605 606 // Execute onLoad for the first show. 607 this.fireOnce( 'load', {} ); 608 this.fire( 'show', {} ); 609 }, 610 100, this ); 594 611 }, 595 612 596 613 /** … … 653 670 var element = this._.element; 654 671 if ( !element.getParent() ) 655 672 return; 673 656 674 element.remove(); 675 this.parts.dialog.setStyle( 'visibility', 'hidden' ); 657 676 658 677 // Unregister all access keys associated with this dialog. 659 678 unregisterAccessKey( this ); -
_source/skins/office2003/skin.js
68 68 el = innerDialog.getChild( 5 ); 69 69 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 70 70 }, 71 0 );71 100 ); 72 72 }); 73 73 } -
_source/skins/v2/skin.js
68 68 el = innerDialog.getChild( 5 ); 69 69 el.setStyle( 'height', ( body.$.offsetHeight - 31 - 14 ) + 'px' ); 70 70 }, 71 0 );71 100 ); 72 72 }); 73 73 }