I’ve started using the dashboard plugin which is demoed here – http://www.gxdeveloperweb.com/dashboardplugin/demo/dashboard.html
I’m struggling with the documentation. Primarily on how to save dashboard configurations altered by the enduser.
In the documentation, it tells you how to do a “dashboardStateChange”:
dashboard.element.trigger("dashboardStateChange",{"stateChange":"widgetAdded","widget":widget});
But I don’t really understand where this is to go within the dashboard setup, and how you use this to save the changes. I thought I could could access dashboardStateChange from within the DOM when something happens, but even failing to understand how this is done.
Has anyone got any tips on saving the dashboard whenever its state has changed? I would like it to talk to a php script which saves the dashboard setup.
Unfortunately there aren’t any great tutorials on this sort of functionality.
Thanks!
I don’t know if this question is still of interest but I’ve been using this plugin for quite a while and it’s actually quite easy to use.
Pretty much all of the answer can be found in the example that comes with the plugin and to your problem you might want to have a look at the following example code that I use to make the current layout of the dashboard persistent on the server.
Please note that “saveID” is the ID of a Save button and “saveConfiguration” is the URL that save the layout on the server.