Title: Portal Panel on top of other programmatically created panel Post by: Alfred on November 28, 2017, 06:45:15 AM I have the following code to create panel on the fly. Now I want to create panels on top of others. The following code replaces the existing panel.
Code: <script type="text/javascript"> Code: addpanel('link', 'Linkname') Code: remove() Code: remove() Code: remove Title: Re: Portal Panel on top of other programmatically created panel Post by: stworthy on November 29, 2017, 05:00:12 PM A possible way to solve this issue may be to hide the previous panel instead of placing a panel on the existing panel. When add a new panel, find the previous panel and hide it.
Title: Re: Portal Panel on top of other programmatically created panel Post by: Alfred on November 29, 2017, 09:43:40 PM Thanks stworthy,
That is what I am thinking now. You enlightened it. But as completely a newbie, I have no idea. Actually I was thinking about minimizing the panel once the new panel is added and open the minimized panel once the current panel is closed. I wonder if you could give me a sample code to work on; like hiding the previous panel once a panel is added and open the hidden panel when the current panel is closed. Thank you. Title: Re: Portal Panel on top of other programmatically created panel Post by: stworthy on November 30, 2017, 06:12:13 PM Here is the simple code that shows how to hide the previous panel when open a new panel.
Code: $('#pp').portal('add', { Title: Re: Portal Panel on top of other programmatically created panel Post by: Alfred on December 04, 2017, 02:14:01 AM Thank you very much. This works perfectly.
Title: Re: Portal Panel on top of other programmatically created panel Post by: Alfred on December 05, 2017, 01:08:49 AM It works perfectly well until I faced this problem. If we reopen the panel which is previously hidden from the function mentioned below here, there is a problem in the content. It appends the content. I want to use the function add(link,title); to open the panel. If the panel I am trying to open using the function is already existed (hidden or open), I want to show it if it is hidden and do nothing if it is open.
Code: add(link, title){ This is what I tried which appends the content: Code: if(p.panel('exists', title)){ Your support is amazing. Please help me. Thanks |