Commit 1ef64359d6bd24010e05fbe78262f064011892aa
1 parent
ba4f459f
integrated login functionality
Showing
7 changed files
with
33 additions
and
25 deletions
400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj.user
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | <VisualStudio> |
8 | 8 | <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> |
9 | 9 | <WebProjectProperties> |
10 | - <StartPageUrl>index.html</StartPageUrl> | |
10 | + <StartPageUrl>login.html</StartPageUrl> | |
11 | 11 | <StartAction>SpecificPage</StartAction> |
12 | 12 | <AspNetDebugging>True</AspNetDebugging> |
13 | 13 | <SilverlightDebugging>False</SilverlightDebugging> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AuthenticationController.js
1 | -'use strict'; | |
1 | +/// <reference path="../../index.html" /> | |
2 | +/// <reference path="../../index.html" /> | |
3 | +'use strict'; | |
2 | 4 | |
3 | -AIA.controller("AuthenticationController",["$scope", "$log", "$location", "$timeout", "AuthenticationService", | |
4 | - function ($scope, $log, $location, $timeout, AuthenticationService) { | |
5 | +AIA.controller("AuthenticationController", ["$scope", "$log", "$location", '$window', "$timeout", "AuthenticationService", | |
6 | + function ($scope, $log, $location, $window, $timeout, AuthenticationService) { | |
5 | 7 | $scope.IsAuthenticated = false; |
6 | 8 | |
7 | 9 | $scope.login = function () { |
8 | - alert('called controller'); | |
10 | + | |
11 | + | |
12 | + // alert('called controller'); | |
9 | 13 | $scope.IsAuthenticated = AuthenticationService.authenticateUser('superadmin', 'education'); |
14 | + if ($scope.IsAuthenticated) { | |
15 | + $window.location.href = "/AIA/index.html"; | |
16 | + } | |
17 | + else { | |
18 | + | |
19 | + } | |
10 | 20 | } |
11 | - | |
12 | - }] | |
13 | -); | |
14 | 21 | |
22 | + }] | |
23 | +); | |
15 | 24 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... | ... | @@ -41,7 +41,10 @@ AIA.constant('DA', [ |
41 | 41 | ]); |
42 | 42 | |
43 | 43 | |
44 | -AIA.config(function ($routeProvider, pages) { | |
44 | +AIA.config(function ($routeProvider, pages, $locationProvider) { | |
45 | + | |
46 | + $locationProvider.html5Mode(true); | |
47 | + | |
45 | 48 | for (var i = 0; i < pages.length; i++) { |
46 | 49 | if (pages[i].pageSlug != null) { |
47 | 50 | $routeProvider.when('/' + pages[i].pageSlug, | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
1 | -AIA.factory('AuthenticationService',function() { | |
2 | - return { | |
3 | - authenticateUser:function(userName,Password) { | |
4 | - alert('called service'); | |
5 | - return true; | |
6 | - } | |
7 | - }; | |
8 | -}); | |
9 | - | |
10 | - | |
11 | - | |
12 | - | |
13 | - | |
1 | +AIA.factory('AuthenticationService', function () { | |
2 | + return { | |
3 | + authenticateUser: function (userName, Password) { | |
4 | + //alert('called service'); | |
5 | + return true; | |
6 | + } | |
7 | + }; | |
8 | +}); | |
14 | 9 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-body-view-list.html
400-SOURCECODE/AIAHTML5.Web/index.html
1 | 1 | <!DOCTYPE html> |
2 | 2 | <html lang="en" ng-cloak ng-app="AIA"> |
3 | 3 | <head> |
4 | - <!--<base href="/AIA/" />--> | |
4 | + <base href="/AIA/" /> | |
5 | 5 | <meta charset="utf-8"> |
6 | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/login.html