Results 1 to 3 of 3

Thread: loadMsg position

  1. #1
    Sencha Premium Member milestonebass's Avatar
    Join Date
    Dec 2009
    Location
    Melbourne, Australia
    Posts
    28

    Question loadMsg position

    Is it possible for the loadMsg to be positioned near the top of the loadMask, instead of center aligned?

    How so?

    Thanks.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    You would have to override Ext.Element.mask to not call maskMsg.center.

  3. #3
    Sencha Premium Member milestonebass's Avatar
    Join Date
    Dec 2009
    Location
    Melbourne, Australia
    Posts
    28

    Smile How to Manually Position!

    Thanks for your guidance Condor, it is a good approach to solving this issue.

    I'm sure this is a common problem, so here's I resolved it:

    Added the override as below:
    Code:
    Ext.Element.prototype.mask = function(msg, msgCls) {
        var me  = this,
            dom = me.dom,
            dh  = Ext.DomHelper,
            el,
            mask,
            XMASKEDRELATIVE = 'x-masked-relative',
            XMASKED = 'x-masked',
            EXTELMASKMSG = "ext-el-mask-msg",
            data = Ext.Element.data;
    
        if (!/^body/i.test(dom.tagName) && me.getStyle('position') == 'static') {
            me.addClass(XMASKEDRELATIVE);
        }
        if (el = data(dom, 'maskMsg')) {
            el.remove();
        }
        if (el = data(dom, 'mask')) {
            el.remove();
        }
    
        mask = dh.append(dom, {cls : "ext-el-mask"}, true);
        data(dom, 'mask', mask);
    
        me.addClass(XMASKED);
        mask.setDisplayed(true);
    
        if (typeof msg == 'string') {
            var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true);
            data(dom, 'maskMsg', mm);
            mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG;
            mm.dom.firstChild.innerHTML = msg;
            mm.setDisplayed(true);
            //stop call to center so we can manually position
            //mm.center(me);
        }
    
    
        if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') {
            mask.setSize(undefined, me.getHeight());
        }
    
        return mask;
    };
    Manually positioned the mask message by modifying the following style class:
    Code:
    .ext-el-mask-msg

Similar Threads

  1. page position
    By asedmaloch in forum Ext GWT: Discussion
    Replies: 2
    Last Post: 8 Sep 2009, 9:45 AM
  2. Position Anchor Layout (anchor your component's position and size to their container)
    By tiago.silva in forum Ext 2.x: User Extensions and Plugins
    Replies: 1
    Last Post: 12 Jan 2009, 7:29 PM
  3. Resizable position
    By cesarwbr in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 8 Sep 2008, 5:25 AM
  4. loadMsg Mask.
    By althulus in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 3 Jan 2008, 12:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •