jQuery UI Widgets › Forums › Dialogs and Notifications › Window › [x] Button-Size change
Tagged: javascript window, jqxwindow, window close, window open
This topic contains 5 replies, has 2 voices, and was last updated by ivailo 8 years, 9 months ago.
-
Author[x] Button-Size change Posts
-
Hello,
we have the close and the collapse Button on a window.
The collapse-Button should hide the window.
All windows which are hidden are displayed in a listbox.
After clicking on a listbox entry we expand and reopen the window. The window is displayed, but the size of the [x]-button changed.An example: http://jsfiddle.net/sy9tLned/
After clicking a second time on “expand the window” the size will be correct.Best regards
Hi Gat,
In this case expand/collapse functionality don’t seems to be needed.
So without it the behavior is as expected.
Here is a demo.Best Regards,
Ivailo IvanovjQWidgets Team
http://www.jqwidgets.comHi Ivailo,
I just tried you example, still the same behaviour. The link is the same as mine.
Best Regards
Hi ivailo,
I think you misunderstood our problem.
The close-button itself works right.
We just want to use the hide-feature on the collapse-button.
The Close-Button should always close the window.We are catching the events (‘close’ and ‘collapse’) like:
$('#newWindow'+id).on('close', function(event) { var item = $("#jqxListBox").jqxListBox('getItemByValue', id); $("#jqxListBox").jqxListBox('removeAt', item.index); } }); $('#newWindow'+id).on('collapse', function(event) { $('#newWindow'+id).jqxWindow('hide'); });
A hidden window can be displayed again after clicking on a listBox entry:
$('#jqxListBox').on('select', function (event) { var args = event.args; if (args) { var index = args.index; var item = args.item; var label = item.label; var value = item.value; if (!$('#'+label).jqxWindow('isOpen')) { $('#'+label).jqxWindow('expand'); //Without expand the Window is collapsed $('#'+label).jqxWindow('open'); //Must be after expand, otherwise it doesn't work } } });
Or is their away to prevent the collapse-Button from collapsing the window? It only should hide it, or is their a hide-button?
We need both features ‘hide’ and ‘close’ on different buttons.
Best Regards
Hi Gat,
In this case, probably this is the behavior what you need.
Best Regards,
Ivailo IvanovjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.