forked from elmau/empresa-libre
Fix in templates
This commit is contained in:
commit
af5fa3c812
|
@ -78,7 +78,7 @@ var controllers = {
|
||||||
tb_options = $$('tab_options').getTabbar()
|
tb_options = $$('tab_options').getTabbar()
|
||||||
tb_options.attachEvent('onChange', tab_options_change)
|
tb_options.attachEvent('onChange', tab_options_change)
|
||||||
$$('txt_plantilla_factura_html').attachEvent('onItemClick', txt_plantilla_factura_html_click)
|
$$('txt_plantilla_factura_html').attachEvent('onItemClick', txt_plantilla_factura_html_click)
|
||||||
$$('txt_plantilla_factura_json').attachEvent('onItemClick', txt_plantilla_factura_json_click)
|
//~ $$('txt_plantilla_factura_json').attachEvent('onItemClick', txt_plantilla_factura_json_click)
|
||||||
$$('txt_plantilla_factura_css').attachEvent('onItemClick', txt_plantilla_factura_css_click)
|
$$('txt_plantilla_factura_css').attachEvent('onItemClick', txt_plantilla_factura_css_click)
|
||||||
$$('txt_plantilla_ticket').attachEvent('onItemClick', txt_plantilla_ticket_click)
|
$$('txt_plantilla_ticket').attachEvent('onItemClick', txt_plantilla_ticket_click)
|
||||||
//~ $$('txt_plantilla_donataria').attachEvent('onItemClick', txt_plantilla_donataria_click)
|
//~ $$('txt_plantilla_donataria').attachEvent('onItemClick', txt_plantilla_donataria_click)
|
||||||
|
@ -951,42 +951,42 @@ function emisor_logo_click(id, e){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function txt_plantilla_factura_33_click(e){
|
//~ function txt_plantilla_factura_33_click(e){
|
||||||
|
|
||||||
var body_elements = [
|
//~ var body_elements = [
|
||||||
{cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
|
//~ {cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
|
||||||
value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_33',
|
//~ value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_33',
|
||||||
width: 200}, {width: 100}]},
|
//~ width: 200}, {width: 100}]},
|
||||||
{view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
|
//~ {view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
|
||||||
borderless: true},
|
//~ borderless: true},
|
||||||
{},
|
//~ {},
|
||||||
{cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
|
//~ {cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
|
||||||
click:("$$('win_template').close();")}, {}]}
|
//~ click:("$$('win_template').close();")}, {}]}
|
||||||
]
|
//~ ]
|
||||||
|
|
||||||
var w = webix.ui({
|
//~ var w = webix.ui({
|
||||||
view: 'window',
|
//~ view: 'window',
|
||||||
id: 'win_template',
|
//~ id: 'win_template',
|
||||||
modal: true,
|
//~ modal: true,
|
||||||
position: 'center',
|
//~ position: 'center',
|
||||||
head: 'Subir Plantilla 3.3 ODT',
|
//~ head: 'Subir Plantilla 3.3 ODT',
|
||||||
body: {
|
//~ body: {
|
||||||
view: 'form',
|
//~ view: 'form',
|
||||||
elements: body_elements,
|
//~ elements: body_elements,
|
||||||
}
|
//~ }
|
||||||
})
|
//~ })
|
||||||
|
|
||||||
w.show()
|
//~ w.show()
|
||||||
|
|
||||||
$$('up_template').attachEvent('onUploadComplete', function(response){
|
//~ $$('up_template').attachEvent('onUploadComplete', function(response){
|
||||||
if(response.ok){
|
//~ if(response.ok){
|
||||||
$$('txt_plantilla_factura_33').setValue(response.name)
|
//~ $$('txt_plantilla_factura_33').setValue(response.name)
|
||||||
msg_ok('Plantilla cargada correctamente')
|
//~ msg_ok('Plantilla cargada correctamente')
|
||||||
}else{
|
//~ }else{
|
||||||
msg_error(response.name)
|
//~ msg_error(response.name)
|
||||||
}
|
//~ }
|
||||||
})
|
//~ })
|
||||||
}
|
//~ }
|
||||||
|
|
||||||
|
|
||||||
function txt_plantilla_ticket_click(e){
|
function txt_plantilla_ticket_click(e){
|
||||||
|
@ -1027,42 +1027,42 @@ function txt_plantilla_ticket_click(e){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function txt_plantilla_factura_32_click(e){
|
//~ function txt_plantilla_factura_32_click(e){
|
||||||
|
|
||||||
var body_elements = [
|
//~ var body_elements = [
|
||||||
{cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
|
//~ {cols: [{width: 100}, {view: 'uploader', id: 'up_template', autosend: true, link: 'lst_files',
|
||||||
value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_32',
|
//~ value: 'Seleccionar archivo', upload: '/files/txt_plantilla_factura_32',
|
||||||
width: 200}, {width: 100}]},
|
//~ width: 200}, {width: 100}]},
|
||||||
{view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
|
//~ {view: 'list', id: 'lst_files', type: 'uploader', autoheight:true,
|
||||||
borderless: true},
|
//~ borderless: true},
|
||||||
{},
|
//~ {},
|
||||||
{cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
|
//~ {cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
|
||||||
click:("$$('win_template').close();")}, {}]}
|
//~ click:("$$('win_template').close();")}, {}]}
|
||||||
]
|
//~ ]
|
||||||
|
|
||||||
var w = webix.ui({
|
//~ var w = webix.ui({
|
||||||
view: 'window',
|
//~ view: 'window',
|
||||||
id: 'win_template',
|
//~ id: 'win_template',
|
||||||
modal: true,
|
//~ modal: true,
|
||||||
position: 'center',
|
//~ position: 'center',
|
||||||
head: 'Subir Plantilla 3.2 ODT',
|
//~ head: 'Subir Plantilla 3.2 ODT',
|
||||||
body: {
|
//~ body: {
|
||||||
view: 'form',
|
//~ view: 'form',
|
||||||
elements: body_elements,
|
//~ elements: body_elements,
|
||||||
}
|
//~ }
|
||||||
})
|
//~ })
|
||||||
|
|
||||||
w.show()
|
//~ w.show()
|
||||||
|
|
||||||
$$('up_template').attachEvent('onUploadComplete', function(response){
|
//~ $$('up_template').attachEvent('onUploadComplete', function(response){
|
||||||
if(response.ok){
|
//~ if(response.ok){
|
||||||
$$('txt_plantilla_factura_32').setValue(response.name)
|
//~ $$('txt_plantilla_factura_32').setValue(response.name)
|
||||||
msg_ok('Plantilla cargada correctamente')
|
//~ msg_ok('Plantilla cargada correctamente')
|
||||||
}else{
|
//~ }else{
|
||||||
msg_error(response.name)
|
//~ msg_error(response.name)
|
||||||
}
|
//~ }
|
||||||
})
|
//~ })
|
||||||
}
|
//~ }
|
||||||
|
|
||||||
|
|
||||||
function txt_plantilla_factura_html_click(e){
|
function txt_plantilla_factura_html_click(e){
|
||||||
|
@ -1147,45 +1147,45 @@ function txt_plantilla_factura_css_click(e){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function txt_plantilla_factura_json_click(e){
|
//~ function txt_plantilla_factura_json_click(e){
|
||||||
|
|
||||||
var body_elements = [
|
//~ var body_elements = [
|
||||||
{cols: [
|
//~ {cols: [
|
||||||
{width: 100},
|
//~ {width: 100},
|
||||||
{view: 'uploader', id: 'up_template', autosend: true,
|
//~ {view: 'uploader', id: 'up_template', autosend: true,
|
||||||
link: 'lst_files', value: 'Seleccionar archivo',
|
//~ link: 'lst_files', value: 'Seleccionar archivo',
|
||||||
upload: '/files/txt_plantilla_factura_json', width: 200},
|
//~ upload: '/files/txt_plantilla_factura_json', width: 200},
|
||||||
{width: 100}]},
|
//~ {width: 100}]},
|
||||||
{view: 'list', id: 'lst_files', type: 'uploader', autoheight: true,
|
//~ {view: 'list', id: 'lst_files', type: 'uploader', autoheight: true,
|
||||||
borderless: true},
|
//~ borderless: true},
|
||||||
{},
|
//~ {},
|
||||||
{cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
|
//~ {cols: [{}, {view: 'button', label: 'Cerrar', autowidth: true,
|
||||||
click:("$$('win_template').close();")}, {}]}
|
//~ click:("$$('win_template').close();")}, {}]}
|
||||||
]
|
//~ ]
|
||||||
|
|
||||||
var w = webix.ui({
|
//~ var w = webix.ui({
|
||||||
view: 'window',
|
//~ view: 'window',
|
||||||
id: 'win_template',
|
//~ id: 'win_template',
|
||||||
modal: true,
|
//~ modal: true,
|
||||||
position: 'center',
|
//~ position: 'center',
|
||||||
head: 'Subir Plantilla 3.3 JSON',
|
//~ head: 'Subir Plantilla 3.3 JSON',
|
||||||
body: {
|
//~ body: {
|
||||||
view: 'form',
|
//~ view: 'form',
|
||||||
elements: body_elements,
|
//~ elements: body_elements,
|
||||||
}
|
//~ }
|
||||||
})
|
//~ })
|
||||||
|
|
||||||
w.show()
|
//~ w.show()
|
||||||
|
|
||||||
$$('up_template').attachEvent('onUploadComplete', function(response){
|
//~ $$('up_template').attachEvent('onUploadComplete', function(response){
|
||||||
if(response.ok){
|
//~ if(response.ok){
|
||||||
$$('txt_plantilla_factura_json').setValue(response.name)
|
//~ $$('txt_plantilla_factura_json').setValue(response.name)
|
||||||
msg_ok('Plantilla cargada correctamente')
|
//~ msg_ok('Plantilla cargada correctamente')
|
||||||
}else{
|
//~ }else{
|
||||||
msg_error(response.name)
|
//~ msg_error(response.name)
|
||||||
}
|
//~ }
|
||||||
})
|
//~ })
|
||||||
}
|
//~ }
|
||||||
|
|
||||||
|
|
||||||
//~ function txt_plantilla_donataria_click(e){
|
//~ function txt_plantilla_donataria_click(e){
|
||||||
|
|
|
@ -609,7 +609,7 @@ var opt_templates_cfdi = [
|
||||||
{id: '_3.3_ccp_2.0.ods', value: 'CFDI v3.3 - Carta Porte v2.0'},
|
{id: '_3.3_ccp_2.0.ods', value: 'CFDI v3.3 - Carta Porte v2.0'},
|
||||||
{id: '_3.3_cp_1.0.ods', value: 'CFDI v3.3 - Pagos v1.0'},
|
{id: '_3.3_cp_1.0.ods', value: 'CFDI v3.3 - Pagos v1.0'},
|
||||||
{id: '_3.3.json', value: 'CFDI v3.3 - JSON'},
|
{id: '_3.3.json', value: 'CFDI v3.3 - JSON'},
|
||||||
{id: '_3.2.ods', value: 'CFDI v3.2'},
|
{id: '_3.2.ods', value: 'CFDI v3.2'}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -630,24 +630,10 @@ var options_templates = [
|
||||||
label: 'Archivo de estilos (CSS): ', labelPosition: 'top',
|
label: 'Archivo de estilos (CSS): ', labelPosition: 'top',
|
||||||
icon: 'file'}, {maxWidth: 20} ]},
|
icon: 'file'}, {maxWidth: 20} ]},
|
||||||
{maxHeight: 20},
|
{maxHeight: 20},
|
||||||
//~ {cols: [{maxWidth: 20},
|
|
||||||
//~ {view: 'search', id: 'txt_plantilla_factura_json', name: 'plantilla_factura_json',
|
|
||||||
//~ label: 'Plantilla Factura v3.3 (JSON): ', labelPosition: 'top',
|
|
||||||
//~ icon: 'file'}, {maxWidth: 25},
|
|
||||||
//~ {}, {maxWidth: 20} ]},
|
|
||||||
//~ {maxHeight: 20},
|
|
||||||
//~ {cols: [{maxWidth: 20},
|
|
||||||
//~ {view: 'search', id: 'txt_plantilla_pagos10', name: 'plantilla_pagos10',
|
|
||||||
//~ label: 'Plantilla Factura de Pagos v1.0 - Cfdi 3.3 (ODS): ',
|
|
||||||
//~ labelPosition: 'top', icon: 'file'}, {maxWidth: 40}, {}]},
|
|
||||||
//~ {maxHeight: 20},
|
|
||||||
{cols: [{maxWidth: 20},
|
{cols: [{maxWidth: 20},
|
||||||
{view: 'search', id: 'txt_plantilla_ticket', name: 'plantilla_ticket',
|
{view: 'search', id: 'txt_plantilla_ticket', name: 'plantilla_ticket',
|
||||||
label: 'Plantilla para Tickets (ODS): ', labelPosition: 'top',
|
label: 'Plantilla para Tickets (ODS): ', labelPosition: 'top',
|
||||||
icon: 'file'},
|
icon: 'file'},
|
||||||
//~ {view: 'search', id: 'txt_plantilla_donataria', name: 'plantilla_donataria',
|
|
||||||
//~ label: 'Plantilla Donataria (solo ONGs): ', labelPosition: 'top',
|
|
||||||
//~ icon: 'file'},
|
|
||||||
{}]},
|
{}]},
|
||||||
{maxHeight: 20},
|
{maxHeight: 20},
|
||||||
{cols: [{maxWidth: 20},
|
{cols: [{maxWidth: 20},
|
||||||
|
|
Loading…
Reference in New Issue