Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 5d775f3e
authored
2024-07-31 18:37:51 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Mejora Imprimir pdf
1 parent
f009e76a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
static/src/carbone.js
static/src/carbone.js
View file @
5d775f3
...
@@ -28,6 +28,7 @@ function generarReporteTemplate (template) {
...
@@ -28,6 +28,7 @@ function generarReporteTemplate (template) {
//REPORTE VIA CARBONE
//REPORTE VIA CARBONE
var
solicitud
=
{};
var
solicitud
=
{};
const
patente
=
document
.
getElementById
(
'patente_header'
);
const
patente
=
document
.
getElementById
(
'patente_header'
);
message
(
"Recuperando reporte "
+
patente
.
value
)
/////////////////////////ADAPTO_DATOS////////////////////////////
/////////////////////////ADAPTO_DATOS////////////////////////////
...
@@ -107,10 +108,29 @@ function generarReporteTemplate (template) {
...
@@ -107,10 +108,29 @@ function generarReporteTemplate (template) {
.
then
(
data
=>
{
.
then
(
data
=>
{
var
pdfUrl
=
data
.
full_url
;
var
pdfUrl
=
data
.
full_url
;
window
.
open
(
pdfUrl
);
openPdfInPopup
(
pdfUrl
);
document
.
getElementById
(
"message"
).
click
();
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
console
.
error
(
'Error:'
,
error
);
message
(
'Error:'
+
error
);
});
});
}
}
function
openPdfInPopup
(
url
)
{
// Especifica las características de la ventana emergente
const
width
=
800
;
const
height
=
600
;
const
left
=
(
screen
.
width
-
width
)
/
2
;
const
top
=
(
screen
.
height
-
height
)
/
2
;
// Abre la ventana emergente
window
.
open
(
url
,
'_blank'
,
`width=
${
width
}
,height=
${
height
}
,top=
${
top
}
,left=
${
left
}
`
);
}
function
message
(
msg
)
{
let
m
=
document
.
getElementById
(
"message"
);
m
.
style
.
display
=
"block"
;
m
=
document
.
getElementById
(
"msg"
);
m
.
innerHTML
=
msg
;
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment