category and category/topic components; removed #topic-container selectors

This commit is contained in:
psychobunny
2015-03-19 13:56:12 -04:00
parent aeb7548a9d
commit 10eb617c6d
9 changed files with 54 additions and 43 deletions

View File

@@ -9,7 +9,7 @@ define('topicSelect', function() {
var topicsContainer;
TopicSelect.init = function(onSelect) {
topicsContainer = $('#topics-container');
topicsContainer = $('[component="category"]');
topicsContainer.on('selectstart', function() {
return false;
});
@@ -78,7 +78,7 @@ define('topicSelect', function() {
}
function getIndex(tid) {
return $('.category-item[data-tid="' + tid + '"]').index('#topics-container .category-item');
return components.get('category/topic', 'tid', tid).index('[component="category/topic"]');
}
return TopicSelect;