EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Max Lamda on November 24, 2015, 09:05:17 AM



Title: Tabs Loading-Message
Post by: Max Lamda on November 24, 2015, 09:05:17 AM
How to I change the message which is displayed when the tabs add-function is called with an URL?

         $('#maintabs').tabs('add',{
            id: 'rectab-' + uni,
            border:false,
            title: 'rectab-' + uni,
            href: url,
            loadMsg: 'Daten werden vom Server geladen.',
            closable:true
         });

does not display the message.


Title: Re: Tabs Loading-Message
Post by: jarry on November 24, 2015, 07:08:30 PM
Please use the 'loadingMessage' property to display the loading message.


Title: Re: Tabs Loading-Message
Post by: arma on November 26, 2015, 04:07:29 AM
Hi Jarry,

Rather than displaying loadingMessage text, can i simply use one large animated icon only in the of tab content centered vertically and horizontally ?

Thanks.


Title: Re: Tabs Loading-Message
Post by: jarry on November 26, 2015, 11:57:35 PM
You can call 'showMask' method to display a centered message before loading the panel content, and then call 'hideMask' method to hide it after loaded the panel content successfully. These two methods are extended from http://www.jeasyui.com/forum/index.php?topic=3641.0

Code:
$('#tt').tabs('add',{
    id: 'rectab-',
    border:false,
    title: 'rectab-',
    href: url,
    loadingMessage: '',
    closable:true,
    onBeforeLoad: function(){
        $(this).panel('showMask','<div class="panel-loading">Daten werden vom Server geladen.</div>')
    },
    onLoad: function(){
        $(this).panel('hideMask')
    }
});