diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-03-31 21:22:33 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-03-31 21:22:33 +0300 |
commit | 30a4494af2f9eaefab81240c7db7a23e408c4657 (patch) | |
tree | a6ce0343bc30bffbe7be8ea40d275527d571f23e | |
parent | 568a1a11fda199fb56cbbe9715760cfd256ef27f (diff) | |
parent | add5d22c4e82041bc69a709daa17e554a0863f4e (diff) | |
download | wekan-30a4494af2f9eaefab81240c7db7a23e408c4657.tar.gz wekan-30a4494af2f9eaefab81240c7db7a23e408c4657.tar.bz2 wekan-30a4494af2f9eaefab81240c7db7a23e408c4657.zip |
Merge branch 'devel'
-rw-r--r-- | CHANGELOG.md | 9 | ||||
-rw-r--r-- | client/components/lists/listsGroup.js | 13 | ||||
-rw-r--r-- | client/components/swimlanes/swimlanes.js | 172 | ||||
-rw-r--r-- | client/components/swimlanes/swimlanes.styl | 2 | ||||
-rw-r--r-- | i18n/de.i18n.json | 12 | ||||
-rw-r--r-- | i18n/es.i18n.json | 12 | ||||
-rw-r--r-- | i18n/fa.i18n.json | 12 | ||||
-rw-r--r-- | i18n/fr.i18n.json | 12 | ||||
-rw-r--r-- | i18n/id.i18n.json | 2 | ||||
-rw-r--r-- | i18n/ko.i18n.json | 8 | ||||
-rw-r--r-- | i18n/zh-CN.i18n.json | 32 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | sandstorm-pkgdef.capnp | 4 |
13 files changed, 157 insertions, 135 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cb97d4a..07c1fd38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,16 @@ -# Upcoming Wekan release +# v0.79 2018-03-31 Wekan release This release adds the following new features: - [Checklist items sort fix, and checklist sort capability](https://github.com/wekan/wekan/pull/1543); - [Add Received Date and End Date. Between them is already existing Start and Due Date](https://github.com/wekan/wekan/pull/1550). -Thanks to GitHub users andresmanelli and rjevnikar for their contributions. +and fixes the following bugs: + +- [Fix drag in lists view](https://github.com/wekan/wekan/pull/1559/commits/679e50af6449a680f958256570e8b9f1944a3a92); +- [Set fixed width for swimlane header](https://github.com/wekan/wekan/pull/1559/commits/2e8f8924dd0d985ae4634450cfbef04e88e5d954). + +Thanks to GitHub users andresmanelli, rjevnikar and xet7 for their contributions. # v0.78 2018-03-17 Wekan release diff --git a/client/components/lists/listsGroup.js b/client/components/lists/listsGroup.js deleted file mode 100644 index f94f681f..00000000 --- a/client/components/lists/listsGroup.js +++ /dev/null @@ -1,13 +0,0 @@ -BlazeComponent.extendComponent({ - currentCardIsInThisList(listId, swimlaneId) { - const currentCard = Cards.findOne(Session.get('currentCard')); - const currentBoardId = Session.get('currentBoard'); - const board = Boards.findOne(currentBoardId); - if (board.view === 'board-view-lists') - return currentCard && currentCard.listId === listId; - else if (board.view === 'board-view-swimlanes') - return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId; - else - return false; - }, -}).register('listsGroup'); diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js index 3dd7f208..f37e1e9c 100644 --- a/client/components/swimlanes/swimlanes.js +++ b/client/components/swimlanes/swimlanes.js @@ -1,5 +1,85 @@ const { calculateIndex } = Utils; +function currentCardIsInThisList(listId, swimlaneId) { + const currentCard = Cards.findOne(Session.get('currentCard')); + const currentBoardId = Session.get('currentBoard'); + const board = Boards.findOne(currentBoardId); + if (board.view === 'board-view-lists') + return currentCard && currentCard.listId === listId; + else if (board.view === 'board-view-swimlanes') + return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId; + else + return false; +} + +function initSortable(boardComponent, $listsDom) { + // We want to animate the card details window closing. We rely on CSS + // transition for the actual animation. + $listsDom._uihooks = { + removeElement(node) { + const removeNode = _.once(() => { + node.parentNode.removeChild(node); + }); + if ($(node).hasClass('js-card-details')) { + $(node).css({ + flexBasis: 0, + padding: 0, + }); + $listsDom.one(CSSEvents.transitionend, removeNode); + } else { + removeNode(); + } + }, + }; + + $listsDom.sortable({ + tolerance: 'pointer', + helper: 'clone', + handle: '.js-list-header', + items: '.js-list:not(.js-list-composer)', + placeholder: 'list placeholder', + distance: 7, + start(evt, ui) { + ui.placeholder.height(ui.helper.height()); + EscapeActions.executeUpTo('popup-close'); + boardComponent.setIsDragging(true); + }, + stop(evt, ui) { + // To attribute the new index number, we need to get the DOM element + // of the previous and the following card -- if any. + const prevListDom = ui.item.prev('.js-list').get(0); + const nextListDom = ui.item.next('.js-list').get(0); + const sortIndex = calculateIndex(prevListDom, nextListDom, 1); + + $listsDom.sortable('cancel'); + const listDomElement = ui.item.get(0); + const list = Blaze.getData(listDomElement); + + Lists.update(list._id, { + $set: { + sort: sortIndex.base, + }, + }); + + boardComponent.setIsDragging(false); + }, + }); + + function userIsMember() { + return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); + } + + // Disable drag-dropping while in multi-selection mode, or if the current user + // is not a board member + boardComponent.autorun(() => { + const $listDom = $listsDom; + if ($listDom.data('sortable')) { + $listsDom.sortable('option', 'disabled', + MultiSelection.isActive() || !userIsMember()); + } + }); +} + BlazeComponent.extendComponent({ onRendered() { const boardComponent = this.parentComponent(); @@ -9,71 +89,7 @@ BlazeComponent.extendComponent({ boardComponent.scrollLeft(); } - // We want to animate the card details window closing. We rely on CSS - // transition for the actual animation. - $listsDom._uihooks = { - removeElement(node) { - const removeNode = _.once(() => { - node.parentNode.removeChild(node); - }); - if ($(node).hasClass('js-card-details')) { - $(node).css({ - flexBasis: 0, - padding: 0, - }); - $listsDom.one(CSSEvents.transitionend, removeNode); - } else { - removeNode(); - } - }, - }; - - $listsDom.sortable({ - tolerance: 'pointer', - helper: 'clone', - handle: '.js-list-header', - items: '.js-list:not(.js-list-composer)', - placeholder: 'list placeholder', - distance: 7, - start(evt, ui) { - ui.placeholder.height(ui.helper.height()); - EscapeActions.executeUpTo('popup-close'); - boardComponent.setIsDragging(true); - }, - stop(evt, ui) { - // To attribute the new index number, we need to get the DOM element - // of the previous and the following card -- if any. - const prevListDom = ui.item.prev('.js-list').get(0); - const nextListDom = ui.item.next('.js-list').get(0); - const sortIndex = calculateIndex(prevListDom, nextListDom, 1); - - $listsDom.sortable('cancel'); - const listDomElement = ui.item.get(0); - const list = Blaze.getData(listDomElement); - - Lists.update(list._id, { - $set: { - sort: sortIndex.base, - }, - }); - - boardComponent.setIsDragging(false); - }, - }); - - function userIsMember() { - return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); - } - - // Disable drag-dropping while in multi-selection mode, or if the current user - // is not a board member - boardComponent.autorun(() => { - const $listDom = $listsDom; - if ($listDom.data('sortable')) { - $listsDom.sortable('option', 'disabled', - MultiSelection.isActive() || !userIsMember()); - } - }); + initSortable(boardComponent, $listsDom); }, onCreated() { this.draggingActive = new ReactiveVar(false); @@ -87,15 +103,7 @@ BlazeComponent.extendComponent({ }, currentCardIsInThisList(listId, swimlaneId) { - const currentCard = Cards.findOne(Session.get('currentCard')); - const currentBoardId = Session.get('currentBoard'); - const board = Boards.findOne(currentBoardId); - if (board.view === 'board-view-lists') - return currentCard && currentCard.listId === listId; - else if (board.view === 'board-view-swimlanes') - return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId; - else - return false; + return currentCardIsInThisList(listId, swimlaneId); }, events() { @@ -210,3 +218,19 @@ Template.swimlane.helpers({ return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly(); }, }); + +BlazeComponent.extendComponent({ + currentCardIsInThisList(listId, swimlaneId) { + return currentCardIsInThisList(listId, swimlaneId); + }, + onRendered() { + const boardComponent = this.parentComponent(); + const $listsDom = this.$('.js-lists'); + + if (!Session.get('currentCard')) { + boardComponent.scrollLeft(); + } + + initSortable(boardComponent, $listsDom); + }, +}).register('listsGroup'); diff --git a/client/components/swimlanes/swimlanes.styl b/client/components/swimlanes/swimlanes.styl index 555bcd3b..dce298b0 100644 --- a/client/components/swimlanes/swimlanes.styl +++ b/client/components/swimlanes/swimlanes.styl @@ -39,7 +39,7 @@ margin-top: 50px; font-weight: bold; min-height: 9px; - min-width: 30px; + width: 50px; overflow: hidden; -o-text-overflow: ellipsis; text-overflow: ellipsis; diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index 3ced5f15..3e2b7434 100644 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -436,10 +436,10 @@ "createdAt": "Erstellt am", "verified": "Geprüft", "active": "Aktiv", - "card-received": "Received", - "card-received-on": "Received on", - "card-end": "End", - "card-end-on": "Ends on", - "editCardReceivedDatePopup-title": "Change received date", - "editCardEndDatePopup-title": "Change end date" + "card-received": "Empfangen", + "card-received-on": "Empfangen am", + "card-end": "Ende", + "card-end-on": "Endet am", + "editCardReceivedDatePopup-title": "Empfangsdatum ändern", + "editCardEndDatePopup-title": "Enddatum ändern" }
\ No newline at end of file diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 116dfb7a..9417dd57 100644 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -436,10 +436,10 @@ "createdAt": "Creado en", "verified": "Verificado", "active": "Activo", - "card-received": "Received", - "card-received-on": "Received on", - "card-end": "End", - "card-end-on": "Ends on", - "editCardReceivedDatePopup-title": "Change received date", - "editCardEndDatePopup-title": "Change end date" + "card-received": "Recibido", + "card-received-on": "Recibido el", + "card-end": "Termina", + "card-end-on": "Termina el", + "editCardReceivedDatePopup-title": "Cambiar la fecha de recepción", + "editCardEndDatePopup-title": "Cambiar la fecha de finalización" }
\ No newline at end of file diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json index 169559b0..c227b835 100644 --- a/i18n/fa.i18n.json +++ b/i18n/fa.i18n.json @@ -436,10 +436,10 @@ "createdAt": "ساخته شده در", "verified": "معتبر", "active": "فعال", - "card-received": "Received", - "card-received-on": "Received on", - "card-end": "End", - "card-end-on": "Ends on", - "editCardReceivedDatePopup-title": "Change received date", - "editCardEndDatePopup-title": "Change end date" + "card-received": "رسیده", + "card-received-on": "رسیده در", + "card-end": "پایان", + "card-end-on": "پایان در", + "editCardReceivedDatePopup-title": "تغییر تاریخ رسید", + "editCardEndDatePopup-title": "تغییر تاریخ پایان" }
\ No newline at end of file diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 091e589a..b0e03b24 100644 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -436,10 +436,10 @@ "createdAt": "Créé à", "verified": "Vérifié", "active": "Actif", - "card-received": "Received", - "card-received-on": "Received on", - "card-end": "End", - "card-end-on": "Ends on", - "editCardReceivedDatePopup-title": "Change received date", - "editCardEndDatePopup-title": "Change end date" + "card-received": "Reçue", + "card-received-on": "Reçue le", + "card-end": "Fin", + "card-end-on": "Se termine le", + "editCardReceivedDatePopup-title": "Changer la date de réception", + "editCardEndDatePopup-title": "Changer la date de fin" }
\ No newline at end of file diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json index c32dcedf..73f2169d 100644 --- a/i18n/id.i18n.json +++ b/i18n/id.i18n.json @@ -245,7 +245,7 @@ "import-show-user-mapping": "Review pemetaan partisipan", "import-user-select": "Pilih nama pengguna yang Anda mau gunakan sebagai anggota ini", "importMapMembersAddPopup-title": "Pilih anggota Wekan", - "info": "Version", + "info": "Versi", "initials": "Inisial", "invalid-date": "Tanggal tidak sah", "invalid-time": "Invalid time", diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index 1358954c..27a51cf1 100644 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -435,5 +435,11 @@ "accounts-allowEmailChange": "Allow Email Change", "createdAt": "Created at", "verified": "Verified", - "active": "Active" + "active": "Active", + "card-received": "Received", + "card-received-on": "Received on", + "card-end": "End", + "card-end-on": "Ends on", + "editCardReceivedDatePopup-title": "Change received date", + "editCardEndDatePopup-title": "Change end date" }
\ No newline at end of file diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index 6df88c9d..fb07b6d8 100644 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -12,7 +12,7 @@ "act-archivedBoard": "归档看板 __board__", "act-archivedCard": "归档卡片 __card__", "act-archivedList": "归档列表 __list__", - "act-archivedSwimlane": "archived __swimlane__", + "act-archivedSwimlane": "归档泳道 __swimlane__", "act-importBoard": "导入看板 __board__", "act-importCard": "导入卡片 __card__", "act-importList": "导入列表 __list__", @@ -69,7 +69,7 @@ "archive-board": "归档看板", "archive-card": "归档卡片", "archive-list": "归档列表", - "archive-swimlane": "Archive Swimlane", + "archive-swimlane": "归档泳道图", "archive-selection": "归档所选内容", "archiveBoardPopup-title": "确定要归档看板吗?", "archived-items": "已归档项目", @@ -159,9 +159,9 @@ "confirm-checklist-delete-dialog": "确认要删除清单吗", "copy-card-link-to-clipboard": "复制卡片链接到剪贴板", "copyCardPopup-title": "复制卡片", - "copyChecklistToManyCardsPopup-title": "Copy Checklist Template to Many Cards", - "copyChecklistToManyCardsPopup-instructions": "Destination Card Titles and Descriptions in this JSON format", - "copyChecklistToManyCardsPopup-format": "[ {\"title\": \"First card title\", \"description\":\"First card description\"}, {\"title\":\"Second card title\",\"description\":\"Second card description\"},{\"title\":\"Last card title\",\"description\":\"Last card description\"} ]", + "copyChecklistToManyCardsPopup-title": "复制清单模板至多个卡片", + "copyChecklistToManyCardsPopup-instructions": "以JSON格式表示目标卡片的标题和描述", + "copyChecklistToManyCardsPopup-format": "[ {\"title\": \"第一个卡片的标题\", \"description\":\"第一个卡片的描述\"}, {\"title\":\"第二个卡片的标题\",\"description\":\"第二个卡片的描述\"},{\"title\":\"最后一个卡片的标题\",\"description\":\"最后一个卡片的描述\"} ]", "create": "创建", "createBoardPopup-title": "创建看板", "chooseBoardSourcePopup-title": "导入看板", @@ -268,7 +268,7 @@ "list-move-cards": "移动列表中的所有卡片", "list-select-cards": "选择列表中的所有卡片", "listActionPopup-title": "列表操作", - "swimlaneActionPopup-title": "Swimlane Actions", + "swimlaneActionPopup-title": "泳道图操作", "listImportCardPopup-title": "导入 Trello 卡片", "listMorePopup-title": "更多", "link-list": "关联到这个列表", @@ -295,7 +295,7 @@ "name": "名称", "no-archived-cards": "没有已归档的卡片", "no-archived-lists": "没有已归档的列表。", - "no-archived-swimlanes": "No archived swimlanes.", + "no-archived-swimlanes": "没有已归档的泳道图", "no-results": "无结果", "normal": "普通", "normal-desc": "可以创建以及编辑卡片,无法更改设置。", @@ -331,8 +331,8 @@ "restore": "还原", "save": "保存", "search": "搜索", - "search-cards": "Search from card titles and descriptions on this board", - "search-example": "Text to search for?", + "search-cards": "搜索当前看板上的卡片标题和描述", + "search-example": "搜索", "select-color": "选择颜色", "set-wip-limit-value": "设置此列表中的最大任务数", "setWipLimitPopup-title": "设置最大任务数", @@ -378,7 +378,7 @@ "watching": "关注", "watching-info": "当此看板发生变更时会通知你", "welcome-board": "“欢迎”看板", - "welcome-swimlane": "Milestone 1", + "welcome-swimlane": "里程碑 1", "welcome-list1": "基本", "welcome-list2": "高阶", "what-to-do": "要做什么?", @@ -436,10 +436,10 @@ "createdAt": "创建于", "verified": "已验证", "active": "活跃", - "card-received": "Received", - "card-received-on": "Received on", - "card-end": "End", - "card-end-on": "Ends on", - "editCardReceivedDatePopup-title": "Change received date", - "editCardEndDatePopup-title": "Change end date" + "card-received": "已接收", + "card-received-on": "接收于", + "card-end": "终止", + "card-end-on": "终止于", + "editCardReceivedDatePopup-title": "修改接收日期", + "editCardEndDatePopup-title": "修改终止日期" }
\ No newline at end of file diff --git a/package.json b/package.json index ec6ff169..9485ca2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wekan", - "version": "0.78.0", + "version": "0.79.0", "description": "The open-source Trello-like kanban", "private": true, "scripts": { diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 4d478e1c..8690076d 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 63, + appVersion = 64, # Increment this for every release. - appMarketingVersion = (defaultText = "0.78.0~2018-03-17"), + appMarketingVersion = (defaultText = "0.79.0~2018-03-31"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, |