Commit 1b7688b99d203e88c78317b093463ecdc4a63e20

Authored by Amrita Vishnoi
2 parents cb860f55 4023af4d

Merge branch 'Bug#11523' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -426,7 +426,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
426 426 //da-body-views functions
427 427  
428 428 $scope.openBodyView = function () {
429   -
  429 +
430 430 //0. we will initially append container to load body
431 431  
432 432 //check if localstorage has any settings
... ... @@ -441,116 +441,127 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
441 441 }
442 442  
443 443 //0.1
  444 +
444 445 var currentBodyViewId = localStorage.getItem("currentBodyViewId");
445   -
446   - $scope.loadSearchDataForBodyView();
  446 + if (currentBodyViewId == null || currentBodyViewId == undefined) {
  447 + // document.location = '/';
  448 + document.location = '/';
  449 + $rootScope.isVisibleLogin = true;
  450 +
  451 + }
  452 + else {
  453 + $rootScope.isVisibleLogin = false;
  454 + $scope.loadSearchDataForBodyView();
447 455  
448 456  
449   - console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId);
  457 + console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId);
450 458  
451   - var openViews;
452   - if ($rootScope.openViews != null || $rootScope.openViews != undefined) {
453   - if ($rootScope.openViews.length > 0) {
454   - openViews = new jinqJs()
455   - .from($rootScope.openViews)
456   - .where("BodyViewId == " + currentBodyViewId)
457   - .select();
  459 + var openViews;
  460 + if ($rootScope.openViews != null || $rootScope.openViews != undefined) {
  461 + if ($rootScope.openViews.length > 0) {
  462 + openViews = new jinqJs()
  463 + .from($rootScope.openViews)
  464 + .where("BodyViewId == " + currentBodyViewId)
  465 + .select();
  466 + }
458 467 }
459   - }
460 468  
461   - // 0.2 getting corresponding body view title
462   - //var counter = 1;
463   - var tittle = localStorage.getItem("currentViewTitleFromJson");
464   - localStorage.setItem("currentViewTitle", tittle);
  469 + // 0.2 getting corresponding body view title
  470 + //var counter = 1;
  471 + var tittle = localStorage.getItem("currentViewTitleFromJson");
  472 + localStorage.setItem("currentViewTitle", tittle);
465 473  
466   - //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD
467   - //if (openViews != null && openViews != undefined) {
468   - // angular.forEach(openViews, function (value, key) {
  474 + //WILL BE USED WHEN MULTI VIEWOPEN FUNCTIONALITY IS IMPELMNETD
  475 + //if (openViews != null && openViews != undefined) {
  476 + // angular.forEach(openViews, function (value, key) {
469 477  
470   - // if (value.bodyView == tittle) {
471   - // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
472   - // $rootScope.currentActiveViewTitle = tittle;
473   - // localStorage.setItem("currentViewTitle", tittle);
474   - // }
  478 + // if (value.bodyView == tittle) {
  479 + // tittle = localStorage.getItem("currentViewTitleFromJson") + counter++;
  480 + // $rootScope.currentActiveViewTitle = tittle;
  481 + // localStorage.setItem("currentViewTitle", tittle);
  482 + // }
475 483  
476   - // });
477   - //}
478   - //else {
479   - // localStorage.setItem("currentViewTitle", tittle);
480   - //}
481   -
482   - //0.3
  484 + // });
  485 + //}
  486 + //else {
  487 + // localStorage.setItem("currentViewTitle", tittle);
  488 + //}
483 489  
484   - $.jsPanel({
485   - id: 'daImagePanel',
486   - selector: '.daBodyView',
487   - theme: 'success',
488   - currentController: 'DAController',
489   - parentSlug: 'da-view-list',
490   - ajax: {
491   - url: 'app/views/da/da-view.html'
492   - },
493   - title: localStorage.getItem("currentViewTitle"),
  490 + //0.3
494 491  
495   - position: {
496   - top: 70,
497   - left: 1,
498   - },
  492 + $.jsPanel({
  493 + id: 'daImagePanel',
  494 + selector: '.daBodyView',
  495 + theme: 'success',
  496 + currentController: 'DAController',
  497 + parentSlug: 'da-view-list',
  498 + ajax: {
  499 + url: 'app/views/da/da-view.html'
  500 + },
  501 + title: localStorage.getItem("currentViewTitle"),
499 502  
500   - size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 },
  503 + position: {
  504 + top: 70,
  505 + left: 1,
  506 + },
501 507  
502   - });
  508 + size: { width: $(window).outerWidth() - 10, height: $(window).outerHeight() - 110 },
503 509  
504   - console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel'))
505   - //0.1
506   - $rootScope.currentSlug = 'da-body-view';
  510 + });
507 511  
508   - //0.2
509   - $rootScope.openViews.push(
510   - {
511   - "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId,
512   - "slug": $rootScope.currentSlug
513   - }
514   - );
  512 + console.log('jsPanel loaded daImagePanel exist= ' + document.getElementById('daImagePanel'))
  513 + //0.1
  514 + $rootScope.currentSlug = 'da-body-view';
515 515  
516   - //0.3
517   - var daBodyviewElement = angular.element(document.getElementById("daBodyview"));
  516 + //0.2
  517 + $rootScope.openViews.push(
  518 + {
  519 + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId,
  520 + "slug": $rootScope.currentSlug
  521 + }
  522 + );
518 523  
519   - $timeout(function () {
520   - $compile(daBodyviewElement.contents())($scope);
  524 + //0.3
  525 + var daBodyviewElement = angular.element(document.getElementById("daBodyview"));
521 526  
522   - console.log('html is compiled' + document.getElementById('daView'))
523   - if (document.getElementById('daView') != null) {
  527 + $timeout(function () {
  528 + $compile(daBodyviewElement.contents())($scope);
524 529  
525   - //0.4 added some stylesheets
526   - $('#daBodyview').css("height", $(window).outerHeight());
  530 + console.log('html is compiled' + document.getElementById('daView'))
  531 + if (document.getElementById('daView') != null) {
527 532  
528   - $('#daBodyview').css("width", $(window).outerWidth());
  533 + //0.4 added some stylesheets
  534 + $('#daBodyview').css("height", $(window).outerHeight());
529 535  
530   - //1. load navigator man first
531   - console.log('before LoadBodyViewNavigatorImage call')
532   - $scope.LoadBodyViewNavigatorImage();
  536 + $('#daBodyview').css("width", $(window).outerWidth());
533 537  
534   - //$scope.loadSearchDataForBodyView();
  538 + //1. load navigator man first
  539 + console.log('before LoadBodyViewNavigatorImage call')
  540 + $scope.LoadBodyViewNavigatorImage();
535 541  
536   - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
  542 + //$scope.loadSearchDataForBodyView();
537 543  
538   - $scope.layerNumber = 0;
  544 + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle");
539 545  
540   - //2.
  546 + $scope.layerNumber = 0;
541 547  
542   - console.log('currentBodyViewId just before sending: ' + currentBodyViewId);
543   - $scope.loadBodyViewData(currentBodyViewId);
  548 + //2.
  549 +
544 550  
545   - //2. load bodyRegion data
546   - $rootScope.isLoading = true;
547   - $rootScope.voId = localStorage.getItem("currentBodyViewId");
  551 + console.log('currentBodyViewId just before sending: ' + currentBodyViewId);
  552 + $scope.loadBodyViewData(currentBodyViewId);
548 553  
  554 + //2. load bodyRegion data
  555 + $rootScope.isLoading = true;
  556 + $rootScope.voId = localStorage.getItem("currentBodyViewId");
  557 + }
549 558 $('#daBodyview').css("height", $(window).outerHeight());
550 559  
551 560 $('#daBodyview').css("width", $(window).outerWidth());
552   - }
553   - }, 250);
  561 +
  562 + }, 250);
  563 + }
  564 +
554 565 }
555 566  
556 567 angular.element(document).ready(function (e) {
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
... ... @@ -26,25 +26,8 @@
26 26 <div class="sidebar pull-left mCustomScrollbar _mCS_1 mCS-autoHide ">
27 27 <!--{{name}}-->
28 28 <ul class="nav nav-sidebar" ng-init="hideScrollbar()">
29   - <!--<li ng-repeat="module in userModules"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible()">{{module.name}}</a></li>-->
30   - <li><a href="da-view-list" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/da-view-list')}">Dissectible Anatomy</a></li>
31   - <li ><a href="3d-anatomy-list" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/3d-anatomy-list')}">3D Anatomy</a></li>
32   - <li ><a href="clinical-illustrations" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/clinical-illustrations')}">Clinical Illustrations</a></li>
33   - <li ><a href="clinical-animations" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/clinical-animations')}">Clinical Animations</a></li>
34   - <li><a href="Link/encyclopedia" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/encyclopedia')}">Encyclopedia</a></li>
35   - <li><a href="curriculum-builder" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/curriculum-builder')}">Curriculum Builder</a></li>
36   - <li><a href="anatomy-test" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/anatomy-test')}">Anatomy Tests</a></li>
37   - <li><a href="Link/IP-10" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/IP-10')}">IP 10</a></li>
38   - <li><a href="lab-exercises" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/lab-exercises')}">Lab Exercises</a></li>
39   - <li><a href="Link/indepth-reports" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/indepth-reports')}">In-Depth Reports</a></li>
40   - <li><a href="Link/complementary-and-alternate-medicine" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/complementary-and-alternate-medicine')}">Complementary and Alternative Medicine</a></li>
41   - <li><a href="ADAM-Images" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/ADAM-Images')}">A.D.A.M Images</a></li>
42   - <li><a href="Link/bodyguide" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/bodyguide')}">Body Guide</a></li>
43   - <li><a href="Link/symptom-navigator" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/symptom-navigator')}">Symptom Navigator</a></li>
44   - <li><a href="Link/wellness-tools" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/wellness-tools')}">The Wellness Tools</a></li>
45   - <li><a href="Link/aod" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/ADAM-on-demand')}">A.D.A.M OnDemand</a></li>
46   -
47   - </ul>
  29 + <li ng-repeat="module in userModules"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible()">{{module.name}}</a></li>
  30 + </ul>
48 31 </div>
49 32  
50 33 </div>
... ...