mirror of
https://github.com/documize/community.git
synced 2025-07-22 14:49:42 +02:00
improved empty state and dropdown positions
This commit is contained in:
parent
c77b384215
commit
38b401f646
25 changed files with 148 additions and 96 deletions
|
@ -160,19 +160,14 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, DropdownMixin
|
|||
|
||||
$(".category-access-dialog").css("display", "block");
|
||||
|
||||
let drop = new Drop({
|
||||
let dropOptions = Object.assign(this.get('dropDefaults'), {
|
||||
target: $("#category-access-button-" + catId)[0],
|
||||
content: $(".category-access-dialog")[0],
|
||||
classes: 'drop-theme-basic',
|
||||
position: "bottom right",
|
||||
openOn: "always",
|
||||
tetherOptions: {
|
||||
offset: "5px 0",
|
||||
targetOffset: "10px 0"
|
||||
},
|
||||
remove: false
|
||||
});
|
||||
remove: false});
|
||||
|
||||
let drop = new Drop(dropOptions);
|
||||
this.set('dropdown', drop);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -112,6 +112,7 @@ export default Ember.Component.extend(NotifierMixin, {
|
|||
|
||||
this.get('folderService').savePermissions(folder.get('id'), payload).then(() => {
|
||||
this.showNotification('Saved permissions');
|
||||
this.get('router').transitionTo('folder', folder.get('id'), folder.get('slug'));
|
||||
});
|
||||
|
||||
if (is.not.undefined(hasEveryone)) {
|
||||
|
|
|
@ -34,6 +34,9 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, AuthMixin, {
|
|||
newName: ''
|
||||
},
|
||||
deleteSpaceName: '',
|
||||
spaceSettings: Ember.computed('permissions', function() {
|
||||
return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage');
|
||||
}),
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue