Ticket #3951: 3951_3.patch
File 3951_3.patch, 4.8 KB (added by , 14 years ago) |
---|
-
CHANGES.html
131 131 <li><a href="http://dev.fckeditor.net/ticket/3671">#3671</a> : Fixed body fixing should be applied to the real type under fake elements.</li> 132 132 <li><a href="http://dev.fckeditor.net/ticket/3836">#3836</a> : Fixed remove list in enterMode=BR will merge sibling text to one line.</li> 133 133 <li><a href="http://dev.fckeditor.net/ticket/3949">#3949</a> : Fixed enterKey within pre-formatted text introduce wrong line-break.</li> 134 <li><a href="http://dev.fckeditor.net/ticket/3951">#3951</a> : Reset size and lock ratio options were not accessible in Image dialog.</li> 134 135 </ul> 135 136 <h3> 136 137 CKEditor 3.0 RC</h3> -
_source/plugins/image/dialogs/image.js
346 346 { 347 347 if ( dialogType != 'image' ) 348 348 this.hidePage( 'Link' ); //Hide Link tab. 349 var doc = this._.element.getDocument(); 350 this.addFocusable( doc.getById( 'btnLockSizes' ), 5 ); 351 this.addFocusable( doc.getById( 'btnResetSize' ), 5 ); 349 352 }, 350 353 onHide : function() 351 354 { … … 614 617 }, this.getDialog() ); 615 618 resetButton.on( 'mouseover', function() 616 619 { 617 this.addClass( ' BtnOver' );620 this.addClass( 'cke_btn_over' ); 618 621 }, resetButton ); 619 622 resetButton.on( 'mouseout', function() 620 623 { 621 this.removeClass( ' BtnOver' );624 this.removeClass( 'cke_btn_over' ); 622 625 }, resetButton ); 623 626 } 624 627 // Activate (Un)LockRatio button … … 642 645 }, this.getDialog() ); 643 646 ratioButton.on( 'mouseover', function() 644 647 { 645 this.addClass( ' BtnOver' );648 this.addClass( 'cke_btn_over' ); 646 649 }, ratioButton ); 647 650 ratioButton.on( 'mouseout', function() 648 651 { 649 this.removeClass( ' BtnOver' );652 this.removeClass( 'cke_btn_over' ); 650 653 }, ratioButton ); 651 654 } 652 655 }, 653 656 html : '<div>'+ 654 '< divtitle="' + editor.lang.image.lockRatio +655 '" class="cke_btn_locked" id="btnLockSizes"></ div>' +656 '< divtitle="' + editor.lang.image.resetSize +657 '" class="cke_btn_reset" id="btnResetSize"></ div>'+657 '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.lockRatio + 658 '" class="cke_btn_locked" id="btnLockSizes"></a>' + 659 '<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.resetSize + 660 '" class="cke_btn_reset" id="btnResetSize"></a>'+ 658 661 '</div>' 659 662 } 660 663 ] -
_source/plugins/dialog/plugin.js
442 442 CKEDITOR.skins.load( editor, 'dialog' ); 443 443 }; 444 444 445 // Focusable interface. Use it via dialog.addFocusable. 446 function Focusable( dialog, element, index ) { 447 this.element = element; 448 this.focusIndex = index; 449 this.isFocusable = function() 450 { 451 return true; 452 }; 453 this.focus = function() 454 { 455 dialog._.currentFocusIndex = this.focusIndex; 456 this.element.focus(); 457 }; 458 // Bind events 459 element.on( 'keydown', function( e ) 460 { 461 if ( e.data.getKeystroke() in { 32:1, 13:1 } ) 462 this.fire( 'click' ); 463 } ); 464 element.on( 'focus', function() 465 { 466 this.fire( 'mouseover' ); 467 } ); 468 element.on( 'blur', function() 469 { 470 this.fire( 'mouseout' ); 471 } ); 472 } 473 445 474 CKEDITOR.dialog.prototype = 446 475 { 447 476 /** … … 988 1017 getSelectedElement : function() 989 1018 { 990 1019 return this.getParentEditor().getSelection().getSelectedElement(); 991 } 1020 }, 1021 1022 /** 1023 * Adds element to dialog's focusable list. 1024 * 1025 * @param {CKEDITOR.dom.element} element 1026 * @param {Number} [index] 1027 */ 1028 addFocusable: function( element, index ) { 1029 if ( typeof index == 'undefined' ) 1030 { 1031 index = this._.focusList.length; 1032 this._.focusList.push( new Focusable( this, element, index ) ); 1033 } 1034 else 1035 { 1036 this._.focusList.splice( index, 0, new Focusable( this, element, index ) ); 1037 for ( var i = index + 1 ; i < this._.focusList.length ; i++ ) 1038 this._.focusList[ i ].focusIndex++; 1039 } 1040 } 992 1041 }; 993 1042 994 1043 CKEDITOR.tools.extend( CKEDITOR.dialog,