EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: mapner on November 22, 2013, 04:55:29 AM



Title: Adapt the messager window size to the content
Post by: mapner 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


Title: Re: Adapt the messager window size to the content
Post by: stworthy 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:''
}
});


Title: Re: Adapt the messager window size to the content
Post by: mapner 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