fix bottom bar events

This commit is contained in:
barisusakli
2015-10-24 22:13:30 -04:00
parent adf413ddf3
commit e91b5f07b8

View File

@@ -10,7 +10,7 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'comp
renderMenu();
var topicContainer = $('[component="topic"]');
var topicContainer = $('.topic');
topicContainer.on('click', '[component="topic/delete"]', function() {
topicCommand('delete', tid);
@@ -97,7 +97,7 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'comp
};
function renderMenu() {
$('[component="topic"]').on('show.bs.dropdown', '.thread-tools', function() {
function render() {
var $this = $(this);
var dropdownMenu = $this.find('.dropdown-menu');
if (dropdownMenu.html()) {
@@ -115,7 +115,10 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'comp
});
});
});
});
}
$('[component="topic"]').on('show.bs.dropdown', '.thread-tools', render);
$('.bottom-post-bar').on('show.bs.dropdown', '.thread-tools', render);
}
function topicCommand(command, tid) {