From 10253102fd28a835c557e88ba81b0be829b0b7d2 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 29 Oct 2014 17:10:28 -0400 Subject: [PATCH] Added a listener to the NotesCheckbox that checks whether or not the the box is checked before the checkbox's state is altered, then stashes the boolean. Also added a line of code to pre-check the notescheckbox if the stashed boolean returns true Cross-port: e46144c --- Open-ILS/xul/staff_client/server/cat/update_items.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/update_items.js b/Open-ILS/xul/staff_client/server/cat/update_items.js index 270ec356a8..dc11233e2a 100644 --- a/Open-ILS/xul/staff_client/server/cat/update_items.js +++ b/Open-ILS/xul/staff_client/server/cat/update_items.js @@ -139,6 +139,17 @@ function my_init() { var noteCheckbox = document.createElement('checkbox'); noteCheckbox.setAttribute('id','li_note_checkbox'); noteCheckbox.setAttribute('label',$('catStrings').getString('staff.cat.update_items.lineitem_note.default')); + + if (g.data.notes_toggle == true){noteCheckbox.setAttribute('checked', true);} + + noteCheckbox.addEventListener('click',function(ev) + { + if ($('li_note_checkbox').checked){g.data.notes_toggle = false;} + else{g.data.notes_toggle = true;} + g.data.stash(g.data.notes_toggle); + } + ); + control_bar.appendChild( noteCheckbox ); // Make the textbox for the default note -- 2.11.0