EasyUI Forum
May 08, 2024, 07:42:22 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: ComboTree - Set the zIndex of its panel  (Read 7178 times)
amir-t
Newbie
*
Posts: 48


View Profile
« on: February 23, 2014, 09:06:27 AM »

Hi,
When i'm creating a comboTree it has an inner panel component which is appended to the html's body.
I have a problem when using the comboTree inside an external modal window, where the z-index value of the modal window (10000) is greater than the comboTree's panel div, and therefore the panel is not displaying when pressing the arrow button of the comboTree.
Is there a way to set the zIndex of the comboTree's panel div?

i've tried this following code, after the combotree is created:
Code:
var p=$(this).combotree('panel');
p.panel('panel').css('z-index', 20000);

But the problem is that when the combotree is loaded in browser,
when i'm trying to open its panel, my z-index is being overridden  and changed to 9001 (i noticed that the default z-index of easy ui window is 9000, so i guess its related in some way).

I actually need to change the z-Index of the combotree's panel in a way that it won't be changed by the comboTree's inside code, maybe by setting some property which the comboTree code will use.

How can i manage this ? is there another solution for this issue?

Thanks in advance.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 23, 2014, 05:34:17 PM »

When the drop-down panel display, it will use the next z-index value greater than the value that window used. Thus it will always stay on top of window. If you want to manually set the z-index value of drop-down panel, please call jquery's css method in 'onShowPanel' event.
Code:
$('#ct').combotree({
onShowPanel:function(){
$(this).combotree('panel').panel('panel').css('zIndex', 20000);
}
})
Logged
amir-t
Newbie
*
Posts: 48


View Profile
« Reply #2 on: February 24, 2014, 02:53:05 AM »

Thanks Smiley
it works.
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!