From 96a85c3a0c1092f604c826f85b6a991eb7d1fe99 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 23 Nov 2011 09:37:25 +0100 Subject: [PATCH] 0001183: Can't close the popup dimension # view window --- includes/ui/ui_controls.inc | 2 +- js/utils.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 8687b33..774dbd0 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -187,7 +187,7 @@ function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0) echo ""._("View Attachment")."\n"; echo ""._("Print")."\n"; } - echo "".($no_menu ? _("Close") : _("Back"))."\n"; + echo "".($no_menu ? _("Close") : _("Back"))."\n"; end_row(); end_table(); if ($center) diff --git a/js/utils.js b/js/utils.js index 781382b..5af7bfb 100644 --- a/js/utils.js +++ b/js/utils.js @@ -251,8 +251,8 @@ function get_amount(doc, label) { return isNaN(val) ? 0 : val; } -function goBack() { - if (window.history.length <= 1) +function goBack(no_menu) { + if (no_menu) window.close(); else window.history.go(-1); -- 2.30.2