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!