Commit cd0eb9e151fb118bb36ab8db3898284fd833d92e
1 parent
84d49e96
inProgress...
Showing
6 changed files
with
60 additions
and
506 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -5,6 +5,8 @@ AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$ | @@ -5,6 +5,8 @@ AIA.controller("TileViewListController", ["$scope", "$rootScope", "$compile", "$ | ||
5 | function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService,ModuleService) { | 5 | function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService,ModuleService) { |
6 | 6 | ||
7 | 7 | ||
8 | + $rootScope.OpenedTileData=[]; | ||
9 | + | ||
8 | $scope.genderId = ""; | 10 | $scope.genderId = ""; |
9 | $scope.BodyViewData; | 11 | $scope.BodyViewData; |
10 | $scope.selectedGenderBodyViewData; | 12 | $scope.selectedGenderBodyViewData; |
@@ -133,37 +135,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -133,37 +135,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
133 | 'Medial Arm': '6' | 135 | 'Medial Arm': '6' |
134 | } | 136 | } |
135 | 137 | ||
136 | - $scope.isBodylayerdataLoaded = false; | ||
137 | - $scope.isBodyRegionDataLoaded = false; | ||
138 | - //currentTitleFromJson shows the current BodyView Title | ||
139 | - $scope.currentTitleFromJson; | ||
140 | - $scope.showme = false; | ||
141 | - $scope.IsVisible = function () { | ||
142 | - $scope.scroll(); | ||
143 | - | ||
144 | - } | ||
145 | - | ||
146 | - $scope.scroll = function () { | ||
147 | - // $window.scrollTo(0, 0); | ||
148 | - $("html,body").scrollTop(0); | ||
149 | - //alert("scroll"); | ||
150 | - } | ||
151 | - | ||
152 | - | ||
153 | - $scope.switchGender = function () { | ||
154 | - | ||
155 | - var retrievedObject = localStorage.getItem('currentViewTitle'); | ||
156 | - | ||
157 | - if (retrievedObject == "Male Anterior") { | ||
158 | - $scope.male = "active"; | ||
159 | - $scope.female = ""; | ||
160 | - } | ||
161 | - else if (retrievedObject == "Female Anterior") { | ||
162 | - $scope.male = ""; | ||
163 | - $scope.female = "active"; | ||
164 | - } | ||
165 | - } | ||
166 | - | ||
167 | $scope.loadForModuleById = function (moduleId) { | 138 | $scope.loadForModuleById = function (moduleId) { |
168 | 139 | ||
169 | alert('hi'); | 140 | alert('hi'); |
@@ -188,335 +159,36 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -188,335 +159,36 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
188 | } | 159 | } |
189 | 160 | ||
190 | $scope.openModuleItemView = function (event) { | 161 | $scope.openModuleItemView = function (event) { |
191 | - //alert('openModuleItemView is called') | ||
192 | - var moduleItemDataToBeSaved = event.target.id; | ||
193 | - | ||
194 | - var OpendTileData = []; | 162 | + alert('openModuleItemView is called') |
163 | + var moduleItemDataToBeSaved = event.target.id; | ||
195 | 164 | ||
196 | - OpendTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); | 165 | + $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); |
197 | 166 | ||
198 | - $rootScope.imageName = OpendTileData[3]; | 167 | + $rootScope.imageName = $rootScope.OpenedTileData[3]; |
199 | 168 | ||
200 | - $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + OpendTileData[3]; | ||
201 | - //alert('img Name: ' +$scope.OpenItemImageName); | 169 | + $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; |
170 | + alert('img Name: ' + $rootScope.OpenItemImageName); | ||
202 | 171 | ||
203 | var u = $location.url(); | 172 | var u = $location.url(); |
204 | $location.url('/module-item-view'); | 173 | $location.url('/module-item-view'); |
205 | } | 174 | } |
206 | 175 | ||
207 | - //get the DA body view list based on selected gender | ||
208 | - //get the DA body view list based on selected gender | ||
209 | - $scope.getDAViewList = function ($event) { | ||
210 | - | ||
211 | - | ||
212 | - if ($('#MainImage') != null) { | ||
213 | - $('#MainImage').remove(); | ||
214 | - } | ||
215 | - $rootScope.currentActiveModuleTitle = Modules[0].Name; | ||
216 | - | ||
217 | - alert('mod name: ' + Modules[0].Name) | ||
218 | - | ||
219 | - $("#bodyViewList").empty(); | ||
220 | - //for default load | ||
221 | - if ($event == null || $event == undefined) { | ||
222 | - //if ((localStorage.getItem("genderId") != "")||(localStorage.getItem("genderId")!="null")) { | ||
223 | - // $scope.genderId = localStorage.getItem("genderId"); | ||
224 | - //} | ||
225 | - var selectedGender = localStorage.getItem("genderId"); | ||
226 | - if ((selectedGender == null)) { | ||
227 | - $scope.genderId = "Male"; | ||
228 | - } | ||
229 | - else | ||
230 | - $scope.genderId = localStorage.getItem("genderId"); | ||
231 | - | ||
232 | - } | ||
233 | - else { | ||
234 | - $scope.genderId = $event.currentTarget.id; | ||
235 | - } | ||
236 | - | ||
237 | - localStorage.setItem("genderId", $scope.genderId); | ||
238 | - | ||
239 | - var selectedGender = localStorage.getItem("genderId"); | ||
240 | - | ||
241 | - if (selectedGender != null) { | ||
242 | - if (selectedGender == "Male") { | ||
243 | - $('#Male').addClass('active'); | ||
244 | - $('#Female').removeClass("active"); | ||
245 | - } | ||
246 | - else { | ||
247 | - $('#Female').addClass('active'); | ||
248 | - $('#Male').removeClass("active"); | ||
249 | - } | ||
250 | - | ||
251 | - } | ||
252 | - | ||
253 | - $scope.selectedGenderBodyViewData = new jinqJs() | ||
254 | - .from($scope.BodyViewData.BodyViews.view) | ||
255 | - .where('_gender == ' + $scope.genderId) | ||
256 | - .select(); | ||
257 | - | ||
258 | - if ($scope.selectedGenderBodyViewData != null || $scope.selectedGenderBodyViewData != undefined) { | ||
259 | - angular.forEach($scope.selectedGenderBodyViewData, function (value, key) { | ||
260 | - | ||
261 | - | ||
262 | - var userEthnicity; | ||
263 | - var userModestysettings; | ||
264 | - var curentEthnicity = localStorage.getItem("globalEthnicity"); | ||
265 | - if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { | ||
266 | - userEthnicity = curentEthnicity; | ||
267 | - } | ||
268 | - else { | ||
269 | - userEthnicity = $rootScope.globalSetting.ethnicity; | ||
270 | - } | ||
271 | - | ||
272 | - var curentmodesty = localStorage.getItem("globalModesty"); | ||
273 | - if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { | ||
274 | - userModestysettings = curentmodesty; | ||
275 | - } | ||
276 | - else { | ||
277 | - userModestysettings = $rootScope.globalSetting.modesty; | ||
278 | - } | ||
279 | - | ||
280 | - | ||
281 | - | ||
282 | - //var userSelectedSkintone = 'W'; | ||
283 | - //$scope.userModestySetting = 'Y' | ||
284 | - var thumbnailImage; | ||
285 | - if ((value._id == 1) || (value._id == 3) || (value._id == 5) || (value._id == 6) || (value._id == 7) || (value._id == 11)) | ||
286 | - thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity + userModestysettings)) + '.jpg'; | ||
287 | - else { | ||
288 | - thumbnailImage = ((value._thumbnailImage).replace('.jpg', '_' + userEthnicity)) + '.jpg'; | ||
289 | - | ||
290 | - } | ||
291 | - | ||
292 | - $scope.imagePath = "~/../content/images/DA/" + $scope.zoomInOut + "/body-views/" + value._id + '/skintone/' + userEthnicity + '/' + thumbnailImage; | ||
293 | - | ||
294 | - | ||
295 | - var $el = $('<div id=' + value._id + ' class="col-sm-3 col-lg-2" title = ' + value._title + ' data-ng-click="openView($event)"><div class="thumbnail" >' | ||
296 | - + '<img class= "daImg" id="' + value._title + '" src="' + $scope.imagePath + '" alt="" title="" >' | ||
297 | - + '<div class="caption"><p>' + value._title + '</p></div></a></div></div>').appendTo('#bodyViewList'); | ||
298 | - | ||
299 | - | ||
300 | - $compile($el)($scope); | ||
301 | - $(".sidebar").mCustomScrollbar({ | ||
302 | - autoHideScrollbar: true, | ||
303 | - //theme:"rounded" | ||
304 | - }); | ||
305 | - | ||
306 | - }); | ||
307 | - } | ||
308 | - | ||
309 | - }; | ||
310 | 176 | ||
311 | - $scope.openView = function ($event) { | ||
312 | - alert('openView is called in AA') | 177 | + $scope.openBodyView = function () |
178 | + { | ||
313 | debugger; | 179 | debugger; |
314 | - | ||
315 | - $rootScope.MenuModuleName = "DA"; | ||
316 | - //alert($rootScope.MenuModuleName); | ||
317 | - $rootScope.isLoading = true; | ||
318 | - $('#spinner').css('visibility', 'visible'); | ||
319 | - | ||
320 | - $rootScope.currentBodyViewId = $event.currentTarget.id; | ||
321 | - $rootScope.ViewTitle = $event.currentTarget.textContent; | ||
322 | - | ||
323 | - localStorage.setItem("currentViewTitleFromJson", $event.currentTarget.textContent); | ||
324 | - localStorage.setItem("currentViewTitle", $event.currentTarget.textContent); | ||
325 | - localStorage.setItem("currentBodyViewId", $event.currentTarget.id); | ||
326 | - | ||
327 | - var u = $location.url(); | ||
328 | - $location.url('/da-body-view'); | ||
329 | - | ||
330 | - var view_list = angular.element($event.currentTarget); | ||
331 | - var view_list_male_female = view_list.attr('title'); | ||
332 | - | ||
333 | - if (($event.currentTarget.textContent == "Female Anterior" || $event.currentTarget.textContent == "Male Anterior")) { | ||
334 | - $rootScope.AnteriorView = "active"; | ||
335 | - $rootScope.LateralView = ""; | ||
336 | - $rootScope.MedialView = ""; | ||
337 | - $rootScope.PosteriorView = ""; | ||
338 | - $rootScope.LateralArmView = ""; | ||
339 | - $rootScope.MedialArmView = ""; | ||
340 | - } | ||
341 | - if (($event.currentTarget.textContent == "Female Lateral" || $event.currentTarget.textContent == "Male Lateral")) { | ||
342 | - $rootScope.AnteriorView = ""; | ||
343 | - $rootScope.LateralView = "active"; | ||
344 | - $rootScope.MedialView = ""; | ||
345 | - $rootScope.PosteriorView = ""; | ||
346 | - $rootScope.LateralArmView = ""; | ||
347 | - $rootScope.MedialArmView = ""; | ||
348 | - | ||
349 | - | ||
350 | - } | ||
351 | - if (($event.currentTarget.textContent == "Female Medial" || $event.currentTarget.textContent == "Male Medial")) { | ||
352 | - $rootScope.AnteriorView = ""; | ||
353 | - $rootScope.LateralView = ""; | ||
354 | - $rootScope.MedialView = "active"; | ||
355 | - $rootScope.PosteriorView = ""; | ||
356 | - $rootScope.LateralArmView = ""; | ||
357 | - $rootScope.MedialArmView = ""; | ||
358 | - | ||
359 | - | ||
360 | - } | ||
361 | - if (($event.currentTarget.textContent == "Female Posterior" || $event.currentTarget.textContent == "Male Posterior")) { | ||
362 | - $rootScope.AnteriorView = ""; | ||
363 | - $rootScope.LateralView = ""; | ||
364 | - $rootScope.MedialView = ""; | ||
365 | - $rootScope.PosteriorView = "active"; | ||
366 | - $rootScope.LateralArmView = ""; | ||
367 | - $rootScope.MedialArmView = ""; | ||
368 | - | ||
369 | - } | ||
370 | - if (($event.currentTarget.textContent == "Female Lateral Arm" || $event.currentTarget.textContent == "Male Lateral Arm")) { | ||
371 | - $rootScope.AnteriorView = ""; | ||
372 | - $rootScope.LateralView = ""; | ||
373 | - $rootScope.MedialView = ""; | ||
374 | - $rootScope.PosteriorView = ""; | ||
375 | - $rootScope.LateralArmView = "active"; | ||
376 | - $rootScope.MedialArmView = ""; | ||
377 | - | ||
378 | - | ||
379 | - } | ||
380 | - if (($event.currentTarget.textContent == "Female Medial Arm" || $event.currentTarget.textContent == "Male Medial Arm")) { | ||
381 | - $rootScope.AnteriorView = ""; | ||
382 | - $rootScope.LateralView = ""; | ||
383 | - $rootScope.MedialView = ""; | ||
384 | - $rootScope.PosteriorView = ""; | ||
385 | - $rootScope.LateralArmView = ""; | ||
386 | - $rootScope.MedialArmView = "active"; | ||
387 | - | ||
388 | - | ||
389 | - } | ||
390 | - | ||
391 | - //$rootScope.Normal = "LeftButtonsDefaultState"; | ||
392 | - | ||
393 | - if (view_list_male_female == "Male") { | ||
394 | - | ||
395 | - $rootScope.male = "active"; | ||
396 | - $rootScope.female = ""; | ||
397 | - } | ||
398 | - else { | ||
399 | - | ||
400 | - $rootScope.male = ""; | ||
401 | - $rootScope.female = "active"; | ||
402 | - } | ||
403 | - | ||
404 | - | ||
405 | - } | ||
406 | - | ||
407 | - | ||
408 | - //load json data for body view | ||
409 | - $scope.loadDissectibleAnatomyData = function () { | ||
410 | - | ||
411 | - alert('AA: loadDissectibleAnatomyData is called'); | ||
412 | - | ||
413 | - $rootScope.ClearIframe(); | ||
414 | - | ||
415 | - //load common data | ||
416 | - var commondataJsonPath = '~/../content/data/json/da/da_dat_common.json'; | ||
417 | - | ||
418 | - DataService.getAnotherJson(commondataJsonPath) | ||
419 | - .then( | ||
420 | - function (result) { | ||
421 | - | ||
422 | - $rootScope.CommonData = result; | ||
423 | - $http({ method: 'GET', url: '~/../content/data/json/da/da_dat_contentlist.json' }).success(function (data) { | ||
424 | - | ||
425 | - $scope.BodyViewData = data; | ||
426 | - | ||
427 | - $scope.getDAViewList(); | ||
428 | - | ||
429 | - }) | ||
430 | - .error(function (data, status, headers, config) { | ||
431 | - console.log(data); | ||
432 | - }); | ||
433 | - | ||
434 | - | ||
435 | - }, | ||
436 | - function (error) { | ||
437 | - console.log(error.statusText) | ||
438 | - } | ||
439 | - ) | ||
440 | - //load body-views data | ||
441 | - | ||
442 | - | ||
443 | - // $('#daLoaderLabel').css('visibility', 'hidden') | ||
444 | - $rootScope.isLoading = false; | ||
445 | - | ||
446 | - | ||
447 | - | ||
448 | - //push the details of open module in array $rootScope.openModules | ||
449 | - $rootScope.openModules.push({ "ModuleId": 1 }); | ||
450 | - | ||
451 | - | ||
452 | - } | ||
453 | - | ||
454 | - $scope.openBodyView = function () { | ||
455 | - | ||
456 | - //0. we will initially append container to load body | ||
457 | - | ||
458 | - //check if localstorage has any settings | ||
459 | - var curentEthnicity = localStorage.getItem("globalEthnicity"); | ||
460 | - if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { | ||
461 | - $rootScope.globalSetting.ethnicity = curentEthnicity; | ||
462 | - } | ||
463 | - | ||
464 | - var curentmodesty = localStorage.getItem("globalModesty"); | ||
465 | - if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { | ||
466 | - $rootScope.globalSetting.modesty = curentmodesty | ||
467 | - } | ||
468 | - | ||
469 | - //0.1 | ||
470 | - var currentBodyViewId = localStorage.getItem("currentBodyViewId"); | ||
471 | - | ||
472 | - $scope.loadSearchDataForBodyView(); | ||
473 | - | ||
474 | - | ||
475 | - console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); | ||
476 | - | ||
477 | - var openViews; | ||
478 | - if ($rootScope.openViews != null || $rootScope.openViews != undefined) { | ||
479 | - if ($rootScope.openViews.length > 0) { | ||
480 | - openViews = new jinqJs() | ||
481 | - .from($rootScope.openViews) | ||
482 | - .where("BodyViewId == " + currentBodyViewId) | ||
483 | - .select(); | ||
484 | - } | ||
485 | - } | ||
486 | - | ||
487 | - // 0.2 getting corresponding body view title | ||
488 | - //var counter = 1; | ||
489 | - var tittle = localStorage.getItem("currentViewTitleFromJson"); | ||
490 | - localStorage.setItem("currentViewTitle", tittle); | ||
491 | - | ||
492 | - //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD | ||
493 | - //if (openViews != null && openViews != undefined) { | ||
494 | - // angular.forEach(openViews, function (value, key) { | ||
495 | - | ||
496 | - // if (value.bodyView == tittle) { | ||
497 | - // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | ||
498 | - // $rootScope.currentActiveViewTitle = tittle; | ||
499 | - // localStorage.setItem("currentViewTitle", tittle); | ||
500 | - // } | ||
501 | - | ||
502 | - // }); | ||
503 | - //} | ||
504 | - //else { | ||
505 | - // localStorage.setItem("currentViewTitle", tittle); | ||
506 | - //} | ||
507 | - | ||
508 | - //0.3 | 180 | + alert('openBodyView is called') |
509 | 181 | ||
510 | $.jsPanel({ | 182 | $.jsPanel({ |
511 | - id: 'daImagePanel', | ||
512 | - selector: '.daBodyView', | 183 | + id: 'aaImagePanel', |
184 | + selector: '.aaBodyView', | ||
513 | theme: 'success', | 185 | theme: 'success', |
514 | - currentController: 'DAController', | ||
515 | - parentSlug: 'da-view-list', | 186 | + currentController: 'TileViewListController', |
187 | + parentSlug: 'tile-view', | ||
516 | ajax: { | 188 | ajax: { |
517 | - url: 'app/views/da/da-view.html' | 189 | + url: 'app/views/aa/atlas-anatomy-detail.html' |
518 | }, | 190 | }, |
519 | - title: localStorage.getItem("currentViewTitle"), | 191 | + //title: localStorage.getItem("currentViewTitle"), |
520 | 192 | ||
521 | position: { | 193 | position: { |
522 | top: 70, | 194 | top: 70, |
@@ -527,187 +199,65 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -527,187 +199,65 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
527 | 199 | ||
528 | }); | 200 | }); |
529 | 201 | ||
530 | - console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel')) | 202 | + console.log('jsPanel loaded aaImagePanel exist= ' + document.getElementById('aaImagePanel')) |
531 | //0.1 | 203 | //0.1 |
532 | - $rootScope.currentSlug = 'da-body-view'; | 204 | + // $rootScope.currentSlug = 'da-body-view'; |
533 | 205 | ||
534 | //0.2 | 206 | //0.2 |
535 | - $rootScope.openViews.push( | ||
536 | - { | ||
537 | - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | ||
538 | - "slug": $rootScope.currentSlug | ||
539 | - } | ||
540 | - ); | 207 | + //$rootScope.openViews.push( |
208 | + // { | ||
209 | + // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | ||
210 | + // "slug": $rootScope.currentSlug | ||
211 | + // } | ||
212 | + // ); | ||
541 | 213 | ||
542 | //0.3 | 214 | //0.3 |
543 | - var daBodyviewElement = angular.element(document.getElementById("daBodyview")); | 215 | + var aaViewElement = angular.element(document.getElementById("aaView")); |
216 | + | ||
217 | + debugger; | ||
544 | 218 | ||
545 | $timeout(function () { | 219 | $timeout(function () { |
546 | - $compile(daBodyviewElement.contents())($scope); | 220 | + $compile(aaViewElement.contents())($scope); |
547 | 221 | ||
548 | - console.log('html is compiled' + document.getElementById('daView')) | ||
549 | - if (document.getElementById('daView') != null) { | 222 | + //console.log('html is compiled' + document.getElementById('daView')) |
223 | + if (document.getElementById('aaView') != null) { | ||
550 | 224 | ||
551 | - //0.4 added some stylesheets | ||
552 | - $('#daBodyview').css("height", $(window).outerHeight()); | 225 | + alert('inside jsPanel') |
226 | + ////0.4 added some stylesheets | ||
227 | + //$('#daBodyview').css("height", $(window).outerHeight()); | ||
553 | 228 | ||
554 | - $('#daBodyview').css("width", $(window).outerWidth()); | 229 | + //$('#daBodyview').css("width", $(window).outerWidth()); |
555 | 230 | ||
556 | - //1. load navigator man first | ||
557 | - console.log('before LoadBodyViewNavigatorImage call') | ||
558 | - $scope.LoadBodyViewNavigatorImage(); | 231 | + ////1. load navigator man first |
232 | + //console.log('before LoadBodyViewNavigatorImage call') | ||
233 | + // $scope.LoadBodyViewNavigatorImage(); | ||
559 | 234 | ||
560 | //$scope.loadSearchDataForBodyView(); | 235 | //$scope.loadSearchDataForBodyView(); |
561 | 236 | ||
562 | - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | 237 | + //$scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); |
563 | 238 | ||
564 | - $scope.layerNumber = 0; | 239 | + // $scope.layerNumber = 0; |
565 | 240 | ||
566 | //2. | 241 | //2. |
567 | 242 | ||
568 | - console.log('currentBodyViewId just before sending: ' + currentBodyViewId); | ||
569 | - $scope.loadBodyViewData(currentBodyViewId); | 243 | + // console.log('currentBodyViewId just before sending: ' + currentBodyViewId); |
244 | + $scope.loadAAImage($rootScope.OpenItemImagePath); | ||
570 | 245 | ||
571 | //2. load bodyRegion data | 246 | //2. load bodyRegion data |
572 | - $rootScope.isLoading = true; | ||
573 | - $rootScope.voId = localStorage.getItem("currentBodyViewId"); | 247 | + //$rootScope.isLoading = true; |
248 | + ////$rootScope.voId = localStorage.getItem("currentBodyViewId"); | ||
574 | 249 | ||
575 | - $('#daBodyview').css("height", $(window).outerHeight()); | 250 | + //$('#daBodyview').css("height", $(window).outerHeight()); |
576 | 251 | ||
577 | - $('#daBodyview').css("width", $(window).outerWidth()); | 252 | + //$('#daBodyview').css("width", $(window).outerWidth()); |
578 | } | 253 | } |
579 | }, 250); | 254 | }, 250); |
580 | } | 255 | } |
256 | + | ||
257 | + $scope.loadAAImage = function (OpenedModuleItemPath) | ||
258 | + { | ||
581 | 259 | ||
582 | - //da-body-views functions | ||
583 | - | ||
584 | - //$scope.openBodyView = function () { | ||
585 | - | ||
586 | - // //0. we will initially append container to load body | ||
587 | - | ||
588 | - // //check if localstorage has any settings | ||
589 | - // //var curentEthnicity = localStorage.getItem("globalEthnicity"); | ||
590 | - // //if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) { | ||
591 | - // // $rootScope.globalSetting.ethnicity = curentEthnicity; | ||
592 | - // //} | ||
593 | - | ||
594 | - // //var curentmodesty = localStorage.getItem("globalModesty"); | ||
595 | - // //if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) { | ||
596 | - // // $rootScope.globalSetting.modesty = curentmodesty | ||
597 | - // //} | ||
598 | - | ||
599 | - // //0.1 | ||
600 | - // //var currentBodyViewId = localStorage.getItem("currentBodyViewId"); | ||
601 | - | ||
602 | - // //$scope.loadSearchDataForBodyView(); | ||
603 | - | ||
604 | - | ||
605 | - // //console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); | ||
606 | - | ||
607 | - // //var openViews; | ||
608 | - // //if ($rootScope.openViews != null || $rootScope.openViews != undefined) { | ||
609 | - // // if ($rootScope.openViews.length > 0) { | ||
610 | - // // openViews = new jinqJs() | ||
611 | - // // .from($rootScope.openViews) | ||
612 | - // // .where("BodyViewId == " + currentBodyViewId) | ||
613 | - // // .select(); | ||
614 | - // // } | ||
615 | - // //} | ||
616 | - | ||
617 | - // // 0.2 getting corresponding body view title | ||
618 | - // //var counter = 1; | ||
619 | - // //var tittle = localStorage.getItem("currentViewTitleFromJson"); | ||
620 | - // //localStorage.setItem("currentViewTitle", tittle); | ||
621 | - | ||
622 | - // //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD | ||
623 | - // //if (openViews != null && openViews != undefined) { | ||
624 | - // // angular.forEach(openViews, function (value, key) { | ||
625 | - | ||
626 | - // // if (value.bodyView == tittle) { | ||
627 | - // // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; | ||
628 | - // // $rootScope.currentActiveViewTitle = tittle; | ||
629 | - // // localStorage.setItem("currentViewTitle", tittle); | ||
630 | - // // } | ||
631 | - | ||
632 | - // // }); | ||
633 | - // //} | ||
634 | - // //else { | ||
635 | - // // localStorage.setItem("currentViewTitle", tittle); | ||
636 | - // //} | ||
637 | - | ||
638 | - // //0.3 | ||
639 | - | ||
640 | - // $.jsPanel({ | ||
641 | - // id: 'daImagePanel', | ||
642 | - // selector: '.daBodyView', | ||
643 | - // theme: 'success', | ||
644 | - // currentController: 'TileListViewController', | ||
645 | - // parentSlug: 'tile-view-list', | ||
646 | - // ajax: { | ||
647 | - // url: 'app/views/aa/atlas-anatomy-detail.html' | ||
648 | - // }, | ||
649 | - // title: "abc", | ||
650 | - | ||
651 | - // position: { | ||
652 | - // top: 70, | ||
653 | - // left: 1, | ||
654 | - // }, | ||
655 | - | ||
656 | - // size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 }, | ||
657 | - | ||
658 | - // }); | ||
659 | - | ||
660 | - // console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel')) | ||
661 | - // //0.1 | ||
662 | - // //$rootScope.currentSlug = 'da-body-view'; | ||
663 | - | ||
664 | - // //0.2 | ||
665 | - // //$rootScope.openViews.push( | ||
666 | - // // { | ||
667 | - // // "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | ||
668 | - // // "slug": $rootScope.currentSlug | ||
669 | - // // } | ||
670 | - // // ); | ||
671 | - | ||
672 | - // //0.3 | ||
673 | - // var daBodyviewElement = angular.element(document.getElementById("daBodyview")); | ||
674 | - | ||
675 | - // $timeout(function () { | ||
676 | - // $compile(daBodyviewElement.contents())($scope); | ||
677 | - | ||
678 | - // console.log('html is compiled' + document.getElementById('daView')) | ||
679 | - // if (document.getElementById('daView') != null) { | ||
680 | - | ||
681 | - // //0.4 added some stylesheets | ||
682 | - // $('#daBodyview').css("height", $(window).outerHeight()); | ||
683 | - | ||
684 | - // $('#daBodyview').css("width", $(window).outerWidth()); | ||
685 | - | ||
686 | - // //1. load navigator man first | ||
687 | - // console.log('before LoadBodyViewNavigatorImage call') | ||
688 | - // // $scope.LoadBodyViewNavigatorImage(); | ||
689 | - | ||
690 | - // //$scope.loadSearchDataForBodyView(); | ||
691 | - | ||
692 | - // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); | ||
693 | - | ||
694 | - // $scope.layerNumber = 0; | ||
695 | - | ||
696 | - // //2. | ||
697 | - | ||
698 | - // //console.log('currentBodyViewId just before sending: ' + currentBodyViewId); | ||
699 | - // // $scope.loadBodyViewData(currentBodyViewId); | ||
700 | - | ||
701 | - // //2. load bodyRegion data | ||
702 | - // $rootScope.isLoading = true; | ||
703 | - // $rootScope.voId = localStorage.getItem("currentBodyViewId"); | ||
704 | - | ||
705 | - // $('#daBodyview').css("height", $(window).outerHeight()); | ||
706 | - | ||
707 | - // $('#daBodyview').css("width", $(window).outerWidth()); | ||
708 | - // } | ||
709 | - // }, 250); | ||
710 | - //} | 260 | + } |
711 | 261 | ||
712 | angular.element(document).ready(function (e) { | 262 | angular.element(document).ready(function (e) { |
713 | $("#daImagePanel").resize(function () { | 263 | $("#daImagePanel").resize(function () { |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
@@ -45,6 +45,8 @@ AIA.service('ModuleService', function($http, DataService) { | @@ -45,6 +45,8 @@ AIA.service('ModuleService', function($http, DataService) { | ||
45 | 45 | ||
46 | if (modName == ATLAS_ANATOMY) | 46 | if (modName == ATLAS_ANATOMY) |
47 | { | 47 | { |
48 | + debugger; | ||
49 | + | ||
48 | var AADataForSelectedItem = []; | 50 | var AADataForSelectedItem = []; |
49 | 51 | ||
50 | var title = id; | 52 | var title = id; |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
@@ -134,7 +134,7 @@ | @@ -134,7 +134,7 @@ | ||
134 | right: 0; | 134 | right: 0; |
135 | } | 135 | } |
136 | </style> | 136 | </style> |
137 | -<div class=" " id="daView" ng-controller="TileViewListController" ng-init="alert('hi')"> | 137 | +<div class=" " id="aaView" ng-controller="TileViewListController" ng-init="alert('hi')"> |
138 | <div class="pos-relative leftToolBar tools pull-left"> | 138 | <div class="pos-relative leftToolBar tools pull-left"> |
139 | <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;"></div> | 139 | <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;"></div> |
140 | <div class="" style="top:20px"> | 140 | <div class="" style="top:20px"> |
@@ -452,7 +452,7 @@ | @@ -452,7 +452,7 @@ | ||
452 | rootScope.$apply(function () { | 452 | rootScope.$apply(function () { |
453 | rootScope.isLoading = true; | 453 | rootScope.isLoading = true; |
454 | }) | 454 | }) |
455 | - var scope = angular.element(document.getElementById("daView")).scope(); | 455 | + var scope = angular.element(document.getElementById("aaView")).scope(); |
456 | scope.$apply(function () { | 456 | scope.$apply(function () { |
457 | if (scope.isTransparencyActivated) { | 457 | if (scope.isTransparencyActivated) { |
458 | rootScope.isLoading = false; | 458 | rootScope.isLoading = false; |
@@ -524,7 +524,7 @@ | @@ -524,7 +524,7 @@ | ||
524 | orientation: "horizontal", | 524 | orientation: "horizontal", |
525 | stop: function (event, ui) { | 525 | stop: function (event, ui) { |
526 | //alert('trans changed') | 526 | //alert('trans changed') |
527 | - var scope = angular.element(document.getElementById("daView")).scope(); | 527 | + var scope = angular.element(document.getElementById("aaView")).scope(); |
528 | scope.$apply(function () { | 528 | scope.$apply(function () { |
529 | scope.onTransparencyChange(event, ui); | 529 | scope.onTransparencyChange(event, ui); |
530 | }); | 530 | }); |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -280,7 +280,7 @@ | @@ -280,7 +280,7 @@ | ||
280 | <div class=""> | 280 | <div class=""> |
281 | <div class="input-group col-sm-8 col-xs-7 col-md-10 pull-left"> | 281 | <div class="input-group col-sm-8 col-xs-7 col-md-10 pull-left"> |
282 | 282 | ||
283 | - <input type="text" class="form-control input-sm pull-left" id="typedtermname" ng-blur="HideSearch()" onclick="OnSearch()" ondblclick="OnSearch()" ng-model="searchFilter" ng-change="textChange(searchFilter)" placeholder="Search..."> | 283 | + <input ng-init="alert('hi')" type="text" class="form-control input-sm pull-left" id="typedtermname" ng-blur="HideSearch()" onclick="OnSearch()" ondblclick="OnSearch()" ng-model="searchFilter" ng-change="textChange(searchFilter)" placeholder="Search..."> |
284 | 284 | ||
285 | <div id="backdrop" ng-show="IsSearchVisible"> | 285 | <div id="backdrop" ng-show="IsSearchVisible"> |
286 | <div class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left"> | 286 | <div class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left"> |
@@ -408,6 +408,8 @@ | @@ -408,6 +408,8 @@ | ||
408 | <script> | 408 | <script> |
409 | $(window).load(function () { | 409 | $(window).load(function () { |
410 | $(".stickey-area").sticky(); | 410 | $(".stickey-area").sticky(); |
411 | + //var val = $location.search().abc; | ||
412 | + //alert(val); | ||
411 | });</script> | 413 | });</script> |
412 | <script> | 414 | <script> |
413 | $(function () { | 415 | $(function () { |
400-SOURCECODE/AIAHTML5.Web/app/views/module-item-view.html
1 | <div> | 1 | <div> |
2 | <div ng-include="aap/widget/MainMenu.html"></div> | 2 | <div ng-include="aap/widget/MainMenu.html"></div> |
3 | - <div ng-init="openBodyView()" id="" class="daBodyView" ng-controller="TileViewListController"></div> | 3 | + <div ng-init="openBodyView()" id="" class="aaBodyView" ng-controller="TileViewListController"></div> |
4 | <!--<div > | 4 | <!--<div > |
5 | 5 | ||
6 | </div>--> | 6 | </div>--> |
400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | <div ng-repeat="(key,val) in moduleLandingData.data.root.Item"> | 17 | <div ng-repeat="(key,val) in moduleLandingData.data.root.Item"> |
18 | <div id="{{val._Id}}" class="col-sm-3 col-md-3" title="{{val._Title}}" ng-click="openModuleItemView($event)"> | 18 | <div id="{{val._Id}}" class="col-sm-3 col-md-3" title="{{val._Title}}" ng-click="openModuleItemView($event)"> |
19 | <div class="thumbnail"> | 19 | <div class="thumbnail"> |
20 | - <img class="tinyImg" id="{{val._Title}}" ng-src="../content/images/aa/thumbnails/{{val._TileImageName}}" data-ng-click="openView($event)" alt="" title=""> | 20 | + <img class="tinyImg" id="{{val._Title}}" ng-src="../content/images/aa/thumbnails/{{val._TileImageName}}" data-ng-click="openModuleItemView($event)" alt="" title=""> |
21 | <div class="caption"><p>{{val._Title}}</p></div> | 21 | <div class="caption"><p>{{val._Title}}</p></div> |
22 | </div> | 22 | </div> |
23 | </div> | 23 | </div> |