mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
EmberJS: FolderID to SpaceID
Co-Authored-By: Harvey Kandola <harvey@documize.com>
This commit is contained in:
parent
66d5e73ed1
commit
e0457b40da
45 changed files with 170 additions and 99 deletions
|
@ -127,7 +127,7 @@ export default Component.extend(ModalMixin, TooltipMixin, {
|
|||
selection = {
|
||||
context: '',
|
||||
documentId: documentId,
|
||||
folderId: folderId,
|
||||
spaceId: folderId,
|
||||
id: stringUtil.makeId(16),
|
||||
linkType: 'network',
|
||||
targetId: '',
|
||||
|
|
|
@ -147,7 +147,7 @@ export default Component.extend(ModalMixin, Tooltips, {
|
|||
|
||||
this.get('documentService').getPageMeta(this.get('document.id'), page.get('id')).then((pm) => {
|
||||
let block = {
|
||||
folderId: this.get('folder.id'),
|
||||
spaceId: this.get('folder.id'),
|
||||
contentType: page.get('contentType'),
|
||||
pageType: page.get('pageType'),
|
||||
title: blockTitle,
|
||||
|
|
|
@ -137,7 +137,7 @@ export default Component.extend(Notifier, {
|
|||
// prepare links associated with document
|
||||
link.forEach((l) => {
|
||||
let t = {
|
||||
folderId: folderId,
|
||||
spaceId: folderId,
|
||||
documentId: docId,
|
||||
categoryId: l.get('id')
|
||||
};
|
||||
|
@ -148,7 +148,7 @@ export default Component.extend(Notifier, {
|
|||
// prepare links no longer associated with document
|
||||
unlink.forEach((l) => {
|
||||
let t = {
|
||||
folderId: folderId,
|
||||
spaceId: folderId,
|
||||
documentId: docId,
|
||||
categoryId: l.get('id')
|
||||
};
|
||||
|
|
|
@ -108,7 +108,7 @@ export default Component.extend(ModalMixin, TooltipMixin, Notifer, {
|
|||
|
||||
let c = {
|
||||
category: cat,
|
||||
folderId: this.get('space.id')
|
||||
spaceId: this.get('space.id')
|
||||
};
|
||||
|
||||
this.showWait();
|
||||
|
|
|
@ -41,11 +41,11 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
let folder = this.get('space');
|
||||
|
||||
let spaceTypeOptions = A([]);
|
||||
spaceTypeOptions.pushObject({id: constants.FolderType.Private, label: 'Private - viewable only by me'});
|
||||
spaceTypeOptions.pushObject({id: constants.FolderType.Protected, label: 'Protected - access is restricted to selected users'});
|
||||
spaceTypeOptions.pushObject({id: constants.FolderType.Public, label: 'Public - can be seen by everyone'});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Private, label: 'Private - viewable only by me'});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Protected, label: 'Protected - access is restricted to selected users'});
|
||||
spaceTypeOptions.pushObject({id: constants.SpaceType.Public, label: 'Public - can be seen by everyone'});
|
||||
this.set('spaceTypeOptions', spaceTypeOptions);
|
||||
this.set('spaceType', spaceTypeOptions.findBy('id', folder.get('folderType')));
|
||||
this.set('spaceType', spaceTypeOptions.findBy('id', folder.get('spaceType')));
|
||||
|
||||
this.set('allowLikes', folder.get('allowLikes'));
|
||||
|
||||
|
@ -75,7 +75,7 @@ export default Component.extend(AuthMixin, Notifier, {
|
|||
if (!this.get('isSpaceAdmin')) return;
|
||||
|
||||
let space = this.get('space');
|
||||
space.set('folderType', this.get('spaceType.id'));
|
||||
space.set('spaceType', this.get('spaceType.id'));
|
||||
|
||||
let allowLikes = this.get('allowLikes');
|
||||
space.set('likes', allowLikes ? this.get('likes') : '');
|
||||
|
|
|
@ -99,7 +99,7 @@ export default Component.extend(Notifier, Modals, {
|
|||
let raw = {
|
||||
id: stringUtil.makeId(16),
|
||||
orgId: this.get('folder.orgId'),
|
||||
folderId: this.get('folder.id'),
|
||||
spaceId: this.get('folder.id'),
|
||||
whoId: whoId,
|
||||
who: who,
|
||||
name: name,
|
||||
|
|
|
@ -92,7 +92,7 @@ export default Component.extend(ModalMixin, {
|
|||
|
||||
actions: {
|
||||
jumpToPin(pin) {
|
||||
let folderId = pin.get('folderId');
|
||||
let folderId = pin.get('spaceId');
|
||||
let documentId = pin.get('documentId');
|
||||
|
||||
if (_.isEmpty(documentId)) {
|
||||
|
|
|
@ -36,13 +36,13 @@ export default Component.extend(TooltipMixin, NotifierMixin, AuthMixin, {
|
|||
let privateFolders = [];
|
||||
|
||||
_.each(folders, folder => {
|
||||
if (folder.get('folderType') === constants.FolderType.Public) {
|
||||
if (folder.get('spaceType') === constants.SpaceType.Public) {
|
||||
publicFolders.pushObject(folder);
|
||||
}
|
||||
if (folder.get('folderType') === constants.FolderType.Private) {
|
||||
if (folder.get('spaceType') === constants.SpaceType.Private) {
|
||||
privateFolders.pushObject(folder);
|
||||
}
|
||||
if (folder.get('folderType') === constants.FolderType.Protected) {
|
||||
if (folder.get('spaceType') === constants.SpaceType.Protected) {
|
||||
protectedFolders.pushObject(folder);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -92,7 +92,7 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, Notifier, {
|
|||
let pin = {
|
||||
pin: this.get('pinState.newName'),
|
||||
documentId: this.get('document.id'),
|
||||
folderId: this.get('space.id')
|
||||
spaceId: this.get('space.id')
|
||||
};
|
||||
|
||||
this.get('pinned').pinItem(pin).then((pin) => {
|
||||
|
|
|
@ -164,7 +164,7 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, Notifier, {
|
|||
let pin = {
|
||||
pin: this.get('pinState.newName'),
|
||||
documentId: '',
|
||||
folderId: this.get('space.id')
|
||||
spaceId: this.get('space.id')
|
||||
};
|
||||
|
||||
this.get('pinned').pinItem(pin).then((pin) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue