Added a listener to the NotesCheckbox that checks whether or not the the box is check...
authorBill Erickson <berickxx@gmail.com>
Wed, 29 Oct 2014 21:10:28 +0000 (17:10 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
    Cross-port: e46144c

Open-ILS/xul/staff_client/server/cat/update_items.js

index 270ec35..dc11233 100644 (file)
@@ -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