diff --git a/.eslintrc b/.eslintrc
index 4f7d4e2413..ef9f48dedc 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -32,6 +32,9 @@
"no-prototype-builtins": "off",
"new-cap": "off",
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
+ "object-curly-newline": "off",
+ "no-restricted-globals": "off",
+ "function-paren-newline": "off",
"import/no-unresolved": "error",
// ES6
@@ -42,6 +45,7 @@
"no-var": "off",
"object-shorthand": "off",
"vars-on-top": "off",
+ "prefer-destructuring": "off",
// TODO
"import/no-extraneous-dependencies": "off",
diff --git a/package.json b/package.json
index eed7731493..19984ac8f6 100644
--- a/package.json
+++ b/package.json
@@ -19,27 +19,27 @@
"dependencies": {
"ace-builds": "^1.2.8",
"async": "2.5.0",
- "autoprefixer": "7.1.3",
+ "autoprefixer": "7.1.4",
"bcryptjs": "2.4.3",
- "benchpressjs": "^1.0.3",
- "body-parser": "^1.17.2",
+ "benchpressjs": "^1.1.0",
+ "body-parser": "^1.18.2",
"bootstrap": "^3.3.7",
"chart.js": "^2.6.0",
"colors": "^1.1.2",
- "compression": "^1.7.0",
+ "compression": "^1.7.1",
"connect-ensure-login": "^0.1.1",
"connect-flash": "^0.1.1",
"connect-mongo": "1.3.2",
"connect-multiparty": "^2.0.0",
- "connect-redis": "3.3.0",
+ "connect-redis": "3.3.2",
"cookie-parser": "^1.4.3",
"cron": "^1.2.1",
- "cropperjs": "^0.8.1",
+ "cropperjs": "^1.0.0",
"csurf": "^1.9.0",
"daemon": "^1.1.0",
- "express": "^4.15.4",
- "express-session": "^1.15.5",
- "express-useragent": "1.0.7",
+ "express": "^4.16.1",
+ "express-session": "^1.15.6",
+ "express-useragent": "1.0.8",
"html-to-text": "3.3.0",
"ipaddr.js": "^1.5.2",
"jimp": "0.2.28",
@@ -49,14 +49,14 @@
"lodash": "^4.17.4",
"logrotate-stream": "^0.2.5",
"lru-cache": "4.1.1",
- "mime": "^1.4.0",
+ "mime": "^2.0.3",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"mongodb": "2.2.31",
- "morgan": "^1.8.2",
+ "morgan": "^1.9.0",
"mousetrap": "^1.6.1",
- "nconf": "^0.8.4",
- "nodebb-plugin-composer-default": "6.0.0",
+ "nconf": "^0.8.5",
+ "nodebb-plugin-composer-default": "6.0.1",
"nodebb-plugin-dbsearch": "2.0.6",
"nodebb-plugin-emoji-extended": "1.1.1",
"nodebb-plugin-emoji-one": "1.2.1",
@@ -65,25 +65,25 @@
"nodebb-plugin-soundpack-default": "1.0.0",
"nodebb-plugin-spam-be-gone": "0.5.1",
"nodebb-rewards-essentials": "0.0.9",
- "nodebb-theme-lavender": "4.0.5",
- "nodebb-theme-persona": "6.0.1",
+ "nodebb-theme-lavender": "4.1.0",
+ "nodebb-theme-persona": "6.1.0",
"nodebb-theme-slick": "1.1.1",
- "nodebb-theme-vanilla": "7.0.1",
+ "nodebb-theme-vanilla": "7.1.0",
"nodebb-widget-essentials": "3.0.6",
- "nodemailer": "4.1.0",
- "passport": "^0.3.0",
+ "nodemailer": "4.1.1",
+ "passport": "^0.4.0",
"passport-local": "1.0.0",
- "postcss": "6.0.10",
- "postcss-clean": "1.0.3",
+ "postcss": "6.0.12",
+ "postcss-clean": "1.1.0",
"promise-polyfill": "^6.0.2",
"prompt": "^1.0.0",
"redis": "2.8.0",
- "request": "2.81.0",
- "rimraf": "2.6.1",
+ "request": "2.83.0",
+ "rimraf": "2.6.2",
"rss": "^1.2.2",
- "sanitize-html": "^1.14.0",
+ "sanitize-html": "^1.14.1",
"semver": "^5.4.1",
- "serve-favicon": "^2.4.3",
+ "serve-favicon": "^2.4.5",
"sitemap": "^1.13.0",
"socket.io": "2.0.3",
"socket.io-client": "2.0.3",
@@ -92,24 +92,24 @@
"spdx-license-list": "^3.0.1",
"string": "^3.3.3",
"toobusy-js": "^0.5.1",
- "uglify-js": "^3.0.28",
- "validator": "8.1.0",
+ "uglify-js": "^3.1.3",
+ "validator": "9.0.0",
"winston": "^2.3.1",
"xml": "^1.0.1",
"xregexp": "3.2.0",
"zxcvbn": "^4.4.2"
},
"devDependencies": {
- "coveralls": "^2.11.14",
- "eslint": "^3.12.0",
- "eslint-config-airbnb-base": "^11.1.0",
- "eslint-plugin-import": "^2.2.0",
+ "coveralls": "^3.0.0",
+ "eslint": "^4.8.0",
+ "eslint-config-airbnb-base": "^12.0.1",
+ "eslint-plugin-import": "^2.7.0",
"grunt": "^1.0.1",
"grunt-contrib-watch": "^1.0.0",
- "istanbul": "^0.4.2",
- "jsdom": "^11.2.0",
- "mocha": "^3.5.0",
- "mocha-lcov-reporter": "^1.2.0",
+ "istanbul": "^0.4.5",
+ "jsdom": "^11.3.0",
+ "mocha": "^3.5.3",
+ "mocha-lcov-reporter": "^1.3.0",
"xmlhttprequest": "1.8.0",
"xmlhttprequest-ssl": "1.5.3"
},
@@ -136,4 +136,4 @@
"url": "https://github.com/barisusakli"
}
]
-}
\ No newline at end of file
+}
diff --git a/public/language/en-GB/admin/settings/email.json b/public/language/en-GB/admin/settings/email.json
index 97696e1f44..50d210103b 100644
--- a/public/language/en-GB/admin/settings/email.json
+++ b/public/language/en-GB/admin/settings/email.json
@@ -15,6 +15,10 @@
"smtp-transport.gmail-warning2": "For more information about this workaround, please consult this NodeMailer article on the issue. An alternative would be to utilise a third-party emailer plugin such as SendGrid, Mailgun, etc. Browse available plugins here.",
"smtp-transport.host": "SMTP Host",
"smtp-transport.port": "SMTP Port",
+ "smtp-transport.security": "Connection security",
+ "smtp-transport.security-encrypted": "Encrypted",
+ "smtp-transport.security-starttls": "StartTLS",
+ "smtp-transport.security-none": "None",
"smtp-transport.username": "Username",
"smtp-transport.username-help": "For the Gmail service, enter the full email address here, especially if you are using a Google Apps managed domain.",
"smtp-transport.password": "Password",
diff --git a/public/language/th/admin/general/social.json b/public/language/th/admin/general/social.json
index 23aedfcfaa..7d6a9a8c83 100644
--- a/public/language/th/admin/general/social.json
+++ b/public/language/th/admin/general/social.json
@@ -1,5 +1,5 @@
{
- "post-sharing": "Post Sharing",
- "info-plugins-additional": "Plugins can add additional networks for sharing posts.",
- "save-success": "Successfully saved Post Sharing Networks!"
+ "post-sharing": "การแชร์กระทู้",
+ "info-plugins-additional": "ส่วนเสริมสามารถเพิ่มการเชือมต่อโซเชียลมิเดียเพื่อแชร์กระทู้",
+ "save-success": "การบันทึกการโพสแชร์เนื้อหาเสร็จสมบูรณ์!"
}
\ No newline at end of file
diff --git a/public/language/th/admin/manage/users.json b/public/language/th/admin/manage/users.json
index f1651a814b..599f817de9 100644
--- a/public/language/th/admin/manage/users.json
+++ b/public/language/th/admin/manage/users.json
@@ -1,91 +1,91 @@
{
- "users": "Users",
- "edit": "Edit",
- "make-admin": "Make Admin",
- "remove-admin": "Remove Admin",
- "validate-email": "Validate Email",
- "send-validation-email": "Send Validation Email",
- "password-reset-email": "Send Password Reset Email",
- "ban": "Ban User(s)",
- "temp-ban": "Ban User(s) Temporarily",
- "unban": "Unban User(s)",
- "reset-lockout": "Reset Lockout",
- "reset-flags": "Reset Flags",
- "delete": "Delete User(s)",
- "purge": "Delete User(s) and Content",
- "download-csv": "Download CSV",
- "invite": "Invite",
- "new": "New User",
+ "users": "ผู้ใช้",
+ "edit": "แก้ไข",
+ "make-admin": "ทำให้เป็นแอดมิน",
+ "remove-admin": "ยกเลิกการเป็นแอดมิน",
+ "validate-email": "ยืนยันอีเมล",
+ "send-validation-email": "ส่งอีเมลยืนยัน",
+ "password-reset-email": "ส่งการล้างค่ารหัสผ่านทางอีเมล",
+ "ban": "ผู้ใช้งานที่โดนแบน",
+ "temp-ban": "ผู้ใช้งานที่โดนแบนชั่วคราว",
+ "unban": "ยกเลิกการแบนผู้ใช้งาน",
+ "reset-lockout": "ยกเลิกการกักกัน",
+ "reset-flags": "ยกเลิกการการเฝ้าระวัง",
+ "delete": "ลบผู้ใช้งาน",
+ "purge": "ลบผู้ใช้งานและเนื้อหา",
+ "download-csv": "ดาวน์โหลด CSV",
+ "invite": "เชิญ",
+ "new": "ผู้ใช้งานใหม่",
- "pills.latest": "Latest Users",
- "pills.unvalidated": "Not Validated",
- "pills.no-posts": "No Posts",
- "pills.top-posters": "Top Posters",
- "pills.top-rep": "Most Reputation",
- "pills.inactive": "Inactive",
- "pills.flagged": "Most Flagged",
- "pills.banned": "Banned",
- "pills.search": "User Search",
+ "pills.latest": "ผู้ใช้งานคนล่าสุด",
+ "pills.unvalidated": "ยังไม่ได้ยืนยัน",
+ "pills.no-posts": "ไม่มีกระทู้",
+ "pills.top-posters": "ผู้ที่โพสกระทู้มากที่สุด",
+ "pills.top-rep": "ชื่อเสียงมากที่สุด",
+ "pills.inactive": "ไม่มีการใช้งาน",
+ "pills.flagged": "ได้รับการติดตาม",
+ "pills.banned": "แบน",
+ "pills.search": "ค้นหาผู้ใช้งาน",
- "search.username": "By User Name",
- "search.username-placeholder": "Enter a username to search",
- "search.email": "By Email",
- "search.email-placeholder": "Enter a email to search",
- "search.ip": "By IP Address",
- "search.ip-placeholder": "Enter an IP Address to search",
- "search.not-found": "User not found!",
+ "search.username": "โดยชื่อผู้ใช้งาน",
+ "search.username-placeholder": "ใส่ชื่อผู้ใช้งานเพื่อทำการค้นหา",
+ "search.email": "โดยอีเมล",
+ "search.email-placeholder": "ใส่อีเมลเพื่อทำการค้นหา",
+ "search.ip": "โดย IP แอดเดรส",
+ "search.ip-placeholder": "ใส่ IP แอดเดรสเพื่อทำการค้นหา",
+ "search.not-found": "ไม่พบผู้ใช้งาน!",
- "inactive.3-months": "3 months",
- "inactive.6-months": "6 months",
- "inactive.12-months": "12 months",
+ "inactive.3-months": "สามเดือน",
+ "inactive.6-months": "หกเดือน",
+ "inactive.12-months": "สิบสองเดือน",
"users.uid": "uid",
- "users.username": "username",
- "users.email": "email",
- "users.postcount": "postcount",
- "users.reputation": "reputation",
- "users.flags": "flags",
- "users.joined": "joined",
- "users.last-online": "last online",
- "users.banned": "banned",
+ "users.username": "ชื่อผู้ใช้",
+ "users.email": "อีเมล",
+ "users.postcount": "จำนวนกระทู้",
+ "users.reputation": "ชื่อเสียง",
+ "users.flags": "ติดตาม",
+ "users.joined": "เข้าร่วม",
+ "users.last-online": "ออนไลน์ครั้งสุดท้าย",
+ "users.banned": "แบน",
- "create.username": "User Name",
- "create.email": "Email",
- "create.email-placeholder": "Email of this user",
- "create.password": "Password",
- "create.password-confirm": "Confirm Password",
+ "create.username": "ชื่อผู้ใช้งาน",
+ "create.email": "อีเมล",
+ "create.email-placeholder": "อีเมลของผู้ใช้",
+ "create.password": "รหัสผ่าน",
+ "create.password-confirm": "ยืนยันรหัสผ่าน",
- "temp-ban.length": "Ban Length",
- "temp-ban.reason": "Reason (Optional)",
- "temp-ban.hours": "Hours",
- "temp-ban.days": "Days",
- "temp-ban.explanation": "Enter the length of time for the ban. Note that a time of 0 will be a considered a permanent ban.",
+ "temp-ban.length": "ระยะเวลาการแบน",
+ "temp-ban.reason": "เหตุผล (ตัวเลือก)",
+ "temp-ban.hours": "ชั่วโมง",
+ "temp-ban.days": "วัน",
+ "temp-ban.explanation": "ระบุระยะเวลาของการแบน ถ้าระยะเวลาเป็น \"0\" คือการแบนถาวร",
- "alerts.confirm-ban": "Do you really want to ban this user permanently?",
- "alerts.confirm-ban-multi": "Do you really want to ban these users permanently?",
- "alerts.ban-success": "User(s) banned!",
- "alerts.button-ban-x": "Ban %1 user(s)",
- "alerts.unban-success": "User(s) unbanned!",
- "alerts.lockout-reset-success": "Lockout(s) reset!",
- "alerts.flag-reset-success": "Flags(s) reset!",
- "alerts.no-remove-yourself-admin": "You can't remove yourself as Administrator!",
- "alerts.make-admin-success": "User(s) are now administrators.",
- "alerts.confirm-remove-admin": "Do you really want to remove admins?",
- "alerts.remove-admin-success": "User(s) are no longer administrators.",
- "alerts.confirm-validate-email": "Do you want to validate email(s) of these user(s)?",
- "alerts.validate-email-success": "Emails validated",
- "alerts.password-reset-confirm": "Do you want to send password reset email(s) to these user(s)?",
- "alerts.confirm-delete": "Warning!
Do you really want to delete user(s)?
This action is not reversable! Only the user account will be deleted, their posts and topics will remain.",
- "alerts.delete-success": "User(s) Deleted!",
- "alerts.confirm-purge": "Warning!
Do you really want to delete user(s) and their content?
This action is not reversable! All user data and content will be erased!",
- "alerts.create": "Create User",
- "alerts.button-create": "Create",
- "alerts.button-cancel": "Cancel",
- "alerts.error-passwords-different": "Passwords must match!",
- "alerts.error-x": "Error
%1
", - "alerts.create-success": "User created!", + "alerts.confirm-ban": "คุณต้องการที่จะแบนผู้ใช้คนนี้ ถาวร ?", + "alerts.confirm-ban-multi": "คุณต้องการที่จะแบนผู้ใช้กลุ่มนี้ ถาวร ?", + "alerts.ban-success": "ผู้ใช้งานที่โดนแบน", + "alerts.button-ban-x": "แบน %1 ผู้ใช้งาน", + "alerts.unban-success": "ยกเลิกการแบนผู้ใช้งาน", + "alerts.lockout-reset-success": "ยกเลิกการกักกัน", + "alerts.flag-reset-success": "ยกเลิกการติดตาม", + "alerts.no-remove-yourself-admin": "คุณไม่สามารถที่จะยกเลิกตัวเองจากการเป็นผู้ดูแลระบบ", + "alerts.make-admin-success": "ผู้ใช้งานได้เป็นแอดมิน", + "alerts.confirm-remove-admin": "คุณต้องการที่จะยกเลิกแอดมินเหล่านี้?", + "alerts.remove-admin-success": "ผู้ใช้งานที่ไม่ได้เป็นแอดมิน", + "alerts.confirm-validate-email": "คุณต้องการที่ยืนยันอีเมลของผู้ใช้เหล่านี้หรือไม่?", + "alerts.validate-email-success": "อีเมลที่ได้รับการยืนยัน", + "alerts.password-reset-confirm": "คุณต้องการที่จะส่งอีเมลการล้างค่ารหัสผ่านให้กับผู้ใช้เหล่านี้หรือไม่?", + "alerts.confirm-delete": "ระวัง!%1
", + "alerts.create-success": "ผู้ใช้งานถูกสร้าง!", - "alerts.prompt-email": "Email: ", - "alerts.email-sent-to": "An invitation email has been sent to %1", - "alerts.x-users-found": "%1 user(s) found! Search took %2 ms." + "alerts.prompt-email": "อีเมล: ", + "alerts.email-sent-to": "อีเมลคำเชิญถูกส่งไปที่ %1", + "alerts.x-users-found": "%1 ผู้ใช้งานถูกพบ! การค้นหาใช้เวลา %2 ms." } \ No newline at end of file diff --git a/public/language/th/admin/settings/notifications.json b/public/language/th/admin/settings/notifications.json index 4eff7f341a..e5193fc159 100644 --- a/public/language/th/admin/settings/notifications.json +++ b/public/language/th/admin/settings/notifications.json @@ -1,5 +1,5 @@ { - "notifications": "Notifications", - "welcome-notification": "Welcome Notification", - "welcome-notification-link": "Welcome Notification Link" + "notifications": "การแจ้งเตือน", + "welcome-notification": "การยินดีต้อนรับแจ้งเตือน", + "welcome-notification-link": "ลิงค์การยินดีต้อนรับแจ้งเตือน" } \ No newline at end of file diff --git a/public/src/admin/appearance/skins.js b/public/src/admin/appearance/skins.js index 7ec56349f7..b42f3991a3 100644 --- a/public/src/admin/appearance/skins.js +++ b/public/src/admin/appearance/skins.js @@ -72,8 +72,8 @@ define('admin/appearance/skins', ['translator', 'benchpress'], function (transla if (config['theme:src']) { var skin = config['theme:src'] - .match(/latest\/(\S+)\/bootstrap.min.css/)[1] - .replace(/(^|\s)([a-z])/g, function (m, p1, p2) { return p1 + p2.toUpperCase(); }); + .match(/latest\/(\S+)\/bootstrap.min.css/)[1] + .replace(/(^|\s)([a-z])/g, function (m, p1, p2) { return p1 + p2.toUpperCase(); }); highlightSelectedTheme(skin); } @@ -105,9 +105,9 @@ define('admin/appearance/skins', ['translator', 'benchpress'], function (transla $('[data-theme="' + themeId + '"]') .addClass('selected') .find('[data-action="use"]') - .html(current) - .removeClass('btn-primary') - .addClass('btn-success'); + .html(current) + .removeClass('btn-primary') + .addClass('btn-success'); }); } diff --git a/public/src/admin/appearance/themes.js b/public/src/admin/appearance/themes.js index 64d7a202fd..c0a96831bb 100644 --- a/public/src/admin/appearance/themes.js +++ b/public/src/admin/appearance/themes.js @@ -94,16 +94,16 @@ define('admin/appearance/themes', ['translator', 'benchpress'], function (transl $('[data-theme]') .removeClass('selected') .find('[data-action="use"]') - .html(select) - .removeClass('btn-success') - .addClass('btn-primary'); + .html(select) + .removeClass('btn-success') + .addClass('btn-primary'); $('[data-theme="' + themeId + '"]') .addClass('selected') .find('[data-action="use"]') - .html(current) - .removeClass('btn-primary') - .addClass('btn-success'); + .html(current) + .removeClass('btn-primary') + .addClass('btn-success'); }); } diff --git a/public/src/admin/extend/widgets.js b/public/src/admin/extend/widgets.js index be7bf72e83..f6d02ab420 100644 --- a/public/src/admin/extend/widgets.js +++ b/public/src/admin/extend/widgets.js @@ -148,8 +148,7 @@ define('admin/extend/widgets', ['jqueryui'], function () { .addClass(btn.attr('data-class')); container.attr('data-container-html', container.attr('data-container-html') - .replace(/class="[a-zA-Z0-9-\s]+"/, 'class="' + container[0].className.replace(' pointer ui-draggable', '') + '"') - ); + .replace(/class="[a-zA-Z0-9-\s]+"/, 'class="' + container[0].className.replace(' pointer ui-draggable', '') + '"')); }); } diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.js index e0c17ef25e..3b448a4de8 100644 --- a/public/src/admin/general/dashboard.js +++ b/public/src/admin/general/dashboard.js @@ -472,8 +472,7 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator', 'benchpress' var topic = topics[tids[i]]; var label = topic.value === '0' ? topic.title : ' ' + topic.title + ''; - legend.append( - '' +
+ ('' +
results +
'
')) +
'' +
diff --git a/public/src/app.js b/public/src/app.js
index 913360c615..421cf71943 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -439,6 +439,9 @@ app.cacheBuster = null;
.replace('{pageTitle}', function () { return title; })
.replace('{browserTitle}', function () { return config.browserTitle; });
+ // Allow translation strings in title on ajaxify (#5927)
+ title = translator.unescape(title);
+
translator.translate(title, function (translated) {
titleObj.titles[0] = translated;
app.alternatingTitle('');
diff --git a/public/src/client/account/header.js b/public/src/client/account/header.js
index e88eda06f0..5c16a45a95 100644
--- a/public/src/client/account/header.js
+++ b/public/src/client/account/header.js
@@ -73,7 +73,8 @@ define('forum/account/header', [
}
function setupCoverPhoto() {
- coverPhoto.init(components.get('account/cover'),
+ coverPhoto.init(
+ components.get('account/cover'),
function (imageData, position, callback) {
socket.emit('user.updateCover', {
uid: ajaxify.data.uid,
diff --git a/public/src/client/chats/messages.js b/public/src/client/chats/messages.js
index 8f8caa2a1f..fc4a327021 100644
--- a/public/src/client/chats/messages.js
+++ b/public/src/client/chats/messages.js
@@ -96,9 +96,7 @@ define('forum/chats/messages', ['components', 'sounds', 'translator', 'benchpres
messages.scrollToBottom = function (containerEl) {
if (containerEl.length) {
- containerEl.scrollTop(
- containerEl[0].scrollHeight - containerEl.height()
- );
+ containerEl.scrollTop(containerEl[0].scrollHeight - containerEl.height());
}
};
diff --git a/public/src/client/chats/search.js b/public/src/client/chats/search.js
index f9504e78a4..1b76d665d8 100644
--- a/public/src/client/chats/search.js
+++ b/public/src/client/chats/search.js
@@ -63,8 +63,8 @@ define('forum/chats/search', ['components'], function (components) {
}
var chatEl = $('')
- .attr('data-uid', userObj.uid)
- .appendTo(chatsListEl);
+ .attr('data-uid', userObj.uid)
+ .appendTo(chatsListEl);
chatEl.append(createUserImage());
return chatEl;
diff --git a/public/src/client/groups/details.js b/public/src/client/groups/details.js
index e7225bb16c..65534df0aa 100644
--- a/public/src/client/groups/details.js
+++ b/public/src/client/groups/details.js
@@ -21,7 +21,8 @@ define('forum/groups/details', [
if (ajaxify.data.group.isOwner) {
Details.prepareSettings();
- coverPhoto.init(components.get('groups/cover'),
+ coverPhoto.init(
+ components.get('groups/cover'),
function (imageData, position, callback) {
socket.emit('groups.cover.update', {
groupName: groupName,
diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js
index 28f853ed60..736926101d 100644
--- a/public/src/modules/helpers.js
+++ b/public/src/modules/helpers.js
@@ -77,8 +77,9 @@
var type = tag.type ? 'type="' + tag.type + '" ' : '';
var href = tag.href ? 'href="' + tag.href + '" ' : '';
var sizes = tag.sizes ? 'sizes="' + tag.sizes + '" ' : '';
+ var title = tag.title ? 'title="' + tag.title + '" ' : '';
- return '\n\t';
+ return '\n\t';
}
function stringify(obj) {
diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js
index d8b8cb4fe2..ac6c06ac88 100644
--- a/public/src/modules/navigator.js
+++ b/public/src/modules/navigator.js
@@ -4,7 +4,7 @@ define('navigator', ['forum/pagination', 'components'], function (pagination, co
var navigator = {};
var index = 1;
var count = 0;
- var navigatorUpdateTimeoutId = 0;
+ var navigatorUpdateTimeoutId;
navigator.scrollActive = false;
@@ -91,11 +91,12 @@ define('navigator', ['forum/pagination', 'components'], function (pagination, co
}
navigator.delayedUpdate = function () {
- if (navigatorUpdateTimeoutId) {
- clearTimeout(navigatorUpdateTimeoutId);
- navigatorUpdateTimeoutId = 0;
+ if (!navigatorUpdateTimeoutId) {
+ navigatorUpdateTimeoutId = setTimeout(function () {
+ navigator.update();
+ navigatorUpdateTimeoutId = undefined;
+ }, 100);
}
- navigatorUpdateTimeoutId = setTimeout(navigator.update, 100);
};
navigator.update = function (threshold) {
@@ -165,7 +166,9 @@ define('navigator', ['forum/pagination', 'components'], function (pagination, co
index = index > count ? count : index;
$('.pagination-block .pagination-text').translateHtml('[[global:pagination.out_of, ' + index + ', ' + count + ']]');
- $('.pagination-block .progress-bar').width((index / count * 100) + '%');
+ var fraction = $(window).scrollTop() / ($(document).height() - $(window).height());
+ $('.pagination-block meter').val(fraction);
+ $('.pagination-block .progress-bar').width((fraction * 100) + '%');
};
navigator.scrollUp = function () {
diff --git a/public/src/widgets.js b/public/src/widgets.js
index 082b291624..badc55c892 100644
--- a/public/src/widgets.js
+++ b/public/src/widgets.js
@@ -23,21 +23,21 @@
widgetsAtLocation.forEach(function (widget) {
html += widget.html;
+ });
- if (location === 'footer' && !$('#content [widget-area="footer"]').length) {
- $('#content').append($('[[admin/settings/email:smtp-transport.service-help]] @@ -63,6 +63,13 @@ + + +
Pellentesque habitant morbi tristique senectus' + - 'Aenean vitae est.Mauris eleifend leo.
'), - 'Pellentesque habitant morbi tristique senectus' + - 'Aenean vitae est.Mauris eleifend leo.' - ); + search.sanitize('Pellentesque habitant morbi tristique senectus' + + 'Aenean vitae est.Mauris eleifend leo.
'), + 'Pellentesque habitant morbi tristique senectus' + + 'Aenean vitae est.Mauris eleifend leo.' + ); done(); }); }); @@ -67,24 +67,20 @@ describe('admin search', function () { describe('simplify', function () { it('should remove all mustaches', function (done) { assert.equal( - search.simplify( - 'Pellentesque tristique {{senectus}}habitant morbi' + - 'liquam tincidunt {mauris.eu}risus' - ), - 'Pellentesque tristique habitant morbi' + - 'liquam tincidunt risus' - ); + search.simplify('Pellentesque tristique {{senectus}}habitant morbi' + + 'liquam tincidunt {mauris.eu}risus'), + 'Pellentesque tristique habitant morbi' + + 'liquam tincidunt risus' + ); done(); }); it('should collapse all whitespace', function (done) { assert.equal( - search.simplify( - 'Pellentesque tristique habitant morbi' + - ' \n\n liquam tincidunt mauris eu risus.' - ), - 'Pellentesque tristique habitant morbi' + - '\nliquam tincidunt mauris eu risus.' - ); + search.simplify('Pellentesque tristique habitant morbi' + + ' \n\n liquam tincidunt mauris eu risus.'), + 'Pellentesque tristique habitant morbi' + + '\nliquam tincidunt mauris eu risus.' + ); done(); }); }); diff --git a/test/socket.io.js b/test/socket.io.js index 76f7ae6a72..eb7489ef8a 100644 --- a/test/socket.io.js +++ b/test/socket.io.js @@ -72,7 +72,8 @@ describe('socket.io', function () { helpers.connectSocketIO(res, function (err, _io) { io = _io; assert.ifError(err); - done(err); + + done(); }); }); }); diff --git a/test/topics.js b/test/topics.js index 0592b9d030..f8c1ee5d16 100644 --- a/test/topics.js +++ b/test/topics.js @@ -654,8 +654,8 @@ describe('Topic\'s', function () { function (next) { topicPids = replies.map(function (reply) { return reply.pid; }); socketTopics.bookmark({ uid: topic.userId }, { tid: newTopic.tid, index: originalBookmark }, next); - }], - done); + }, + ], done); }); it('should fail with invalid data', function (done) { @@ -711,7 +711,8 @@ describe('Topic\'s', function () { 'Fork test, no bookmark update', topicPids.slice(1, 3), newTopic.tid, - next); + next + ); }, function (forkedTopicData, next) { topics.getUserBookmark(newTopic.tid, topic.userId, next);