Dashboard plugin - add new widget error
Hi there,
Has anyone successfully got this plugin working well with saving the current dashboard state on the server side?
I added/set the 'stateChangeUrl' option, which works fine when moving the default widgets around. But when I click to add a new widget, I get the following error in my firebug console:
- dashboard.getWidget($(this).attr("id")) is null
- r+= (dashboard.getWidget($(this).attr("id"))).serialize();
I've pretty much got the dashboard set up as per the examples, with this code here for adding a widget:
- // binding for a widgets is added to the dashboard
- dashboard.element.live('dashboardAddWidget',function(e, obj){
- var widget = obj.widget;
- dashboard.addWidget({
- "id":startId++,
- "title":widget.title,
- "url":widget.url,
- "metadata":widget.metadata
- }, dashboard.element.find('.column:first'));
- });
I even tried changing the widget id to
"id":widget.id, but didn't work.
Any ideas?