From 5a8fa9b1f7bd53c4ae8c2b9f466621855ea04897 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 3 Mar 2014 11:07:37 -0500 Subject: [PATCH 01/14] fixed regression in groups management modal --- public/src/forum/admin/groups.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/public/src/forum/admin/groups.js b/public/src/forum/admin/groups.js index 970822fa73..811bc3c17b 100644 --- a/public/src/forum/admin/groups.js +++ b/public/src/forum/admin/groups.js @@ -24,9 +24,9 @@ define(function() { createSubmitBtn.on('click', function() { var submitObj = { - name: createNameEl.val(), - description: $('#create-group-desc').val() - }, + name: createNameEl.val(), + description: $('#create-group-desc').val() + }, errorEl = $('#create-modal-error'), errorText; @@ -91,8 +91,9 @@ define(function() { groupMembersEl.empty(); for (x = 0; x < numMembers; x++) { var memberIcon = $('
  • ') + .attr('data-uid', groupObj.members[x].uid) .append($('').attr('src', groupObj.members[x].picture)) - .append($('').attr('data-uid', groupObj.members[x].uid).html(groupObj.members[x].username)); + .append($('').html(groupObj.members[x].username)); groupMembersEl.append(memberIcon); } } @@ -152,7 +153,7 @@ define(function() { uid: uid }, function(err, data) { if (!err) { - groupMembersEl.append(userLabel.cloneNode(true)); + groupMembersEl.append(userLabel.clone(true)); } }); } @@ -164,10 +165,6 @@ define(function() { socket.emit('admin.groups.get', gid, function(err, groupObj){ if (!err){ - if (groupObj.name == 'Administrators' && uid == yourid){ - bootbox.alert('You cannot remove yourself from the Administrator Group'); - return; - } bootbox.confirm('Are you sure you want to remove this user?', function(confirm) { if (confirm){ socket.emit('admin.groups.leave', { From 64ee792013d4e4eb65448c78ff737fdd6ea0f1cf Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 3 Mar 2014 11:12:28 -0500 Subject: [PATCH 02/14] fixed #1154 --- public/src/forum/admin/categories.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 2bcc541cd8..455bc17d79 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -303,7 +303,9 @@ define(['uploader'], function(uploader) { } var numResults = results.length, trEl, - resultObj; + resultObj; + + groupsResultsEl.empty(); for(var x = 0; x < numResults; x++) { resultObj = results[x]; From dc8839b63c5244cf48c194b5150ff588990b84d8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 3 Mar 2014 12:47:40 -0500 Subject: [PATCH 03/14] updating validator to 3.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b3e7350f72..083db7f7a0 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "rss": "~0.2.0", "prompt": "~0.2.11", "uglify-js": "~2.4.0", - "validator": "~3.2.1", + "validator": "^3.4.0", "cron": "~1.0.1", "semver": "~2.2.1", "string": "~1.7.0", From 70299ea5c2a9ae0ed6cfe7b0d56775bd41e13ada Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Mon, 3 Mar 2014 14:46:50 -0500 Subject: [PATCH 04/14] better search result page --- public/src/forum/search.js | 6 +++--- public/templates/search.tpl | 36 +++++++++++++----------------------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/public/src/forum/search.js b/public/src/forum/search.js index 71ed19b69f..3d3c72389e 100644 --- a/public/src/forum/search.js +++ b/public/src/forum/search.js @@ -3,14 +3,14 @@ define(function() { Search.init = function() { var searchQuery = $('#topic-results').attr('data-search-query'); - $('.search-result-text').children().each(function() { - var text = $(this).text(); + + $('.search-result-text').each(function() { + var text = $(this).html(); var regex = new RegExp(searchQuery, 'gi'); text = text.replace(regex, '' + searchQuery + ''); $(this).html(text); }); - $('#search-form input').val(searchQuery); $('#mobile-search-form').off('submit').on('submit', function() { diff --git a/public/templates/search.tpl b/public/templates/search.tpl index 55a3b57443..393a6d7e04 100644 --- a/public/templates/search.tpl +++ b/public/templates/search.tpl @@ -13,7 +13,7 @@ -
  • ') @@ -348,12 +349,14 @@ define(['uploader'], function(uploader) { readMembers = modalEl.find('#category-permissions-read'), writeMembers = modalEl.find('#category-permissions-write'), moderatorsEl = modalEl.find('#category-permissions-mods'); + socket.emit('admin.categories.getPrivilegeSettings', cid, function(err, privilegeList) { var readLength = privilegeList['+r'].length, writeLength = privilegeList['+w'].length, modLength = privilegeList['mods'].length, liEl, x, userObj; + readMembers.html(''); if (readLength > 0) { for(x = 0; x < readLength; x++) { userObj = privilegeList['+r'][x]; @@ -365,10 +368,11 @@ define(['uploader'], function(uploader) { readMembers.append(liEl); } + writeMembers.html(''); if (writeLength > 0) { for(x=0;x').attr('data-uid', userObj.uid).html(''); + liEl = $('
  • ').attr('data-uid', userObj.uid).html(''); writeMembers.append(liEl); } } else { @@ -376,6 +380,7 @@ define(['uploader'], function(uploader) { writeMembers.append(liEl); } + moderatorsEl.html(''); if (modLength > 0) { for(x = 0;x < modLength; x++) { userObj = privilegeList['mods'][x]; @@ -384,7 +389,7 @@ define(['uploader'], function(uploader) { } } else { liEl = $('
  • ').addClass('empty').html('No moderators'); - moderatorsEl.appendChild(liEl); + moderatorsEl.append(liEl); } }); }; From 3c97ef6829e86686f469c17bec62bc939beda96c Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Tue, 4 Mar 2014 13:09:58 -0500 Subject: [PATCH 14/14] closes #1156 --- public/language/en_GB/reset_password.json | 1 + public/templates/reset.tpl | 4 ++-- public/templates/reset_code.tpl | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/language/en_GB/reset_password.json b/public/language/en_GB/reset_password.json index 468bfb0254..27537ffdf2 100644 --- a/public/language/en_GB/reset_password.json +++ b/public/language/en_GB/reset_password.json @@ -8,6 +8,7 @@ "new_password": "New Password", "repeat_password": "Confirm Password", "enter_email": "Please enter your email address and we will send you an email with instructions on how to reset your account.", + "enter_email_address": "Enter Email Address", "password_reset_sent": "Password Reset Sent", "invalid_email": "Invalid Email / Email does not exist!" } diff --git a/public/templates/reset.tpl b/public/templates/reset.tpl index bcc4d4d931..c7107315f0 100644 --- a/public/templates/reset.tpl +++ b/public/templates/reset.tpl @@ -8,7 +8,7 @@
    - [[reset_password:reset_password:enter_email]] + [[reset_password:enter_email]]
    @@ -21,7 +21,7 @@ [[reset_password:invalid_email]]
    - +
    diff --git a/public/templates/reset_code.tpl b/public/templates/reset_code.tpl index c3590746d4..19bce3ad1c 100644 --- a/public/templates/reset_code.tpl +++ b/public/templates/reset_code.tpl @@ -27,9 +27,9 @@ -
    +
    -
    +