1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    14
    Vote Rating
    0
    RenatoLombardo is on a distinguished road

      0  

    Default Simulate event mouseclick in collapsed accordion

    Simulate event mouseclick in collapsed accordion


    Hello.

    I need to "simulate" a mouseclick in a collapsed accordion, when the mouse is over it, showing its contents but not expanding it.

    Couldn't find anything about that.

    Thanks in advance.

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      1  

    Default


    A mouseenter listener on the header element?

    Which would then.... do something to show the contents somehow.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      1  

    Default


    Maybe if it's a kind of "preview" you need, a ToolTip might be best.

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    14
    Vote Rating
    0
    RenatoLombardo is on a distinguished road

      0  

    Default


    I don't think that's my problem. Here is my code:

    Code:
                var pnPoop = new Ext.Panel({
                    title: '<span class=textblackbold>Pontos Operacionais</span>',
                    contentEl: 'poop',
                    collapsible: false,
                    titleCollapse: false
                });
            
                //var viewport = new Ext.Viewport({
                var viewport = new Ext.FormViewport({
                    layout: 'border',
                    items: [
                    {
                        region: 'west',
                        id: 'west-panel', 
                        split: true,
                        width: 300,
                        minSize: 100,
                        maxSize: 400,
                        collapsible: true,
                        margins: '0 0 0 0',
                        autoHeight: true,
                        layout: {
                            type: 'accordion',
                            animate: false
                        },
                        items: [ pnPoop ]
                    },
                    new Ext.TabPanel({
                        region: 'center', 
                        id: 'center-panel', 
                        deferredRender: false,
                        activeTab: 1,
                        enableTabScroll: false,
                        items: [{
                            contentEl: 'tab1',
                            itemId: 'tabMapa',
                            title: 'Visualização Geográfica',
                            autoScroll: true
                        }, {
                            contentEl: 'tab2',
                            itemId: 'tabProg',
                            title: 'Visualização Painel',
                            autoScroll: true
                        }]
                    })]
                });
    What I want to do is, when mouseover on collapsed west-region (after user clicks the collapse button), it acts the same way as when I click on it (not in the expand button, but in the collapsed region area).

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      1  

    Default


    Oh, so nothing to do with accordion then.

    OK, you'll have to hack the http://dev.sencha.com/deploy/dev/doc...rLayout.Region class.

    Add a mouseenter listener to the collapsedEl which calls slideOut, and a mouseleave listener which calls slideIn

  6. #6
    Sencha User
    Join Date
    Mar 2010
    Posts
    14
    Vote Rating
    0
    RenatoLombardo is on a distinguished road

      0  

    Default


    Just don't have a clue on how to do that... please help.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,508
    Vote Rating
    58
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      -1  

    Default


    What do you mean by "help"?

    Javascript lessons?

    You want me to write a plugin?

  8. #8
    Sencha User
    Join Date
    Mar 2010
    Posts
    14
    Vote Rating
    0
    RenatoLombardo is on a distinguished road

      0  

    Default


    Not a javascript lesson, or your plugin-writing time. Can you give me links with specific examples for your solution?
    Thanks in advance.

  9. #9
    Sencha User
    Join Date
    Dec 2012
    Posts
    44
    Vote Rating
    0
    kramal is an unknown quantity at this point

      1  

    Default


    in my case I did it :

    Code:
    container.query('form[id="'+fieldset.id+'"]')[0].expand();
    where
    1) container = your accordion panel
    2)by query i have got needed item on accordion
    3)by expand() i do what i want

Similar Threads

  1. accordion init component while collapsed
    By umit in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 29 Mar 2010, 1:16 AM
  2. auto collapsed accordion
    By nokia786 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 3 Feb 2009, 10:45 PM
  3. Accordion collapsed by default ?
    By srajakaruna in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 17 Sep 2008, 11:46 PM
  4. Accordion Layout with Zero Width Collapsed
    By jbaldwin in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 5 Sep 2008, 9:23 AM
  5. simulate an event button click
    By zeta28 in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 4 Jan 2008, 10:57 AM

Thread Participants: 2

Tags for this Thread