mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 17:00:24 +01:00
fixes #2782
This commit is contained in:
@@ -31,15 +31,19 @@ define('admin/extend/widgets', function() {
|
|||||||
connectToSortable: ".widget-area"
|
connectToSortable: ".widget-area"
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#widgets .available-containers .containers > [data-container-html]').draggable({
|
$('#widgets .available-containers .containers > [data-container-html]')
|
||||||
helper: function(e) {
|
.draggable({
|
||||||
var target = $(e.target);
|
helper: function(e) {
|
||||||
target = target.attr('data-container-html') ? target : target.parents('[data-container-html]');
|
var target = $(e.target);
|
||||||
|
target = target.attr('data-container-html') ? target : target.parents('[data-container-html]');
|
||||||
|
|
||||||
return target.clone().addClass('block').width(target.width()).css('opacity', '0.5');
|
return target.clone().addClass('block').width(target.width()).css('opacity', '0.5');
|
||||||
},
|
},
|
||||||
distance: 10
|
distance: 10
|
||||||
});
|
})
|
||||||
|
.each(function() {
|
||||||
|
$(this).attr('data-container-html', $(this).attr('data-container-html').replace(/\\\{([\s\S]*?)\\\}/, '{$1}'));
|
||||||
|
});
|
||||||
|
|
||||||
$('#widgets .widget-area').sortable({
|
$('#widgets .widget-area').sortable({
|
||||||
update: function (event, ui) {
|
update: function (event, ui) {
|
||||||
|
|||||||
Reference in New Issue
Block a user