mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
refactor(gridster): adding callback to add_widget function
This commit is contained in:
@@ -327,7 +327,7 @@
|
||||
* @return {HTMLElement} Returns the jQuery wrapped HTMLElement representing.
|
||||
* the widget that was just created.
|
||||
*/
|
||||
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size) {
|
||||
fn.add_widget = function(html, size_x, size_y, col, row, max_size, min_size, callback) {
|
||||
var pos;
|
||||
size_x || (size_x = 1);
|
||||
size_y || (size_y = 1);
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
this.drag_api.set_limits((this.cols * this.min_widget_width) + ((this.cols + 1) * this.options.widget_margins[0]));
|
||||
|
||||
return $w.fadeIn();
|
||||
return $w.fadeIn({complete: function () { if(callback) callback.call(this); }});
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user