mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Complete PDF section type
This commit is contained in:
parent
7fde947a52
commit
b5cd378302
8 changed files with 98 additions and 4 deletions
|
@ -54,6 +54,9 @@ export default Component.extend({
|
|||
|
||||
setPDF() {
|
||||
let files = this.get('attachments');
|
||||
this.set('pdfName', '');
|
||||
this.set('pdfOption.fileId', '');
|
||||
|
||||
if (!_.isArray(files)) return;
|
||||
|
||||
for (let i=0; i < files.length; i++) {
|
||||
|
@ -84,7 +87,7 @@ export default Component.extend({
|
|||
let config = this.get('pdfOption');
|
||||
let page = this.get('page');
|
||||
let meta = this.get('meta');
|
||||
|
||||
|
||||
page.set('title', title);
|
||||
page.set('body', JSON.stringify(config));
|
||||
meta.set('config', JSON.stringify(config));
|
||||
|
|
|
@ -51,6 +51,10 @@ export default Component.extend({
|
|||
let orgId = this.get('appMeta.orgId');
|
||||
let fileId = this.get('pdfOption.fileId');
|
||||
|
||||
if (_.isEmpty(fileId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// For authenticated users we send server auth token.
|
||||
let qry = '';
|
||||
if (this.get('session.hasSecureToken')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue