1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Praveena Nalajala is on a distinguished road

      0  

    Default Unanswered: how to hide overlay up on clicking a button iside the overlay?

    Unanswered: how to hide overlay up on clicking a button iside the overlay?


    Hi Guys,
    I am new to Sencha Touch 2. In my application I am displaying a overlay and in my overlay there is a submit button I want to hide the overlay up on clicking the button not the out side...

  2. #2
    Sencha User
    Join Date
    Apr 2008
    Posts
    69
    Vote Rating
    0
    jonhobbs is on a distinguished road

      0  

    Default


    I asked the same question yesterday so you may find this thread useful...

    http://www.sencha.com/forum/showthre...n-button-click

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Praveena Nalajala is on a distinguished road

      0  

    Default


    I don't have another overlay I have only one overlay and there is a button inside that overlay up on clicking that button I need to hide the overlay. I tried 'this.overlay.hide()' in button handler but this is not working. here is my code
    Ext.define('Sencha.view.Myfavorites',
    {
    extend: 'Ext.Panel',
    xtype: 'myfavoritesCard',

    extend: 'Ext.navigation.View',

    config:
    {
    title: 'My Favorites',
    iconCls: 'user',
    html: 'My favorites page',
    styleHtmlContent: true,
    scrollable: false,
    cls: 'myfavorites',

    navigationBar:
    {
    ui: 'dark',
    items:
    [
    {
    xtype: 'button',
    text: 'Contact Sales',
    align: 'right',
    hidden: false,
    listeners:
    {
    tap: function()
    {
    if(!this.overlay)
    {
    this.overlay = Ext.Viewport.add
    (
    {
    xtype: 'panel',
    modal: true,
    hideOnMaskTap: true,
    showAnimaiton:
    {
    type: 'popIn',
    duration: 250,
    easing: 'ease-out'
    },
    hideAnimation:
    {
    type: 'popOut',
    duration: 250,
    easing: 'ease-out'
    },
    centered: true,
    width: Ext.os.deviceType == 'Phone' ? 260 : 300,
    height: Ext.os.deviceType == 'Phone' ? 220 : 300,
    styleHtmlContent:true,

    items:
    [
    {
    xtype: 'fieldset',
    title: 'Contact Us',

    items:
    [
    {
    xtype: 'textfield',
    label: 'Name',
    name: 'name'
    },
    {
    xtype: 'emailfield',
    label: 'Email',
    name: 'email'
    },
    {
    xtype: 'numberfield',
    label: 'Phone',
    name: 'phonenumber',
    height: 35
    }
    ]
    },
    {
    xtype: 'button',
    text: 'Submit',
    ui: 'confirm',

    // The handler is called when the button is tapped
    handler: function()
    {
    alert('hi');
    this.overlay.hide();

    }
    });
    }
    }
    ],
    scrollable: true
    }
    );
    }
    this.overlay.show();
    }
    }
    },
    ]
    },

    items:
    {
    title: 'My Favorites',
    padding: 10,
    xtype: 'list',
    itemTpl: '{title}',
    store: 'MoreCards',
    color: '#5e7685',

    listeners:
    {
    itemtap: function(list, index, item, record)
    {
    if(!this.picker)
    {
    this.picker=Ext.Viewport.add
    (
    {
    xtype: 'picker',
    slots:
    [
    {
    name: 'limited_speed',
    title: 'Speed',
    data:
    [
    {text: 'Laboratory', value: 50},
    {text: 'explosion proof', value: 50},
    {text: 'blood bank', value: 50},
    {text: 'Laboratory', value: 50},
    {text: 'explosion proof', value: 50},
    {text: 'blood bank', value: 50},
    ]
    }
    ]
    }
    );
    }
    this.picker.show();

    }
    }
    }
    }
    });

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar