Commit 5118737685977b14f44fb1198be31908a9e2b767
1 parent
1217960b
1. removed image existence check from showing da view list code.
2. added code for showing different html on index page(main menu/da-view)
Showing
6 changed files
with
43 additions
and
14 deletions
400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
... | ... | @@ -40,6 +40,7 @@ |
40 | 40 | <ItemGroup> |
41 | 41 | <Content Include="app\controllers\AuthenticationController.js" /> |
42 | 42 | <Content Include="app\controllers\DAController.js" /> |
43 | + <Content Include="app\controllers\HomeController.js" /> | |
43 | 44 | <Content Include="app\main\AIA.js" /> |
44 | 45 | <Content Include="app\services\AuthenticationService.js" /> |
45 | 46 | <Content Include="app\services\load-json-service.js" /> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2,8 +2,8 @@ |
2 | 2 | /// <reference path="../views/da/da-view.html" /> |
3 | 3 | 'use strict'; |
4 | 4 | |
5 | -AIA.controller("DAController", ["$scope", "$compile", "$http", "$log", "$location", "$timeout","DA","$routeParams", | |
6 | -function ($scope, $compile,$http, $log, $location, $timeout,DA,$routeParam ) { | |
5 | +AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "$routeParams", | |
6 | +function ($scope,$rootScope, $compile,$http, $log, $location, $timeout,DA,$routeParam ) { | |
7 | 7 | |
8 | 8 | $scope.genderId = ""; |
9 | 9 | $scope.BodyViewData = null; |
... | ... | @@ -19,7 +19,7 @@ function ($scope, $compile,$http, $log, $location, $timeout,DA,$routeParam ) { |
19 | 19 | //get the DA body view list based on selected gender |
20 | 20 | $scope.getDAViewList = function ($event) { |
21 | 21 | |
22 | - debugger; | |
22 | + // debugger; | |
23 | 23 | $("#bodyViewList").empty(); |
24 | 24 | //for default load |
25 | 25 | if ($event == null) { |
... | ... | @@ -40,15 +40,22 @@ function ($scope, $compile,$http, $log, $location, $timeout,DA,$routeParam ) { |
40 | 40 | var userModestysettings = DA[0].modesty; |
41 | 41 | var userSelectedSkintone = 'W'; |
42 | 42 | $scope.userModestySetting = 'Y' |
43 | - var thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity + userModestysettings)) + '.jpg'; | |
43 | + var thumbnailImage; | |
44 | + if((value._id==1)||(value._id==3)|| (value._id==5)||(value._id==6)||(value._id==7)||(value._id==11)) | |
45 | + thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity + userModestysettings)) + '.jpg'; | |
46 | + else { | |
47 | + thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity)) + '.jpg'; | |
48 | + | |
49 | + } | |
50 | + | |
44 | 51 | $scope.imagePath = "http://localhost/AIA/content/images/DA/BodyViews/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; |
45 | 52 | |
46 | - $scope.isImageExists = $scope.checkImgExistance($scope.imagePath); | |
47 | - //debugger | |
53 | + //$scope.isImageExists = $scope.checkImgExistance($scope.imagePath); | |
54 | + ////debugger | |
48 | 55 | |
49 | - if ($scope.isImageExists == false) { | |
50 | - $scope.imagePath = ($scope.imagePath).replace($scope.userModestySetting, ""); | |
51 | - } | |
56 | + //if ($scope.isImageExists == false) { | |
57 | + // $scope.imagePath = ($scope.imagePath).replace($scope.userModestySetting, ""); | |
58 | + //} | |
52 | 59 | |
53 | 60 | //debugger |
54 | 61 | var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" data-ng-click="openView($event)"><div class="thumbnail" >' |
... | ... | @@ -94,6 +101,8 @@ function ($scope, $compile,$http, $log, $location, $timeout,DA,$routeParam ) { |
94 | 101 | |
95 | 102 | $scope.openView = function ($event) { |
96 | 103 | alert('clicked: ' + $event.currentTarget.id) |
104 | + $rootScope.pageToOpen = 'app/views/da/da-view.html'; | |
105 | + alert($rootScope.pageToOpen) | |
97 | 106 | |
98 | 107 | } |
99 | 108 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
0 → 100644
1 | +'use strict'; | |
2 | + | |
3 | +AIA.controller("HomeController", ["$rootScope", "$log", "$location", "$timeout", | |
4 | + function ($rootScope, $log, $location, $timeout) { | |
5 | + | |
6 | + //$scope.pageToOpen = { | |
7 | + // name: 'MainMenu' | |
8 | + //}; | |
9 | + $rootScope.pageToOpen = 'MainMenu.html'; | |
10 | + }] | |
11 | +); | |
0 | 12 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... | ... | @@ -22,7 +22,13 @@ AIA.constant('pages', [ |
22 | 22 | pageSlug: 'da-body-view/:bodyViewId', |
23 | 23 | pageUrl: 'app/views/da/da-body-view.html', |
24 | 24 | pageController: 'DAController' |
25 | - } | |
25 | + }, | |
26 | + { | |
27 | + name: 'index', | |
28 | + pageSlug: 'index', | |
29 | + pageUrl: 'index.html', | |
30 | + pageController: 'HomeController' | |
31 | + }, | |
26 | 32 | ]); |
27 | 33 | |
28 | 34 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/css/main.css
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | <link href="themes/default/css/bootstrap/3.3.6/jquery-ui.css" rel="stylesheet" /> |
29 | 29 | |
30 | 30 | </head> |
31 | -<body class="no-scroll"> | |
31 | +<body class="no-scroll" ng-controller="HomeController"> | |
32 | 32 | <div class="container-fluid "> |
33 | 33 | <!--Header--> |
34 | 34 | |
... | ... | @@ -53,7 +53,9 @@ |
53 | 53 | </div> |
54 | 54 | <!--Body--> |
55 | 55 | |
56 | - <div ng-include="'MainMenu.html'" /> | |
56 | + <!--<div ng-include="'MainMenu.html'" />--> | |
57 | + <div ng-include="pageToOpen" /> | |
58 | + <!--<div data-ng-include data-ng-src="' pageToOpen.name '"></div>--> | |
57 | 59 | <!-- Footer |
58 | 60 | <footer> |
59 | 61 | <div class="container-fluid text-center">Copyright © 2016 Ebix Inc. All rights reserved.</div> |
... | ... | @@ -149,7 +151,7 @@ |
149 | 151 | |
150 | 152 | <script src="content/js/custom/custom.js"></script> |
151 | 153 | <script src="app/controllers/DAController.js"></script> |
152 | - | |
154 | + <script src="app/controllers/HomeController.js"></script> | |
153 | 155 | <script> |
154 | 156 | $(function () { |
155 | 157 | $("#slider-range-min-2").slider({ | ... | ... |