EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: bakkers on November 04, 2015, 11:51:36 PM



Title: $.messager.alert and z-index
Post by: bakkers on November 04, 2015, 11:51:36 PM
Hello

I have a problem with a $.messager.alert and z-index.

I have opened up a easyui-window and from that windows i need to show a messager.alert, but the messager.alert gets a z-index behind the easyui-window. I can't figure out how to change that.

See the picture to get a idea of what i mean :)

(http://www.nemmehjemmesider.dk/aspuploader/savefiles/279/94633messageAlert.png)


Title: Re: $.messager.alert and z-index
Post by: aswzen on November 05, 2015, 12:55:58 AM
try this bro

Code:
$.messager.alert({
     width:'200px',
     title:'Warning',
     content:'Warning to everybody oh yea',
     modal:true,
     zIndex:99999
});


Title: Re: $.messager.alert and z-index
Post by: bakkers on November 05, 2015, 01:28:38 AM
try this bro

Code:
$.messager.alert({
     width:'200px',
     title:'Warning',
     content:'Warning to everybody oh yea',
     modal:true,
     zIndex:99999
});

That does the same thing, gets placed behind the window, and it actually gets z-index : 9002 so i think the script changes it somehow


Title: Re: $.messager.alert and z-index
Post by: aswzen on November 05, 2015, 01:38:22 AM
which version of your easyui?

try to reduce the parent window zIndex..
Code:
$('#win').window({
    title: 'Kopier Fravaer',
    width:600,
    height:400,
    modal:false,
    zIndex:9000
});

function openWarning(){
$.messager.alert({
     width:'200px',
     title:'Warning',
     content:'Warning to everybody oh yea',
     modal:true,
     zIndex:99999
});
}


Title: Re: $.messager.alert and z-index
Post by: bakkers on November 05, 2015, 03:51:01 AM
I'm using EasyUI 1.4.2

And if i change the zIndex of the window it stops working properly. And if i manuelly change the message.alert to a zIndex bigger then the windows the message.alert goes gray.

Maybe it's not ment to work together.


Title: Re: $.messager.alert and z-index
Post by: aswzen on November 05, 2015, 04:10:31 AM
try to update with latest version :)


Title: Re: $.messager.alert and z-index
Post by: bakkers on November 05, 2015, 04:38:41 AM
I just tried the latest version and it didn't help  ???


Title: Re: $.messager.alert and z-index
Post by: bakkers on November 06, 2015, 01:02:32 AM
I found out a way to make it work.

If i click on the window to select it, before i open the alert, it works, the only problem is that i manually have to double tap the header on the window to select it.

So how do i select the window through script so it's done automatically

(http://www.nemmehjemmesider.dk/aspuploader/savefiles/279/94898messageAlert.png)


Title: Re: $.messager.alert and z-index
Post by: jarry on November 06, 2015, 01:18:35 AM
Please refer to http://jsfiddle.net/fy1e57y9/. It works fine.


Title: Re: $.messager.alert and z-index
Post by: bakkers on November 06, 2015, 01:18:51 AM
I now found the right solution. I just moved the $('#popUpForm').window('open');   to a later stage in the process and now it's selected and the zIndex works :)