1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 21:29:42 +02:00

improved empty state and dropdown positions

This commit is contained in:
Harvey Kandola 2017-10-10 16:02:46 -04:00
parent c77b384215
commit 38b401f646
25 changed files with 148 additions and 96 deletions

View file

@ -12,6 +12,13 @@
import Ember from 'ember';
export default Ember.Component.extend({
showAdd: Ember.computed('permissions', 'documents', function() {
return this.get('documents.length') === 0 && this.get('permissions.documentAdd');
}),
showLockout: Ember.computed('permissions', 'documents', function() {
return this.get('documents.length') === 0 && !this.get('permissions.documentAdd');
}),
actions: {
selectDocument(documentId) {
let doc = this.get('documents').findBy('id', documentId);