From 97ea98ed3f0f8e503f6c95de0f56ebd7b71d000a Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 6 Jun 2013 11:01:14 -0400 Subject: [PATCH] topics: reply button in mobile menu + icon --- public/src/modules/mobileMenu.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/public/src/modules/mobileMenu.js b/public/src/modules/mobileMenu.js index 2880e26464..c21bc5bed9 100644 --- a/public/src/modules/mobileMenu.js +++ b/public/src/modules/mobileMenu.js @@ -65,15 +65,25 @@ define(function() { mobileMenu.onNavigate = function() { - var cid = templates.get('category_id'); + var cid = templates.get('category_id'), + tid = templates.get('topic_id'); if (cid) { postBtn.style.display = 'inline-block'; postBtn.onclick = function() { require(['composer'], function(cmp) { - cmp.push(0, cid); //todo check if in post + cmp.push(0, cid); }); }; + postBtn.children[0].className = 'icon-plus icon-2x'; + } else if (tid) { + postBtn.style.display = 'inline-block'; + postBtn.onclick = function() { + require(['composer'], function(cmp) { + cmp.push(tid); + }); + }; + postBtn.children[0].className = 'icon-reply icon-2x' } else { postBtn.style.display = 'none'; }