From fe096a5edea0132a5b0a3ff3e1d86a1a19ad215a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Bakkeli?= Date: Thu, 21 Jul 2011 16:36:02 +0200 Subject: [PATCH] Fixed return link when one closes premodal --- header.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/header.php b/header.php index 4cfe64f..2af909f 100644 --- a/header.php +++ b/header.php @@ -66,9 +66,9 @@ function showUrlModal(href) }); }, onClose: function (dialog) { - window.location = window.location.origin + "#"; + window.location = preModal; dialog.data.slideUp('fast', function () { - dialog.overlay.slideUp('slow', function () { + dialog.overlay.slideUp('fast', function () { dialog.container.fadeOut('fast', function () { $j.modal.close(); }); @@ -82,8 +82,8 @@ function showUrlModal(href) } -var preModal = window.location.href; -if(preModal.indexOf("#") == -1) preModal += "#"; +var preModal = window.location.href + "#" +if(preModal.indexOf("#") == -1) preModal = preModal.substr(0, preModal.indexOf("#")); $j(function() {