mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Integrando preview de cliente
This commit is contained in:
8
.idea/safekat.iml
generated
8
.idea/safekat.iml
generated
@ -1,7 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="WEB_MODULE" version="4">
|
<module type="WEB_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager">
|
||||||
<content url="file://$MODULE_DIR$" />
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/ci4/app" isTestSource="false" packagePrefix="App\" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/ci4/app/Config" isTestSource="false" packagePrefix="Config\" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/ci4/app/ThirdParty/DatatablesEditor/" isTestSource="false" packagePrefix="DataTables\" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/ci4/tests" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/ci4/tests/_support" isTestSource="true" packagePrefix="Tests\Support\" />
|
||||||
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@ -5,34 +5,34 @@ const SK_PERMISSION_MATRIX = [
|
|||||||
"clientes.edit",
|
"clientes.edit",
|
||||||
"clientes.delete",
|
"clientes.delete",
|
||||||
"clientes.menu",
|
"clientes.menu",
|
||||||
"plantillaTarifa.create",
|
"plantilla-tarifa.create",
|
||||||
"plantillaTarifa.edit",
|
"plantilla-tarifa.edit",
|
||||||
"plantillaTarifa.delete",
|
"plantilla-tarifa.delete",
|
||||||
"plantillaTarifa.menu",
|
"plantilla-tarifa.menu",
|
||||||
"presupuesto.create",
|
"presupuesto.create",
|
||||||
"presupuesto.edit",
|
"presupuesto.edit",
|
||||||
"presupuesto.delete",
|
"presupuesto.delete",
|
||||||
"presupuesto.menu",
|
"presupuesto.menu",
|
||||||
"tarifaPreimpresion.create",
|
"tarifa-preimpresion.create",
|
||||||
"tarifaPreimpresion.edit",
|
"tarifa-preimpresion.edit",
|
||||||
"tarifaPreimpresion.delete",
|
"tarifa-preimpresion.delete",
|
||||||
"tarifaPreimpresion.menu",
|
"tarifa-preimpresion.menu",
|
||||||
"tarifaManipulado.create",
|
"tarifa-manipulado.create",
|
||||||
"tarifaManipulado.edit",
|
"tarifa-manipulado.edit",
|
||||||
"tarifaManipulado.delete",
|
"tarifa-manipulado.delete",
|
||||||
"tarifaManipulado.menu",
|
"tarifa-manipulado.menu",
|
||||||
"tarifaAcabado.create",
|
"tarifa-acabado.create",
|
||||||
"tarifaAcabado.edit",
|
"tarifa-acabado.edit",
|
||||||
"tarifaAcabado.delete",
|
"tarifa-acabado.delete",
|
||||||
"tarifaAcabado.menu",
|
"tarifa-acabado.menu",
|
||||||
"tarifaEncuadernacion.create",
|
"tarifa-encuadernacion.create",
|
||||||
"tarifaEncuadernacion.edit",
|
"tarifa-encuadernacion.edit",
|
||||||
"tarifaEncuadernacion.delete",
|
"tarifa-encuadernacion.delete",
|
||||||
"tarifaEncuadernacion.menu",
|
"tarifa-encuadernacion.menu",
|
||||||
"tarifaEnvio.create",
|
"tarifa-envio.create",
|
||||||
"tarifaEnvio.edit",
|
"tarifa-envio.edit",
|
||||||
"tarifaEnvio.delete",
|
"tarifa-envio.delete",
|
||||||
"tarifaEnvio.menu",
|
"tarifa-envio.menu",
|
||||||
"proveedores.create",
|
"proveedores.create",
|
||||||
"proveedores.edit",
|
"proveedores.edit",
|
||||||
"proveedores.delete",
|
"proveedores.delete",
|
||||||
@ -45,8 +45,36 @@ const SK_PERMISSION_MATRIX = [
|
|||||||
"actividad.edit",
|
"actividad.edit",
|
||||||
"actividad.delete",
|
"actividad.delete",
|
||||||
"actividad.menu",
|
"actividad.menu",
|
||||||
|
"paises.create",
|
||||||
|
"paises.edit",
|
||||||
|
"paises.delete",
|
||||||
|
"paises.menu",
|
||||||
|
"maquinas.create",
|
||||||
|
"maquinas.edit",
|
||||||
|
"maquinas.delete",
|
||||||
|
"maquinas.menu",
|
||||||
|
"maquinas-defecto.create",
|
||||||
|
"maquinas-defecto.edit",
|
||||||
|
"maquinas-defecto.delete",
|
||||||
|
"maquinas-defecto.menu",
|
||||||
|
"papel-generico.create",
|
||||||
|
"papel-generico.edit",
|
||||||
|
"papel-generico.delete",
|
||||||
|
"papel-generico.menu",
|
||||||
|
"papel-impresion.create",
|
||||||
|
"papel-impresion.edit",
|
||||||
|
"papel-impresion.delete",
|
||||||
|
"papel-impresion.menu",
|
||||||
|
"usuarios.create",
|
||||||
|
"usuarios.edit",
|
||||||
|
"usuarios.delete",
|
||||||
|
"usuarios.menu",
|
||||||
|
"roles-permisos.create",
|
||||||
|
"roles-permisos.edit",
|
||||||
|
"roles-permisos.delete",
|
||||||
|
"roles-permisos.menu",
|
||||||
],
|
],
|
||||||
"cliente" => [
|
"cliente-admin" => [
|
||||||
"clientes.create",
|
"clientes.create",
|
||||||
"clientes.edit",
|
"clientes.edit",
|
||||||
"clientes.delete",
|
"clientes.delete",
|
||||||
@ -56,6 +84,52 @@ const SK_PERMISSION_MATRIX = [
|
|||||||
"presupuesto.delete",
|
"presupuesto.delete",
|
||||||
"presupuesto.menu",
|
"presupuesto.menu",
|
||||||
],
|
],
|
||||||
|
"cliente-editor" => [
|
||||||
|
"clientes.create",
|
||||||
|
"clientes.edit",
|
||||||
|
"clientes.delete",
|
||||||
|
"clientes.menu",
|
||||||
|
"plantilla-tarifa.create",
|
||||||
|
"plantilla-tarifa.edit",
|
||||||
|
"plantilla-tarifa.delete",
|
||||||
|
"plantilla-tarifa.menu",
|
||||||
|
"presupuesto.create",
|
||||||
|
"presupuesto.edit",
|
||||||
|
"presupuesto.delete",
|
||||||
|
"presupuesto.menu",
|
||||||
|
"tarifa-preimpresion.create",
|
||||||
|
"tarifa-preimpresion.edit",
|
||||||
|
"tarifa-preimpresion.delete",
|
||||||
|
"tarifa-preimpresion.menu",
|
||||||
|
"tarifa-manipulado.create",
|
||||||
|
"tarifa-manipulado.edit",
|
||||||
|
"tarifa-manipulado.delete",
|
||||||
|
"tarifa-manipulado.menu",
|
||||||
|
"tarifa-acabado.create",
|
||||||
|
"tarifa-acabado.edit",
|
||||||
|
"tarifa-acabado.delete",
|
||||||
|
"tarifa-acabado.menu",
|
||||||
|
"tarifa-encuadernacion.create",
|
||||||
|
"tarifa-encuadernacion.edit",
|
||||||
|
"tarifa-encuadernacion.delete",
|
||||||
|
"tarifa-encuadernacion.menu",
|
||||||
|
"tarifa-envio.create",
|
||||||
|
"tarifa-envio.edit",
|
||||||
|
"tarifa-envio.delete",
|
||||||
|
"tarifa-envio.menu",
|
||||||
|
"proveedores.create",
|
||||||
|
"proveedores.edit",
|
||||||
|
"proveedores.delete",
|
||||||
|
"proveedores.menu",
|
||||||
|
"ajustes.create",
|
||||||
|
"ajustes.edit",
|
||||||
|
"ajustes.delete",
|
||||||
|
"ajustes.menu",
|
||||||
|
"actividad.create",
|
||||||
|
"actividad.edit",
|
||||||
|
"actividad.delete",
|
||||||
|
"actividad.menu",
|
||||||
|
],
|
||||||
"comercial" => [
|
"comercial" => [
|
||||||
"token.token",
|
"token.token",
|
||||||
"token.menu",
|
"token.menu",
|
||||||
@ -86,4 +160,50 @@ const SK_PERMISSION_MATRIX = [
|
|||||||
"Profile.index",
|
"Profile.index",
|
||||||
"Profile.menu",
|
"Profile.menu",
|
||||||
],
|
],
|
||||||
|
"beta" => [
|
||||||
|
"clientes.create",
|
||||||
|
"clientes.edit",
|
||||||
|
"clientes.delete",
|
||||||
|
"clientes.menu",
|
||||||
|
"plantilla-tarifa.create",
|
||||||
|
"plantilla-tarifa.edit",
|
||||||
|
"plantilla-tarifa.delete",
|
||||||
|
"plantilla-tarifa.menu",
|
||||||
|
"presupuesto.create",
|
||||||
|
"presupuesto.edit",
|
||||||
|
"presupuesto.delete",
|
||||||
|
"presupuesto.menu",
|
||||||
|
"tarifa-preimpresion.create",
|
||||||
|
"tarifa-preimpresion.edit",
|
||||||
|
"tarifa-preimpresion.delete",
|
||||||
|
"tarifa-preimpresion.menu",
|
||||||
|
"tarifa-manipulado.create",
|
||||||
|
"tarifa-manipulado.edit",
|
||||||
|
"tarifa-manipulado.delete",
|
||||||
|
"tarifa-manipulado.menu",
|
||||||
|
"tarifa-acabado.create",
|
||||||
|
"tarifa-acabado.edit",
|
||||||
|
"tarifa-acabado.delete",
|
||||||
|
"tarifa-acabado.menu",
|
||||||
|
"tarifa-encuadernacion.create",
|
||||||
|
"tarifa-encuadernacion.edit",
|
||||||
|
"tarifa-encuadernacion.delete",
|
||||||
|
"tarifa-encuadernacion.menu",
|
||||||
|
"tarifa-envio.create",
|
||||||
|
"tarifa-envio.edit",
|
||||||
|
"tarifa-envio.delete",
|
||||||
|
"tarifa-envio.menu",
|
||||||
|
"proveedores.create",
|
||||||
|
"proveedores.edit",
|
||||||
|
"proveedores.delete",
|
||||||
|
"proveedores.menu",
|
||||||
|
"ajustes.create",
|
||||||
|
"ajustes.edit",
|
||||||
|
"ajustes.delete",
|
||||||
|
"ajustes.menu",
|
||||||
|
"actividad.create",
|
||||||
|
"actividad.edit",
|
||||||
|
"actividad.delete",
|
||||||
|
"actividad.menu",
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
28
ci4/app/Config/RBAC/permissionMatrix.php.old
Normal file
28
ci4/app/Config/RBAC/permissionMatrix.php.old
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
const SK_PERMISSION_MATRIX = [
|
||||||
|
"superadmin"=> [
|
||||||
|
"admin.*",
|
||||||
|
"users.*",
|
||||||
|
"beta.*"
|
||||||
|
],
|
||||||
|
"admin"=> [
|
||||||
|
"admin.access",
|
||||||
|
"users.create",
|
||||||
|
"users.edit",
|
||||||
|
"users.delete",
|
||||||
|
"beta.access"
|
||||||
|
],
|
||||||
|
"developer"=> [
|
||||||
|
"admin.access",
|
||||||
|
"admin.settings",
|
||||||
|
"users.create",
|
||||||
|
"users.edit",
|
||||||
|
"beta.access"
|
||||||
|
],
|
||||||
|
"user"=> [
|
||||||
|
"users.list"
|
||||||
|
],
|
||||||
|
"beta"=> [
|
||||||
|
"beta.access"
|
||||||
|
]
|
||||||
|
];
|
||||||
@ -5,34 +5,34 @@ const SK_PERMISSIONS = [
|
|||||||
'clientes.edit' => 'Can edit',
|
'clientes.edit' => 'Can edit',
|
||||||
'clientes.delete' => 'Can delete',
|
'clientes.delete' => 'Can delete',
|
||||||
'clientes.menu' => 'Menu shall be visualize',
|
'clientes.menu' => 'Menu shall be visualize',
|
||||||
'plantillaTarifa.create' => 'Can create',
|
'plantilla-tarifa.create' => 'Can create',
|
||||||
'plantillaTarifa.edit' => 'Can edit',
|
'plantilla-tarifa.edit' => 'Can edit',
|
||||||
'plantillaTarifa.delete' => 'Can delete',
|
'plantilla-tarifa.delete' => 'Can delete',
|
||||||
'plantillaTarifa.menu' => 'Menu shall be visualize',
|
'plantilla-tarifa.menu' => 'Menu shall be visualize',
|
||||||
'presupuesto.create' => 'Can create',
|
'presupuesto.create' => 'Can create',
|
||||||
'presupuesto.edit' => 'Can edit',
|
'presupuesto.edit' => 'Can edit',
|
||||||
'presupuesto.delete' => 'Can delete',
|
'presupuesto.delete' => 'Can delete',
|
||||||
'presupuesto.menu' => 'Menu shall be visualize',
|
'presupuesto.menu' => 'Menu shall be visualize',
|
||||||
'tarifaPreimpresion.create' => 'Can create',
|
'tarifa-preimpresion.create' => 'Can create',
|
||||||
'tarifaPreimpresion.edit' => 'Can edit',
|
'tarifa-preimpresion.edit' => 'Can edit',
|
||||||
'tarifaPreimpresion.delete' => 'Can delete',
|
'tarifa-preimpresion.delete' => 'Can delete',
|
||||||
'tarifaPreimpresion.menu' => 'Menu shall be visualize',
|
'tarifa-preimpresion.menu' => 'Menu shall be visualize',
|
||||||
'tarifaManipulado.create' => 'Can create',
|
'tarifa-manipulado.create' => 'Can create',
|
||||||
'tarifaManipulado.edit' => 'Can edit',
|
'tarifa-manipulado.edit' => 'Can edit',
|
||||||
'tarifaManipulado.delete' => 'Can delete',
|
'tarifa-manipulado.delete' => 'Can delete',
|
||||||
'tarifaManipulado.menu' => 'Menu shall be visualize',
|
'tarifa-manipulado.menu' => 'Menu shall be visualize',
|
||||||
'tarifaAcabado.create' => 'Can create',
|
'tarifa-acabado.create' => 'Can create',
|
||||||
'tarifaAcabado.edit' => 'Can edit',
|
'tarifa-acabado.edit' => 'Can edit',
|
||||||
'tarifaAcabado.delete' => 'Can delete',
|
'tarifa-acabado.delete' => 'Can delete',
|
||||||
'tarifaAcabado.menu' => 'Menu shall be visualize',
|
'tarifa-acabado.menu' => 'Menu shall be visualize',
|
||||||
'tarifaEncuadernacion.create' => 'Can create',
|
'tarifa-encuadernacion.create' => 'Can create',
|
||||||
'tarifaEncuadernacion.edit' => 'Can edit',
|
'tarifa-encuadernacion.edit' => 'Can edit',
|
||||||
'tarifaEncuadernacion.delete' => 'Can delete',
|
'tarifa-encuadernacion.delete' => 'Can delete',
|
||||||
'tarifaEncuadernacion.menu' => 'Menu shall be visualize',
|
'tarifa-encuadernacion.menu' => 'Menu shall be visualize',
|
||||||
'tarifaEnvio.create' => 'Can create',
|
'tarifa-envio.create' => 'Can create',
|
||||||
'tarifaEnvio.edit' => 'Can edit',
|
'tarifa-envio.edit' => 'Can edit',
|
||||||
'tarifaEnvio.delete' => 'Can delete',
|
'tarifa-envio.delete' => 'Can delete',
|
||||||
'tarifaEnvio.menu' => 'Menu shall be visualize',
|
'tarifa-envio.menu' => 'Menu shall be visualize',
|
||||||
'proveedores.create' => 'Can create',
|
'proveedores.create' => 'Can create',
|
||||||
'proveedores.edit' => 'Can edit',
|
'proveedores.edit' => 'Can edit',
|
||||||
'proveedores.delete' => 'Can delete',
|
'proveedores.delete' => 'Can delete',
|
||||||
@ -45,4 +45,32 @@ const SK_PERMISSIONS = [
|
|||||||
'actividad.edit' => 'Can edit',
|
'actividad.edit' => 'Can edit',
|
||||||
'actividad.delete' => 'Can delete',
|
'actividad.delete' => 'Can delete',
|
||||||
'actividad.menu' => 'Menu shall be visualize',
|
'actividad.menu' => 'Menu shall be visualize',
|
||||||
|
'paises.create' => 'Can create',
|
||||||
|
'paises.edit' => 'Can edit',
|
||||||
|
'paises.delete' => 'Can delete',
|
||||||
|
'paises.menu' => 'Menu shall be visualize',
|
||||||
|
'maquinas.create' => 'Can create',
|
||||||
|
'maquinas.edit' => 'Can edit',
|
||||||
|
'maquinas.delete' => 'Can delete',
|
||||||
|
'maquinas.menu' => 'Menu shall be visualize',
|
||||||
|
'maquinas-defecto.create' => 'Can create',
|
||||||
|
'maquinas-defecto.edit' => 'Can edit',
|
||||||
|
'maquinas-defecto.delete' => 'Can delete',
|
||||||
|
'maquinas-defecto.menu' => 'Menu shall be visualize',
|
||||||
|
'papel-generico.create' => 'Can create',
|
||||||
|
'papel-generico.edit' => 'Can edit',
|
||||||
|
'papel-generico.delete' => 'Can delete',
|
||||||
|
'papel-generico.menu' => 'Menu shall be visualize',
|
||||||
|
'papel-impresion.create' => 'Can create',
|
||||||
|
'papel-impresion.edit' => 'Can edit',
|
||||||
|
'papel-impresion.delete' => 'Can delete',
|
||||||
|
'papel-impresion.menu' => 'Menu shall be visualize',
|
||||||
|
'usuarios.create' => 'Can create',
|
||||||
|
'usuarios.edit' => 'Can edit',
|
||||||
|
'usuarios.delete' => 'Can delete',
|
||||||
|
'usuarios.menu' => 'Menu shall be visualize',
|
||||||
|
'roles-permisos.create' => 'Can create',
|
||||||
|
'roles-permisos.edit' => 'Can edit',
|
||||||
|
'roles-permisos.delete' => 'Can delete',
|
||||||
|
'roles-permisos.menu' => 'Menu shall be visualize',
|
||||||
];
|
];
|
||||||
|
|||||||
11
ci4/app/Config/RBAC/permissions.php.old
Normal file
11
ci4/app/Config/RBAC/permissions.php.old
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
const SK_PERMISSIONS = [
|
||||||
|
'admin.access' => 'Can access the sites admin area',
|
||||||
|
'admin.settings' => 'Can access the main site settings',
|
||||||
|
'users.manage-admins' => 'Can manage other admins',
|
||||||
|
'users.list' => 'Can list user stuff',
|
||||||
|
'users.create' => 'Can create new non-admin users',
|
||||||
|
'users.edit' => 'Can edit existing non-admin users',
|
||||||
|
'users.delete' => 'Can delete existing non-admin users',
|
||||||
|
'beta.access' => 'Can access beta-level features',
|
||||||
|
];
|
||||||
22
ci4/app/Config/RBAC/roles.json
Normal file
22
ci4/app/Config/RBAC/roles.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"superadmin": {
|
||||||
|
"title": "Super Admin",
|
||||||
|
"description": "Complete control of the site."
|
||||||
|
},
|
||||||
|
"admin": {
|
||||||
|
"title": "Admin",
|
||||||
|
"description": "Day to day administrators of the site."
|
||||||
|
},
|
||||||
|
"developer": {
|
||||||
|
"title": "Developer",
|
||||||
|
"description": "Site programmers."
|
||||||
|
},
|
||||||
|
"user": {
|
||||||
|
"title": "User",
|
||||||
|
"description": "General users of the site. Often customers."
|
||||||
|
},
|
||||||
|
"beta": {
|
||||||
|
"title": "Beta User",
|
||||||
|
"description": "Has access to beta-level features."
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,12 +3,16 @@
|
|||||||
const SK_ROLES = [
|
const SK_ROLES = [
|
||||||
'admin' => [
|
'admin' => [
|
||||||
'title' => 'Administrador',
|
'title' => 'Administrador',
|
||||||
'description' => 'Describeme',
|
|
||||||
],
|
|
||||||
'cliente' => [
|
|
||||||
'title' => 'Cliente',
|
|
||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
|
'cliente-admin' => [
|
||||||
|
'title' => 'Cliente administrador',
|
||||||
|
'description' => 'Rol de cliente con permisos de administración',
|
||||||
|
],
|
||||||
|
'cliente-editor' => [
|
||||||
|
'title' => 'Cliente editor',
|
||||||
|
'description' => 'Rol de cliente con permisos de edición',
|
||||||
|
],
|
||||||
'comercial' => [
|
'comercial' => [
|
||||||
'title' => 'Comercial',
|
'title' => 'Comercial',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
@ -37,4 +41,8 @@ const SK_ROLES = [
|
|||||||
'title' => 'Editor',
|
'title' => 'Editor',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
|
'beta' => [
|
||||||
|
'title' => 'Beta',
|
||||||
|
'description' => '',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
23
ci4/app/Config/RBAC/roles.php.old
Normal file
23
ci4/app/Config/RBAC/roles.php.old
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
const SK_ROLES = [
|
||||||
|
'superadmin' => [
|
||||||
|
'title' => 'Super Admin',
|
||||||
|
'description' => 'Complete control of the site.',
|
||||||
|
],
|
||||||
|
'admin' => [
|
||||||
|
'title' => 'Admin',
|
||||||
|
'description' => 'Day to day administrators of the site.',
|
||||||
|
],
|
||||||
|
'developer' => [
|
||||||
|
'title' => 'Developer',
|
||||||
|
'description' => 'Site programmers.',
|
||||||
|
],
|
||||||
|
'user' => [
|
||||||
|
'title' => 'User',
|
||||||
|
'description' => 'General users of the site. Often customers.',
|
||||||
|
],
|
||||||
|
'beta' => [
|
||||||
|
'title' => 'Beta User',
|
||||||
|
'description' => 'Has access to beta-level features.',
|
||||||
|
],
|
||||||
|
];
|
||||||
@ -111,5 +111,11 @@ class Js_loader extends BaseController
|
|||||||
$this->response->setHeader('Content-Type', 'text/javascript');
|
$this->response->setHeader('Content-Type', 'text/javascript');
|
||||||
return view('themes/vuexy/form/presupuestos/cliente/resumen.js');
|
return view('themes/vuexy/form/presupuestos/cliente/resumen.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function presupuestoClientePreview_js()
|
||||||
|
{
|
||||||
|
$this->response->setHeader('Content-Type', 'text/javascript');
|
||||||
|
return view('themes/vuexy/form/presupuestos/cliente/previews.js');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +39,9 @@
|
|||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<h4 id="resumenTotalIVA" class="mb-1">Total: 100€</h4>
|
<h4 id="resumenTotalIVA" class="mb-1">Total: 100€</h4>
|
||||||
<h6 id="resumenPrecioU" class="mb-0">10.4€/ud</h6>
|
<h6 id="resumenPrecioU" class="mb-0">10.4€/ud</h6>
|
||||||
|
<div id="shape-container">
|
||||||
|
<div id="pv_ec_shape" style="width:95%;height:550px;margin:2.5% auto;"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
735
ci4/app/Views/themes/vuexy/form/presupuestos/cliente/previews.js
Normal file
735
ci4/app/Views/themes/vuexy/form/presupuestos/cliente/previews.js
Normal file
@ -0,0 +1,735 @@
|
|||||||
|
// Global parameters
|
||||||
|
var pvObj;
|
||||||
|
|
||||||
|
$('#toReview').on( "click", function() {
|
||||||
|
|
||||||
|
console.log('ec draw');
|
||||||
|
|
||||||
|
portadaTapaDura();
|
||||||
|
|
||||||
|
//previewEsquemaCubierta('ec', '','');
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
function previewEsquemaCubierta() {
|
||||||
|
|
||||||
|
/*let tipoImpresion;
|
||||||
|
|
||||||
|
if ($("#tipoCosido").is(":checked")) {
|
||||||
|
tipoImpresion = parseInt()
|
||||||
|
}
|
||||||
|
|
||||||
|
let tipoImpresion = parseInt($('#tipo_impresion_id').val());
|
||||||
|
|
||||||
|
// Fresado TD y Cosido TD
|
||||||
|
if (tipoImpresion === 1 || tipoImpresion === 3) {
|
||||||
|
portadaTapaDura();
|
||||||
|
}
|
||||||
|
// Fresado TB y Cosido TB
|
||||||
|
else if (tipoImpresion === 2 || tipoImpresion === 4) {
|
||||||
|
portadaTapaBlanda();
|
||||||
|
}
|
||||||
|
// Espiral TD y TB, Wire-o TD y TB
|
||||||
|
else if (tipoImpresion === 5 || tipoImpresion === 6 ||
|
||||||
|
tipoImpresion === 7 || tipoImpresion === 8) {
|
||||||
|
portadaEspiral();
|
||||||
|
}
|
||||||
|
else if (tipoImpresion === 21) {
|
||||||
|
portadaGrapado();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// ?
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function portadaTapaDura() {
|
||||||
|
|
||||||
|
// Variables locales
|
||||||
|
let altoLibro, anchoLibro, lomoLibro, anchoCubierta, altoSangrado, anchoSangrado;
|
||||||
|
let styleCotas = {size: 12, family: 'Public Sans'};
|
||||||
|
let sangradoTexto = "Sangrado 20 mm";
|
||||||
|
let sangradoValor = parseFloat(20); // mm
|
||||||
|
let anchoPliegue = parseFloat(7); // mm
|
||||||
|
let altoPliegue = parseFloat(7); // mm
|
||||||
|
let anchoCarton = parseFloat(7); // mm
|
||||||
|
|
||||||
|
// Get the preview Object parameters
|
||||||
|
getObjetoToPreview();
|
||||||
|
|
||||||
|
// Definicion de los parametros del Esquema de Cubierta (EC) -
|
||||||
|
anchoSangrado = 400; // px
|
||||||
|
altoSangrado = (anchoSangrado * 0.647 > 350) ? anchoSangrado * 0.647 : 350; // px
|
||||||
|
altoLibro = altoSangrado * 0.88;
|
||||||
|
anchoLibro = anchoSangrado * 0.39;
|
||||||
|
lomoLibro = anchoSangrado * 0.133;
|
||||||
|
anchoCubierta = (2 * anchoLibro) + lomoLibro;
|
||||||
|
|
||||||
|
// Clear the canvas element
|
||||||
|
$('#pv_ec_shape').empty();
|
||||||
|
// Get the element for placing the graphical elements
|
||||||
|
var divEC = document.getElementById('pv_ec_shape');
|
||||||
|
var previewEC = new Two({fitted: true}).appendTo(divEC);
|
||||||
|
// Calculate the center of the canvas element
|
||||||
|
var origenEC = new Two.Vector(previewEC.width / 2, previewEC.height / 2);
|
||||||
|
|
||||||
|
var sangrado = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
anchoSangrado,
|
||||||
|
altoSangrado
|
||||||
|
);
|
||||||
|
sangrado.stroke = 'black';
|
||||||
|
sangrado.dashes = [5, 5];
|
||||||
|
sangrado.fill = '#FCEAF1';
|
||||||
|
sangrado.linewidth = 1;
|
||||||
|
|
||||||
|
var libro = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
((2 * anchoLibro) + lomoLibro),
|
||||||
|
altoLibro);
|
||||||
|
libro.stroke = 'black';
|
||||||
|
libro.linewidth = 1;
|
||||||
|
|
||||||
|
var lomo = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
lomoLibro,
|
||||||
|
altoLibro);
|
||||||
|
lomo.stroke = 'black';
|
||||||
|
lomo.fill = '#F4F8F2';
|
||||||
|
lomo.linewidth = 1;
|
||||||
|
|
||||||
|
// Cotas
|
||||||
|
var cotaAnchoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
origenEC.x + (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
10);
|
||||||
|
cotaAnchoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (anchoCubierta / 2) + 35,
|
||||||
|
origenEC.y + (altoSangrado / 2),
|
||||||
|
origenEC.x + (anchoCubierta / 2) + 35,
|
||||||
|
origenEC.y - (altoSangrado / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoLibro = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (lomoLibro / 2) + 35,
|
||||||
|
origenEC.y + (altoLibro / 2),
|
||||||
|
origenEC.x + (lomoLibro / 2) + 35,
|
||||||
|
origenEC.y - (altoLibro / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoLibro.linewidth = 2;
|
||||||
|
var cotaLomo = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (lomoLibro / 2),
|
||||||
|
origenEC.y + (altoLibro / 3),
|
||||||
|
origenEC.x + (lomoLibro / 2),
|
||||||
|
origenEC.y + (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaLomo.linewidth = 2;
|
||||||
|
var cotaContraportada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (lomoLibro / 2 + anchoLibro),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x - (lomoLibro / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaContraportada.linewidth = 2;
|
||||||
|
var cotaPortada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (lomoLibro / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x + (lomoLibro / 2 + anchoLibro),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaPortada.linewidth = 2;
|
||||||
|
|
||||||
|
|
||||||
|
// Textos:
|
||||||
|
// Titulos generales
|
||||||
|
let stylesEC = {size: 22, weight: 'bold', family: 'Public Sans'};
|
||||||
|
previewEC.makeText("Portada", origenEC.x + (lomoLibro + anchoLibro) / 2, origenEC.y, stylesEC);
|
||||||
|
previewEC.makeText("Contraportada", origenEC.x - (lomoLibro + anchoLibro) / 2, origenEC.y, stylesEC);
|
||||||
|
previewEC.makeText("Lomo", origenEC.x, origenEC.y, stylesEC).rotation = -Math.PI / 2;
|
||||||
|
// Sangrados
|
||||||
|
let styleSangrado = {size: 10, family: 'Public Sans', style: 'italic', fill: 'red'};
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x, origenEC.y + (altoLibro / 2 + 13), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x, origenEC.y - (altoLibro / 2 + 13), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + 13), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + 13), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
// Cotas
|
||||||
|
previewEC.makeText(pvObj.lomoLibro + anchoCarton + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.altoLibro + altoPliegue + " mm", origenEC.x + (lomoLibro / 2) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + altoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText((2 * pvObj.anchoLibro) + pvObj.lomoLibro + (2 * sangradoValor) + +(2 * anchoPliegue) + anchoCarton + " mm",
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y + (altoLibro / 2) + 50,
|
||||||
|
styleCotas);
|
||||||
|
|
||||||
|
previewEC.update();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function portadaTapaBlanda() {
|
||||||
|
|
||||||
|
// Variables locales
|
||||||
|
let altoLibro, anchoLibro, lomoLibro, anchoSolapa, anchoCubierta, altoSangrado, anchoSangrado;
|
||||||
|
let styleCotas = {size: 12, family: 'Public Sans'};
|
||||||
|
let sangradoTexto = "Sangrado 5 mm";
|
||||||
|
let sangradoValor = parseFloat(5); // mm
|
||||||
|
let offsetSolapaValor = parseFloat(0); // mm
|
||||||
|
|
||||||
|
// Get the preview Object parameters
|
||||||
|
getObjetoToPreview();
|
||||||
|
|
||||||
|
// Definicion de los parametros del Esquema de Cubierta (EC)
|
||||||
|
if (pvObj.anchoSolapa == 0) {
|
||||||
|
anchoSangrado = 600; // px
|
||||||
|
altoSangrado = (anchoSangrado * 0.647 > 350) ? anchoSangrado * 0.647 : 350; // px
|
||||||
|
altoLibro = altoSangrado * 0.97;
|
||||||
|
anchoLibro = anchoSangrado * 0.419;
|
||||||
|
anchoSolapa = 0;
|
||||||
|
lomoLibro = anchoSangrado * 0.133;
|
||||||
|
anchoCubierta = (2 * anchoLibro) + (2 * anchoSolapa) + lomoLibro;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
anchoSangrado = 600; // px
|
||||||
|
altoSangrado = (anchoSangrado * 0.418 > 350) ? anchoSangrado * 0.418 : 350; // px
|
||||||
|
altoLibro = altoSangrado * 0.95;
|
||||||
|
anchoLibro = anchoSangrado * 0.28;
|
||||||
|
anchoSolapa = anchoSangrado * 0.163;
|
||||||
|
lomoLibro = anchoSangrado * 0.09;
|
||||||
|
anchoCubierta = (2 * anchoLibro) + (2 * anchoSolapa) + lomoLibro;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear the canvas element
|
||||||
|
$('#pv_ec_shape').empty();
|
||||||
|
// Get the element for placing the graphical elements
|
||||||
|
var divEC = document.getElementById('pv_ec_shape');
|
||||||
|
var previewEC = new Two({fitted: true}).appendTo(divEC);
|
||||||
|
// Calculate the center of the canvas element
|
||||||
|
var origenEC = new Two.Vector(previewEC.width / 2, previewEC.height / 2);
|
||||||
|
|
||||||
|
var sangrado = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
anchoSangrado,
|
||||||
|
altoSangrado
|
||||||
|
);
|
||||||
|
sangrado.stroke = 'black';
|
||||||
|
sangrado.dashes = [5, 5];
|
||||||
|
sangrado.fill = '#FCEAF1';
|
||||||
|
sangrado.linewidth = 1;
|
||||||
|
|
||||||
|
if (pvObj.anchoSolapa != 0) {
|
||||||
|
var solapas = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
anchoCubierta,
|
||||||
|
altoLibro);
|
||||||
|
solapas.stroke = 'black';
|
||||||
|
solapas.linewidth = 1;
|
||||||
|
|
||||||
|
// Cotas Solapas
|
||||||
|
var cotaSolapa2 = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - anchoCubierta / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x - anchoLibro - lomoLibro / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaSolapa2.linewidth = 2;
|
||||||
|
var cotaSolapa1 = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + anchoCubierta / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x + anchoLibro + lomoLibro / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaSolapa1.linewidth = 2;
|
||||||
|
|
||||||
|
// Textos Solapas
|
||||||
|
let stylesSolapa = {size: 18, family: 'Public Sans'};
|
||||||
|
previewEC.makeText("Solapa 1", origenEC.x + anchoLibro + (lomoLibro + anchoSolapa) / 2, origenEC.y, stylesSolapa);
|
||||||
|
previewEC.makeText("Solapa 2", origenEC.x - anchoLibro - (lomoLibro + anchoSolapa) / 2, origenEC.y, stylesSolapa);
|
||||||
|
// Textos Cotas Solapas
|
||||||
|
previewEC.makeText(pvObj.anchoSolapa + " mm", origenEC.x - anchoLibro - (lomoLibro + anchoSolapa) / 2, origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoSolapa + " mm", origenEC.x + anchoLibro + (lomoLibro + anchoSolapa) / 2, origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var libro = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
((2 * anchoLibro) + lomoLibro),
|
||||||
|
altoLibro);
|
||||||
|
libro.stroke = 'black';
|
||||||
|
libro.linewidth = 1;
|
||||||
|
|
||||||
|
var lomo = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
lomoLibro,
|
||||||
|
altoLibro);
|
||||||
|
lomo.stroke = 'black';
|
||||||
|
lomo.fill = '#F4F8F2';
|
||||||
|
lomo.linewidth = 1;
|
||||||
|
|
||||||
|
// Cotas
|
||||||
|
var cotaAnchoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
origenEC.x + (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
10);
|
||||||
|
cotaAnchoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (anchoCubierta / 2) + 35,
|
||||||
|
origenEC.y + (altoSangrado / 2),
|
||||||
|
origenEC.x + (anchoCubierta / 2) + 35,
|
||||||
|
origenEC.y - (altoSangrado / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoLibro = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (lomoLibro / 2) + 35,
|
||||||
|
origenEC.y + (altoLibro / 2),
|
||||||
|
origenEC.x + (lomoLibro / 2) + 35,
|
||||||
|
origenEC.y - (altoLibro / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoLibro.linewidth = 2;
|
||||||
|
var cotaLomo = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (lomoLibro / 2),
|
||||||
|
origenEC.y + (altoLibro / 3),
|
||||||
|
origenEC.x + (lomoLibro / 2),
|
||||||
|
origenEC.y + (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaLomo.linewidth = 2;
|
||||||
|
var cotaContraportada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (lomoLibro / 2 + anchoLibro),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x - (lomoLibro / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaContraportada.linewidth = 2;
|
||||||
|
var cotaPortada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (lomoLibro / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x + (lomoLibro / 2 + anchoLibro),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaPortada.linewidth = 2;
|
||||||
|
|
||||||
|
|
||||||
|
// Textos:
|
||||||
|
// Titulos generales
|
||||||
|
let stylesEC = {size: 22, weight: 'bold', family: 'Public Sans'};
|
||||||
|
previewEC.makeText("Portada", origenEC.x + (lomoLibro + anchoLibro) / 2, origenEC.y, stylesEC);
|
||||||
|
previewEC.makeText("Contraportada", origenEC.x - (lomoLibro + anchoLibro) / 2, origenEC.y, stylesEC);
|
||||||
|
let a = previewEC.makeText("Lomo", origenEC.x, origenEC.y, stylesEC).rotation = -Math.PI / 2;
|
||||||
|
// Sangrados
|
||||||
|
let styleSangrado = {size: 10, family: 'Public Sans', style: 'italic', fill: 'red'};
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x, origenEC.y + (altoLibro / 2 + 20), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x, origenEC.y - (altoLibro / 2 + 20), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
// Cotas
|
||||||
|
previewEC.makeText(pvObj.lomoLibro + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.altoLibro + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y + (altoLibro / 2) + 50,
|
||||||
|
styleCotas);
|
||||||
|
|
||||||
|
previewEC.update();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function portadaEspiral() {
|
||||||
|
|
||||||
|
// Variables locales
|
||||||
|
let altoLibro, anchoLibro, anchoCalle, anchoCubierta, altoSangrado, anchoSangrado, anchoSolapa, offsetCubierta;
|
||||||
|
let styleCotas = {size: 12, family: 'Public Sans'};
|
||||||
|
let sangradoTexto = (isTapaDura) ? "Sangrado 20 mm" : "Sangrado 5 mm";
|
||||||
|
let sangradoValor = (isTapaDura) ? parseFloat(20) : parseFloat(5); // mm
|
||||||
|
|
||||||
|
// Get the preview Object parameters
|
||||||
|
getObjetoToPreview();
|
||||||
|
|
||||||
|
// Definicion de los parametros del Esquema de Cubierta (EC)
|
||||||
|
anchoSangrado = 600; // px
|
||||||
|
|
||||||
|
if((pvObj.anchoSolapa !== 0) && (isTapaDura === 0)){
|
||||||
|
altoSangrado = (anchoSangrado * 0.418 > 350) ? anchoSangrado * 0.418 : 350; // px
|
||||||
|
altoLibro = altoSangrado * 0.95;
|
||||||
|
anchoLibro = anchoSangrado * 0.28;
|
||||||
|
anchoCalle = anchoSangrado * 0.02;
|
||||||
|
anchoSolapa = anchoSangrado * 0.163;
|
||||||
|
sangrado = anchoSangrado * 0.03;
|
||||||
|
anchoCubierta = 2 * (anchoLibro + anchoSolapa+ sangrado) + anchoCalle;
|
||||||
|
offsetCubierta = anchoLibro/2 + anchoCalle/2 + anchoSolapa/2 + sangrado;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
altoSangrado = (anchoSangrado * 0.647 > 350) ? anchoSangrado * 0.647 : 350; // px
|
||||||
|
altoLibro = (isTapaDura) ? altoSangrado * 0.88 : altoSangrado * 0.97;
|
||||||
|
anchoLibro = (isTapaDura) ? anchoSangrado * 0.39 : anchoSangrado * 0.419;
|
||||||
|
anchoCalle = anchoSangrado * 0.02;
|
||||||
|
anchoSolapa = 0;
|
||||||
|
anchoCubierta = (2 * anchoLibro) + (2 * anchoSolapa) + anchoCalle;
|
||||||
|
offsetCubierta = anchoLibro/2 + anchoCalle/2 + anchoSolapa + sangradoValor;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear the canvas element
|
||||||
|
$('#pv_ec_shape').empty();
|
||||||
|
// Get the element for placing the graphical elements
|
||||||
|
var divEC = document.getElementById('pv_ec_shape');
|
||||||
|
var previewEC = new Two({fitted: true}).appendTo(divEC);
|
||||||
|
// Calculate the center of the canvas element
|
||||||
|
var origenEC = new Two.Vector(previewEC.width / 2, previewEC.height / 2);
|
||||||
|
|
||||||
|
var sangrado = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
anchoSangrado,
|
||||||
|
altoSangrado
|
||||||
|
);
|
||||||
|
sangrado.stroke = 'black';
|
||||||
|
sangrado.dashes = [5, 5];
|
||||||
|
sangrado.fill = '#FCEAF1';
|
||||||
|
sangrado.linewidth = 1;
|
||||||
|
|
||||||
|
if (pvObj.anchoSolapa != 0) {
|
||||||
|
var solapa1 = previewEC.makeRectangle(
|
||||||
|
origenEC.x + (anchoLibro + anchoCalle/2 + anchoSolapa/2 + sangradoValor),
|
||||||
|
origenEC.y,
|
||||||
|
anchoSolapa,
|
||||||
|
altoLibro);
|
||||||
|
solapa1.stroke = 'black';
|
||||||
|
solapa1.linewidth = 1;
|
||||||
|
|
||||||
|
var solapa2 = previewEC.makeRectangle(
|
||||||
|
origenEC.x - (anchoLibro + anchoCalle/2 + anchoSolapa/2 + sangradoValor),
|
||||||
|
origenEC.y,
|
||||||
|
anchoSolapa,
|
||||||
|
altoLibro);
|
||||||
|
solapa2.stroke = 'black';
|
||||||
|
solapa2.linewidth = 1;
|
||||||
|
|
||||||
|
// Cotas Solapas
|
||||||
|
var cotaSolapa2 = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (anchoCalle/2 + sangradoValor + anchoLibro + anchoSolapa),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x - (anchoLibro + sangradoValor + anchoCalle / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaSolapa2.linewidth = 2;
|
||||||
|
var cotaSolapa1 = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (anchoCalle/2 + sangradoValor + anchoLibro + anchoSolapa),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x + (anchoLibro + sangradoValor + anchoCalle / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaSolapa1.linewidth = 2;
|
||||||
|
|
||||||
|
// Textos Solapas
|
||||||
|
let stylesSolapa = {size: 18, family: 'Public Sans'};
|
||||||
|
previewEC.makeText("Solapa 1", origenEC.x + anchoLibro + (anchoCalle + anchoSolapa) / 2, origenEC.y, stylesSolapa);
|
||||||
|
previewEC.makeText("Solapa 2", origenEC.x - anchoLibro - (anchoCalle + anchoSolapa) / 2, origenEC.y, stylesSolapa);
|
||||||
|
// Textos Cotas Solapas
|
||||||
|
previewEC.makeText(pvObj.anchoSolapa + " mm", origenEC.x - anchoLibro - (anchoCalle + anchoSolapa) / 2, origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoSolapa + " mm", origenEC.x + anchoLibro + (anchoCalle + anchoSolapa) / 2, origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var portada = previewEC.makeRectangle(
|
||||||
|
origenEC.x + (anchoLibro/2 + anchoCalle/2 + sangradoValor),
|
||||||
|
origenEC.y,
|
||||||
|
anchoLibro,
|
||||||
|
altoLibro);
|
||||||
|
portada.stroke = 'black';
|
||||||
|
portada.linewidth = 1;
|
||||||
|
|
||||||
|
var contraportada = previewEC.makeRectangle(
|
||||||
|
origenEC.x - (anchoLibro/2 + anchoCalle/2 + sangradoValor),
|
||||||
|
origenEC.y,
|
||||||
|
anchoLibro,
|
||||||
|
altoLibro);
|
||||||
|
contraportada.stroke = 'black';
|
||||||
|
contraportada.linewidth = 1;
|
||||||
|
|
||||||
|
var calle = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
anchoCalle,
|
||||||
|
altoSangrado);
|
||||||
|
calle.stroke = 'black';
|
||||||
|
calle.dashes = [2, 5];
|
||||||
|
calle.fill = '#F4F8F2';
|
||||||
|
calle.linewidth = 1;
|
||||||
|
|
||||||
|
// Cotas
|
||||||
|
var cotaAnchoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
origenEC.x + (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
10);
|
||||||
|
cotaAnchoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (anchoSangrado / 2) + 15,
|
||||||
|
origenEC.y + (altoSangrado / 2),
|
||||||
|
origenEC.x + (anchoSangrado / 2) + 15,
|
||||||
|
origenEC.y - (altoSangrado / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoLibro = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (anchoCalle / 2) + 35,
|
||||||
|
origenEC.y + (altoLibro / 2),
|
||||||
|
origenEC.x + (anchoCalle / 2) + 35,
|
||||||
|
origenEC.y - (altoLibro / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoLibro.linewidth = 2;
|
||||||
|
var cotaContraportada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (anchoCalle / 2 + anchoLibro + sangradoValor),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x - ((anchoCalle / 2) + sangradoValor),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaContraportada.linewidth = 2;
|
||||||
|
var cotaPortada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + ((anchoCalle / 2) + sangradoValor),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x + (anchoCalle / 2 + anchoLibro + sangradoValor),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaPortada.linewidth = 2;
|
||||||
|
|
||||||
|
|
||||||
|
// Textos:
|
||||||
|
// Titulos generales
|
||||||
|
let stylesEC = {size: 22, weight: 'bold', family: 'Public Sans'};
|
||||||
|
previewEC.makeText("Portada",
|
||||||
|
origenEC.x + anchoLibro/2 + anchoCalle/2 + sangradoValor + 15,
|
||||||
|
origenEC.y,
|
||||||
|
stylesEC
|
||||||
|
);
|
||||||
|
previewEC.makeText("Contraportada",
|
||||||
|
origenEC.x - (anchoLibro/2 + anchoCalle/2 + sangradoValor),
|
||||||
|
origenEC.y,
|
||||||
|
stylesEC
|
||||||
|
);
|
||||||
|
// Sangrados
|
||||||
|
let styleSangrado = {size: 10, family: 'Public Sans', style: 'italic', fill: 'red'};
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x + offsetCubierta, origenEC.y + (altoLibro / 2 + 13), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x + offsetCubierta, origenEC.y - (altoLibro / 2 + 13), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x - offsetCubierta, origenEC.y + (altoLibro / 2 + 13), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x - offsetCubierta, origenEC.y - (altoLibro / 2 + 13), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x + (anchoSangrado / 2) - 20, origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x - (anchoSangrado / 2) + 20, origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
// Cotas
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x - (offsetCubierta - anchoSolapa/2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + " mm", origenEC.x + (offsetCubierta - anchoSolapa/2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.altoLibro + " mm", origenEC.x + (anchoCalle / 2) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + " mm",
|
||||||
|
origenEC.x + (anchoSangrado / 2) + 30,
|
||||||
|
origenEC.y,
|
||||||
|
styleCotas
|
||||||
|
).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText((2 * pvObj.anchoLibro) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y + (altoLibro / 2) + 50,
|
||||||
|
styleCotas);
|
||||||
|
|
||||||
|
previewEC.update();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function portadaGrapado() {
|
||||||
|
|
||||||
|
// Variables locales
|
||||||
|
let altoLibro, anchoLibro, lomoLibro, anchoSolapa, anchoCubierta, altoSangrado, anchoSangrado;
|
||||||
|
let styleCotas = {size: 12, family: 'Public Sans'};
|
||||||
|
let sangradoTexto = "Sangrado 5 mm";
|
||||||
|
let sangradoValor = parseFloat(5); // mm
|
||||||
|
let offsetSolapaValor = parseFloat(0); // mm
|
||||||
|
|
||||||
|
// Get the preview Object parameters
|
||||||
|
getObjetoToPreview();
|
||||||
|
|
||||||
|
// Definicion de los parametros del Esquema de Cubierta (EC)
|
||||||
|
if (pvObj.anchoSolapa == 0) {
|
||||||
|
anchoSangrado = 600; // px
|
||||||
|
altoSangrado = (anchoSangrado * 0.647 > 350) ? anchoSangrado * 0.647 : 350; // px
|
||||||
|
altoLibro = altoSangrado * 0.97;
|
||||||
|
anchoLibro = anchoSangrado * 0.48;
|
||||||
|
anchoSolapa = 0;
|
||||||
|
lomoLibro = 0; // ESTA ES LA DIFERENCIA PARA GRAPADO
|
||||||
|
anchoCubierta = (2 * anchoLibro) + (2 * anchoSolapa) + lomoLibro;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
anchoSangrado = 600; // px
|
||||||
|
altoSangrado = (anchoSangrado * 0.418 > 350) ? anchoSangrado * 0.418 : 350; // px
|
||||||
|
altoLibro = altoSangrado * 0.95;
|
||||||
|
anchoLibro = anchoSangrado * 0.3;
|
||||||
|
anchoSolapa = anchoSangrado * 0.18;
|
||||||
|
lomoLibro = 0; // ESTA ES LA DIFERENCIA PARA GRAPADO
|
||||||
|
anchoCubierta = (2 * anchoLibro) + (2 * anchoSolapa) + lomoLibro;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear the canvas element
|
||||||
|
$('#pv_ec_shape').empty();
|
||||||
|
// Get the element for placing the graphical elements
|
||||||
|
var divEC = document.getElementById('pv_ec_shape');
|
||||||
|
var previewEC = new Two({fitted: true}).appendTo(divEC);
|
||||||
|
// Calculate the center of the canvas element
|
||||||
|
var origenEC = new Two.Vector(previewEC.width / 2, previewEC.height / 2);
|
||||||
|
|
||||||
|
var sangrado = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
anchoSangrado,
|
||||||
|
altoSangrado
|
||||||
|
);
|
||||||
|
sangrado.stroke = 'black';
|
||||||
|
sangrado.dashes = [5, 5];
|
||||||
|
sangrado.fill = '#FCEAF1';
|
||||||
|
sangrado.linewidth = 1;
|
||||||
|
|
||||||
|
if (pvObj.anchoSolapa != 0) {
|
||||||
|
var solapas = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
anchoCubierta,
|
||||||
|
altoLibro);
|
||||||
|
solapas.stroke = 'black';
|
||||||
|
solapas.linewidth = 1;
|
||||||
|
|
||||||
|
// Cotas Solapas
|
||||||
|
var cotaSolapa2 = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - anchoCubierta / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x - anchoLibro - lomoLibro / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaSolapa2.linewidth = 2;
|
||||||
|
var cotaSolapa1 = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + anchoCubierta / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x + anchoLibro + lomoLibro / 2,
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaSolapa1.linewidth = 2;
|
||||||
|
|
||||||
|
// Textos Solapas
|
||||||
|
let stylesSolapa = {size: 18, family: 'Public Sans'};
|
||||||
|
previewEC.makeText("Solapa 1", origenEC.x + anchoLibro + (lomoLibro + anchoSolapa) / 2, origenEC.y, stylesSolapa);
|
||||||
|
previewEC.makeText("Solapa 2", origenEC.x - anchoLibro - (lomoLibro + anchoSolapa) / 2, origenEC.y, stylesSolapa);
|
||||||
|
// Textos Cotas Solapas
|
||||||
|
previewEC.makeText(pvObj.anchoSolapa + " mm", origenEC.x - anchoLibro - (lomoLibro + anchoSolapa) / 2, origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoSolapa + " mm", origenEC.x + anchoLibro + (lomoLibro + anchoSolapa) / 2, origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var libro = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
((2 * anchoLibro) + lomoLibro),
|
||||||
|
altoLibro);
|
||||||
|
libro.stroke = 'black';
|
||||||
|
libro.linewidth = 1;
|
||||||
|
|
||||||
|
var lomo = previewEC.makeRectangle(
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y,
|
||||||
|
lomoLibro,
|
||||||
|
altoLibro);
|
||||||
|
lomo.stroke = 'black';
|
||||||
|
lomo.fill = '#F4F8F2';
|
||||||
|
lomo.linewidth = 1;
|
||||||
|
|
||||||
|
// Cotas
|
||||||
|
var cotaAnchoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
origenEC.x + (anchoSangrado / 2),
|
||||||
|
origenEC.y + (altoLibro / 2) + 35,
|
||||||
|
10);
|
||||||
|
cotaAnchoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoCubierta = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (anchoCubierta / 2) + 35,
|
||||||
|
origenEC.y + (altoSangrado / 2),
|
||||||
|
origenEC.x + (anchoCubierta / 2) + 35,
|
||||||
|
origenEC.y - (altoSangrado / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoCubierta.linewidth = 2;
|
||||||
|
var cotaAltoLibro = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (lomoLibro / 2) + 35,
|
||||||
|
origenEC.y + (altoLibro / 2),
|
||||||
|
origenEC.x + (lomoLibro / 2) + 35,
|
||||||
|
origenEC.y - (altoLibro / 2),
|
||||||
|
10);
|
||||||
|
cotaAltoLibro.linewidth = 2;
|
||||||
|
var cotaContraportada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x - (lomoLibro / 2 + anchoLibro),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x - (lomoLibro / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaContraportada.linewidth = 2;
|
||||||
|
var cotaPortada = previewEC.makeDobleArrow(
|
||||||
|
origenEC.x + (lomoLibro / 2),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
origenEC.x + (lomoLibro / 2 + anchoLibro),
|
||||||
|
origenEC.y - (altoLibro / 3),
|
||||||
|
10);
|
||||||
|
cotaPortada.linewidth = 2;
|
||||||
|
|
||||||
|
|
||||||
|
// Textos:
|
||||||
|
// Titulos generales
|
||||||
|
let stylesEC = {size: 22, weight: 'bold', family: 'Public Sans'};
|
||||||
|
previewEC.makeText("Portada", origenEC.x + (lomoLibro + anchoLibro) / 2, origenEC.y, stylesEC);
|
||||||
|
previewEC.makeText("Contraportada", origenEC.x - (lomoLibro + anchoLibro) / 2, origenEC.y, stylesEC);
|
||||||
|
// Sangrados
|
||||||
|
let styleSangrado = {size: 10, family: 'Public Sans', style: 'italic', fill: 'red'};
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x, origenEC.y + (altoLibro / 2 + 20), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x, origenEC.y - (altoLibro / 2 + 20), styleSangrado);
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
|
// Cotas
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.anchoLibro + offsetSolapaValor + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
|
previewEC.makeText(pvObj.altoLibro + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
|
previewEC.makeText((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + pvObj.lomoLibro + (2 * sangradoValor) + " mm",
|
||||||
|
origenEC.x,
|
||||||
|
origenEC.y + (altoLibro / 2) + 50,
|
||||||
|
styleCotas);
|
||||||
|
|
||||||
|
previewEC.update();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLomoLibro() {
|
||||||
|
const anchoLomoInputs = $("#tableLineasPresupuesto tbody tr:visible td input[id*='_lomo']");
|
||||||
|
const anchoLomo = Array.from(anchoLomoInputs).reduce((sum, input) => sum + parseFloat($(input).val()), 0);
|
||||||
|
|
||||||
|
return parseFloat(anchoLomo.toFixed(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getObjetoToPreview() {
|
||||||
|
|
||||||
|
pvObj = {
|
||||||
|
lomoLibro: parseFloat('30.0'),
|
||||||
|
anchoSolapa: $('#solapasCubierta').is(':checked') ? parseFloat($('#anchoSolapasCubierta').val()) : parseFloat(0),
|
||||||
|
altoLibro: getDimensionLibro().alto,
|
||||||
|
anchoLibro: getDimensionLibro().ancho
|
||||||
|
};
|
||||||
|
//console.log(pvObj);
|
||||||
|
|
||||||
|
}
|
||||||
@ -128,7 +128,7 @@
|
|||||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
<button id="toReview" class="btn btn-primary btn-next waves-effect waves-light">
|
||||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||||
<i class="ti ti-arrow-right ti-xs"></i>
|
<i class="ti ti-arrow-right ti-xs"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -223,21 +223,23 @@ initDisenioLibro();
|
|||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
<?= $this->section('additionalExternalJs') ?>
|
<?= $this->section('additionalExternalJs') ?>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/bs-stepper/bs-stepper.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/bs-stepper/bs-stepper.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/FormValidation.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/FormValidation.min.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/Bootstrap5.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/Bootstrap5.min.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.html5.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.html5.min.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.print.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.print.min.js") ?>"></script>
|
||||||
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/select/dataTables.select.min.js") ?>"></script>
|
<script src="<?= site_url("themes/vuexy/vendor/libs/datatables-sk/plugins/select/dataTables.select.min.js") ?>"></script>
|
||||||
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
|
<script src="<?= site_url('themes/vuexy/js/datatables-editor/dataTables.editor.min.js') ?>"></script>
|
||||||
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
|
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
|
||||||
<script src="<?= site_url('js_loader/translate_js/Presupuestos') ?>"></script>
|
<script src="<?= site_url('themes/vuexy/vendor/libs/two/two.js') ?>"></script>
|
||||||
<script src="<?= site_url('js_loader/presupuestoCliente_js') ?>"></script>
|
<script src="<?= site_url('js_loader/translate_js/Presupuestos') ?>"></script>
|
||||||
<script src="<?= site_url('js_loader/presupuestoClienteTipoLibro_js') ?>"></script>
|
<script src="<?= site_url('js_loader/presupuestoCliente_js') ?>"></script>
|
||||||
<script src="<?= site_url('js_loader/presupuestoClienteDisenioLibro_js') ?>"></script>
|
<script src="<?= site_url('js_loader/presupuestoClienteTipoLibro_js') ?>"></script>
|
||||||
<script src="<?= site_url('js_loader/presupuestoClienteDirecciones_js') ?>"></script>
|
<script src="<?= site_url('js_loader/presupuestoClienteDisenioLibro_js') ?>"></script>
|
||||||
<script src="<?= site_url('js_loader/presupuestoClienteResumen_js') ?>"></script>
|
<script src="<?= site_url('js_loader/presupuestoClienteDirecciones_js') ?>"></script>
|
||||||
|
<script src="<?= site_url('js_loader/presupuestoClienteResumen_js') ?>"></script>
|
||||||
|
<script src="<?= site_url('js_loader/presupuestoClientePreview_js') ?>"></script>
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
Reference in New Issue
Block a user