Ticket #3951: 3951_3.patch

File 3951_3.patch, 4.8 KB (added by Tobiasz Cudnik, 15 years ago)
  • CHANGES.html

     
    131131                <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>
    132132                <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>
    133133                <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>
    134135        </ul>
    135136        <h3>
    136137                CKEditor 3.0 RC</h3>
  • _source/plugins/image/dialogs/image.js

     
    346346                        {
    347347                                if ( dialogType != 'image' )
    348348                                        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 );
    349352                        },
    350353                        onHide : function()
    351354                        {
     
    614617                                                                                                                                }, this.getDialog() );
    615618                                                                                                                        resetButton.on( 'mouseover', function()
    616619                                                                                                                                {
    617                                                                                                                                         this.addClass( 'BtnOver' );
     620                                                                                                                                        this.addClass( 'cke_btn_over' );
    618621                                                                                                                                }, resetButton );
    619622                                                                                                                        resetButton.on( 'mouseout', function()
    620623                                                                                                                                {
    621                                                                                                                                         this.removeClass( 'BtnOver' );
     624                                                                                                                                        this.removeClass( 'cke_btn_over' );
    622625                                                                                                                                }, resetButton );
    623626                                                                                                                }
    624627                                                                                                                // Activate (Un)LockRatio button
     
    642645                                                                                                                                }, this.getDialog() );
    643646                                                                                                                        ratioButton.on( 'mouseover', function()
    644647                                                                                                                                {
    645                                                                                                                                         this.addClass( 'BtnOver' );
     648                                                                                                                                        this.addClass( 'cke_btn_over' );
    646649                                                                                                                                }, ratioButton );
    647650                                                                                                                        ratioButton.on( 'mouseout', function()
    648651                                                                                                                                {
    649                                                                                                                                         this.removeClass( 'BtnOver' );
     652                                                                                                                                        this.removeClass( 'cke_btn_over' );
    650653                                                                                                                                }, ratioButton );
    651654                                                                                                                }
    652655                                                                                                        },
    653656                                                                                                        html : '<div>'+
    654                                                                                                                 '<div title="' + editor.lang.image.lockRatio +
    655                                                                                                                 '" class="cke_btn_locked" id="btnLockSizes"></div>' +
    656                                                                                                                 '<div title="' + 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>'+
    658661                                                                                                                '</div>'
    659662                                                                                                }
    660663                                                                                        ]
  • _source/plugins/dialog/plugin.js

     
    442442                CKEDITOR.skins.load( editor, 'dialog' );
    443443        };
    444444
     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
    445474        CKEDITOR.dialog.prototype =
    446475        {
    447476                /**
     
    9881017                getSelectedElement : function()
    9891018                {
    9901019                        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                }
    9921041        };
    9931042
    9941043        CKEDITOR.tools.extend( CKEDITOR.dialog,
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy