mirror of
https://github.com/wekan/wekan.git
synced 2026-01-23 17:56:09 +01:00
Fixed "Copy card link to clipboard" icon often not working.
Thanks to brlin-tw and xet7 ! Fixes #6068
This commit is contained in:
parent
4473ca09f6
commit
d337afd5d3
3 changed files with 8 additions and 5 deletions
|
|
@ -423,7 +423,8 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-copy-link'(event) {
|
||||
event.preventDefault();
|
||||
const promise = Utils.copyTextToClipboard(event.target.href);
|
||||
const url = this.data().absoluteUrl();
|
||||
const promise = Utils.copyTextToClipboard(url);
|
||||
|
||||
const $tooltip = this.$('.card-details-header .copied-tooltip');
|
||||
Utils.showCopied(promise, $tooltip);
|
||||
|
|
|
|||
|
|
@ -1067,10 +1067,10 @@ Boards.helpers({
|
|||
},
|
||||
|
||||
absoluteUrl() {
|
||||
return FlowRouter.url('board', { id: this._id, slug: this.slug });
|
||||
return FlowRouter.url('board', { id: this._id, slug: this.slug || 'board' });
|
||||
},
|
||||
originRelativeUrl() {
|
||||
return FlowRouter.path('board', { id: this._id, slug: this.slug });
|
||||
return FlowRouter.path('board', { id: this._id, slug: this.slug || 'board' });
|
||||
},
|
||||
|
||||
colorClass() {
|
||||
|
|
|
|||
|
|
@ -1019,17 +1019,19 @@ Cards.helpers({
|
|||
|
||||
absoluteUrl() {
|
||||
const board = this.board();
|
||||
if (!board) return undefined;
|
||||
return FlowRouter.url('card', {
|
||||
boardId: board._id,
|
||||
slug: board.slug,
|
||||
slug: board.slug || 'board',
|
||||
cardId: this._id,
|
||||
});
|
||||
},
|
||||
originRelativeUrl() {
|
||||
const board = this.board();
|
||||
if (!board) return undefined;
|
||||
return FlowRouter.path('card', {
|
||||
boardId: board._id,
|
||||
slug: board.slug,
|
||||
slug: board.slug || 'board',
|
||||
cardId: this._id,
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue