EasyUI Forum
September 13, 2025, 02:13:39 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: change progress indicator of messager  (Read 9989 times)
JeroenNL
Newbie
*
Posts: 37


View Profile
« on: August 31, 2014, 07:28:45 AM »

Hello there,

I'd like to use the progress option of the messager plugin when loading data from my server. Messager shows a progress indicator in percentages. I have no way to determine what the progress actually is (what percentage) so I'd like to show a simple animated busyindicator gif instead. How can I achieve that with messager?

Cheers,
Jeroen
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 31, 2014, 03:31:02 PM »

Please use the alert message window to display an animating gif.
Code:
var s = '<span class="tree-loading" style="display:inline-block;width:16px;height:24px;vertical-align:middle"></span><span style="display:inline-block;line-height:24px;vertical-align:middle;"> Processing...</span>';
$.messager.alert('My Title',s);
Logged
JeroenNL
Newbie
*
Posts: 37


View Profile
« Reply #2 on: September 02, 2014, 12:03:32 PM »

Thanks stworthy, but using an alert window won't work for me because it has an OK button and can't be closed via code.

Can I use messager.show somehow and close the window via javascript?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: September 02, 2014, 05:29:52 PM »

Yes, you can use $.messager.show to display a animating gif.
Code:
var s = '<span class="tree-loading" style="display:inline-block;width:16px;height:24px;vertical-align:middle"></span><span style="display:inline-block;line-height:24px;vertical-align:middle;"> Processing...</span>';
var win = $.messager.show({
title:'My Title',
msg:s,
showType:'fade',
timeout:0,
style:{
right:'',
bottom:''
}
});
To close the message window, call 'close' method on this window.
Code:
win.window('close');
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!