Ticket #3951: 3951.patch
File 3951.patch, 4.1 KB (added by , 14 years ago) |
---|
-
_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
988 988 getSelectedElement : function() 989 989 { 990 990 return this.getParentEditor().getSelection().getSelectedElement(); 991 } 992 }; 991 }, 992 993 /** 994 * Adds element to dialog's focusable list. 995 * 996 * @param {CKEDITOR.dom.element} element 997 * @param {Number} [index] 998 */ 999 addFocusable: (function() { 1000 var dialog; 1001 var Focusable = function( element, index ) { 1002 this.element = element; 1003 this.focusIndex = index; 1004 this.isFocusable = function() 1005 { 1006 return true; 1007 }; 1008 this.focus = function() 1009 { 1010 dialog._.currentFocusIndex = this.focusIndex; 1011 this.element.focus(); 1012 }; 1013 // Bind events 1014 this.element.on( 'keydown', function( e ) 1015 { 1016 if ( e.data.getKeystroke() in { 32:1, 13:1 } ) 1017 this.fire( 'click' ); 1018 }); 1019 this.element.on( 'focus', function() 1020 { 1021 this.fire( 'mouseover' ); 1022 }); 1023 this.element.on( 'blur', function() 1024 { 1025 this.fire( 'mouseout' ); 1026 }); 1027 }; 1028 return function( element, index ) { 1029 // Update reference. 1030 if ( !dialog ) 1031 dialog = this; 1032 if ( typeof index == 'undefined' ) 1033 { 1034 index = this._.focusList.length; 1035 focusList.push( new Focusable( element, index ) ); 1036 } 1037 else 1038 { 1039 this._.focusList.splice( index, 0, new Focusable( element, index ) ); 1040 for ( var i = index + 1 ; i < this._.focusList.length ; i++ ) 1041 this._.focusList[ i ].focusIndex++; 1042 } 1043 }; 1044 })() 1045 }; 993 1046 994 1047 CKEDITOR.tools.extend( CKEDITOR.dialog, 995 1048 /**