diff --git a/public/src/app.js b/public/src/app.js index a22b93749a..16414c8ca7 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -1,12 +1,10 @@ var socket, config, app = {}, - API_URL = null, - RELATIVE_PATH = null; + API_URL = null; + -// todo: cleanup,etc (function() { - RELATIVE_PATH = $('#relative_path').attr('value'); function loadConfig() { @@ -105,6 +103,8 @@ var socket, }); } + + // takes a string like 1000 and returns 1,000 app.addCommas = function(text) { return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); @@ -238,7 +238,7 @@ var socket, jQuery('document').ready(function() { - loadConfig(); + // On menu click, change "active" state var menuEl = document.querySelector('.nav'), @@ -260,7 +260,7 @@ var socket, addTouchEvents(); }); - + loadConfig(); function addTouchEvents() { diff --git a/public/templates/admin/header.tpl b/public/templates/admin/header.tpl index a1f0fd7693..e600daf0f6 100644 --- a/public/templates/admin/header.tpl +++ b/public/templates/admin/header.tpl @@ -3,7 +3,9 @@