mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
sticky form headers, category improvements, dropdown improvements
This commit is contained in:
parent
785d12191e
commit
1e3f8e51f0
18 changed files with 787 additions and 686 deletions
|
@ -23,6 +23,9 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, DropdownMixin
|
|||
id: "",
|
||||
name: "",
|
||||
},
|
||||
canShow: Ember.computed('permissions', 'files', function() {
|
||||
return this.get('files.length') > 0 || this.get('permissions.documentEdit');
|
||||
}),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
|
|
@ -17,6 +17,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
|
|||
documentService: Ember.inject.service('document'),
|
||||
categoryService: Ember.inject.service('category'),
|
||||
sessionService: Ember.inject.service('session'),
|
||||
newCategory: '',
|
||||
categories: [],
|
||||
hasCategories: Ember.computed('categories', function() {
|
||||
return this.get('categories').length > 0;
|
||||
|
|
|
@ -32,6 +32,7 @@ export default Ember.Component.extend({
|
|||
targetOffset: "10px 0",
|
||||
constrainToWindow: true,
|
||||
constrainToScrollParent: true,
|
||||
cssClass: '',
|
||||
tether: Ember.inject.service(),
|
||||
|
||||
hasSecondButton: Ember.computed('button2', 'color2', function () {
|
||||
|
|
|
@ -155,25 +155,31 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, AuthMixin, {
|
|||
filtered.pushObject(d);
|
||||
}
|
||||
});
|
||||
|
||||
this.set('spaceSelected', false);
|
||||
this.set('uncategorizedSelected', false);
|
||||
break;
|
||||
|
||||
case 'uncategorized':
|
||||
this.set('uncategorizedSelected', true);
|
||||
allowed = _.pluck(categoryMembers, 'documentId');
|
||||
docs.forEach((d) => {
|
||||
if (!_.contains(allowed, d.get('id'))) {
|
||||
filtered.pushObject(d);
|
||||
}
|
||||
});
|
||||
|
||||
this.set('uncategorizedSelected', true);
|
||||
this.set('spaceSelected', false);
|
||||
break;
|
||||
|
||||
case 'space':
|
||||
this.set('spaceSelected', true);
|
||||
allowed = _.pluck(categoryMembers, 'documentId');
|
||||
docs.forEach((d) => {
|
||||
filtered.pushObject(d);
|
||||
});
|
||||
|
||||
this.set('spaceSelected', true);
|
||||
this.set('uncategorizedSelected', false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue