mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 17:00:24 +01:00
Make widget headers clickable anywhere.
This commit is contained in:
@@ -46,8 +46,6 @@ define('admin/extend/widgets', function() {
|
|||||||
appendToggle(ui.item);
|
appendToggle(ui.item);
|
||||||
},
|
},
|
||||||
connectWith: "div"
|
connectWith: "div"
|
||||||
}).on('click', '.toggle-widget', function() {
|
|
||||||
$(this).parents('.widget-panel').children('.panel-body').toggleClass('hidden');
|
|
||||||
}).on('click', '.delete-widget', function() {
|
}).on('click', '.delete-widget', function() {
|
||||||
var panel = $(this).parents('.widget-panel');
|
var panel = $(this).parents('.widget-panel');
|
||||||
|
|
||||||
@@ -56,8 +54,10 @@ define('admin/extend/widgets', function() {
|
|||||||
panel.remove();
|
panel.remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).on('dblclick', '.panel-heading', function() {
|
}).on('mouseup', '.panel-heading', function(evt) {
|
||||||
|
if ( !( $(this).parents('.widget-panel').is('.ui-sortable-helper') || $(evt.target).closest('.delete-widget').length ) ) {
|
||||||
$(this).parents('.widget-panel').children('.panel-body').toggleClass('hidden');
|
$(this).parents('.widget-panel').children('.panel-body').toggleClass('hidden');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#widgets .save').on('click', saveWidgets);
|
$('#widgets .save').on('click', saveWidgets);
|
||||||
|
|||||||
Reference in New Issue
Block a user