EasyUI Forum
May 21, 2024, 12:10:28 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: z-index on windows  (Read 13506 times)
glarsen
Newbie
*
Posts: 39


View Profile Email
« on: May 29, 2014, 12:14:39 PM »

Hi,

Clicking on a window header (on panel with other non-modal windows) brings it to the front.   Is it possible to extend this ability to other parts of the window (borders, other contents)?

Tried this but it's not catching any clicks:    $('.panel.window').on('click', function()

Thanks,
Gary
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 30, 2014, 08:41:12 AM »

Please try this:
Code:
$('div.window').click(function(){
$(this).children('div.window-body').window('open')
})
Logged
glarsen
Newbie
*
Posts: 39


View Profile Email
« Reply #2 on: May 30, 2014, 11:18:23 AM »

Hi,

That's not firing either.  Not a show stopper but if you have any other ideas I can try please let me know.

Thanks,
gary
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: May 30, 2014, 05:37:34 PM »

Please refer to this example http://jsfiddle.net/57B9J/. Clicking any area of a window will brings it to the front.
Logged
glarsen
Newbie
*
Posts: 39


View Profile Email
« Reply #4 on: May 31, 2014, 06:28:01 AM »

Thanks to the example. Must have done something wrong.

gary
Logged
glarsen
Newbie
*
Posts: 39


View Profile Email
« Reply #5 on: May 31, 2014, 08:12:46 AM »

Hi,

I didn't mention that the panel was in a layout, but that also worked using HTML.

Was able to reproduce the issue when creating the windows with JavaScript so I must be doing something wrong there.  Could you check for me?

http://jsfiddle.net/glarsen/Yd2pN/2/

Clicking the window header will display the window, but clicking the body does nothing.

Thanks,
gary
Logged
glarsen
Newbie
*
Posts: 39


View Profile Email
« Reply #6 on: May 31, 2014, 08:15:57 AM »

Hi again,

Also noticed that when a window title wraps it bleeds into the body.  It it possible to adjust the header height to fit?

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


View Profile Email
« Reply #7 on: May 31, 2014, 08:25:19 AM »

This example works fine.
http://jsfiddle.net/Yd2pN/3/
Logged
glarsen
Newbie
*
Posts: 39


View Profile Email
« Reply #8 on: May 31, 2014, 08:43:26 AM »

Sorry, forgot to add the click event. 

I must have something blocking clicks somewhere.

Thanks

Logged
glarsen
Newbie
*
Posts: 39


View Profile Email
« Reply #9 on: May 31, 2014, 08:55:51 AM »

I think it's a DOM order thing.  When I put .click at the top of the script the window clicks don't work.

http://jsfiddle.net/glarsen/Yd2pN/4/

The app creates windows dynamically from drop events onto the panel. How can hook up new windows to the .click event?

Sorry if this is some simple JQuery thing I don't know yet,
gary
Logged
glarsen
Newbie
*
Posts: 39


View Profile Email
« Reply #10 on: May 31, 2014, 09:04:51 AM »

Got it!

    $(document).on('click', 'div.window', function(){
      $(this).children('div.window-body').window('open')
    })


Thanks again for you help.
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!