jQWidgets Forums

jQuery UI Widgets Forums Layouts Docking [Feature request] exportLayout – importLayout

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 12 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • wavetrex
    Participant

    Hello !

    These functions are wonderful as it allows me to save the state of a docking panel and reconstruct it after reloading the page.

    However, it has some flaws:

    – 1. Window heights of the docked windows are not saved/restored (Window sizes of the floating ones are saved however!)
    While “importing” can be emulated by manually setting each windows properties in the HTML before creating the docking, but exporting is complicated… (must take each window, determine it’s CSS properties, make calculations, etc…)

    – 2. The export is a JSON string… why not export/import a javascript object directly and allow the programmer to operate it after export, before import ?
    (I know I can do that with JSON.stringify and JSON.parse, but it’s a rather unnecessary step)

    For exemple, with an ajax request a JSON string that comes from the server is automatically decoded into JavaScript object by jQuery:

    $.get(“?action=get_docking_state”, {
    “layout”: 1
    }, function(x) {
    console.log(x); // <- "x" is already a JS object, not a string, it's parsed automatically…
    });

    Now I have to change it back to a string …

    (example: x_string = JSON.stringify(x); )

    then apply it to the docking widget:

    $('#docking').jqxDocking('importLayout', JSON.stringify(x));

    (and inside, importLayout method is changing it back to an object…)

    Thank you for any steps you might take in future versions to make jqWidgets even greater than it is !
    Wave

    p.s. Request 1 is rather important to me!


    Dimitar
    Participant

    Hello wavetrex,

    Thank you for your feedback. We have created a work item with your request and will take it into consideration.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.