diff --git a/public/src/client/category/tools.js b/public/src/client/category/tools.js index cdef7ea6d0..3e973c68a3 100644 --- a/public/src/client/category/tools.js +++ b/public/src/client/category/tools.js @@ -259,7 +259,7 @@ define('forum/category/tools', [ } app.loadJQueryUI(function () { var topicListEl = $('[component="category"]').filter(function (i, e) { - return !$(e).parents('[widget-area]').length; + return !$(e).parents('[widget-area],[data-widget-area]').length; }); topicListEl.sortable({ handle: '[component="topic/pinned"]', diff --git a/public/src/modules/topicList.js b/public/src/modules/topicList.js index f002665904..bd486d5adb 100644 --- a/public/src/modules/topicList.js +++ b/public/src/modules/topicList.js @@ -62,7 +62,7 @@ define('topicList', [ function findTopicListElement() { return $('[component="category"]').filter(function (i, e) { - return !$(e).parents('[widget-area]').length; + return !$(e).parents('[widget-area],[data-widget-area]').length; }); } diff --git a/public/src/widgets.js b/public/src/widgets.js index b543f08134..2ce59becb0 100644 --- a/public/src/widgets.js +++ b/public/src/widgets.js @@ -11,7 +11,7 @@ var locations = Object.keys(ajaxify.data.widgets); locations.forEach(function (location) { - var area = $('#content [widget-area="' + location + '"]'); + var area = $('#content [widget-area="' + location + '"],#content [data-widget-area="' + location + '"]').eq(0); if (area.length) { return; } @@ -23,9 +23,9 @@ html += widget.html; }); - if (location === 'footer' && !$('#content [widget-area="footer"]').length) { + if (location === 'footer' && !$('#content [widget-area="footer"],#content [data-widget-area="footer"]').length) { $('#content').append($('
')); - } else if (location === 'sidebar' && !$('#content [widget-area="sidebar"]').length) { + } else if (location === 'sidebar' && !$('#content [widget-area="sidebar"],#content [data-widget-area="sidebar"]').length) { if ($('[component="account/cover"]').length) { $('[component="account/cover"]').nextAll().wrapAll($('
')); } else if ($('[component="groups/cover"]').length) { @@ -33,11 +33,11 @@ } else { $('#content > *').wrapAll($('
')); } - } else if (location === 'header' && !$('#content [widget-area="header"]').length) { + } else if (location === 'header' && !$('#content [widget-area="header"],#content [data-widget-area="header"]').length) { $('#content').prepend($('
')); } - area = $('#content [widget-area="' + location + '"]'); + area = $('#content [widget-area="' + location + '"],#content [data-widget-area="' + location + '"]').eq(0); if (html && area.length) { area.html(html); area.find('img:not(.not-responsive)').addClass('img-responsive');