From c652eda24f3caa446815194f32b78d049fa99076 Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Sat, 14 Nov 2015 14:17:25 -0500 Subject: Initial commits - #83 Former-commit-id: 2ee7fa15e0bd6964a5437a537aa4ebca5c0428c9 --- www/js/LoginCtrl.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'www/js/LoginCtrl.js') 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(); + } }; -- cgit v1.2.3