Helpful Panel javascript overrides for 2.x

  1. #1

    Helpful Panel javascript overrides for 2.x

    The following javascript methods were deprecated in 2.x. IMO, they shouldn't be since they are such good convenient methods. So here's a quick way to get them back.

    Admin: feel free to move this to Examples and Extras if that's more appropriate

    
    Ext.panel.Panel.override({
        getTool: function (type) {
            return this.down('tool[type=' + type + ']');
        },
    
    
        getBottomToolbar: function () {
            return this.getDockedItems('toolbar[dock="bottom"]')[0];
        },
    
    
        getTopToolbar: function () {
            return this.getDockedItems('toolbar[dock="top"]')[0];
        }
    
    
    });
  2. #2
    Hello!

    Thank you for sharing!

    Thread have been moved to Examples and Extras forum.
  3. #3
    Hi @jchau,

    +1, thank you for sharing.

    Do you mind I will add the following breaking change item?

    159. The Panel client side methods - getTool, getBottomToolbar, getTopToolbar - have be removed.

    Here is a possible substitution. Thanks to a forum member @jchau.
    http://forums.ext.net/showthread.php?23491

Similar Threads

  1. Problem with Panel Load From JavaScript
    By osef in forum 2.x Help
    Replies: 0
    Last Post: Jun 02, 2012, 6:09 AM
  2. How to get a panel from JavaScript
    By Ubirajara.mnj in forum 1.x Help
    Replies: 2
    Last Post: Feb 16, 2011, 12:32 PM
  3. Expand Panel with Javascript?
    By simonmicheal in forum 1.x Help
    Replies: 1
    Last Post: Oct 06, 2009, 12:27 PM
  4. [CLOSED] Add innerHTML to panel in javascript?
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 03, 2009, 11:00 AM
  5. Where to put overrides and extensions ideally
    By sz_146 in forum 1.x Help
    Replies: 4
    Last Post: Dec 05, 2008, 7:00 AM

Posting Permissions