mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #4214 from beganovich/v5-fix-setup-javascript
(v5) Fix setup issue with opening new PDFs
This commit is contained in:
commit
7a67b8ded0
@ -195,7 +195,7 @@ class SetupController extends Controller
|
|||||||
return $this->testPhantom();
|
return $this->testPhantom();
|
||||||
}
|
}
|
||||||
|
|
||||||
Browsershot::html('PDF GENERATION WORKS! Thank you for using Invoice Ninja!')
|
Browsershot::html('GENERATING PDFs WORKS! Thank you for using Invoice Ninja!')
|
||||||
->setNodeBinary(config('ninja.system.node_path'))
|
->setNodeBinary(config('ninja.system.node_path'))
|
||||||
->setNpmBinary(config('ninja.system.npm_path'))
|
->setNpmBinary(config('ninja.system.npm_path'))
|
||||||
->noSandbox()
|
->noSandbox()
|
||||||
|
2
public/js/setup/setup.js
vendored
2
public/js/setup/setup.js
vendored
File diff suppressed because one or more lines are too long
@ -16,6 +16,6 @@
|
|||||||
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=1c5d76fb5f98bd49f6c8",
|
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=1c5d76fb5f98bd49f6c8",
|
||||||
"/js/clients/shared/multiple-downloads.js": "/js/clients/shared/multiple-downloads.js?id=bf87649ca30c9a3fba59",
|
"/js/clients/shared/multiple-downloads.js": "/js/clients/shared/multiple-downloads.js?id=bf87649ca30c9a3fba59",
|
||||||
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=df93e290245c26694fdb",
|
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=df93e290245c26694fdb",
|
||||||
"/js/setup/setup.js": "/js/setup/setup.js?id=9561e6b4d2cc26f85d17",
|
"/js/setup/setup.js": "/js/setup/setup.js?id=e8de60f3af6b10afe483",
|
||||||
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
|
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
|
||||||
}
|
}
|
||||||
|
16
resources/js/setup/setup.js
vendored
16
resources/js/setup/setup.js
vendored
@ -59,12 +59,20 @@ class Setup {
|
|||||||
handleTestPdfCheck() {
|
handleTestPdfCheck() {
|
||||||
Axios.post('/setup/check_pdf', {})
|
Axios.post('/setup/check_pdf', {})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
let win = window.open(response.data.url, '_blank');
|
try {
|
||||||
win.focus();
|
let win = window.open(response.data.url, '_blank');
|
||||||
|
win.focus();
|
||||||
|
|
||||||
return this.handleSuccess(this.checkPdfAlert);
|
return this.handleSuccess(this.checkPdfAlert);
|
||||||
|
} catch (error) {
|
||||||
|
this.handleSuccess(this.checkPdfAlert);
|
||||||
|
this.checkPdfAlert.textContent = `Success! You can preview test PDF here: ${response.data.url}`;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => this.handleFailure(this.checkPdfAlert));
|
.catch((error) => {
|
||||||
|
console.log(error);
|
||||||
|
this.handleFailure(this.checkPdfAlert)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSuccess(element) {
|
handleSuccess(element) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user