summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliablePixels <pliablepixels@gmail.com>2015-07-02 16:09:38 -0400
committerPliablePixels <pliablepixels@gmail.com>2015-07-02 16:09:38 -0400
commita33062f255ed05a76d831648e7ef28e56e4185d3 (patch)
tree6bb9d0fbabf2761b37d3d9534b82fbe20c00cdde
parentf112345add03c42bf18d6a1e9533efe455d11b11 (diff)
made it easier to figure out what all the fields are in the settings screen
-rw-r--r--www/js/LoginCtrl.js9
-rw-r--r--www/templates/login.html25
2 files changed, 22 insertions, 12 deletions
diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js
index 7541000e..c4192927 100644
--- a/www/js/LoginCtrl.js
+++ b/www/js/LoginCtrl.js
@@ -28,7 +28,8 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
// http://stackoverflow.com/questions/11300906/check-if-a-string-starts-with-http-using-javascript
//-------------------------------------------------------------------------------
function addhttp(url) {
- if (!/^(f|ht)tps?:\/\//i.test(url)) {
+
+ if ((!/^(f|ht)tps?:\/\//i.test(url)) && (url !="") ) {
url = "http://" + url;
}
return url;
@@ -135,7 +136,11 @@ function addhttp(url) {
]).then(
function (results) {
$ionicLoading.hide();
- //alert("All good");
+ $ionicPopup.alert({
+ title: 'Settings Saved',
+ template: 'Please explore the menu and enjoy zmNinja!'
+ }).then(function(res) { $ionicSideMenuDelegate.toggleLeft();});
+
},
function (error) {
$ionicLoading.hide();
diff --git a/www/templates/login.html b/www/templates/login.html
index 5c2eff64..a9fc6ac9 100644
--- a/www/templates/login.html
+++ b/www/templates/login.html
@@ -8,22 +8,27 @@
<ion-content class="padding">
<div class="list list-inset">
<span style="color:rgb(100,100,100)"> <i class="ion-android-home" style="font-size:150%"></i> ZoneMinder Settings</span>
- <label class="item item-input">
- <input autocapitalize="none" type="text" placeholder="Username" ng-model="loginData.username">
+ <label class="item item-input item-floating-label">
+ <span class="input-label">username</span>
+ <input autocapitalize="none" type="text" placeholder="username" ng-model="loginData.username">
</label>
- <label class="item item-input">
- <input type="password" placeholder="Password" ng-model="loginData.password">
+ <label class="item item-input item-floating-label">
+ <span class="input-label">password</span>
+ <input type="password" placeholder="password" ng-model="loginData.password">
</label>
- <label class="item item-input">
- <input autocapitalize="none" type="text" placeholder="ZM portal URL " ng-model="loginData.url">
+ <label class="item item-input item-floating-label">
+ <span class="input-label">ZM portal url</span>
+ <input autocapitalize="none" type="text" placeholder="ZM portal url " ng-model="loginData.url">
</label>
- <label class="item item-input">
- <input autocapitalize="none" type="text" placeholder="Base path to cgi-bin" ng-model="loginData.streamingurl">
+ <label class="item item-input item-floating-label">
+ <span class="input-label">base path to cgi-bin</span>
+ <input autocapitalize="none" type="text" placeholder="base path to cgi-bin" ng-model="loginData.streamingurl">
</label>
- <label class="item item-input">
- <input autocapitalize="none" type="text" placeholder="ZM Api URL" ng-model="loginData.apiurl">
+ <label class="item item-input item-floating-label">
+ <span class="input-label">ZM api url</span>
+ <input autocapitalize="none" type="text" placeholder="ZM api url" ng-model="loginData.apiurl">
</label>
<label >