From 5705d96e0010b9e588f1d01920ea302556fb0a03 Mon Sep 17 00:00:00 2001 From: nikita Date: Thu, 19 Jan 2017 10:32:58 +0530 Subject: [PATCH] for now the modules are hard coded as earlier and bypasses login. This will be back once the remote mongoDB conenction issue is fixed. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 57 +++++++++++++++++++++++++++++---------------------------- 400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html | 21 +++++++++++++++++++-- 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 45bdb0b..cb61dd4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -86,37 +86,38 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.userModules ; $rootScope.AuthenticateUser = function (userInfo) { - if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { + $rootScope.isVisibleLogin = false; + //if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { - alert("Please enter correct information"); + // alert("Please enter correct information"); - } - else { - - AuthenticationService.authenticateUser(userInfo) - .then( - - function (result) { - if (result == LoginConstants.USER_NOT_FOUND) { - - alert(result); - } - else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { - alert(result); - } - else { - if (result.loginId != undefined || result.loginId != "" || result.loginId != null) + //} + //else { - $rootScope.userData = result; - $rootScope.userModules = result.modules; - $rootScope.isVisibleLogin = false; - } - }, - function (error) { - console.log(' Error in authentication = ' + error.statusText); - alert(LoginConstants.ERROR_IN_FECTHING_DETAILS); - }); - } + // AuthenticationService.authenticateUser(userInfo) + // .then( + + // function (result) { + // if (result == LoginConstants.USER_NOT_FOUND) { + + // alert(result); + // } + // else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { + // alert(result); + // } + // else { + // if (result.loginId != undefined || result.loginId != "" || result.loginId != null) + + // $rootScope.userData = result; + // $rootScope.userModules = result.modules; + // $rootScope.isVisibleLogin = false; + // } + // }, + // function (error) { + // console.log(' Error in authentication = ' + error.statusText); + // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS); + // }); + //} } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html index 5021ccd..0b87496 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html @@ -25,8 +25,25 @@ -- libgit2 0.21.4