Baris Usakli 12 years ago
commit 67191b3a54

@ -31,9 +31,12 @@ var ajaxify = {};
app.enter_room('global');
var url = url.replace(/\/$/, "");
tpl_url = templates.get_custom_map(tpl_url);
var tpl_url = (url === '' || url === '/') ? 'home' : url.split('/')[0];
var tpl_url = templates.get_custom_map(url);
if (tpl_url == false) {
tpl_url = (url === '' || url === '/') ? 'home' : url.split('/')[0];
}
if (templates[tpl_url]) {
window.history.pushState({}, url, "/" + url);

@ -7,7 +7,6 @@ var templates = {};
templates.get_custom_map = function(tpl) {
if (config['custom_mapping'] && tpl) {
for (var pattern in config['custom_mapping']) {
console.log(pattern);
if (tpl.match(pattern)) {
return (config['custom_mapping'][pattern]);
}

@ -38,7 +38,7 @@
</li>
</ul>
<ul class="nav pull-right" id="right-menu">
<li><i class="icon-plus icon-2x" style="color:#999;"></i></li>
<!--<li><i class="icon-plus icon-2x" style="color:#999;"></i></li> fail. add this back later -->
<li><a href="/users" id="user_label"></a></li>
</ul>
</div>

@ -98,7 +98,7 @@ var RDB = require('./redis.js'),
callback({
'category_name' : category_id ? category_name : 'Recent',
'show_topic_button' : category_id ? 'show' : 'hidden',
'category_id': category_id,
'category_id': category_id || 0,
'topics': topics
});
@ -108,7 +108,7 @@ var RDB = require('./redis.js'),
callback({
'category_name' : category_id ? category_name : 'Recent',
'show_topic_button' : category_id ? 'show' : 'hidden',
'category_id': category_id,
'category_id': category_id || 0,
'topics': []
});
}

Loading…
Cancel
Save