summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-04-06 08:46:40 +0300
committerLauri Ojansivu <x@xet7.org>2019-04-06 08:46:40 +0300
commit56cccc678107a94d4cadb13f3b6138cef93a18b0 (patch)
treec3bef1326c7d328506e3bc38e6223fbf3f205c25 /client
parentb680bb53725103f186ac1c7cb604fbd4a5773051 (diff)
parent48216e16537d50a27579c545c93624c0302a5a78 (diff)
downloadwekan-56cccc678107a94d4cadb13f3b6138cef93a18b0.tar.gz
wekan-56cccc678107a94d4cadb13f3b6138cef93a18b0.tar.bz2
wekan-56cccc678107a94d4cadb13f3b6138cef93a18b0.zip
Merge remote-tracking branch 'Angtrim/feature-duplicate' into edge
Diffstat (limited to 'client')
-rw-r--r--client/components/boards/boardsList.jade2
-rw-r--r--client/components/boards/boardsList.js15
-rw-r--r--client/components/boards/boardsList.styl13
-rw-r--r--client/components/rules/triggers/boardTriggers.jade3
-rw-r--r--client/components/rules/triggers/boardTriggers.js6
5 files changed, 35 insertions, 4 deletions
diff --git a/client/components/boards/boardsList.jade b/client/components/boards/boardsList.jade
index e36b8fc6..abb009f7 100644
--- a/client/components/boards/boardsList.jade
+++ b/client/components/boards/boardsList.jade
@@ -22,7 +22,7 @@ template(name="boardList")
i.fa.js-star-board(
class="fa-star{{#if isStarred}} is-star-active{{else}}-o{{/if}}"
title="{{_ 'star-board-title'}}")
-
+ i.fa.js-clone-board(class="fa-clone")
if hasSpentTimeCards
i.fa.js-has-spenttime-cards(
class="fa-circle{{#if hasOvertimeCards}} has-overtime-card-active{{else}} no-overtime-card-active{{/if}}"
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index 3aacdedb..ad28fee8 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -55,6 +55,21 @@ BlazeComponent.extendComponent({
Meteor.user().toggleBoardStar(boardId);
evt.preventDefault();
},
+ 'click .js-clone-board'(evt) {
+ Meteor.call('cloneBoard',
+ this.currentData()._id,
+ Session.get('fromBoard'),
+ (err, res) => {
+ if (err) {
+ this.setError(err.error);
+ } else {
+ Session.set('fromBoard', null);
+ Utils.goBoardId(res);
+ }
+ }
+ );
+ evt.preventDefault();
+ },
'click .js-accept-invite'() {
const boardId = this.currentData()._id;
Meteor.user().removeInvite(boardId);
diff --git a/client/components/boards/boardsList.styl b/client/components/boards/boardsList.styl
index 80e47685..9f0b204e 100644
--- a/client/components/boards/boardsList.styl
+++ b/client/components/boards/boardsList.styl
@@ -93,14 +93,27 @@ $spaceBetweenTiles = 16px
.is-star-active
color: white
+ .fa-clone
+ position: absolute;
+ bottom: 0
+ font-size: 14px
+ height: 18px
+ line-height: 18px
+ opacity: 0
+ right: 0
+ padding: 9px 9px
+ transition-duration: .15s
+ transition-property: color, font-size, background
li:hover a
&:hover
.fa-star,
+ .fa-clone,
.fa-star-o
color: white
.fa-star,
+ .fa-clone,
.fa-star-o
color: white
opacity: .75
diff --git a/client/components/rules/triggers/boardTriggers.jade b/client/components/rules/triggers/boardTriggers.jade
index b8c11d69..ff1406f6 100644
--- a/client/components/rules/triggers/boardTriggers.jade
+++ b/client/components/rules/triggers/boardTriggers.jade
@@ -64,8 +64,7 @@ template(name="boardTriggers")
div.trigger-text
| {{_'r-in-swimlane'}}
div.trigger-dropdown
- input(id="create-swimlane-name",type=text,placeholder="{{_'r-swimlane-name'}}")
- div.trigger-button.trigger-button-person.js-show-user-field
+ input(id="create-swimlane-name-2",type=text,placeholder="{{_'r-swimlane-name'}}")
div.trigger-button.trigger-button-person.js-show-user-field
i.fa.fa-user
div.user-details.hide-element
diff --git a/client/components/rules/triggers/boardTriggers.js b/client/components/rules/triggers/boardTriggers.js
index d4b9b81c..1dc5c437 100644
--- a/client/components/rules/triggers/boardTriggers.js
+++ b/client/components/rules/triggers/boardTriggers.js
@@ -39,15 +39,18 @@ BlazeComponent.extendComponent({
'click .js-add-moved-trigger' (event) {
const datas = this.data();
const desc = Utils.getTriggerActionDesc(event, this);
- const swimlaneName = this.find('#create-swimlane-name').value;
+ const swimlaneName = this.find('#create-swimlane-name-2').value;
const actionSelected = this.find('#move-action').value;
const listName = this.find('#move-list-name').value;
const boardId = Session.get('currentBoard');
+ const divId = $(event.currentTarget.parentNode).attr('id');
+ const cardTitle = this.cardTitleFilters[divId];
if (actionSelected === 'moved-to') {
datas.triggerVar.set({
activityType: 'moveCard',
boardId,
listName,
+ cardTitle,
swimlaneName,
'oldListName': '*',
desc,
@@ -57,6 +60,7 @@ BlazeComponent.extendComponent({
datas.triggerVar.set({
activityType: 'moveCard',
boardId,
+ cardTitle,
swimlaneName,
'listName': '*',
'oldListName': listName,