Commit efd7fac2a8f05850008ca19f169cd27e3c1ff6e2

Authored by unknown
1 parent d639c6d6

commit changes

400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... ... @@ -838,13 +838,15 @@ namespace AIAHTML5.API.Models
838 838  
839 839 internal static bool ValidateUserAuthenticity(string username, string password, User user)
840 840 {
841   - logger.Debug(" Inside ValidateUserAuthenticity for Username = " + username + ", Password: " + password);
  841 + logger.Debug(" Inside ValidateUserAuthenticity for Username = " + username + ", Password: " + password + "username from database =" + user.LoginId + "password from database =" + user.Password);
842 842  
843 843 bool result = false;
  844 +
844 845  
845 846 try
846 847 {
847   - if ((string.Equals(username.ToUpper(), user.LoginId.ToUpper())) && (string.Equals(password, user.Password)))
  848 + if (username.ToUpper().Trim().Equals(user.LoginId.ToUpper().Trim()) && (password.Trim().Equals(user.Password.Trim())))
  849 +
848 850 {
849 851 result = true;
850 852 }
... ... @@ -852,6 +854,7 @@ namespace AIAHTML5.API.Models
852 854 {
853 855 result = false;
854 856 }
  857 + logger.Debug(" Inside ValidateUserAuthenticity result =" + result + "," + username.ToUpper().Trim().Equals(user.LoginId.ToUpper().Trim()) + "," + password.Trim().Equals(user.Password.Trim()));
855 858 }
856 859 catch (SqlException ex)
857 860 {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
1   -AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile",
2   -function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) {
3   -
4   -
5   - $scope.showTabButton = false;
6   - $scope.threeDAnatomyData;
7   - $scope.Id;
8   - $scope.$on('$viewContentLoaded', function (event) {
9   - var currentURL = $location.path();
10   - var selectedModuleName = '';
11   - //set module title
12   - angular.forEach($rootScope.userModules, function (value, key) {
13   - if (value.slug === currentURL.replace('/', '')) {
14   - selectedModuleName = value.name;
15   - }
16   - $rootScope.currentActiveModuleTitle = selectedModuleName;
17   - })
18   - if ($rootScope.refreshcheck == null) {
19   - $location.path('/');
20   - }
21   - $scope.scroll();
22   - var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json')
23   - promise.then(
24   - function (result) {
25   - $scope.threeDAnatomyData = result;
26   -
27   - // $scope.selectedThreeDAdata = $scope.threeDAnatomyData.root.ThreeDAData;
28   -
29   - $scope.selectedThreeDAdata = new jinqJs()
30   - .from($scope.threeDAnatomyData.root.ThreeDAData)
31   - .orderBy([{ field: '_Title', sort: 'asc' }])
32   - .select();
33   -
34   - // console.log($scope.selectedCIListViewData);
35   - $('#grid-view').empty();
36   - angular.forEach($scope.selectedThreeDAdata, function (value, key) {
37   - $scope.imagePath = "~/../content/images/3da/thumbnails/" + value._ThumbnailImage;
38   -
39   - var $el = $('<div id="3dView' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '">'
40   - + '<div class="thumbnail">'
41   - + '<img id="' + value._id + '"ng-src="' + $scope.imagePath + '" alt="" title="' + value._Title + '" data-ng-click="Open3DModel($event)" >'
42   - + '<div class="caption"><p>' + value._Title + '</p></div></div></div>').appendTo('#grid-view');
43   -
44   -
45   - $compile($el)($scope);
46   -
47   - $(".sidebar").mCustomScrollbar({
48   - autoHideScrollbar: true,
49   - //theme:"rounded"
50   - });
51   -
52   - });
53   -
54   - },
55   - function (error) {
56   - // handle errors here
57   - console.log(' $scope.threeDAnatomyData = ' + error.statusText);
58   - }
59   - );
60   -
61   - });
62   - $scope.scroll = function () {
63   - // $window.scrollTo(0, 0);
64   - $("html,body").scrollTop(0);
65   - //alert("scroll");
66   - }
67   - $scope.IsVisible = function () {
68   - //$scope.scroll();
69   -
70   - $location.url("/3dAnatomy");
71   -
72   - }
73   -
74   -
75   - $scope.Open3DModel = function ($event) {
76   - $rootScope.currentBodyViewId = $event.currentTarget.id;
77   - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") {
78   - var ThreeDTitle = [];
79   - ThreeDTitle = new jinqJs()
80   - .from($scope.selectedThreeDAdata)
81   - .where('_id = ' + $event.currentTarget.id)
82   - .select('_Title');
83   -
84   - $rootScope.ViewTitle = ThreeDTitle[0]._Title;
85   - }
86   - else {
87   - $rootScope.ViewTitle = $event.currentTarget.textContent;
88   -
89   - }
90   -
91   -
92   - localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle);
93   - localStorage.setItem("currentBodyViewId", $event.currentTarget.id);
94   -
95   - var u = $location.url();
96   - $location.url('/3d-anatomy-details');
97   -
98   - }
99   -
100   - $scope.Open3DModelBody = function () {
101   -
102   - if ($rootScope.refreshcheck == null) {
103   - $location.path('/');
104   -
105   - }
106   - $rootScope.isLoading = true;
107   - $('#spinner').css('visibility', 'visible');
108   - //alert($rootScope.getLocalStorageValue("currentBodyViewId"));
109   - $scope.voId3D = $rootScope.getLocalStorageValue("currentBodyViewId");
110   -
111   - //alert($scope.voId3D);
112   -
113   -
114   - //once you get id in scope push detail in jspanel content
115   -
116   - var openViews;
117   - if ($rootScope.openViews.length > 0) {
118   - openViews = new jinqJs()
119   - .from($rootScope.openViews)
120   - .where("BodyViewId==" + $scope.voId3D)
121   - .select();
122   - }
123   - var counter = 1;
124   - var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
125   -
126   - if (openViews != null && openViews.length > 0) {
127   - angular.forEach(openViews, function (value, key) {
128   -
129   - if (value.body - views == tittle) {
130   - tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
131   - $rootScope.currentActiveViewTitle = tittle;
132   - localStorage.setItem("currentViewTitle", tittle);
133   - }
134   -
135   - });
136   - }
137   - else {
138   - localStorage.setItem("currentViewTitle", tittle);
139   -
140   - }
141   -
142   - // alert($rootScope.getLocalStorageValue("currentViewTitle"));
143   -
144   - var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json')
145   - promise.then(
146   - function (result) {
147   - $scope.threeDAnatomyData = result;
148   -
149   - var clicked3dAview = [];
150   - clicked3dAview = new jinqJs().from($scope.threeDAnatomyData.root.ThreeDAData)
151   - .where('_id == ' + $scope.voId3D)
152   - .select('_Title', '_3dimagepath');
153   - $scope.Selected3DImagePath = clicked3dAview[0]._3dimagepath;
154   - $scope.threeDBodySystemTitle = clicked3dAview[0]._Title;
155   -
156   - if (clicked3dAview.length > 0) {
157   -
158   - $rootScope.isLoading = false;
159   - $('#spinner').css('visibility', 'hidden');
160   -
161   - $.jsPanel({
162   - id: '3DImagePanel',
163   - selector: '.threeDView',
164   - theme: 'success',
165   - currentController: '3dAController',
166   - parentSlug: '3d-anatomy-list',
167   - content: '<div class="col-sm-12">' +
168   - '<object data="' + $scope.Selected3DImagePath + '" width="100%" height="800px" type="image/svg+xml"></object>' +
169   - '</div><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {var threeDivWidth = $("#ThreeDView").css("width");$("#ThreeDView").css({"left":"0px","width":"100%","min-idth": threeDivWidth}); var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#3DImagePanel").css("width", "100%"); }});</script>',
170   - title: $rootScope.getLocalStorageValue("currentViewTitle"),
171   - position: {
172   - top: 70,
173   - left: 1,
174   - },
175   -
176   - size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 10 },
177   -
178   - });
179   -
180   - $rootScope.currentSlug = '3d-anatomy-details';
181   -
182   - $rootScope.openViews.push(
183   - {
184   - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId,
185   - "slug": $rootScope.currentSlug
186   - });
187   -
188   -
189   - }
190   -
191   -
192   - },
193   - function (error) {
194   - // handle errors here
195   - console.log(' $scope.CIllustrationData = ' + error.statusText);
196   - }
197   -
198   - );
199   - $('#ThreeDView').css("height", $(window).outerHeight());
200   -
201   - $('#ThreeDView').css("width", $(window).outerWidth());
202   -
203   - }
204   -
205   -
206   -
207   -}]
208   -
209   -
210   -
  1 +AIA.controller("3dAController", ["$scope", "$rootScope", "pages", "$log", '$http', 'DataService', '$filter', '$location', '$document', '$sce', "$compile",
  2 +function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location, $document, $sce, $compile) {
  3 +
  4 +
  5 + $scope.showTabButton = false;
  6 + $scope.threeDAnatomyData;
  7 + $scope.Id;
  8 + $scope.$on('$viewContentLoaded', function (event) {
  9 +
  10 + var currentURL = $location.path();
  11 + var selectedModuleName = '';
  12 + //set module title
  13 + angular.forEach($rootScope.userModules, function (value, key) {
  14 + if (value.slug === "3d-anatomy-list") {
  15 + //if (value.slug === currentURL.replace('/', '')) {
  16 + selectedModuleName = value.name;
  17 + }
  18 +
  19 + $rootScope.currentActiveModuleTitle = selectedModuleName;
  20 +
  21 + })
  22 + if ($rootScope.refreshcheck == null) {
  23 + $location.path('/');
  24 + }
  25 + $scope.scroll();
  26 + var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json')
  27 + promise.then(
  28 + function (result) {
  29 + $scope.threeDAnatomyData = result;
  30 +
  31 + // $scope.selectedThreeDAdata = $scope.threeDAnatomyData.root.ThreeDAData;
  32 +
  33 + $scope.selectedThreeDAdata = new jinqJs()
  34 + .from($scope.threeDAnatomyData.root.ThreeDAData)
  35 + .orderBy([{ field: '_Title', sort: 'asc' }])
  36 + .select();
  37 +
  38 + // console.log($scope.selectedCIListViewData);
  39 + $('#grid-view').empty();
  40 + angular.forEach($scope.selectedThreeDAdata, function (value, key) {
  41 + $scope.imagePath = "~/../content/images/3da/thumbnails/" + value._ThumbnailImage;
  42 +
  43 + var $el = $('<div id="3dView' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '">'
  44 + + '<div class="thumbnail">'
  45 + + '<img id="' + value._id + '"ng-src="' + $scope.imagePath + '" alt="" title="' + value._Title + '" data-ng-click="Open3DModel($event)" >'
  46 + + '<div class="caption"><p>' + value._Title + '</p></div></div></div>').appendTo('#grid-view');
  47 +
  48 +
  49 + $compile($el)($scope);
  50 +
  51 + $(".sidebar").mCustomScrollbar({
  52 + autoHideScrollbar: true,
  53 + //theme:"rounded"
  54 + });
  55 +
  56 + });
  57 +
  58 + },
  59 + function (error) {
  60 + // handle errors here
  61 + console.log(' $scope.threeDAnatomyData = ' + error.statusText);
  62 + }
  63 + );
  64 +
  65 + });
  66 + $scope.scroll = function () {
  67 + // $window.scrollTo(0, 0);
  68 + $("html,body").scrollTop(0);
  69 + //alert("scroll");
  70 + }
  71 + $scope.IsVisible = function () {
  72 + //$scope.scroll();
  73 +
  74 + $location.url("/3dAnatomy");
  75 +
  76 + }
  77 +
  78 +
  79 + $scope.Open3DModel = function ($event) {
  80 + $rootScope.currentBodyViewId = $event.currentTarget.id;
  81 + if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") {
  82 + var ThreeDTitle = [];
  83 + ThreeDTitle = new jinqJs()
  84 + .from($scope.selectedThreeDAdata)
  85 + .where('_id = ' + $event.currentTarget.id)
  86 + .select('_Title');
  87 +
  88 + $rootScope.ViewTitle = ThreeDTitle[0]._Title;
  89 + }
  90 + else {
  91 + $rootScope.ViewTitle = $event.currentTarget.textContent;
  92 +
  93 + }
  94 +
  95 +
  96 + localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle);
  97 + localStorage.setItem("currentBodyViewId", $event.currentTarget.id);
  98 +
  99 + var u = $location.url();
  100 + $location.url('/3d-anatomy-details');
  101 +
  102 + }
  103 +
  104 + $scope.Open3DModelBody = function () {
  105 +
  106 + if ($rootScope.refreshcheck == null) {
  107 + $location.path('/');
  108 +
  109 + }
  110 + $rootScope.isLoading = true;
  111 + $('#spinner').css('visibility', 'visible');
  112 + //alert($rootScope.getLocalStorageValue("currentBodyViewId"));
  113 + $scope.voId3D = $rootScope.getLocalStorageValue("currentBodyViewId");
  114 +
  115 + //alert($scope.voId3D);
  116 +
  117 +
  118 + //once you get id in scope push detail in jspanel content
  119 +
  120 + var openViews;
  121 + //if ($rootScope.openViews.length > 0) {
  122 + // openViews = new jinqJs()
  123 + // .from($rootScope.openViews)
  124 + // .where("BodyViewId==" + $scope.voId3D)
  125 + // .select();
  126 + //}
  127 + var counter = 1;
  128 + var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
  129 + $rootScope.currentActiveViewTitle = tittle;
  130 + localStorage.setItem("currentViewTitle", tittle);
  131 + //if (openViews != null && openViews.length > 0) {
  132 + // angular.forEach(openViews, function (value, key) {
  133 +
  134 + // if (value.body - views == tittle) {
  135 + // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
  136 + // $rootScope.currentActiveViewTitle = tittle;
  137 + // localStorage.setItem("currentViewTitle", tittle);
  138 + // }
  139 +
  140 + // });
  141 + //}
  142 + //else {
  143 + // localStorage.setItem("currentViewTitle", tittle);
  144 +
  145 + //}
  146 +
  147 + // alert($rootScope.getLocalStorageValue("currentViewTitle"));
  148 +
  149 + var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json')
  150 + promise.then(
  151 + function (result) {
  152 + $scope.threeDAnatomyData = result;
  153 +
  154 + var clicked3dAview = [];
  155 + clicked3dAview = new jinqJs().from($scope.threeDAnatomyData.root.ThreeDAData)
  156 + .where('_id == ' + $scope.voId3D)
  157 + .select('_Title', '_3dimagepath');
  158 + $scope.Selected3DImagePath = clicked3dAview[0]._3dimagepath;
  159 + $scope.threeDBodySystemTitle = clicked3dAview[0]._Title;
  160 +
  161 + if (clicked3dAview.length > 0) {
  162 +
  163 + $rootScope.isLoading = false;
  164 + $('#spinner').css('visibility', 'hidden');
  165 +
  166 + $.jsPanel({
  167 + id: '3DImagePanel',
  168 + selector: '.threeDView',
  169 + theme: 'success',
  170 + currentController: '3dAController',
  171 + parentSlug: '3d-anatomy-list',
  172 + content: '<div class="col-sm-12">' +
  173 + '<object data="' + $scope.Selected3DImagePath + '" width="100%" height="800px" type="image/svg+xml"></object>' +
  174 + '</div><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {var threeDivWidth = $("#ThreeDView").css("width");$("#ThreeDView").css({"left":"0px","width":"100%","min-idth": threeDivWidth}); var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#3DImagePanel").css("width", "100%"); }});</script>',
  175 + title: $rootScope.getLocalStorageValue("currentViewTitle"),
  176 + position: {
  177 + top: 70,
  178 + left: 1,
  179 + },
  180 +
  181 + size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 10 },
  182 +
  183 + });
  184 +
  185 + $rootScope.currentSlug = '3d-anatomy-details';
  186 +
  187 + $rootScope.openViews.push(
  188 + {
  189 + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId,
  190 + "slug": $rootScope.currentSlug
  191 + });
  192 +
  193 +
  194 + }
  195 +
  196 +
  197 + },
  198 + function (error) {
  199 + // handle errors here
  200 + console.log(' $scope.CIllustrationData = ' + error.statusText);
  201 + }
  202 +
  203 + );
  204 + $('#ThreeDView').css("height", $(window).outerHeight());
  205 +
  206 + $('#ThreeDView').css("width", $(window).outerWidth());
  207 +
  208 + }
  209 +
  210 +
  211 +
  212 +}]
  213 +
  214 +
  215 +
211 216 );
212 217 \ No newline at end of file
... ...