From 05557c644c57d3cb52609d7f97af23bbdbebe406 Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Sat, 30 Apr 2016 14:48:16 -0400 Subject: #234 - some comments added Former-commit-id: 2d29f99afe2459d29fbeeab1bd89371c4535ed2f --- www/js/WizardCtrl.js | 31 +++++++++++++++++++++---------- www/templates/wizard.html | 7 +++---- 2 files changed, 24 insertions(+), 14 deletions(-) (limited to 'www') diff --git a/www/js/WizardCtrl.js b/www/js/WizardCtrl.js index 8dacfee7..d1bd9da9 100644 --- a/www/js/WizardCtrl.js +++ b/www/js/WizardCtrl.js @@ -9,6 +9,10 @@ $scope.openMenu = function () { + + //-------------------------------------------------------------------------- + // tags a protocol + //-------------------------------------------------------------------------- function addhttp(url) { if ((!/^(f|ht)tps?:\/\//i.test(url)) && (url != "")) { @@ -17,16 +21,10 @@ $scope.openMenu = function () { return url; } - function validURL(url) - { - if (!url) - - return ({status:false, code:"URL cannot be empty"}); - url = addhttp(url); - return ({status:true, code:""}); - - } + //-------------------------------------------------------------------------- + // exit validator for auth wizard + //-------------------------------------------------------------------------- $scope.exitAuth = function() { @@ -75,6 +73,10 @@ $scope.openMenu = function () { }; + //-------------------------------------------------------------------------- + // validator for portal url wizard + //-------------------------------------------------------------------------- + $scope.exitPortal = function() { ZMDataModel.zmLog ("Wizard: validating portal url syntax"); @@ -125,6 +127,9 @@ $scope.openMenu = function () { return true; }; + //-------------------------------------------------------------------------- + // part of auth wizard - toggles display of auth components + //-------------------------------------------------------------------------- $scope.toggleAuth = function() { $scope.wizard.useauth = !$scope.wizard.useauth; @@ -136,6 +141,9 @@ $scope.openMenu = function () { }; + //-------------------------------------------------------------------------- + // global tip toggler for all wizard steps + //-------------------------------------------------------------------------- $scope.toggleTip = function() { $scope.wizard.tipshow = !$scope.wizard.tipshow; @@ -146,7 +154,10 @@ $scope.openMenu = function () { }; - $scope.$on('$ionicView.enter', function () { + //-------------------------------------------------------------------------- + // initial + //-------------------------------------------------------------------------- + $scope.$on('$ionicView.beforeEnter', function () { //console.log("**VIEW ** Help Ctrl Entered"); $scope.wizard = { diff --git a/www/templates/wizard.html b/www/templates/wizard.html index ee29fe21..5b491d8c 100644 --- a/www/templates/wizard.html +++ b/www/templates/wizard.html @@ -2,8 +2,6 @@ - - @@ -11,6 +9,7 @@ +

Welcome to zmWizard

Configuring ZoneMinder can be a pain. Lets see if zmWizard can help. In the next few screens, I will ask you some simple questions and do my best to guess the settings for you.

@@ -34,7 +33,7 @@
- +

Portal Authentication

Lets talk about how you have configured authentication If you have enabled authentication, toggle this button

@@ -76,7 +75,7 @@
- +

Lets try and validate your inputs

I am now going to try and log into the portal using: -- cgit v1.2.3