Tickets, guardar notas

This commit is contained in:
Mauricio Baeza 2018-01-10 22:03:46 -06:00
parent 98e6cc389a
commit bee911504b
2 changed files with 16 additions and 13 deletions

View File

@ -34,7 +34,6 @@ var tickets_controllers = {
$$('grid_ticket_clients_found').attachEvent('onValueSuggest', grid_ticket_clients_found_click)
$$('grid_tdetails').attachEvent('onAfterRender', grid_tdetails_render)
webix.extend($$('grid_tickets'), webix.ProgressBar)
webix.extend($$('grid_tickets_active'), webix.ProgressBar)
}
@ -729,9 +728,15 @@ function cmd_ticket_notes_click(){
}
function ticket_notes_key_up(){
var value = this.getValue()
//~ function ticket_notes_key_up(){
//~ var value = this.getValue()
//~ $$('form_new_ticket').setValues({notas: value}, true)
//~ }
function cmd_ticket_save_note_click(){
var value = $$('ticket_notes').getValue()
$$('form_new_ticket').setValues({notas: value}, true)
$$('win_ticket_notes').close()
}

View File

@ -454,7 +454,10 @@ var app_tickets = {
var body_ticket_notes = {rows: [
{minHeight: 5, maxHeight: 5},
{view: 'textarea', id: 'ticket_notes', name: 'ticket_notes', height: 300,
placeholder: 'Captura las notas, se autoguarda al escribir.'},
placeholder: 'Captura las notas'},
{minHeight: 5, maxHeight: 5},
{cols: [{}, {view: 'button', id: 'cmd_ticket_save_note', autowidth: true,
label: 'Guardar y Cerrar', type: 'iconButton'}, {}]},
{minHeight: 5, maxHeight: 5},
]}
@ -464,18 +467,13 @@ var win_ticket_notes = {
webix.ui({
view: 'window',
id: 'win_ticket_notes',
height: 350,
height: 400,
width: 500,
modal: true,
position: 'center',
head: {view: 'toolbar',
elements: [
{view: 'label', label: 'Notas'},
{view: 'icon', icon: 'times-circle', hotkey: 'esc',
click: '$$("win_ticket_notes").close()'},
]
},
head: 'Notas',
body: body_ticket_notes,
})
$$('ticket_notes').attachEvent('onTimedKeyPress', ticket_notes_key_up);
//~ $$('ticket_notes').attachEvent('onTimedKeyPress', ticket_notes_key_up);
$$('cmd_ticket_save_note').attachEvent('onItemClick', cmd_ticket_save_note_click)
}}