mirror of
https://github.com/documize/community.git
synced 2025-07-22 22:59:43 +02:00
Content liking
New per space option that allows users to like/dislike content. The prompt is configurable per space, e.g. "Was this useful?". Enterprise edition gets new Votes report providing insights into most/least liked content.
This commit is contained in:
parent
6c8f23792c
commit
22b6674edb
23 changed files with 1031 additions and 694 deletions
|
@ -40,6 +40,7 @@ export default Component.extend(TooltipMixin, {
|
|||
return this.get('blocks.length') > 0;
|
||||
}),
|
||||
mousetrap: null,
|
||||
voteThanks: false,
|
||||
|
||||
didRender() {
|
||||
this._super(...arguments);
|
||||
|
@ -77,7 +78,7 @@ export default Component.extend(TooltipMixin, {
|
|||
let mousetrap = this.get('mousetrap');
|
||||
if (is.not.null(mousetrap)) {
|
||||
mousetrap.unbind('esc');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
contentLinkHandler() {
|
||||
|
@ -229,7 +230,7 @@ export default Component.extend(TooltipMixin, {
|
|||
// let cb2 = this.get('onSavePage');
|
||||
// cb2(page, meta);
|
||||
this.attrs.onSavePage(page, meta); // eslint-disable-line ember/no-attrs-in-components
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -351,6 +352,11 @@ export default Component.extend(TooltipMixin, {
|
|||
});
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
onVote(vote) {
|
||||
this.get('documentService').vote(this.get('document.id'), vote);
|
||||
this.set('voteThanks', true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue