mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
fixed bug with app boot
This commit is contained in:
parent
4de19dcbec
commit
ca783dd323
9 changed files with 2673 additions and 1141 deletions
File diff suppressed because one or more lines are too long
|
@ -41,20 +41,23 @@ export default Component.extend(ModalMixin, {
|
|||
},
|
||||
|
||||
load() {
|
||||
this.get('documentService').getPageMoveCopyTargets().then((d) => {
|
||||
let me = this.get('document');
|
||||
|
||||
d.forEach((i) => {
|
||||
i.set('selected', false);
|
||||
let permissions = this.get('permissions');
|
||||
if (permissions.get('documentMove') || permissions.get('documentCopy')) {
|
||||
this.get('documentService').getPageMoveCopyTargets().then((d) => {
|
||||
let me = this.get('document');
|
||||
|
||||
d.forEach((i) => {
|
||||
i.set('selected', false);
|
||||
});
|
||||
|
||||
if (this.get('isDestroyed') || this.get('isDestroying')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.set('documentList', A(d));
|
||||
this.set('documentListOthers', A(d.filter((item) => item.get('id') !== me.get('id'))));
|
||||
});
|
||||
|
||||
if (this.get('isDestroyed') || this.get('isDestroying')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.set('documentList', A(d));
|
||||
this.set('documentListOthers', A(d.filter((item) => item.get('id') !== me.get('id'))));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
|
@ -29,7 +29,6 @@ export default Component.extend({
|
|||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.getAttachments();
|
||||
},
|
||||
|
||||
|
|
|
@ -136,14 +136,16 @@ export default Component.extend(TooltipMixin, {
|
|||
},
|
||||
|
||||
loadBlocks() {
|
||||
this.get('sectionService').getSpaceBlocks(this.get('folder.id')).then((blocks) => {
|
||||
if (this.get('isDestroyed') || this.get('isDestroying')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.set('blocks', blocks);
|
||||
this.set('hasBlocks', blocks.get('length') > 0);
|
||||
});
|
||||
if (is.not.undefined(this.get('folder'))) {
|
||||
this.get('sectionService').getSpaceBlocks(this.get('folder.id')).then((blocks) => {
|
||||
if (this.get('isDestroyed') || this.get('isDestroying')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.set('blocks', blocks);
|
||||
this.set('hasBlocks', blocks.get('length') > 0);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
|
||||
<div class="row no-gutters">
|
||||
<div class="col-12">
|
||||
<div class="text-center">
|
||||
<ul class="tabnav-control mt-5 mb-5">
|
||||
<div class="text-center mt-5 mb-5 non-printable">
|
||||
<ul class="tabnav-control">
|
||||
<li class="tab {{if (eq tab 'content') 'selected'}}" {{action 'onTabChange' 'content'}}>Content</li>
|
||||
<li class="tab {{if (eq tab 'attachment') 'selected'}}" {{action 'onTabChange' 'attachment'}}>Attachments</li>
|
||||
{{#if session.authenticated}}
|
||||
|
|
|
@ -62,22 +62,18 @@ export default Service.extend({
|
|||
return resolve(this);
|
||||
}
|
||||
|
||||
if (requestedRoute === 'secure') {
|
||||
this.setProperties({
|
||||
title: htmlSafe("Secure document viewing"),
|
||||
allowAnonymousAccess: true,
|
||||
secureMode: true
|
||||
});
|
||||
|
||||
this.get('localStorage').clearAll();
|
||||
|
||||
return resolve(this);
|
||||
}
|
||||
|
||||
return this.get('ajax').request('public/meta').then((response) => {
|
||||
this.setProperties(response);
|
||||
|
||||
if (is.not.include(requestedUrl, '/auth/')) {
|
||||
if (requestedRoute === 'secure') {
|
||||
this.setProperties({
|
||||
title: htmlSafe("Secure document viewing"),
|
||||
allowAnonymousAccess: true,
|
||||
secureMode: true
|
||||
});
|
||||
|
||||
this.get('localStorage').clearAll();
|
||||
} else if (is.not.include(requestedUrl, '/auth/')) {
|
||||
this.get('localStorage').storeSessionItem('entryUrl', requestedUrl);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{{#each files key="id" as |a index|}}
|
||||
<li class="item">
|
||||
<img class="icon" src="/assets/img/attachments/{{document/file-icon a.extension}}" />
|
||||
<a href="{{ appMeta.endpoint }}/public/attachments/{{ appMeta.orgId }}/{{ a.id }}">
|
||||
<a href="{{appMeta.endpoint}}/public/attachments/{{appMeta.orgId}}/{{a.id}}">
|
||||
<span class="file">{{ a.filename }}</span>
|
||||
</a>
|
||||
{{#if permissions.documentEdit}}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"author": "Documize Inc.",
|
||||
"license": "AGPL",
|
||||
"devDependencies": {
|
||||
"broccoli-asset-rev": "^2.4.5",
|
||||
"broccoli-asset-rev": "^2.6.0",
|
||||
"ember-ajax": "^3.0.0",
|
||||
"ember-cli": "^2.17.1",
|
||||
"ember-cli-app-version": "^3.0.0",
|
||||
|
|
|
@ -1082,7 +1082,7 @@ breakable@~1.0.0:
|
|||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/breakable/-/breakable-1.0.0.tgz#784a797915a38ead27bad456b5572cb4bbaa78c1"
|
||||
|
||||
broccoli-asset-rev@^2.4.5:
|
||||
broccoli-asset-rev@^2.6.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/broccoli-asset-rev/-/broccoli-asset-rev-2.6.0.tgz#0633fc3a0b2ba0c2c1d56fa9feb7b331fc83be6d"
|
||||
dependencies:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue