EasyUI Forum
May 03, 2024, 07:04:13 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: 1.4.2 messager plugin location problem  (Read 14369 times)
majorli
Newbie
*
Posts: 3


View Profile
« on: April 16, 2015, 11:59:10 PM »

before 1.4.2, i can easily change a messager window's location by chain a window() method after the messager() method like this:
Code:
$.messager.alert(title,msg,icon,fn).window({top:10,left:10});
now, when i upgrade my easyui to 1.4.2, it doesn't work. chain a window() method causes all buttons disappeared, and messager.progress() will throw a lot of exceptions.

here is my solution:
Code:
var prg = $.messager.progress({"title" : "Progress",	"msg" : "Progressing..."})[0]["parentElement"];
$(prg).css({"top" : 20, "left" : 20});
$(prg["nextSibling"]).css({"top" : 20, "left" : 20});
now it works, but it's so messy.
« Last Edit: April 17, 2015, 12:00:54 AM by majorli » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: April 17, 2015, 01:01:40 AM »

If you only want to move the message window, please call 'move' method instead.
Code:
$.messager.alert(title,msg,icon,fn).window('move', {top:10,left:10});
Logged
majorli
Newbie
*
Posts: 3


View Profile
« Reply #2 on: April 17, 2015, 02:54:32 AM »

I have tried window("move"), but i see the window "jump" to the new location, not "display" at there. What I want is to show the window there directly.
« Last Edit: April 17, 2015, 03:06:25 AM by majorli » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: April 17, 2015, 06:26:19 AM »

Please try the following code instead.
Code:
$.messager.alert({
title: 'title',
msg: 'msg',
icon: 'info',
left: 10,
top: 10
})
Logged
elcidofauy
Newbie
*
Posts: 11


View Profile
« Reply #4 on: July 01, 2015, 10:05:53 PM »

With using the "move" method I'm also getting the annoying jump screen whereby a lot of the times the message box is out of view when it should not be... I've tried using the following code:

Code:
$.messager.alert({
title: 'title',
msg: 'msg',
icon: 'info',
left: 10,
top: 10
})

However that results in an error stating "object:object, undefined" on the message box - with it not being displayed according to the specified top/left locations...

I would really, really appreciate it if this can be solved...

Many Thanks!!!
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #5 on: July 02, 2015, 01:27:48 AM »

An example is available from http://jsfiddle.net/wo4zux34/. It works fine.
Logged
elcidofauy
Newbie
*
Posts: 11


View Profile
« Reply #6 on: July 02, 2015, 06:10:39 AM »

Thanks for the jsfiddle example! I still cannot get it to work... Huh However I've now also upgraded to 1.4.2 and find no real improvement (although with Firefox browser its slightly better).

[Edit Note]:
(1) The message box still gets obscured depending if its on the top half or bottom half of the page.
(2) Depending on which browser the jump can be even more dramatic with chrome being the worse with it entirely obscuring the message box.


I reckon I've tried just about everything.... Now starting to think that perhaps the issue relates to the fact that I am using an iframe...
« Last Edit: July 02, 2015, 08:40:14 AM by elcidofauy » Logged
elcidofauy
Newbie
*
Posts: 11


View Profile
« Reply #7 on: July 02, 2015, 04:33:28 PM »

This is really weird but I managed to get the following working:

Code:
$.messager.alert({
title: 'title',
msg: 'msg',
icon: 'info',
left: 10,
top: 10
})

Its seems my browser cache was having some issues... I typed the following in my command prompt:

Code:
ipconfig /flushdns

Really happy to see this working !!!  Smiley
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!