1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    27
    Vote Rating
    0
    thzero is on a distinguished road

      0  

    Default Extended Menu

    Extended Menu


    My extended menu allows for 2 things:

    a) to allow individual menus not to display icons.
    b) to allow individual menus to have different themes.

    To utilize it, just include the js and css files into your page and then use Ext.ux.MenuEx instead of Ext.menu.Menu. You will also, unfortunately, need to make the change the onMouseDown function of the Ext.menu.MenuMgr to the following otherwise clicking on menu items will not function correctly.

    Code:
    function onMouseDown(e){
           if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu-layer")){
               hideAll();
           }
       }
    Want to use a different set of menuEx? You modify the x-menuEx* classes, or you could copy the x-menuEx class and give it a prefix different than x-menuEx, i.e. 'x-menuBlue', then set the 'clsPrefix' option of the MenuEx to be 'x-menuBlue' and then menu (and submenus) will use those classes.

    Want to not display the 'icon'? Just set the 'showIcon' option to false and no icon will be displayed.

    Oops, forgot a feature. You can render the menu to a pre-existing element, i.e.

    Code:
    <div id="sidebarMenu"></div>
    
    <script type="text/javascript">
    Ext.onReady(function()
    {
        var sidebarMenuPanel = new Ext.Panel({
            id: 'sidebarMenuPanel',
            title: 'Sidebar,
            layout:'fit',
            contentEl: 'sidebarMenuContent',
            renderTo: 'sidebarMenuPanel'
        });
    
        var sidebarMenu = new Ext.ux.MenuEx(
        {
            id: 'sidebarMenu',
            clsPrefix: 'x-menuEx',
            items: [
            {
                text: 'Home',
                handler: onSidebarMenuItemClick,
                location: '/'
            },
            {
                text: 'Get Started Here',
                handler: onSidebarMenuItemClick,
                location: '/index/start'
            },
            {
                text: 'General Rules and Procedures',
                handler: onSidebarMenuItemClick,
                location: '/index/rules'
            },
            {
                text: 'Member List',
                handler: onSidebarMenuItemClick,
                location: '/index/memberlist'
            },
            {
                text: 'Forums',
                handler: onSidebarMenuItemClick,
                location: '/forum/index'
            }]
        });
        sidebarMenu.renderTo('sidebarMenu');
            
        function onSidebarMenuItemClick(btn)
        {
            window.location = this.location;
        }
    });
    </script>
    Attached Files

  2. #2
    Ext User
    Join Date
    Aug 2007
    Posts
    147
    Vote Rating
    0
    Yossi is on a distinguished road

      0  

    Default


    Sounds great, thank you

  3. #3
    Ext User
    Join Date
    Jun 2007
    Location
    Christchurch, New Zealand
    Posts
    50
    Vote Rating
    0
    sintax.era is on a distinguished road

      0  

    Default


    isnt there a way to override the default ext code using a line of code in your script...to fix the bug you mentioned...

    Ext.override(MyClass, {
    newMethod1: function(){
    // etc.
    },
    newMethod2: function(foo){
    // etc.
    }
    });

    forgive me if I'm completely wrong, I'm pretty new to all of this

  4. #4
    Ext User
    Join Date
    Oct 2007
    Posts
    27
    Vote Rating
    0
    thzero is on a distinguished road

      0  

    Default


    I tried it and never got it to work. Perhaps I'll have to experiment some more.

  5. #5
    Ext User
    Join Date
    Jul 2007
    Posts
    73
    Vote Rating
    0
    SilveR316 is on a distinguished road

      0  

    Default


    Do you have a demo?

  6. #6
    Ext User
    Join Date
    Oct 2007
    Posts
    27
    Vote Rating
    0
    thzero is on a distinguished road

      0  

    Default


    Nope, however with the noted additions it works exactly as does the standard Menu.

  7. #7
    Ext User
    Join Date
    Oct 2007
    Posts
    27
    Vote Rating
    0
    thzero is on a distinguished road

      0  

    Default


    Well doesn't let me change the original message to remove or overwrite a file, so I'm attaching an updated one here. A change got made to the style sheets as follows:

    Code:
    .x-menuEx a.x-menuEx-item{display:block;line-height:16px;padding:0px 3px 0px 3px;white-space:nowrap;text-decoration:none;color:#222;-moz-outline:0 none;outline:0 none;cursor:pointer;}
    becomes

    Code:
    .x-menuEx a.x-menuEx-item{font:normal 11px tahoma,arial,sans-serif;display:block;line-height:16px;padding:0px 3px 0px 3px;white-space:nowrap;text-decoration:none;color:#222;-moz-outline:0 none;outline:0 none;cursor:pointer;}
    The "font:normal 11px tahoma,arial,sans-serif" is copied from the .x-menuEx-list-item style. This was need to keep a global "a" style from mucking with the menu's item styling for links.
    Attached Files

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi