Commit 0ad05f5f1f57334d04327e2e930b3bbff7ed950c
1 parent
db798846
commit Changes
Showing
1 changed file
with
38 additions
and
28 deletions
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 |