diff --git a/public/language/en_GB/pages.json b/public/language/en_GB/pages.json index 9fc75d3d2b..10a7ef070b 100644 --- a/public/language/en_GB/pages.json +++ b/public/language/en_GB/pages.json @@ -8,6 +8,7 @@ "user.edit": "Editing \"%1\"", "user.following": "People %1 Follows", "user.followers": "People who Follow %1", + "user.posts": "Posts made by %1", "user.favourites": "%1's Favourite Posts", "user.settings": "User Settings" } \ No newline at end of file diff --git a/public/src/app.js b/public/src/app.js index 836748641f..f7734ab588 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -15,6 +15,9 @@ var socket, url: RELATIVE_PATH + '/api/config', success: function (data) { config = data; + + exposeConfigToTemplates(); + if(socket) { socket.disconnect(); setTimeout(function() { @@ -591,13 +594,17 @@ var socket, }); createHeaderTooltips(); - - templates.setGlobal('relative_path', RELATIVE_PATH); - templates.setGlobal('usePagination', config.usePagination); - templates.setGlobal('topicsPerPage', config.topicsPerPage); - templates.setGlobal('postsPerPage', config.postsPerPage); }); + function exposeConfigToTemplates() { + $(document).ready(function() { + templates.setGlobal('relative_path', RELATIVE_PATH); + for(var key in config) { + templates.setGlobal('config.' + key, config[key]); + } + }); + } + function createHeaderTooltips() { $('#header-menu li i[title]').each(function() { $(this).parents('a').tooltip({ diff --git a/public/src/forum/login.js b/public/src/forum/login.js index 4c8b3a0128..1f4df45ea6 100644 --- a/public/src/forum/login.js +++ b/public/src/forum/login.js @@ -18,23 +18,23 @@ define(function() { url: RELATIVE_PATH + '/login', data: loginData, success: function(data, textStatus, jqXHR) { + $('#login').html('Redirecting...'); + if(!app.previousUrl) { + app.previousUrl = '/'; + } - if (!data.success) { - $('#login-error-notify').show(); - $('#login').removeAttr('disabled').html('Login'); + if(app.previousUrl.indexOf('/reset/') !== -1) { + window.location.replace(RELATIVE_PATH + "/?loggedin"); } else { - $('#login').html('Redirecting...'); - if(!app.previousUrl) { - app.previousUrl = '/'; - } - - if(app.previousUrl.indexOf('/reset/') != -1) - window.location.replace(RELATIVE_PATH + "/?loggedin"); - else + var index = app.previousUrl.indexOf('#'); + if(index !== -1) { + window.location.replace(app.previousUrl.slice(0, index) + '?loggedin' + app.previousUrl.slice(index)); + } else { window.location.replace(app.previousUrl + "?loggedin"); - - app.loadConfig(); + } } + + app.loadConfig(); }, error: function(data, textStatus, jqXHR) { $('#login-error-notify').show(); diff --git a/public/templates/admin/groups.tpl b/public/templates/admin/groups.tpl index bd21db2b9f..39967ad648 100644 --- a/public/templates/admin/groups.tpl +++ b/public/templates/admin/groups.tpl @@ -10,12 +10,12 @@

{groups.name}

{groups.description}

+
- -
+
-
-
-
Active Users socket connections
-
-
-
-
-
-
+
Updates
@@ -33,4 +25,12 @@
+
+
+
Active Users socket connections
+
+
+
+
+
\ No newline at end of file diff --git a/public/templates/category.tpl b/public/templates/category.tpl index 36c5bfa393..7489279134 100644 --- a/public/templates/category.tpl +++ b/public/templates/category.tpl @@ -86,14 +86,14 @@ - +
- + diff --git a/public/templates/header.tpl b/public/templates/header.tpl index aad9c657ab..c84294f8e5 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -14,6 +14,10 @@ + + + + @@ -31,12 +35,6 @@ } }); - - - - - - diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index c6eeaeb2df..4666bc639e 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -214,14 +214,14 @@
- +
- +