Serial alert notes missing commit
authorDan Wells <dbw2@calvin.edu>
Tue, 15 Oct 2013 13:33:46 +0000 (09:33 -0400)
committerDan Wells <dbw2@calvin.edu>
Tue, 15 Oct 2013 15:06:31 +0000 (11:06 -0400)
These changes were somehow lost during the hacking on this feature
at the Hack-a-Way.  The translation string is nice, but the changes
to notes.xul are necessary for being able to create notes.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Open-ILS/xul/staff_client/server/locale/en-US/serial.properties
Open-ILS/xul/staff_client/server/serial/manage_items.js
Open-ILS/xul/staff_client/server/serial/notes.xul

index bf4e631..14c16bb 100644 (file)
@@ -70,6 +70,7 @@ staff.serial.manage_items.notes_column.label=Notes (Item/Dist/Sub)
 staff.serial.manage_items.set_claimed_success=Successfully claimed %1$s item(s)
 staff.serial.manage_items.set_not_held_success=Successfully set %1$s item(s) to 'Not Held'
 staff.serial.manage_items.set_not_published_success=Successfully set %1$s item(s) to 'Not Published'
+staff.serial.manage_items.alert_notes.title=Serial Alerts
 staff.serial.manage_items.alert_button.label=1 Alert
 staff.serial.manage_items.alert_button.plural.label=%1s Alerts
 staff.serial.manage_subs.add.error=error adding object in manage_subs.js:
index 696d819..3a760f7 100644 (file)
@@ -1219,7 +1219,7 @@ serial.manage_items.prototype = {
         var notes_window = win.open(
             urls.XUL_SERIAL_NOTES,
             '','chrome,resizable,modal',
-            { 'notes' : notes, 'section_titles' : section_titles, 'title' : "Serial Alerts", 'disable_create' : true, 'section_id_names' : { 'ssubn' : 'subscription', 'sdistn' : 'distribution', 'sin' : 'item'} }
+            { 'notes' : notes, 'section_titles' : section_titles, 'title' : $('serialStrings').getString('staff.serial.manage_items.alert_notes.title'), 'disable_create' : true, 'section_id_names' : { 'ssubn' : 'subscription', 'sdistn' : 'distribution', 'sin' : 'item'} }
         );
         if (notes_window.notes_updated) { // we changed some notes
             if (notes_window.notes_updated.sdistn || notes_window.notes_updated.ssubn) {
index d6ec108..7e12c62 100644 (file)
                        var edit_mode; // for clarity
                        var label_text;
                        var button_accesskey;
+                       var note_fm_type;
 
                        if (typeof index != 'undefined') {
                                edit_mode = true;
                                alert = get_bool(g.notes[index].alert());
                                title = xml_encode(g.notes[index].title());
                                value = xml_encode(g.notes[index].value());
+                               note_fm_type = g.notes[index].classname;
                                label_text = $('serialStrings').getString('staff.serial.notes.edit_note.label');
                                button_accesskey = $('serialStrings').getString('staff.serial.notes.edit_note.accesskey');
                        } else {
+                               note_fm_type = g.fm_type;
                                label_text = $('catStrings').getString('staff.cat.copy_notes.new_note.add_note.label');
                                button_accesskey = $('catStrings').getString('staff.cat.copy_notes.new_note.add_note.accesskey');
                        }
                                        <grid flex="1"><columns><column/><column flex="1"/></columns> \
                                                <rows> \
                                                        <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.public') + '"/><checkbox id="pub" name="fancy_data" checked="' + public + '"/></row> \
-                                                       <row><label value="' + fieldmapper.IDL.fmclasses[g.notes[index].classname].field_map.alert.label + '"/><checkbox id="alert" name="fancy_data" checked="' + alert + '"/></row> \
+                                                       <row><label value="' + fieldmapper.IDL.fmclasses[note_fm_type].field_map.alert.label + '"/><checkbox id="alert" name="fancy_data" checked="' + alert + '"/></row> \
                                                        <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.title') + '"/><textbox id="title" name="fancy_data" context="clipboard" value="' + title + '"/></row> \
                                                        <row><label value="' + $('catStrings').getString('staff.cat.copy_notes.new_note.note') + '"/><textbox multiline="true" id="note" name="fancy_data" context="clipboard" value="' + value + '"/></row> \
                                                        <row><spacer/><hbox> \