Wrap interface results from "find originating purchase order" in browser
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 May 2010 19:52:20 +0000 (19:52 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 May 2010 19:52:20 +0000 (19:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16401 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/util.js

index 01162bb..089a860 100644 (file)
@@ -3158,14 +3158,17 @@ circ.util.find_acq_po = function(session, copy_id) {
             "onresponse": function(r) {
                 if (r = openils.Util.readResponse(r)) {
                     if (r.purchase_order()) {
-                        /* XXX would prefer to use browser.xul to wrap this so
-                         * that we get back/forward/reload buttons, but that
-                         * doesn't work in this context. need to find out why.
-                         */
-                        xulG.new_tab(
-                            urls.EG_ACQ_PO_VIEW +
-                                "/" + r.purchase_order() + "/" + r.id(),
-                            {}, {}
+                        var url = urls.XUL_BROWSER + "?url=" +
+                            xulG.url_prefix(
+                                escape(urls.EG_ACQ_PO_VIEW +
+                                    "/" + r.purchase_order() + "/" + r.id())
+                            );
+                        window.xulG.new_tab(
+                            url, {"browser": true}, {
+                                "no_xulG": false,
+                                "show_print_button": false,
+                                "show_nav_buttons": true
+                            }
                         );
                     } else {
                         /* unlikely: got an LI with no PO */