Merge branch 'GhassenRjab-feature/fix-lint' into devel

This commit is contained in:
Lauri Ojansivu 2018-02-26 16:11:03 +02:00
commit 1efa66b58c
6 changed files with 48 additions and 25 deletions

View file

@ -129,6 +129,8 @@
"Integrations": true,
"HTTP": true,
"AccountSettings": true,
"Announcements": true
"Announcements": true,
"Swimlanes": true,
"Npm": true
}
}

View file

@ -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:

View file

@ -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;

View file

@ -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;

View file

@ -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) {

View file

@ -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');