From 80b4a53d5a830153f4f42fcde44b78db506008af Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 25 Sep 2013 16:19:40 +0200 Subject: [PATCH] Raw captive portal detected popup --- css/{settingsPopup.css => popups.css} | 32 ++++++++++++++++++--------- index.html | 7 ++++-- js/SettingsWindow.js | 3 ++- js/main.js | 6 ++++- 4 files changed, 33 insertions(+), 15 deletions(-) rename css/{settingsPopup.css => popups.css} (79%) diff --git a/css/settingsPopup.css b/css/popups.css similarity index 79% rename from css/settingsPopup.css rename to css/popups.css index 1b518a4..ed23a9b 100644 --- a/css/settingsPopup.css +++ b/css/popups.css @@ -8,7 +8,8 @@ height: 100%; display:none; } -#settings { + +.popup { background-color: #fff; z-index: 15; @@ -29,24 +30,24 @@ border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; - overflow: hidden; + overflow: hidden; + display:none; } + + #settings header { margin: 25px 25px 0 25px; height: 44px; } - -div.content { +#settings div.content { margin: 15px 25px 25px 25px; height: 388px; display: table; } - -div.content > div { +#settings div.content > div { height: 100%; } - -div.content > div.settings { +#settings div.content > div.settings { border: 1px solid rgb(187, 187, 187); -webkit-border-radius: 5px; -moz-border-radius: 5px; @@ -58,17 +59,26 @@ div.content > div.settings { overflow-x: hidden; padding: 10px 10px 10px 10px; } -div.content > div.manipulationBtns { +#settings div.content > div.manipulationBtns { display: table-cell; vertical-align: bottom; width: 125px; } - -div.content .btnOK { +#settings div.content .btnOK { width: 85px; height: 86px; background: url('../img/buttons/btnOk_settings.png') no-repeat; margin: 0 0 0 10px; cursor: pointer; } + + +#portalpopup { + width: 400px; + height: 200px; + margin: -100px 0 0 -200px; +} +#portalpopup p{ + margin: 1em; +} \ No newline at end of file diff --git a/index.html b/index.html index 9a9d1c5..2fde870 100755 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + @@ -79,7 +79,7 @@
-
+
+
diff --git a/js/SettingsWindow.js b/js/SettingsWindow.js index 60bb14d..9937c56 100644 --- a/js/SettingsWindow.js +++ b/js/SettingsWindow.js @@ -109,7 +109,7 @@ function SettingsWindow() { console.log("f:showSettings()"); this.loadSettings(); // reload settings - + this.window.css("display","block"); $("#contentOverlay").fadeIn(375, function() { document.body.removeEventListener('touchmove',prevent,false); }); @@ -117,6 +117,7 @@ function SettingsWindow() { this.hideSettings = function() { $("#contentOverlay").fadeOut(375, function() { document.body.addEventListener('touchmove',prevent,false); + self.window.css("display","none"); }); } diff --git a/js/main.js b/js/main.js index f7c0973..5e782ce 100644 --- a/js/main.js +++ b/js/main.js @@ -48,7 +48,11 @@ $(function() { settingsWindow.init(wifiboxURL); $(document).on(SettingsWindow.SETTINGS_LOADED,settingsLoaded); - + + if(window.toolbar.visible == false) { + $("#contentOverlay").css("display","block"); + $("#portalpopup").css("display","block"); + } if(debugMode) { console.log("debug mode is true"); $("body").css("overflow", "auto");