webstaff: using egEmbedFrame escape opens new window at frame's current location
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 7 Feb 2017 20:45:35 +0000 (15:45 -0500)
committerKathy Lussier <klussier@masslnc.org>
Sat, 18 Feb 2017 18:31:31 +0000 (13:31 -0500)
... as opposed to whatever URL was originally embedded.

For example, if you doing a PO search, then open the frame in a
new window, the results of the search are displayed in that window
rather than an empty search form.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/services/eframe.js

index e87b0ba..7fdbd0a 100644 (file)
@@ -276,7 +276,7 @@ angular.module('egCoreMod')
             // open a new tab with the embedded URL
             $scope.escapeEmbed = function() {
                 $scope.showIframe = false;
-                $window.open($scope.url, '_blank').focus();
+                $window.open($scope.iframe.contentWindow.location, '_blank').focus();
             }
             $scope.restoreEmbed = function() {
                 $scope.showIframe = true;