From d09894ce779e1b55970514d1318119dd2485da44 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 3 Dec 2012 12:05:11 +0000 Subject: [PATCH] make it show password dialog on wrong password --- src/static/js/pad.js | 1 + src/static/js/pad_utils.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 316802bf3..d380a8dcf 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -315,6 +315,7 @@ function handshake() { $('#loading').hide(); $('#wrongPassword').show(); + $('#passwordRequired').show(); $("#passwordinput").focus(); } } diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js index 83ee9aae8..f752722f3 100644 --- a/src/static/js/pad_utils.js +++ b/src/static/js/pad_utils.js @@ -52,7 +52,17 @@ function createCookie(name, value, days, path) if(!path) path = "/"; - document.cookie = name + "=" + value + expires + "; path=" + path; + if(!path) + path = "/"; + + //Check if the browser is IE and if so make sure the full path is set in the cookie + if(navigator.appName=='Microsoft Internet Explorer'){ + document.cookie = name + "=" + value + expires + "; path="+document.location; + } + else{ + document.cookie = name + "=" + value + expires + "; path=" + path; + } + } function readCookie(name)