EasyUI Forum
May 07, 2024, 02:02:59 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Adapt the messager window size to the content  (Read 8464 times)
mapner
Jr. Member
**
Posts: 63


View Profile
« on: November 22, 2013, 04:55:29 AM »

Hi,

How to adapt de messager window size to the content?
I use this to show a text with many lines (example: "line 1...<br> line2....<br> line3....<br> line4....<br>")

Code:
	$.messager.show({
title:'Warning! Errors!',
msg:result.msg,
showType:'show',
style:{
right:'',
top:document.body.scrollTop+document.documentElement.scrollTop,
bottom:''
}
});

thanks
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 22, 2013, 10:22:22 PM »

Add 'width' and 'height' properties to customize the window size.
Code:
$.messager.show({
title:'Warning! Errors!',
msg:'line 1...<br> line2....<br> line3....<br> line4....<br>',
showType:'show',
width:300,
height:150,
style:{
right:'',
top:document.body.scrollTop+document.documentElement.scrollTop,
bottom:''
}
});
Logged
mapner
Jr. Member
**
Posts: 63


View Profile
« Reply #2 on: November 23, 2013, 03:09:52 PM »

stworthy,

Thanks for your answer. I use the messager component for display the result of the remote validation.
This send a text with multiples error messages in multiples lines.
What is the best way for show this type of information ?

Regards
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!