diff --git a/README.md b/README.md index f1f90f2a98..2d3bab3918 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,14 @@ **NodeBB** is a robust Node.js driven forum built on a redis database. It is powered by web sockets, and is compatible down to IE8. * [NodeBB Homepage](http://www.nodebb.org/ "NodeBB") +* [Demo & Meta Discussion](http://try.nodebb.org) +* [Join us on IRC](https://kiwiirc.com/client/irc.freenode.net/nodebb) - #nodebb on Freenode * [Follow on Twitter](http://www.twitter.com/NodeBB/ "NodeBB Twitter") * [Like us on Facebook](http://www.facebook.com/NodeBB/ "NodeBB Facebook") -* [Join us on IRC](https://kiwiirc.com/client/irc.freenode.net/nodebb) - #nodebb on Freenode - + - + ## How can I follow along/contribute? diff --git a/package.json b/package.json index c7bd713f8e..e9244ea8db 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nodebb", "license": "GPLv3 or later", "description": "NodeBB Forum", - "version": "0.0.6", + "version": "0.0.7", "homepage": "http://www.nodebb.org", "repository": { "type": "git", @@ -42,7 +42,7 @@ "validator": "~1.5.1" }, "optionalDependencies": { - "hiredis" : "~0.1.15" + "hiredis": "~0.1.15" }, "bugs": { "url": "https://github.com/designcreateplay/NodeBB/issues" diff --git a/public/src/forum/admin/users.js b/public/src/forum/admin/users.js index 289adafa3c..4f9ba9dc88 100644 --- a/public/src/forum/admin/users.js +++ b/public/src/forum/admin/users.js @@ -18,33 +18,10 @@ } function updateUserButtons() { - - jQuery('.admin-btn').each(function(index, element) { - var adminBtn = $(element); - var uid = getUID(adminBtn); - - if (isUserAdmin(adminBtn)) - adminBtn.addClass('btn-success'); - else - adminBtn.removeClass('btn-success'); - - if (uid === yourid) - adminBtn.addClass('disabled'); - }); - - jQuery('.delete-btn').each(function(index, element) { - var deleteBtn = $(element); - - if (isUserAdmin(deleteBtn)) - deleteBtn.addClass('disabled'); - else - deleteBtn.show(); - }); - jQuery('.ban-btn').each(function(index, element) { var banBtn = $(element); - - if (isUserAdmin(banBtn)) + var uid = getUID(banBtn); + if (isUserAdmin(banBtn) || uid === yourid) banBtn.addClass('disabled'); else if (isUserBanned(banBtn)) banBtn.addClass('btn-warning'); @@ -58,31 +35,6 @@ updateUserButtons(); - $('#users-container').on('click', '.admin-btn', function() { - var adminBtn = $(this); - var isAdmin = isUserAdmin(adminBtn); - var parent = adminBtn.parents('.users-box'); - var uid = getUID(adminBtn); - - if (isAdmin && uid != yourid) { - socket.emit('api:admin.user.removeAdmin', uid); - adminBtn.removeClass('btn-success'); - parent.find('.delete-btn').removeClass('disabled'); - parent.attr('data-admin', 0); - } else if (uid != yourid) { - bootbox.confirm('Do you really want to make "' + parent.attr('data-username') + '" an admin?', function(confirm) { - if (confirm) { - socket.emit('api:admin.user.makeAdmin', uid); - adminBtn.addClass('btn-success'); - parent.find('.delete-btn').addClass('disabled'); - parent.attr('data-admin', 1); - } - }); - } - - return false; - }); - $('#users-container').on('click', '.ban-btn', function() { var banBtn = $(this); var isAdmin = isUserAdmin(banBtn); diff --git a/public/src/templates.js b/public/src/templates.js index 2e4faffc21..82c0438b05 100644 --- a/public/src/templates.js +++ b/public/src/templates.js @@ -124,47 +124,40 @@ var template_data = null; - (function () { - var timestamp = new Date().getTime(); //debug - - if (!templates[tpl_url]) { - jQuery.get(RELATIVE_PATH + '/templates/' + tpl_url + '.tpl?v=' + timestamp, function (html) { - var template = function () { - this.toString = function () { - return this.html; - }; - } + var timestamp = new Date().getTime(); //debug + + if (!templates[tpl_url]) { + jQuery.get(RELATIVE_PATH + '/templates/' + tpl_url + '.tpl?v=' + timestamp, function (html) { + var template = function () { + this.toString = function () { + return this.html; + }; + } - template.prototype.parse = parse; - template.prototype.html = String(html); - template.prototype.blocks = {}; + template.prototype.parse = parse; + template.prototype.html = String(html); + template.prototype.blocks = {}; - templates[tpl_url] = new template; + templates[tpl_url] = new template; - parse_template(); - }); - } else { parse_template(); - } - - }()); - - (function () { - jQuery.get(RELATIVE_PATH + '/api/' + api_url, function (data) { + }); + } else { + parse_template(); + } - if (!data) { - ajaxify.go('404'); - return; - } + jQuery.get(RELATIVE_PATH + '/api/' + api_url, function (data) { - template_data = data; - parse_template(); - }).fail(function (data) { - template_data = {}; - parse_template(); - }); - }()); + if (!data) { + ajaxify.go('404'); + return; + } + template_data = data; + parse_template(); + }).fail(function (data) { + app.alertError("Can't load template data!"); + }); function parse_template() { if (!templates[tpl_url] || !template_data) return; diff --git a/public/templates/admin/groups.tpl b/public/templates/admin/groups.tpl index a31c507040..2637bfedc2 100644 --- a/public/templates/admin/groups.tpl +++ b/public/templates/admin/groups.tpl @@ -90,8 +90,7 @@
diff --git a/public/templates/admin/header.tpl b/public/templates/admin/header.tpl index 3a2c7b4768..72469a018a 100644 --- a/public/templates/admin/header.tpl +++ b/public/templates/admin/header.tpl @@ -58,6 +58,9 @@