Ticket #5715: 5715.patch

File 5715.patch, 2.2 KB (added by brooks, 14 years ago)
  • _source/plugins/tabletools/dialogs/tableCell.js

     
    2323                 * @param dialogName
    2424                 * @param callback [ childDialog ]
    2525                 */
    26                 function getDialogValue( dialogName, callback )
     26                function getDialogValue( dialogName, callback, cellDialog )
    2727                {
    2828                        var onOk = function()
    2929                        {
    3030                                releaseHandlers( this );
    31                                 callback( this );
     31                                callback( this, cellDialog );
     32                                cellDialog.changeFocus( true );
    3233                        };
    3334                        var onCancel = function()
    3435                        {
    3536                                releaseHandlers( this );
     37                                cellDialog.changeFocus();
    3638                        };
    3739                        var bindToDialog = function( dialog )
    3840                        {
     
    439441                                                                                                        style : 'margin-left: 10px',
    440442                                                                                                        onClick : function()
    441443                                                                                                        {
    442                                                                                                                 var self = this;
    443                                                                                                                 getDialogValue( 'colordialog', function( colorDialog )
     444                                                                                                                getDialogValue( 'colordialog', function( colorDialog, cellDialog )
    444445                                                                                                                {
    445                                                                                                                         self.getDialog().getContentElement( 'info', 'bgColor' ).setValue(
     446                                                                                                                        cellDialog.getContentElement( 'info', 'bgColor' ).setValue(
    446447                                                                                                                                colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue()
    447448                                                                                                                        );
    448                                                                                                                 } );
     449                                                                                                                }, this.getDialog() );
    449450                                                                                                        }
    450451                                                                                                }
    451452                                                                                        ]
     
    489490                                                                                                        style : 'margin-left: 10px',
    490491                                                                                                        onClick : function()
    491492                                                                                                        {
    492                                                                                                                 var self = this;
    493                                                                                                                 getDialogValue( 'colordialog', function( colorDialog )
     493                                                                                                                getDialogValue( 'colordialog', function( colorDialog, cellDialog )
    494494                                                                                                                {
    495                                                                                                                         self.getDialog().getContentElement( 'info', 'borderColor' ).setValue(
     495                                                                                                                        cellDialog.getContentElement( 'info', 'borderColor' ).setValue(
    496496                                                                                                                                colorDialog.getContentElement( 'picker', 'selectedColor' ).getValue()
    497497                                                                                                                        );
    498                                                                                                                 } );
     498                                                                                                                }, this.getDialog() );
    499499                                                                                                        }
    500500                                                                                                }
    501501                                                                                        ]
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy