jQWidgets Forums

jQuery UI Widgets Forums Layouts Docking Removing a window breaks exportLayout

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Removing a window breaks exportLayout #30795

    Jazz
    Participant

    Hello jqWidgets gurus,

    I’m currently using jqxDocking and it’s being a bit of a pain. Basically, I have a bunch of windows that the user can chose to close. When a window is closed I send a signal to the server so it remembers that it’s closed and hence won’t load the window on a refresh.

    The problem is, that closing a window, then calling ‘exportLayout’ the closed window is still included in the layout. This means that on a page reload the layout throws an “Invalid JSON string” error alert which is annoying my users.

    I then tried calling a remove() on the window once it is closed, then calling ‘exportLayout’ which then returns for real invalid JSON. In my case:

    {"panel0": {"arms_widget":{"collapsed":false},"pms_widget":{"collapsed":false}},"panel1": {},"panel2": {"phonelist_widget":{"collapsed":false},"notification_widget":{"collapsed":false}},"floating":{"calendar_widget":{"x":"555.5px","y":"168px","width":"undefined","height":"undefined","collapsed":undefined}},"orientation": "horizontal"}

    The problem appears to be the “collapsed”:undefined at the end which is causing an error when I JSON.parse the string as ‘undefined’ it not a valid object.

    For starters, why is the window that I have removed still being included in the exported layout? Why is it considered ‘floating’ when it no longer even exists in the DOM?

    Also, why is this widget the ONLY widget in the jqWidgets suite that throws an alert? Ideally it would be nice if it just silently ignored any windows that don’t actually exist in the host DIV layout.

    Jamie

    Removing a window breaks exportLayout #30796

    Peter Stoev
    Keymaster

    Hi Jamie,

    Thank you for the feedback! We will investigate the reported behavior.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Removing a window breaks exportLayout #48967

    Jazz
    Participant

    Any updates on this at all? I’ve just hit the same problem again and need to know if there’s a workaround.

    Thanks.

    Jamie

    Removing a window breaks exportLayout #48989

    Peter Stoev
    Keymaster

    Hi Jamie,

    There are no updates about the Docking widget in the latest releases.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.