fix hold notice interface
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 17 Nov 2008 03:10:38 +0000 (03:10 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 17 Nov 2008 03:10:38 +0000 (03:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11236 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/hold_notices.xul

index 6e9f73f..15c41d7 100644 (file)
 
                                a_list_of_one();
 
-                               document.getElementById('bib_brief').setAttribute('src',urls.XUL_BIB_BRIEF); // + '?docid=' + g.ahr.target());
-                               get_contentWindow(document.getElementById('bib_brief')).xulG = { 'docid' : g.ahr.target() };
+                               var x = document.getElementById('bib_brief_box'); while (x.firstChild) x.removeChild(x.lastChild);
+                var bib_brief = document.createElement('iframe'); x.appendChild(bib_brief);
+                bib_brief.setAttribute('flex',1);
+                bib_brief.setAttribute('src',urls.XUL_BIB_BRIEF); 
+                               get_contentWindow(bib_brief).xulG = { 'docid' : g.ahr.target() };
 
                                refresh();
 
                                /* template */
                                var node = $('notification_template').cloneNode(true); np.appendChild(node); node.hidden = false;
                                util.widgets.apply(node,'name','notify_time',
-                                       function(n){n.setAttribute("tooltiptext", $("patronStrings").getFormattedString('staff.patron.hold_notices.tooltiptext',[g.notifications[i].id(), g.notifications[i].hold(), g.notifications[i].notify_staff()]));
+                                       function(n){
+                        n.setAttribute(
+                            "tooltiptext", 
+                            $("patronStrings").getFormattedString('staff.patron.hold_notices.tooltiptext',[g.notifications[i].id(), g.notifications[i].hold(), g.notifications[i].notify_staff()])
+                        );
+                    }
                                );
                                apply(node,'method',g.notifications[i].method ? g.notifications[i].method() : '');
                                apply(node,'note',g.notifications[i].note() ? g.notifications[i].note() : '');
                                xml += '<caption label="' + $("patronStrings").getString('staff.patron.hold_notices.new_notification_record') + '"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows>';
                                xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.method') + '"/><textbox id="method" name="fancy_data"/></row>';
                                xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.note') + '"/><textbox multiline="true" id="note" name="fancy_data"/></row>';
-                               xml += '<row><spacer/><hbox><button label="' + $("patronStrings").getString('staff.patron.hold_notices.cancel') + '" name="fancy_cancel"';
+                               xml += '<row><spacer/><hbox><button label="' + $("patronStrings").getString('staff.patron.hold_notices.cancel') + '" name="fancy_cancel" ';
                                xml += 'accesskey="' + $("patronStrings").getString('staff.patron.hold_notices.cancel_accesskey') + '"/>';
-                               xml += '<button label="' + $("patronStrings").getString('staff.patron.hold_notices.add_notif_record') + '";'
+                               xml += '<button label="' + $("patronStrings").getString('staff.patron.hold_notices.add_notif_record') + '" ';
                                xml += 'accesskey="' + $("patronStrings").getString('staff.patron.hold_notices.add_notif_record_accesskey') + '" name="fancy_submit"/></hbox></row></rows></grid></groupbox>';
-                               //g.data.init({'via':'stash'});
-                               //g.data.temp_notification_xml = xml; g.data.stash('temp_notification_xml');
                                JSAN.use('util.window'); var win = new util.window();
                                var fancy_prompt_data = win.open(
                                        urls.XUL_FANCY_PROMPT,
-                                       //+ '?xml_in_stash=temp_notification_xml'
-                                       //+ '&focus=' + window.escape('method')
-                                       //+ '&title=' + window.escape('Add Notification Record'),
                                        'fancy_prompt', 'chrome,resizable,modal,width=700,height=500',
                                        { 'xml' : xml, 'focus' : 'method', 'title' : $("patronStrings").getString('staff.patron.hold_notices.add_notif_record') }
                                );
 
     <vbox id="v1" flex="1" persist="height">
         <label id="patron_name" class="patronNameLarge"/>
-        <iframe id="bib_brief" flex="1"/>
+        <vbox id="bib_brief_box" flex="1"/>
     </vbox>
 
     <splitter><grippy/></splitter>