Commit b5ce27ebaf373a1e6d7a3821e7d770fc32478f49
1 parent
28a79005
merged Bug34241+AdminDisable and deleted orig file
Showing
1 changed file
with
0 additions
and
245 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js.orig deleted
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 | -<<<<<<< HEAD | |
14 | - if (value.slug === currentURL.replace('/', '')) { | |
15 | - selectedModuleName = value.name; | |
16 | -======= | |
17 | - // if (value.slug === currentURL.replace('/', '')) { | |
18 | - if (value.slug === "3d-anatomy-list") { | |
19 | - selectedModuleName = value.name; | |
20 | ->>>>>>> a3f0825d877d83f47a713081fef2e780c2d2c693 | |
21 | - } | |
22 | - $rootScope.currentActiveModuleTitle = selectedModuleName; | |
23 | - }) | |
24 | - if ($rootScope.refreshcheck == null) { | |
25 | - $location.path('/'); | |
26 | - } | |
27 | - $scope.scroll(); | |
28 | - var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json') | |
29 | - promise.then( | |
30 | - function (result) { | |
31 | - $scope.threeDAnatomyData = result; | |
32 | - | |
33 | - // $scope.selectedThreeDAdata = $scope.threeDAnatomyData.root.ThreeDAData; | |
34 | - | |
35 | - $scope.selectedThreeDAdata = new jinqJs() | |
36 | - .from($scope.threeDAnatomyData.root.ThreeDAData) | |
37 | - .orderBy([{ field: '_Title', sort: 'asc' }]) | |
38 | - .select(); | |
39 | - | |
40 | - // console.log($scope.selectedCIListViewData); | |
41 | - $('#grid-view').empty(); | |
42 | - angular.forEach($scope.selectedThreeDAdata, function (value, key) { | |
43 | - $scope.imagePath = "~/../content/images/3da/thumbnails/" + value._ThumbnailImage; | |
44 | - | |
45 | - var $el = $('<div id="3dView' + value._id + '" class="col-sm-3 col-md-2" title = "' + value._Title + '">' | |
46 | - + '<div class="thumbnail">' | |
47 | - + '<img id="' + value._id + '"ng-src="' + $scope.imagePath + '" alt="" title="' + value._Title + '" data-ng-click="Open3DModel($event)" >' | |
48 | - + '<div class="caption"><p>' + value._Title + '</p></div></div></div>').appendTo('#grid-view'); | |
49 | - | |
50 | - | |
51 | - $compile($el)($scope); | |
52 | - | |
53 | - $(".sidebar").mCustomScrollbar({ | |
54 | - autoHideScrollbar: true, | |
55 | - //theme:"rounded" | |
56 | - }); | |
57 | - | |
58 | - }); | |
59 | - | |
60 | - }, | |
61 | - function (error) { | |
62 | - // handle errors here | |
63 | - console.log(' $scope.threeDAnatomyData = ' + error.statusText); | |
64 | - } | |
65 | - ); | |
66 | - | |
67 | - }); | |
68 | - $scope.scroll = function () { | |
69 | - // $window.scrollTo(0, 0); | |
70 | - $("html,body").scrollTop(0); | |
71 | - //alert("scroll"); | |
72 | - } | |
73 | - $scope.IsVisible = function () { | |
74 | - //$scope.scroll(); | |
75 | - | |
76 | - $location.url("/3dAnatomy"); | |
77 | - | |
78 | - } | |
79 | - | |
80 | - | |
81 | - $scope.Open3DModel = function ($event) { | |
82 | - $rootScope.currentBodyViewId = $event.currentTarget.id; | |
83 | - if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { | |
84 | - var ThreeDTitle = []; | |
85 | - ThreeDTitle = new jinqJs() | |
86 | - .from($scope.selectedThreeDAdata) | |
87 | - .where('_id = ' + $event.currentTarget.id) | |
88 | - .select('_Title'); | |
89 | - | |
90 | - $rootScope.ViewTitle = ThreeDTitle[0]._Title; | |
91 | - } | |
92 | - else { | |
93 | - $rootScope.ViewTitle = $event.currentTarget.textContent; | |
94 | - | |
95 | - } | |
96 | - | |
97 | - | |
98 | - localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); | |
99 | - localStorage.setItem("currentBodyViewId", $event.currentTarget.id); | |
100 | - | |
101 | - var u = $location.url(); | |
102 | - $location.url('/3d-anatomy-details'); | |
103 | - | |
104 | - } | |
105 | - | |
106 | - $scope.Open3DModelBody = function () { | |
107 | - | |
108 | - if ($rootScope.refreshcheck == null) { | |
109 | - $location.path('/'); | |
110 | - | |
111 | - } | |
112 | - $rootScope.isLoading = true; | |
113 | - $('#spinner').css('visibility', 'visible'); | |
114 | - //alert($rootScope.getLocalStorageValue("currentBodyViewId")); | |
115 | - $scope.voId3D = $rootScope.getLocalStorageValue("currentBodyViewId"); | |
116 | - | |
117 | - //alert($scope.voId3D); | |
118 | - | |
119 | - | |
120 | - //once you get id in scope push detail in jspanel content | |
121 | - | |
122 | - var openViews; | |
123 | -<<<<<<< HEAD | |
124 | - if ($rootScope.openViews.length > 0) { | |
125 | - openViews = new jinqJs() | |
126 | - .from($rootScope.openViews) | |
127 | - .where("BodyViewId==" + $scope.voId3D) | |
128 | - .select(); | |
129 | - } | |
130 | - var counter = 1; | |
131 | - var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | |
132 | - | |
133 | - if (openViews != null && openViews.length > 0) { | |
134 | - angular.forEach(openViews, function (value, key) { | |
135 | - | |
136 | - if (value.body - views == tittle) { | |
137 | - tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | |
138 | - $rootScope.currentActiveViewTitle = tittle; | |
139 | - localStorage.setItem("currentViewTitle", tittle); | |
140 | - } | |
141 | - | |
142 | - }); | |
143 | - } | |
144 | - else { | |
145 | - localStorage.setItem("currentViewTitle", tittle); | |
146 | - | |
147 | - } | |
148 | -======= | |
149 | - //if ($rootScope.openViews.length > 0) { | |
150 | - // openViews = new jinqJs() | |
151 | - // .from($rootScope.openViews) | |
152 | - // .where("BodyViewId==" + $scope.voId3D) | |
153 | - // .select(); | |
154 | - //} | |
155 | - //var counter = 1; | |
156 | - var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); | |
157 | - $rootScope.currentActiveViewTitle = tittle; | |
158 | - localStorage.setItem("currentViewTitle", tittle); | |
159 | - //if (openViews != null && openViews.length > 0) { | |
160 | - // angular.forEach(openViews, function (value, key) { | |
161 | - | |
162 | - // if (value.body - views == tittle) { | |
163 | - // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++; | |
164 | - // $rootScope.currentActiveViewTitle = tittle; | |
165 | - // localStorage.setItem("currentViewTitle", tittle); | |
166 | - // } | |
167 | - | |
168 | - // }); | |
169 | - //} | |
170 | - //else { | |
171 | - // localStorage.setItem("currentViewTitle", tittle); | |
172 | - | |
173 | - //} | |
174 | ->>>>>>> a3f0825d877d83f47a713081fef2e780c2d2c693 | |
175 | - | |
176 | - // alert($rootScope.getLocalStorageValue("currentViewTitle")); | |
177 | - | |
178 | - var promise = DataService.getJson('~/../content/data/json/3da/3da_dat_contentlist.json') | |
179 | - promise.then( | |
180 | - function (result) { | |
181 | - $scope.threeDAnatomyData = result; | |
182 | - | |
183 | - var clicked3dAview = []; | |
184 | - clicked3dAview = new jinqJs().from($scope.threeDAnatomyData.root.ThreeDAData) | |
185 | - .where('_id == ' + $scope.voId3D) | |
186 | - .select('_Title', '_3dimagepath'); | |
187 | - $scope.Selected3DImagePath = clicked3dAview[0]._3dimagepath; | |
188 | - $scope.threeDBodySystemTitle = clicked3dAview[0]._Title; | |
189 | - | |
190 | - if (clicked3dAview.length > 0) { | |
191 | - | |
192 | - $rootScope.isLoading = false; | |
193 | - $('#spinner').css('visibility', 'hidden'); | |
194 | - | |
195 | - $.jsPanel({ | |
196 | - id: '3DImagePanel', | |
197 | - selector: '.threeDView', | |
198 | - theme: 'success', | |
199 | - currentController: '3dAController', | |
200 | - parentSlug: '3d-anatomy-list', | |
201 | - content: '<div class="col-sm-12">' + | |
202 | - '<object data="' + $scope.Selected3DImagePath + '" width="100%" height="800px" type="image/svg+xml"></object>' + | |
203 | - '</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>', | |
204 | - title: $rootScope.getLocalStorageValue("currentViewTitle"), | |
205 | - position: { | |
206 | - top: 70, | |
207 | - left: 1, | |
208 | - }, | |
209 | - | |
210 | - size: { width: $(window).outerWidth() - 20, height: $(window).outerHeight() - 10 }, | |
211 | - | |
212 | - }); | |
213 | - | |
214 | - $rootScope.currentSlug = '3d-anatomy-details'; | |
215 | - | |
216 | - $rootScope.openViews.push( | |
217 | - { | |
218 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
219 | - "slug": $rootScope.currentSlug | |
220 | - }); | |
221 | - | |
222 | - | |
223 | - } | |
224 | - | |
225 | - | |
226 | - }, | |
227 | - function (error) { | |
228 | - // handle errors here | |
229 | - console.log(' $scope.CIllustrationData = ' + error.statusText); | |
230 | - } | |
231 | - | |
232 | - ); | |
233 | - $('#ThreeDView').css("height", $(window).outerHeight()); | |
234 | - | |
235 | - $('#ThreeDView').css("width", $(window).outerWidth()); | |
236 | - | |
237 | - } | |
238 | - | |
239 | - | |
240 | - | |
241 | -}] | |
242 | - | |
243 | - | |
244 | - | |
245 | -); | |
246 | 0 | \ No newline at end of file |