mirror of
https://github.com/documize/community.git
synced 2025-07-23 07:09:43 +02:00
Applied new layout to space admin screens
Applied the new master layout and UI controls to the following space admin screens: 1. General options. 2. Deletion. 3. Permissions. 4. Content blocks. Co-Authored-By: Harvey Kandola <harvey@documize.com>
This commit is contained in:
parent
d5b5e015d1
commit
60e92b63a9
15 changed files with 309 additions and 226 deletions
|
@ -63,13 +63,13 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
this.set('spaceType', t);
|
||||
},
|
||||
|
||||
onSetLikes(l) {
|
||||
this.set('allowLikes', l);
|
||||
// onSetLikes(l) {
|
||||
// this.set('allowLikes', l);
|
||||
|
||||
schedule('afterRender', () => {
|
||||
if (l) this.$('#space-likes-prompt').focus();
|
||||
});
|
||||
},
|
||||
// schedule('afterRender', () => {
|
||||
// if (l) this.$('#space-likes-prompt').focus();
|
||||
// });
|
||||
// },
|
||||
|
||||
onSave() {
|
||||
if (!this.get('isSpaceAdmin')) return;
|
||||
|
|
|
@ -30,6 +30,8 @@ export default Component.extend(Notifier, Modals, {
|
|||
searchText: '',
|
||||
inviteEmail: '',
|
||||
inviteMessage: '',
|
||||
showSpacePermExplain: false,
|
||||
showDocumentPermExplain: false,
|
||||
|
||||
isSpaceAdmin: computed('permissions', function() {
|
||||
return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage');
|
||||
|
@ -146,6 +148,26 @@ export default Component.extend(Notifier, Modals, {
|
|||
},
|
||||
|
||||
actions: {
|
||||
toggleSpacePerms() {
|
||||
this.set('showSpacePermExplain', !this.get('showSpacePermExplain'));
|
||||
|
||||
if (this.showSpacePermExplain) {
|
||||
this.$(".space-perms").show();
|
||||
} else {
|
||||
this.$(".space-perms").hide();
|
||||
}
|
||||
},
|
||||
|
||||
toggleDocumentPerms() {
|
||||
this.set('showDocumentPermExplain', !this.get('showDocumentPermExplain'));
|
||||
|
||||
if (this.showDocumentPermExplain) {
|
||||
this.$(".document-perms").show();
|
||||
} else {
|
||||
this.$(".document-perms").hide();
|
||||
}
|
||||
},
|
||||
|
||||
onShowInviteModal() {
|
||||
this.modalOpen("#space-invite-user-modal", {"show": true}, '#space-invite-email');
|
||||
},
|
||||
|
|
|
@ -39,10 +39,11 @@ export default Component.extend({
|
|||
this.onClick(e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (is.not.undefined(this.linkTo)) {
|
||||
// TODO: pass in linkModel, linkOptions
|
||||
// https://emberjs.com/api/ember/3.5/classes/RouterService/methods/transitionTo?anchor=transitionTo
|
||||
this.router.transitionTo(this.linkTo);
|
||||
this.router.transitionTo(this.get('linkTo'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue