s/portalurl/syncurl/g
This commit is contained in:
parent
2c30fe1b82
commit
96dd892c39
@ -30,7 +30,7 @@ document.addEventListener("deviceready", function () {
|
|||||||
* succeeds.
|
* succeeds.
|
||||||
*/
|
*/
|
||||||
function getuserinfo(callback) {
|
function getuserinfo(callback) {
|
||||||
$.post(localStorage.getItem("portalurl"), {
|
$.post(localStorage.getItem("syncurl"), {
|
||||||
username: localStorage.getItem("username"),
|
username: localStorage.getItem("username"),
|
||||||
key: localStorage.getItem("key"),
|
key: localStorage.getItem("key"),
|
||||||
password: localStorage.getItem("password"),
|
password: localStorage.getItem("password"),
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
function loadapps() {
|
function loadapps() {
|
||||||
$.post(localStorage.getItem("portalurl"), {
|
$.post(localStorage.getItem("syncurl"), {
|
||||||
username: localStorage.getItem("username"),
|
username: localStorage.getItem("username"),
|
||||||
key: localStorage.getItem("key"),
|
key: localStorage.getItem("key"),
|
||||||
action: "listapps"
|
action: "listapps"
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
// Wipe localStorage
|
// Wipe localStorage
|
||||||
localStorage.removeItem("setupcomplete");
|
localStorage.removeItem("setupcomplete");
|
||||||
localStorage.removeItem("username");
|
localStorage.removeItem("username");
|
||||||
localStorage.removeItem("portalurl");
|
localStorage.removeItem("syncurl");
|
||||||
localStorage.removeItem("key");
|
localStorage.removeItem("key");
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
// force-reload app
|
// force-reload app
|
||||||
@ -64,14 +64,6 @@
|
|||||||
}, "Are you sure?");
|
}, "Are you sure?");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Open Portal in an iframe.
|
|
||||||
* @returns {undefined}
|
|
||||||
*/
|
|
||||||
function openportal() {
|
|
||||||
openapp("portal", "/mobile/index.php", localStorage.getItem("portalurl").replace("/mobile/index.php", ""), "/static/img/logo.svg", "Portal", false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleAnimations() {
|
function toggleAnimations() {
|
||||||
if (localStorage.getItem("animations") === null || localStorage.getItem("animations") === "true") {
|
if (localStorage.getItem("animations") === null || localStorage.getItem("animations") === "true") {
|
||||||
localStorage.setItem("animations", "false");
|
localStorage.setItem("animations", "false");
|
||||||
@ -94,7 +86,7 @@
|
|||||||
function updatepassword() {
|
function updatepassword() {
|
||||||
navigator.notification.prompt("Re-enter your password.", function (results) {
|
navigator.notification.prompt("Re-enter your password.", function (results) {
|
||||||
if (results.buttonIndex == 1) {
|
if (results.buttonIndex == 1) {
|
||||||
$.post(localStorage.getItem("portalurl"), {
|
$.post(localStorage.getItem("syncurl"), {
|
||||||
username: localStorage.getItem("username"),
|
username: localStorage.getItem("username"),
|
||||||
key: localStorage.getItem("key"),
|
key: localStorage.getItem("key"),
|
||||||
password: results.input1,
|
password: results.input1,
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<input type="text" id="key" class="form-control" placeholder="Sync key" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /> <br />
|
<input type="text" id="key" class="form-control" placeholder="Sync key" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /> <br />
|
||||||
<div class="input-group" style="margin-left: -20px;">
|
<div class="input-group" style="margin-left: -20px;">
|
||||||
<span class="input-group-addon" id="protocol-select">https://</span>
|
<span class="input-group-addon" id="protocol-select">https://</span>
|
||||||
<input type="text" id="portalurl" class="form-control" placeholder="URL" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
<input type="text" id="syncurl" class="form-control" placeholder="URL" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
||||||
</div> <br />
|
</div> <br />
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
@ -44,13 +44,13 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
/* Detect if the user typed "http[s]://" into the URL box and correct for it */
|
/* Detect if the user typed "http[s]://" into the URL box and correct for it */
|
||||||
$("#portalurl").blur(function () {
|
$("#syncurl").blur(function () {
|
||||||
if ($('#portalurl').val().toLowerCase().startsWith("https://")) {
|
if ($('#syncurl').val().toLowerCase().startsWith("https://")) {
|
||||||
$('#portalurl').val($('#portalurl').val().replace(/https\:\/\//ig, ""));
|
$('#syncurl').val($('#syncurl').val().replace(/https\:\/\//ig, ""));
|
||||||
$('#protocol-select').text("https://");
|
$('#protocol-select').text("https://");
|
||||||
$('#use-security').prop('checked', true);
|
$('#use-security').prop('checked', true);
|
||||||
} else if ($('#portalurl').val().toLowerCase().startsWith("http://")) {
|
} else if ($('#syncurl').val().toLowerCase().startsWith("http://")) {
|
||||||
$('#portalurl').val($('#portalurl').val().replace(/http\:\/\//ig, ""));
|
$('#syncurl').val($('#syncurl').val().replace(/http\:\/\//ig, ""));
|
||||||
$('#protocol-select').text("http://");
|
$('#protocol-select').text("http://");
|
||||||
$('#use-security').prop('checked', false);
|
$('#use-security').prop('checked', false);
|
||||||
}
|
}
|
||||||
@ -79,10 +79,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function manualsetup() {
|
function manualsetup() {
|
||||||
if ($('#portalurl').val().toLowerCase().startsWith("http")) {
|
if ($('#syncurl').val().toLowerCase().startsWith("http")) {
|
||||||
var portal = $('#portalurl').val();
|
var portal = $('#syncurl').val();
|
||||||
} else {
|
} else {
|
||||||
var portal = $('#protocol-select').text() + $('#portalurl').val();
|
var portal = $('#protocol-select').text() + $('#syncurl').val();
|
||||||
}
|
}
|
||||||
var username = $('#username').val();
|
var username = $('#username').val();
|
||||||
var key = $('#key').val().replace(/\s+/g, '');
|
var key = $('#key').val().replace(/\s+/g, '');
|
||||||
@ -101,7 +101,7 @@
|
|||||||
}, function (data) {
|
}, function (data) {
|
||||||
if (data.status === 'OK') {
|
if (data.status === 'OK') {
|
||||||
localStorage.setItem("username", username);
|
localStorage.setItem("username", username);
|
||||||
localStorage.setItem("portalurl", portal);
|
localStorage.setItem("syncurl", portal);
|
||||||
localStorage.setItem("key", key);
|
localStorage.setItem("key", key);
|
||||||
openscreen("setup2");
|
openscreen("setup2");
|
||||||
} else {
|
} else {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
function savePassword() {
|
function savePassword() {
|
||||||
$.post(localStorage.getItem("portalurl"), {
|
$.post(localStorage.getItem("syncurl"), {
|
||||||
username: localStorage.getItem("username"),
|
username: localStorage.getItem("username"),
|
||||||
key: localStorage.getItem("key"),
|
key: localStorage.getItem("key"),
|
||||||
password: $('#passbox').val(),
|
password: $('#passbox').val(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user