EasyUI Forum
May 12, 2024, 03:36:51 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: check if window is open  (Read 6319 times)
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« on: February 13, 2015, 09:55:01 AM »

Hello,

How can I find if a non-modal window is currently in open state? The window may or may not have the focus.

I am wanting this to update the content the window (by reopening it) if it is already open.

Thanks.
Logged
yamilbracho
Jr. Member
**
Posts: 64


View Profile Email
« Reply #1 on: February 13, 2015, 06:33:56 PM »

Just an idea....
Subclass Window class and add an instance variable, say openFlag, then overwrite onOpen, setting openFlag to true and onClose, setting openFlag to false

HTH,
Yamil
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 on: February 13, 2015, 09:04:54 PM »

The 'closed' option can indicate whether the window is closed.
Code:
var opts = $('w').window('options');
console.log(opts.closed);
Logged
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« Reply #3 on: February 16, 2015, 09:12:32 AM »

The 'closed' option solves the issue! Nice to know that this option is updated on window close/open. Thanks very much.
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!