From b79ed5b657c6027421f76ad8f35026fef8a0a0fd Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Mon, 5 Oct 2015 09:30:31 +0200 Subject: [PATCH] Tentative fix for issue #89 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tentative fix for issue #89: - https://github.com/clipperz/password-manager/issues/89 Also fixed props passing to correctly show ‘offline copy’ header in unlock page. --- frontend/delta/js/Clipperz/PM/UI/MainController.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/delta/js/Clipperz/PM/UI/MainController.js b/frontend/delta/js/Clipperz/PM/UI/MainController.js index f255179..a2b838e 100644 --- a/frontend/delta/js/Clipperz/PM/UI/MainController.js +++ b/frontend/delta/js/Clipperz/PM/UI/MainController.js @@ -1112,18 +1112,17 @@ Clipperz.log("THE BROWSER IS OFFLINE"); if (fromPage != toPage) { var shouldAddItemToHistory; - shouldAddItemToHistory = typeof(addToHistory) == 'undefined' ? false : addToHistory; + if (this.proxyInfo()['proxyType'] != 'OFFLINE_COPY') { + shouldAddItemToHistory = typeof(addToHistory) == 'undefined' ? false : addToHistory; + } else { + shouldAddItemToHistory = false; + } this.slidePage(MochiKit.DOM.getElement(fromPage), MochiKit.DOM.getElement(toPage), 'LEFT'); this.setCurrentPage(toPage); if (shouldAddItemToHistory) { -//console.log("ADD ITEM TO HISTORY"); -//console.log("ADD ITEM TO HISTORY - window", window); -//console.log("ADD ITEM TO HISTORY - window.history", window.history); window.history.pushState({'fromPage': fromPage, 'toPage': toPage}, ""); -//# window.history.pushState(); -//console.log("ADDED ITEM TO HISTORY"); } else { //console.log("Skip HISTORY"); } @@ -1245,7 +1244,8 @@ Clipperz.log("THE BROWSER IS OFFLINE"); }; } else if (aPageName == 'unlockPage') { extraProperties = { - 'mode': this.loginMode(), + 'mode': this.loginMode(), + 'proxyInfo': this.proxyInfo(), } } else if (aPageName == 'registrationPage') { } else if (aPageName == 'mainPage') {