From: Bill Erickson Date: Wed, 29 Oct 2014 21:10:28 +0000 (-0400) Subject: Added a listener to the NotesCheckbox that checks whether or not the the box is check... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=10253102fd28a835c557e88ba81b0be829b0b7d2;p=working%2FEvergreen.git 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 --- 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