Back link on final edition page now properly redirects user to previous menu tab...
[fa-stable.git] / js / utils.js
index 5af7bfb4f644bab6e6e54836eb4ba38d5162d8a6..898a536211086ff3cabb62a0f873395aa4cef698 100644 (file)
@@ -251,11 +251,11 @@ function get_amount(doc, label) {
                return isNaN(val) ? 0 : val;
 }
 
-function goBack(no_menu) {
-       if (no_menu)
+function goBack(deep) {
+       if (window.opener)
         window.close();
        else
-        window.history.go(-1);
+        window.history.go(deep || -1);
 }
 
 function setFocus(name, byId) {