mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
add_resize_handle: multiple span (resizeable) entries in widgets
On init() or get_widgets_from_DOM() new span entries are added to the widgets container.
This commit is contained in:
@@ -429,8 +429,11 @@
|
||||
* @return {HTMLElement} Returns instance of gridster Class.
|
||||
*/
|
||||
fn.add_resize_handle = function($w) {
|
||||
var append_to = this.options.resize.handle_append_to;
|
||||
$(this.resize_handle_tpl).appendTo( append_to ? $(append_to, $w) : $w);
|
||||
var $append_to = this.options.resize.handle_append_to ? $(this.options.resize.handle_append_to, $w) : $w;
|
||||
|
||||
if ( ($append_to.children("span[class~='" + this.resize_handle_class + "']")).length == 0 ) {
|
||||
$(this.resize_handle_tpl).appendTo( $append_to );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user