[CLOSED] LoadMask

  1. #1

    [CLOSED] LoadMask

    Hello,

    Just curious if there is a way to have a common loading mask for all events on a form? And also, any recommendations on how to customize the loading mask? The gray background with the little box is a little annoying, wouldn't mind doing something with a message in the right corner.

    Cheers,
    Timothy
  2. #2

    RE: [CLOSED] LoadMask

    Hi Timothy,

    Unfortunately the LoadMask have no common settings(i mean settings for all mask). Each loading mask should be set individually. You can investigate Target, CustomTarget, Msg, MsgCls properties of EventMask in AjaxEvent. If you need my help with these properties then let me know. I wrote small sample which show custom mask:

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title></title>
        <script runat="server">
            protected void Button1_Click(object sender, AjaxEventArgs e)
            {
                this.Button1.Text = "some works on server done";
            }
        </script>
    <style type="text/css">
          
          div.botright{
            display:block;      
            position:absolute;
            bottom:0;
            right:0;
            width:105px;        
            height:105px;        
            background:#eee;
            border:1px solid #ddd;
          }
        </style>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server">
            </ext:ScriptManager>
            
            <ext:Button runat="server" ID="Button1" Text="Loading mask">
                <AjaxEvents>
                    <Click OnEvent="Button1_Click" 
                        Before="function(){#{maskDiv}.removeClass('x-hide-display');}"
                        Success="function(){#{maskDiv}.addClass('x-hide-display');}"
                        Failure="function(){#{maskDiv}.addClass('x-hide-display');}"
                     >
                        <EventMask  MinDelay="5000" ShowMask="false" />
                     </Click>
                </AjaxEvents>
            </ext:Button>
            
            <div id="maskDiv" class="botright x-hide-display">
                <%--the mask will be show 5 sec--%>
                <img src="8-1.gif" />
            
    
        </form>
    </body>
    </html>
    In attach the image from this sample (8-1.gif)

  3. #3

    RE: [CLOSED] LoadMask

    Hi Vlad,

    me too, I'm trying to customize loading panel, I copied and paste the code above, but I can't see any loading image.
    Maybe this is due to some updated code in the various versions, can you check it?

    Thank you a lot

    Matteo
  4. #4

    RE: [CLOSED] LoadMask

    Sorry... It was the function() call, I replaced

    Before="function(){#{maskDiv}.removeClass('x-hide-display');}"
    with

    Before="{#{maskDiv}.removeClass('x-hide-display');}"
    ...
    ...
    all warks fine

    Matteo
  5. #5

    RE: [CLOSED] LoadMask

    Hi Matteo,

    Now Before, Succes and Failure handlers don't require to wrap to function. Plus the now require ShowMask="true". Now it should be

    
                     <Click OnEvent="Button1_Click" 
                        Before="#{maskDiv}.removeClass('x-hide-display');"
                        Success="#{maskDiv}.addClass('x-hide-display');"
                        Failure="#{maskDiv}.addClass('x-hide-display');"
                     >
                        <EventMask ShowMask="true"  MinDelay="5000" ShowMask="false" />
                     </Click>

Similar Threads

  1. [CLOSED] LoadMask on an ext:FormPanel
    By ewgoforth in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 08, 2011, 1:55 PM
  2. [CLOSED] [0.8.1] LoadMask
    By cobiscorp in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 27, 2010, 3:23 PM
  3. LoadMask
    By Krisller in forum 1.x Help
    Replies: 0
    Last Post: Jun 10, 2010, 7:35 PM
  4. help with LoadMask
    By idrissb in forum 1.x Help
    Replies: 0
    Last Post: Sep 16, 2008, 3:48 AM
  5. [CLOSED] How do you use a LoadMask?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 09, 2008, 3:52 PM

Posting Permissions