mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
Make widget headers clickable anywhere.
This commit is contained in:
@@ -46,8 +46,6 @@ define('admin/extend/widgets', function() {
|
||||
appendToggle(ui.item);
|
||||
},
|
||||
connectWith: "div"
|
||||
}).on('click', '.toggle-widget', function() {
|
||||
$(this).parents('.widget-panel').children('.panel-body').toggleClass('hidden');
|
||||
}).on('click', '.delete-widget', function() {
|
||||
var panel = $(this).parents('.widget-panel');
|
||||
|
||||
@@ -56,8 +54,10 @@ define('admin/extend/widgets', function() {
|
||||
panel.remove();
|
||||
}
|
||||
});
|
||||
}).on('dblclick', '.panel-heading', function() {
|
||||
$(this).parents('.widget-panel').children('.panel-body').toggleClass('hidden');
|
||||
}).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');
|
||||
}
|
||||
});
|
||||
|
||||
$('#widgets .save').on('click', saveWidgets);
|
||||
|
||||
Reference in New Issue
Block a user