summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md13
-rw-r--r--client/components/boards/boardsList.styl1
-rw-r--r--client/components/cards/cardDetails.jade26
-rw-r--r--client/components/cards/cardDetails.js33
-rw-r--r--client/components/cards/minicard.styl3
-rw-r--r--models/cards.js6
6 files changed, 79 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9acedd52..1f269401 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,16 @@
+# Upcoming Wekan release
+
+This release adds the following new features:
+
+* [Copy/Move cards to other board in Standalone Wekan](https://github.com/wekan/wekan/pull/1330).
+
+and fixes the following bugs:
+
+* [Board list with long-description boards not visible](https://github.com/wekan/wekan/pull/1346);
+* [Remove erroneous minicard title whitespace](https://github.com/wekan/wekan/pull/1347).
+
+Thanks to GitHub users couscous3, GhassenRjab and thuanpq for their contributions.
+
# v0.55 2017-11-19 Wekan release
This release adds the following new features:
diff --git a/client/components/boards/boardsList.styl b/client/components/boards/boardsList.styl
index 4b5245f9..b4d21df6 100644
--- a/client/components/boards/boardsList.styl
+++ b/client/components/boards/boardsList.styl
@@ -17,6 +17,7 @@ $spaceBetweenTiles = 16px
opacity: 1
.board-list-item
+ overflow: hidden;
background-color: #999
color: #f6f6f6
height: 90px
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade
index b6572251..859b80c3 100644
--- a/client/components/cards/cardDetails.jade
+++ b/client/components/cards/cardDetails.jade
@@ -132,14 +132,36 @@ template(name="cardDetailsActionsPopup")
li: a.js-more {{_ 'cardMorePopup-title'}}
template(name="moveCardPopup")
- +boardLists
+ if isSandstorm
+ +boardLists
+ else
+ +boardsAndLists
template(name="copyCardPopup")
label(for='copy-card-title') {{_ 'title'}}:
textarea#copy-card-title.minicard-composer-textarea.js-card-title(autofocus)
= title
+ if isSandstorm
+ +boardLists
+ else
+ +boardsAndLists
+
+template(name="boardsAndLists")
+ select.js-select-boards
+ each boards
+ if $eq _id currentBoard._id
+ option(value="{{_id}}" selected) {{_ 'current'}}
+ else
+ option(value="{{_id}}") {{title}}
+
label {{_ 'lists'}}:
- +boardLists
+ ul.pop-over-list
+ each aBoardLists
+ li
+ if $eq ../_id _id
+ a.disabled {{title}} ({{_ 'current'}})
+ else
+ a.js-select-list= title
template(name="cardMembersPopup")
ul.pop-over-list.js-card-member-list
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index ab062385..c5b2fcdc 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -1,3 +1,5 @@
+const subManager = new SubsManager();
+
BlazeComponent.extendComponent({
mixins() {
return [Mixins.InfiniteScrolling, Mixins.PerfectScrollbar];
@@ -215,12 +217,43 @@ Template.moveCardPopup.events({
},
});
+BlazeComponent.extendComponent({
+ onCreated() {
+ this.selectedBoard = new ReactiveVar(Session.get('currentBoard'));
+ },
+
+ boards() {
+ const boards = Boards.find({
+ archived: false,
+ 'members.userId': Meteor.userId(),
+ }, {
+ sort: ['title'],
+ });
+ return boards;
+ },
+
+ aBoardLists() {
+ subManager.subscribe('board', this.selectedBoard.get());
+ const board = Boards.findOne(this.selectedBoard.get());
+ return board.lists();
+ },
+ events() {
+ return [{
+ 'change .js-select-boards'(evt) {
+ this.selectedBoard.set($(evt.currentTarget).val());
+ },
+ }];
+ },
+}).register('boardsAndLists');
+
Template.copyCardPopup.events({
'click .js-select-list' (evt) {
const card = Cards.findOne(Session.get('currentCard'));
const oldId = card._id;
card._id = null;
card.listId = this._id;
+ const list = Lists.findOne(card.listId);
+ card.boardId = list.boardId;
const textarea = $(evt.currentTarget).parents('.content').find('textarea');
const title = textarea.val().trim();
// insert new card to the bottom of new list
diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl
index a6aad896..d59f1f63 100644
--- a/client/components/cards/minicard.styl
+++ b/client/components/cards/minicard.styl
@@ -77,6 +77,9 @@
height: @width
border-radius: 2px
margin-left: 3px
+ .minicard-title
+ p:last-child
+ margin-bottom: 0
.dates
display: flex;
flex-direction: row;
diff --git a/models/cards.js b/models/cards.js
index 5de17c6f..b6397c9e 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -207,7 +207,11 @@ Cards.mutations({
},
move(listId, sortIndex) {
- const mutatedFields = {listId};
+ const list = Lists.findOne(listId);
+ const mutatedFields = {
+ listId,
+ boardId: list.boardId,
+ };
if (sortIndex) {
mutatedFields.sort = sortIndex;
}