[fix] Remove empty column if widget is found.

bzr revid: vda@tinyerp.com-20110428053143-42jsffz31m0p6i27
This commit is contained in:
vda (OpenERP)
2011-04-28 11:01:43 +05:30
parent cc9b3c76de
commit a455af2e78
@@ -164,10 +164,6 @@
});
} else {
// set the layout
// var currentLayout;
// if(typeof dashboard.layout != 'undefined') {
// currentLayout = dashboard.layout
// }
var currentLayout = (typeof dashboard.layout != 'undefined') ? dashboard.layout : getLayout(opts.json_data.layout);
dashboard.setLayout(currentLayout);
dashboard.loadWidgets(opts.json_data.data);
@@ -196,7 +192,10 @@
// add it to the column
wi.appendTo(column);
if(column.find('.emptycolumn').length)
column.find('.emptycolumn').remove();
dashboard.widgets[wid] = widget({
id: wid,
element: wi,
@@ -843,7 +842,6 @@
$.fn.dashboard.defaults = {
debuglevel:3,
json_data: {},
simple_data: {},
loadingHtml: '<div class="loading"><img alt="Loading, please wait" src="../themes/default/loading.gif" /><p>Loading...</p></div>',
emptyColumnHtml: 'Drag your widgets here',
widgetTemplate: 'widgettemplate',
@@ -935,4 +933,4 @@
// Provide some basic currying to the user
return data ? fn( data ) : fn;
};
})();
})();