1. #1
    Sencha User B@RT's Avatar
    Join Date
    May 2010
    Posts
    5
    Vote Rating
    0
    B@RT is on a distinguished road

      0  

    Default Ext.ux.Notification

    Ext.ux.Notification


    Port ExtJS2 Ext.ux.Notification for ExtJS4
    Original thread: http://www.sencha.com/forum/showthre...x.Notification

    Version 1.0

    Code:
    Ext.ux.NotificationMgr = {
        positions: []
    };
        
    Ext.define('Ext.ux.Notification', {
        extend: 'Ext.Window',
       
        initComponent: function(){
            Ext.apply(this, {
                iconCls: this.iconCls || 'x-icon-information',
                cls: 'x-notification',
                width: 200,
                autoHeight: true,
                plain: true,
                border:false,
                draggable: false,
                shadow:true,
                bodyStyle: 'text-align:center'
            });
            if(this.autoDestroy) {
                this.task = new Ext.util.DelayedTask(this.hide, this);
            } else {
                this.closable = true;
            }
            Ext.ux.Notification.superclass.initComponent.apply(this);
        },
        setMessage: function(msg){
            this.body.update(msg);
        },
        setTitle: function(title, iconCls){
            Ext.ux.Notification.superclass.setTitle.call(this, title, iconCls||this.iconCls);
        },
        onDestroy: function(){
            Ext.ux.NotificationMgr.positions.splice(this.pos);
            Ext.ux.Notification.superclass.onDestroy.call(this);   
        },
        cancelHiding: function(){
            this.addClass('fixed');
            if(this.autoDestroy) {
                this.task.cancel();
            }
        },
        afterShow: function(){
            
            Ext.ux.Notification.superclass.afterShow.call(this);
            Ext.fly(this.body.dom).on('click', this.cancelHiding, this);
            if(this.autoDestroy) {
                this.task.delay(this.hideDelay || 5000);
           }
        },
        
        beforeShow:function(){
            this.el.hide();
        },
        
        onShow: function(){
            var me = this;
            
            this.pos = 0;
            while(Ext.ux.NotificationMgr.positions.indexOf(this.pos)>-1)
                this.pos++;
            Ext.ux.NotificationMgr.positions.push(this.pos);
            
            this.el.alignTo(document, "br-br", [ -20, -20-((this.getSize().height+10)*this.pos) ]);
            this.el.slideIn('b', {
                duration: 500,
                listeners:{
                    afteranimate:{
                        fn: function() {
                              me.el.show();
                        }
                    }
                }
            });
            
            
        },
        onHide: function(){
            this.el.disableShadow();
            this.el.ghost("b", {duration: 500,remove: true});
             Ext.ux.NotificationMgr.positions.splice(this.pos);
        },
        focus: Ext.emptyFn
    });

  2. #2
    Sencha User
    Join Date
    May 2011
    Location
    Oslo
    Posts
    7
    Vote Rating
    0
    espeak is on a distinguished road

      0  

    Default Small bug?

    Small bug?


    I had to change:
    Code:
    setMessage: function(msg) {
        this.body.update(msg);
    },
    to
    Code:
    setMessage: function(msg) {
        this.update(msg);
    },
    To make this work.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    1
    Vote Rating
    0
    roshbelli is on a distinguished road

      0  

    Default


    Thank you very much..... It saved me a lot of efforts

Thread Participants: 2

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