1. #31
    Touch Premium Member
    Join Date
    Jan 2011
    Location
    Lisbon, Portugal
    Posts
    192
    Vote Rating
    0
    jmaia is on a distinguished road

      0  

    Default


    You can go to Eirik's example page and check out the source code (do a view source). I did that and managed to get it to work perfectly.

    http://www.eirik.net/Ext/ux/window/Notification.html

    Regards,

    jm

  2. #32
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33
    Vote Rating
    0
    EmCy90 is on a distinguished road

      0  

    Default


    I have already done that i can not SMMJ_Dev's
    changes to work.

  3. #33
    Touch Premium Member
    Join Date
    Jan 2011
    Location
    Lisbon, Portugal
    Posts
    192
    Vote Rating
    0
    jmaia is on a distinguished road

      0  

    Default


    Oh, I see. I'm not using those changes in my code (just Eirik's original version), so I can't really be of much help. But do try and post what your problem is (i.e. what is happening on your side, and maybe someone can help).

    regards,

    jm

  4. #34
    Sencha User
    Join Date
    Oct 2011
    Posts
    7
    Vote Rating
    0
    dan5k is on a distinguished road

      0  

    Default getting error: dom.getBoundingClientRect is not a function

    getting error: dom.getBoundingClientRect is not a function


    Hello and thank you for this great plugin!
    Is anyone else getting this error in Firefox:
    "dom.getBoundingClientRect is not a function"
    which takes me to the line in ext-debug
    rect = dom.getBoundingClientRect();

    It may be related to the Notification window trying to get the browser dimensions....it is creating scrollbars on the page as well. Is anyone having problems like this?

    Thank you,
    Dan

  5. #35
    Sencha User
    Join Date
    Sep 2011
    Posts
    2
    Vote Rating
    0
    anton0825 is on a distinguished road

      0  

    Default


    Awesome!! It's work for me.
    Thank you so much, eirik.lorentsen

    I use like this.

    define standard nortificaiton
    Code:
    Ext.define('Real.view.shop.pc.universal.StandardNotification', {
        extend: 'Ext.ux.Notification',
        alias: 'widget.notification',
        corner: 'tr',
        manager: 'real',
        cls: 'ux-notification-light',
        iconCls: 'ux-notification-icon-information',
        stickOnClick: true,
        closable: true,
        title: 'information',
        html: '',
        slideInDelay: 800,
        slideDownDelay: 1500,
        resizable: false,
        slideInAnimation: 'elasticIn',
        slideDownAnimation: 'elasticIn',
        
        setErrorIcon: function() {
            this.iconCls = 'ux-notification-icon-error'
        },
        setTitle: function(title) {
            this.title = title;
        },
        setMessage: function(message) {
            this.html = message;
        },
        
        showMessage: function(message) {
            this.html = message;
            this.autoDestroyDelay = message.length * 150 + 3000;
            this.show();
        }
    })
    and then, use notificaiton one liner
    Code:
    Ext.widget('notification').showMessage('saved');

  6. #36
    Sencha User
    Join Date
    Oct 2011
    Posts
    7
    Vote Rating
    0
    dan5k is on a distinguished road

      0  

    Default


    figured it out.
    I had ...show(document)
    needed to just be ....show();

  7. #37
    Sencha User Simonici's Avatar
    Join Date
    Nov 2009
    Posts
    14
    Vote Rating
    0
    Simonici is on a distinguished road

      0  

    Default great work

    great work


    Great, you added what was missing in the ext3 extension.
    I really like the the ms-word-enhanced-Tooltip-look-alike styling (demo 2 first button)

  8. #38
    Sencha User eirik.lorentsen's Avatar
    Join Date
    Aug 2011
    Location
    Santiago, Chile
    Posts
    33
    Vote Rating
    7
    eirik.lorentsen is on a distinguished road

      0  

    Default


    jmaia:
    Nice suggestion adding center alignment. It shouldn't be too difficult to add it in a future version.

    Meanwhile it should be possible to fake it relatively easy by overriding the paddingX or paddingY properties. For example to align the notification 'bc' you poll the manager's width add the notification's width then divide by two. Using the result as the paddingX value and 'bl' as corner when creating the notifications should center them.

  9. #39
    Touch Premium Member
    Join Date
    Jan 2011
    Location
    Lisbon, Portugal
    Posts
    192
    Vote Rating
    0
    jmaia is on a distinguished road

      0  

    Default


    Hi Eirik,

    That's cool, I will try to implement it that way, as soon as I get a little free time from the project I'm working at.

    Thanks for the tip.

    Regards,

    Joao Maia

  10. #40
    Touch Premium Member
    Join Date
    Jan 2011
    Location
    Lisbon, Portugal
    Posts
    192
    Vote Rating
    0
    jmaia is on a distinguished road

      0  

    Default


    Hello again Eirik,

    Managed to do it following your tip, but the calculations I did for the padding were the following:

    Code:
    var centerPadding = (Ext.getBody().getViewSize().width - notificationBox.width) / 2;
    notificationBox.paddingX = centerPadding;


    Since I'm always using the browser window in my application and showing the notification windows from that browser window (and not from a child component such as a panel), this works. But I would like to know how to do it from a child panel.

    Anyway, thanks for your help !


    Regards,

    Joao Maia