summaryrefslogtreecommitdiff
path: root/www/js/LoginCtrl.js
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-11-14 14:17:25 -0500
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-11-14 14:17:25 -0500
commitc652eda24f3caa446815194f32b78d049fa99076 (patch)
treeb12a1d8cbc39a8f3283d2202d14f87cc3a9e0acd /www/js/LoginCtrl.js
parentc7e5dc8f53079e4e5f90c974b30c704b61f8d020 (diff)
Initial commits - #83
Former-commit-id: 2ee7fa15e0bd6964a5437a537aa4ebca5c0428c9
Diffstat (limited to 'www/js/LoginCtrl.js')
-rw-r--r--www/js/LoginCtrl.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js
index 1199d78a..27673c54 100644
--- a/www/js/LoginCtrl.js
+++ b/www/js/LoginCtrl.js
@@ -176,6 +176,8 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
function saveItems()
{
+
+
console.log('Saving login');
ZMDataModel.setFirstUse(false);
@@ -324,7 +326,20 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
}
$scope.saveItems = function () {
- saveItems();
+
+ if (!$scope.loginData.serverName)
+ {
+ $ionicPopup.alert({
+ title:'Error',
+ template: 'Server Name cannot be empty',
+ })
+ .then(function(res)
+ {return;});
+ }
+ else
+ {
+ saveItems();
+ }
};