From 876e342d65038b2e33ec5f7d76433a0459d0d3b4 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 12 Dec 2018 14:34:48 -0500 Subject: #716 add view=console to avoid redirect --- www/js/DataModel.js | 8 ++------ www/js/MenuController.js | 2 +- www/js/MontageHistoryCtrl.js | 2 +- www/js/WizardCtrl.js | 2 +- www/js/app.js | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) (limited to 'www/js') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 86efb329..adb6308e 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -210,10 +210,6 @@ angular.module('zmApp.controllers') * @returns */ function setCordovaHttpOptions() { - - debug ("Cordova HTTP: disabling redirect till bug in library is fixed"); - cordova.plugin.http.disableRedirect(true, - function(s) {debug ("redirect disabled");}, function (e) {debug ("redirect disable FAILED");}); if (loginData.isUseBasicAuth) { debug("Cordova HTTP: configuring basic auth"); cordova.plugin.http.useBasicAuth(loginData.basicAuthUser, loginData.basicAuthPassword); @@ -813,7 +809,7 @@ angular.module('zmApp.controllers') { log("Adding to chain stack: " + tLd.serverName + ">" + tLd.url); chainURLs.push({ - url: tLd.url + "/index.php", + url: tLd.url + "/index.php?view=console", server: tLd.serverName }); log("Fallback of " + tLd.serverName + " is " + tLd.fallbackConfiguration); @@ -3064,7 +3060,7 @@ angular.module('zmApp.controllers') method: 'POST', timeout: 7000, //withCredentials: true, - url: loginData.url + '/index.php', + url: loginData.url + '/index.php?view=console', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json', diff --git a/www/js/MenuController.js b/www/js/MenuController.js index be918eb1..729c47d8 100644 --- a/www/js/MenuController.js +++ b/www/js/MenuController.js @@ -134,7 +134,7 @@ angular.module('zmApp.controllers').controller('MenuController', ['$scope', '$io var apiurl = loginData.apiurl + '/host/getVersion.json'; - var portalurl = loginData.url + '/index.php'; + //var portalurl = loginData.url + '/index.php'; zmAutoLogin.doLogin("") // Do the happy menu only if authentication works diff --git a/www/js/MontageHistoryCtrl.js b/www/js/MontageHistoryCtrl.js index 8a1927b3..a83d2ae3 100644 --- a/www/js/MontageHistoryCtrl.js +++ b/www/js/MontageHistoryCtrl.js @@ -534,7 +534,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageHistoryCtrl', ['$sc var req = qHttp({ method: 'POST', /*timeout: 15000,*/ - url: loginData.url + '/index.php', + url: loginData.url + '/index.php?view=console', headers: { 'Content-Type': 'application/x-www-form-urlencoded', //'Accept': '*/*', }, diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js index 8a5f1ac4..85a4d5de 100644 --- a/www/js/WizardCtrl.js +++ b/www/js/WizardCtrl.js @@ -458,7 +458,7 @@ angular.module('zmApp.controllers').controller('zmApp.WizardCtrl', ['$scope', '$ $scope.wizard.fqportal = u; - u = u + '/index.php'; + u = u + '/index.php?view=console'; NVRDataModel.log("Wizard: login url is " + u); // now lets login diff --git a/www/js/app.js b/www/js/app.js index 17cdea09..e735557b 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1304,7 +1304,7 @@ angular.module('zmApp', [ method: 'post', timeout: httpDelay, //withCredentials: true, - url: loginData.url + '/index.php', + url: loginData.url + '/index.php?view=console', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json', -- cgit v1.2.3