diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 17df8e9..04cce01 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -56,6 +56,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.isEligibleForHighlight = false; $scope.doHighlightOrExtract = false; $scope.isClickedOnBodyForHighlight; + $scope.isSearchClicked = false; $scope.isEligibleForHighlightBodyByTermList = false; // $scope.AnteriorView = "active"; @@ -816,7 +817,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }) // $rootScope.languageArray = []; $rootScope.loadSearchData = function () { - var primaryLexiconIndex; + + $scope.primaryLexiconInd; var languageArray = []; $rootScope.vocabTermDataArray = []; var languageArray = $rootScope.lexiconLanguageArray; @@ -871,13 +873,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) { - primaryLexiconIndex = i; + $scope.primaryLexiconInd = i; } } //alert(primaryLexiconIndex); - if ($rootScope.isListManagerMenuSelected) { + if ($rootScope.isListManagerMenuSelected ) { $scope.loadListManger(); } + else if ($scope.isSearchClicked) { + $scope.ShowSearch(); + } } @@ -8898,28 +8903,25 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.ShowSearch = function () { - if (($rootScope.vocabTermDataArray != null || $rootScope.vocabTermDataArray != undefined) && ($rootScope.vocabTermDataArray.length > 0)) { - var primaryLexiconIndex; - for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { - if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) { - primaryLexiconIndex = i; - } - } - console.log('ShowSearch is called'); + + $scope.isSearchClicked = true; + console.log('ShowSearch is called'); + var primaryLexiconIndx = $scope.primaryLexiconInd; + //this check is for log only because we are writing length so need to check if its not null or undefined - if ($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) - console.log('$scope.VocabTermTxt.length= ' + $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt.length) + if ($rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) + console.log('$scope.VocabTermTxt.length= ' + $rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt.length) $timeout(function () { - if (($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) && ($rootScope.vocabTermDataArray[0].vocabTermTxt.length > 0)) { + if (($rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt != undefined) && ($rootScope.vocabTermDataArray[0].vocabTermTxt.length > 0)) { //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed //Remove the list and then Repopulate if ($('#searchListDiv').html() != "") - $('#searchListDiv').empty() + $('#searchListDiv').empty(); //Delay compile of ul li so that the remove of li is completed. $timeout(function () { - console.log("INSIDE WATCH. LIST IS CREATED"); + $scope.isSearchDataLoaded = true; if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { @@ -8944,12 +8946,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }, 500); $scope.IsSearchVisible = true; - console.log("s" + $rootScope.vocabTermDataArray[primaryLexiconIndex].language); - $rootScope.a = primaryLexiconIndex; + console.log("primary language: " + $rootScope.vocabTermDataArray[primaryLexiconIndx].language); + + + $rootScope.a = primaryLexiconIndx; var $e2 = $('
').appendTo('#searchListDiv') $compile($e2)($scope); + + console.log('termlistfilter is created and complied'); + document.getElementById("termlistfilter").style.display = "block"; $timeout(function () { $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { @@ -8969,19 +8976,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { $rootScope.loadSearchData(); - if ($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt.length > 0) { - $scope.ShowSearch(); - } + //if ($rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt.length > 0) { + // $scope.ShowSearch(); + //} } }, 500); - } - else { - $rootScope.loadSearchData(); - $scope.ShowSearch(); - - - } + + + } @@ -9119,7 +9122,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }); $scope.loadListManger = function () { - var primaryLexiconIndex; + var primaryLexiconIndex = $scope.primaryLexiconInd;; if ($rootScope.vocabTermDataArray != null && $rootScope.vocabTermDataArray != undefined && $rootScope.vocabTermDataArray.length > 0) { for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index d878823..482ae84 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -516,6 +516,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $rootScope.aaPinDataArray = []; $rootScope.isShowSelectedSystemPinsClicked = false; $scope.showAllPins = function () { + $scope.allPinDataArray = []; var promise = ModuleService.getPinDataForImage($rootScope.imageName) .then( @@ -530,7 +531,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou document.getElementById('navigatorDiv').style.visibility = 'hidden'; } + //draw pins + + $scope.aaPinData = result.data.Root.Item; if ($scope.aaPinData != null && $scope.aaPinData.length > 0) { $rootScope.aaPinDataArray = $scope.aaPinData @@ -771,7 +775,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.isBodySystemSelected = false; $scope.SelectedSystemTitle = "Current Structure"; $scope.showSelectedSystemPins = function (event) { - + if (typeof event == "object") { if (event.currentTarget.title == $("#bodySystemList li.activeAASystemSelect a").attr("title")) { @@ -809,6 +813,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.showAllPinsAfterHide(); } else { + //#30499 : Atlas Anatomy > All Pins are not appeared on the body system even after selecting the Body System: All + $('#aaDetailViewCanvas').removeLayers(); $scope.showAllPins(); } } @@ -839,7 +845,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) { angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) { - + if (aaPinDataValue._BodySystemName != $scope.selectedSystemName) { $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId); @@ -1384,7 +1390,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) { - + //if ($scope.isSearchOptionClicked == true) { // $scope.clickedPins = []; // $scope.isSearchOptionClicked = false;