topics: reply button in mobile menu + icon

v1.18.x
psychobunny 12 years ago
parent a8f6222824
commit 97ea98ed3f

@ -65,15 +65,25 @@ define(function() {
mobileMenu.onNavigate = function() { mobileMenu.onNavigate = function() {
var cid = templates.get('category_id'); var cid = templates.get('category_id'),
tid = templates.get('topic_id');
if (cid) { if (cid) {
postBtn.style.display = 'inline-block'; postBtn.style.display = 'inline-block';
postBtn.onclick = function() { postBtn.onclick = function() {
require(['composer'], function(cmp) { 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 { } else {
postBtn.style.display = 'none'; postBtn.style.display = 'none';
} }

Loading…
Cancel
Save