From 9321e565ad124c78e2dfaf2662cdb49fbdf95d91 Mon Sep 17 00:00:00 2001 From: acardinale Date: Tue, 12 Jul 2016 14:56:24 +0200 Subject: [PATCH] Added new core component for topic with tid Added new core component for topic with a specific tid To use ```javascript var topicContainer = components.get('topic', 'tid', tid); ```javascript in a view with more topics / posts --- public/src/modules/components.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/src/modules/components.js b/public/src/modules/components.js index 29d1ba64a9..58773d9821 100644 --- a/public/src/modules/components.js +++ b/public/src/modules/components.js @@ -10,6 +10,9 @@ define('components', function() { return $('[component="topic/teaser"]'); } }, + 'topic': function(name, value) { + return $('[component="topic"][data-' + name + '="' + value + '"]'); + }, 'post': function(name, value) { return $('[component="post"][data-' + name + '="' + value + '"]'); }, @@ -63,4 +66,4 @@ define('components', function() { }; return components; -}); \ No newline at end of file +});