Commit e1a24cf70bcd5186fcec2169f0bbfb569a88f112

Authored by Nikita Kulshreshtha
2 parents 26e1133e 0ad05f5f

Merge branch '26672' into Develop-IPAD-MAC

400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -497,31 +497,31 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -497,31 +497,31 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
497 497
498 //once you get id in scope push detail in jspanel content 498 //once you get id in scope push detail in jspanel content
499 499
500 - var openViews;  
501 - if ($rootScope.openViews.length > 0) {  
502 - openViews = new jinqJs()  
503 - .from($rootScope.openViews)  
504 - .where("BodyViewId==" + $scope.voId)  
505 - .select();  
506 - } 500 + // var openViews;
  501 + //if ($rootScope.openViews.length > 0) {
  502 + // openViews = new jinqJs()
  503 + // .from($rootScope.openViews)
  504 + // .where("BodyViewId==" + $scope.voId)
  505 + // .select();
  506 + //}
507 var counter = 1; 507 var counter = 1;
508 var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); 508 var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
  509 + localStorage.setItem("currentViewTitle", tittle);
  510 + //if (openViews != null && openViews.length > 0) {
  511 + // angular.forEach(openViews, function (value, key) {
509 512
510 - if (openViews != null && openViews.length > 0) {  
511 - angular.forEach(openViews, function (value, key) { 513 + // if (value.body - views == tittle) {
  514 + // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
  515 + // $rootScope.currentActiveViewTitle = tittle;
  516 + // localStorage.setItem("currentViewTitle", tittle);
  517 + // }
512 518
513 - if (value.body - views == tittle) {  
514 - tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;  
515 - $rootScope.currentActiveViewTitle = tittle;  
516 - localStorage.setItem("currentViewTitle", tittle);  
517 - }  
518 -  
519 - });  
520 - }  
521 - else {  
522 - localStorage.setItem("currentViewTitle", tittle); 519 + // });
  520 + //}
  521 + //else {
  522 + // localStorage.setItem("currentViewTitle", tittle);
523 523
524 - } 524 + //}
525 525
526 //alert($rootScope.getLocalStorageValue("currentViewTitle")); 526 //alert($rootScope.getLocalStorageValue("currentViewTitle"));
527 527
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -501,7 +501,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -501,7 +501,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
501 501
502 502
503 $scope.openView = function ($event) { 503 $scope.openView = function ($event) {
504 - 504 +
505 $rootScope.MenuModuleName = "CI"; 505 $rootScope.MenuModuleName = "CI";
506 $rootScope.disableAnnotationTB = false; 506 $rootScope.disableAnnotationTB = false;
507 $rootScope.CIAnotationIdentifyModeOff = true; 507 $rootScope.CIAnotationIdentifyModeOff = true;
@@ -523,7 +523,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -523,7 +523,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
523 523
524 } 524 }
525 525
526 -  
527 localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle); 526 localStorage.setItem("currentViewTitleFromJson", $rootScope.ViewTitle);
528 localStorage.setItem("currentBodyViewId", $event.currentTarget.id); 527 localStorage.setItem("currentBodyViewId", $event.currentTarget.id);
529 528
@@ -539,7 +538,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -539,7 +538,6 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
539 538
540 $scope.openBodyView = function () { 539 $scope.openBodyView = function () {
541 540
542 -  
543 if ($rootScope.refreshcheck == null) { 541 if ($rootScope.refreshcheck == null) {
544 $location.path('/'); 542 $location.path('/');
545 } 543 }
@@ -548,36 +546,48 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -548,36 +546,48 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
548 $('#spinner').css('visibility', 'visible'); 546 $('#spinner').css('visibility', 'visible');
549 $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId"); 547 $scope.voId = $rootScope.getLocalStorageValue("currentBodyViewId");
550 548
551 - // alert($scope.voId);  
552 -  
553 549
554 //once you get id in scope push detail in jspanel content 550 //once you get id in scope push detail in jspanel content
555 551
556 - var openViews;  
557 - if ($rootScope.openViews.length > 0) {  
558 - openViews = new jinqJs()  
559 - .from($rootScope.openViews)  
560 - .where("BodyViewId==" + $scope.voId)  
561 - .select();  
562 - } 552 + // var openViews;
  553 + // console.log($rootScope.openViews);
  554 + // if ($rootScope.openViews.length > 0 && $rootScope.openViews != null && $rootScope.openViews != undefined) {
  555 + // alert("entered");
  556 + //for (var i=0; i <= $rootScope.openViews.length - 1; i++) {
  557 + // if ($rootScope.openViews[i].BodyViewId == $scope.voId) {
  558 + // alert("success");
  559 + // openViews = $rootScope.openViews;
  560 + // }
  561 + //}
  562 + // openViews = $rootScope.openViews;
  563 +
  564 +
  565 + //alert($rootScope.openViews);
  566 + //openViews = new jinqJs()
  567 + // .from($rootScope.openViews)
  568 + // .where("BodyViewId==" + $scope.voId)
  569 + // .select();
  570 + //}
  571 +
563 var counter = 1; 572 var counter = 1;
564 var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson"); 573 var tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson");
565 -  
566 - if (openViews != null && openViews.length > 0) {  
567 - angular.forEach(openViews, function (value, key) {  
568 -  
569 - if (value.body - views == tittle) {  
570 - tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;  
571 - $rootScope.currentActiveViewTitle = tittle;  
572 - localStorage.setItem("currentViewTitle", tittle);  
573 - }  
574 -  
575 - });  
576 - }  
577 - else {  
578 - localStorage.setItem("currentViewTitle", tittle);  
579 -  
580 - } 574 + localStorage.setItem("currentViewTitle", tittle);
  575 + //if (openViews != null && openViews.length > 0 && openViews != undefined) {
  576 + // // alert("aaa");
  577 + // console.log(openViews);
  578 + // angular.forEach(openViews, function (value, key) {
  579 + // if (value.body - views == tittle) {
  580 + // tittle = $rootScope.getLocalStorageValue("currentViewTitleFromJson") + counter++;
  581 + // $rootScope.currentActiveViewTitle = tittle;
  582 + // localStorage.setItem("currentViewTitle", tittle);
  583 + // }
  584 +
  585 + // });
  586 + //}
  587 + //else {
  588 + // localStorage.setItem("currentViewTitle", tittle);
  589 +
  590 + //}
581 591
582 //alert($rootScope.getLocalStorageValue("currentViewTitle")); 592 //alert($rootScope.getLocalStorageValue("currentViewTitle"));
583 593