Commit 1ef64359d6bd24010e05fbe78262f064011892aa

Authored by Nikita Kulshreshtha
1 parent ba4f459f

integrated login functionality

400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj.user
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <VisualStudio> 7 <VisualStudio>
8 <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> 8 <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
9 <WebProjectProperties> 9 <WebProjectProperties>
10 - <StartPageUrl>index.html</StartPageUrl> 10 + <StartPageUrl>login.html</StartPageUrl>
11 <StartAction>SpecificPage</StartAction> 11 <StartAction>SpecificPage</StartAction>
12 <AspNetDebugging>True</AspNetDebugging> 12 <AspNetDebugging>True</AspNetDebugging>
13 <SilverlightDebugging>False</SilverlightDebugging> 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 $scope.IsAuthenticated = false; 7 $scope.IsAuthenticated = false;
6 8
7 $scope.login = function () { 9 $scope.login = function () {
8 - alert('called controller'); 10 +
  11 +
  12 + // alert('called controller');
9 $scope.IsAuthenticated = AuthenticationService.authenticateUser('superadmin', 'education'); 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 \ No newline at end of file 24 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
@@ -41,7 +41,10 @@ AIA.constant(&#39;DA&#39;, [ @@ -41,7 +41,10 @@ AIA.constant(&#39;DA&#39;, [
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 for (var i = 0; i < pages.length; i++) { 48 for (var i = 0; i < pages.length; i++) {
46 if (pages[i].pageSlug != null) { 49 if (pages[i].pageSlug != null) {
47 $routeProvider.when('/' + pages[i].pageSlug, 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 \ No newline at end of file 9 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-body-view-list.html
1 - <div ng-init="loadDissectibleAnatomyData()"> 1 +
  2 +<div ng-init="loadDissectibleAnatomyData()">
2 <!--<div class="main">--> 3 <!--<div class="main">-->
3 <div class="col-sm-12"> 4 <div class="col-sm-12">
4 <div id="inner-anatomyPage"> 5 <div id="inner-anatomyPage">
400-SOURCECODE/AIAHTML5.Web/index.html
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="en" ng-cloak ng-app="AIA"> 2 <html lang="en" ng-cloak ng-app="AIA">
3 <head> 3 <head>
4 - <!--<base href="/AIA/" />--> 4 + <base href="/AIA/" />
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 7 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
400-SOURCECODE/AIAHTML5.Web/login.html
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 - <!--<base href="/AIA/" />--> 4 + <base href="/AIA/" />
5 <meta charset="utf-8"> 5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 7 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">