diff options
Diffstat (limited to 'client/components/boards')
-rw-r--r-- | client/components/boards/boardsList.jade | 2 | ||||
-rw-r--r-- | client/components/boards/boardsList.js | 15 | ||||
-rw-r--r-- | client/components/boards/boardsList.styl | 13 |
3 files changed, 29 insertions, 1 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 |