summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-02-26 16:11:03 +0200
committerLauri Ojansivu <x@xet7.org>2018-02-26 16:11:03 +0200
commit1efa66b58c2703772e39d0fca01dcb7f2f14a44c (patch)
tree29a608a9c4e929385323c1477ba9d74d3b37bb2e
parent5bdb392258bd3d3863699e5bf05b64b70f222621 (diff)
parentdc8c9053c2d454f14983903880fbf481eab2be20 (diff)
downloadwekan-1efa66b58c2703772e39d0fca01dcb7f2f14a44c.tar.gz
wekan-1efa66b58c2703772e39d0fca01dcb7f2f14a44c.tar.bz2
wekan-1efa66b58c2703772e39d0fca01dcb7f2f14a44c.zip
Merge branch 'GhassenRjab-feature/fix-lint' into devel
-rw-r--r--.eslintrc.json4
-rw-r--r--CHANGELOG.md11
-rw-r--r--client/components/main/layouts.js12
-rw-r--r--client/components/users/userHeader.js14
-rw-r--r--models/trelloCreator.js26
-rw-r--r--sandstorm.js6
6 files changed, 48 insertions, 25 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index a6d651a5..8bd678b3 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -129,6 +129,8 @@
"Integrations": true,
"HTTP": true,
"AccountSettings": true,
- "Announcements": true
+ "Announcements": true,
+ "Swimlanes": true,
+ "Npm": true
}
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7bd8b16..e4eab854 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,14 @@
+# Upcoming Wekan release
+
+This release fixes the following bugs:
+
+- [Fix lint errors related to sandstorm](https://github.com/wekan/wekan/commit/0a16147470246c8f49bb918f5ddc7bb2e54fba14);
+- [Add Swimlanes to globals](https://github.com/wekan/wekan/commit/373e9782dcf87a9c1169b5d1f8175ce14e4898c9);
+- [Fix lint errors related to trello creator](https://github.com/wekan/wekan/commit/951a0db380d60f3d948ae38d50b85a54983a51de);
+- [Fix lint errors related to language names](https://github.com/wekan/wekan/commit/c0d33d97f2c8d4e9371a03d4ad3022df3ed64d3d).
+
+Thanks to GitHub user GhassenRjab for contributions.
+
# v0.77 2018-02-23 Wekan release
This release adds the following new features:
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index df22fc14..f12718a7 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -17,10 +17,14 @@ Template.userFormsLayout.onRendered(() => {
Template.userFormsLayout.helpers({
languages() {
return _.map(TAPi18n.getLanguages(), (lang, code) => {
- return {
- tag: code,
- name: lang.name === 'br' ? 'Brezhoneg' : lang.name === 'ig' ? 'Igbo' : lang.name,
- };
+ const tag = code;
+ let name = lang.name;
+ if (lang.name === 'br') {
+ name = 'Brezhoneg';
+ } else if (lang.name === 'ig') {
+ name = 'Igbo';
+ }
+ return { tag, name };
}).sort(function(a, b) {
if (a.name === b.name) {
return 0;
diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js
index 96c8c95e..be7d4dcb 100644
--- a/client/components/users/userHeader.js
+++ b/client/components/users/userHeader.js
@@ -114,10 +114,16 @@ Template.changePasswordPopup.onRendered(function () {
Template.changeLanguagePopup.helpers({
languages() {
return _.map(TAPi18n.getLanguages(), (lang, code) => {
- return {
- tag: code,
- name: lang.name === 'br' ? 'Brezhoneg' : lang.name === 'ig' ? 'Igbo' : lang.name,
- };
+ // Same code in /client/components/main/layouts.js
+ // TODO : Make code reusable
+ const tag = code;
+ let name = lang.name;
+ if (lang.name === 'br') {
+ name = 'Brezhoneg';
+ } else if (lang.name === 'ig') {
+ name = 'Igbo';
+ }
+ return { tag, name };
}).sort(function (a, b) {
if (a.name === b.name) {
return 0;
diff --git a/models/trelloCreator.js b/models/trelloCreator.js
index 2d85ee71..89e48a16 100644
--- a/models/trelloCreator.js
+++ b/models/trelloCreator.js
@@ -401,19 +401,19 @@ export class TrelloCreator {
}
createSwimlanes(boardId) {
- const swimlaneToCreate = {
- archived: false,
- boardId,
- // We are being defensing here by providing a default date (now) if the
- // creation date wasn't found on the action log. This happen on old
- // Wekan boards (eg from 2013) that didn't log the 'createList' action
- // we require.
- createdAt: this._now(),
- title: 'Default',
- };
- const swimlaneId = Swimlanes.direct.insert(swimlaneToCreate);
- Swimlanes.direct.update(swimlaneId, {$set: {'updatedAt': this._now()}});
- this.swimlane = swimlaneId;
+ const swimlaneToCreate = {
+ archived: false,
+ boardId,
+ // We are being defensing here by providing a default date (now) if the
+ // creation date wasn't found on the action log. This happen on old
+ // Wekan boards (eg from 2013) that didn't log the 'createList' action
+ // we require.
+ createdAt: this._now(),
+ title: 'Default',
+ };
+ const swimlaneId = Swimlanes.direct.insert(swimlaneToCreate);
+ Swimlanes.direct.update(swimlaneId, {$set: {'updatedAt': this._now()}});
+ this.swimlane = swimlaneId;
}
createChecklists(trelloChecklists) {
diff --git a/sandstorm.js b/sandstorm.js
index bb3e5011..3dcbf03c 100644
--- a/sandstorm.js
+++ b/sandstorm.js
@@ -22,9 +22,9 @@ const sandstormBoard = {
if (isSandstorm && Meteor.isServer) {
const fs = require('fs');
- const pathParts = process.cwd().split("/");
- var path = pathParts.join("/");
- const Capnp = Npm.require(path + "../../../node_modules/capnp.js");
+ const pathParts = process.cwd().split('/');
+ const path = pathParts.join('/');
+ const Capnp = Npm.require(`${path}../../../node_modules/capnp.js`);
const Package = Capnp.importSystem('sandstorm/package.capnp');
const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp');
const Identity = Capnp.importSystem('sandstorm/identity.capnp');