|
Title: How to get an active window and close in easyui desktop extension? Post by: Alfred on February 24, 2019, 03:41:15 AM How do I close an active dialog in easyui desktop. I know it is possible to close it by its ID but I want to close just the active window using js code. This was we can close the active window by using keyboard shortcut key. Please help. I want to know how I would get the active window (desktop dialog) using js.
The following code checks whether the dialog is created but it uses ID selector and does not particularly target active dialog. Code: $('#dlg').data('dialog')But how do I target an active dialog and not using ID selector. Thanks and regards, Alfred Title: Re: How to get an active window and close in easyui desktop extension? Post by: stworthy on February 24, 2019, 07:43:40 AM Please try this code to get all the opened windows.
Code: var apps = $('body').desktop('options').apps;Title: Re: How to get an active window and close in easyui desktop extension? Post by: Alfred on February 24, 2019, 08:05:05 AM Please can you give an example on how I would select the active window and close it.
Thanks. Title: Re: How to get an active window and close in easyui desktop extension? Post by: stworthy on February 25, 2019, 02:37:20 AM Call this code to close all the opened windows.
Code: var apps = $('body').desktop('options').apps;Title: Re: How to get an active window and close in easyui desktop extension? Post by: Alfred on February 25, 2019, 02:56:49 AM It works great. But I have one more request. Why does not it close the dialog created using function? I really appreciate your help.
Code: function singleCollect(){Thanks Alfred Title: Re: How to get an active window and close in easyui desktop extension? Post by: stworthy on February 25, 2019, 07:12:08 PM This code closes all the opened windows.
Code: var openedApps = $('body').desktop('getOpenedApps');Title: Re: How to get an active window and close in easyui desktop extension? Post by: Alfred on February 25, 2019, 09:31:31 PM Thanks it works..
|