diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 807fe01..5754166 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -3646,6 +3646,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic if (viewNameAftrSplit[0] == "null") { document.location.href = "/"; } + + if ($location.url() == "/module-item-view") { + $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onSearchItemSelection(this.options[this.selectedIndex].id)"); + } + else { + $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)"); + } + } $rootScope.CloseListManager = function () { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js index bb215e1..85fa59e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js @@ -1280,9 +1280,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $('#termList').empty(); $('#termlistfilter').empty(); for (var j = 0; j < $scope.pinTermData.length; j++) { - var $el = $('
  • ' + $scope.pinTermData[j].TermTxt + '
  • ').appendTo('#termlistfilter') + var $el = $('
  • ' + $scope.pinTermData[j].TermTxt + '
  • ').appendTo('#termlistfilter') + //var $el = $('
  • ' + $scope.pinTermData[j].TermTxt + '
  • ').appendTo('#termlistfilter') $compile($el)($scope); - var $selectedOptions = $('').appendTo("#termList") + var $selectedOptions = $('').appendTo("#termList") $compile($selectedOptions)($scope); @@ -1339,7 +1340,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou var bodySystemName = $("#AABodySystems #" + bodySystemId).val(); if (bodySystemName == "All") { for (var j = 0; j <= $scope.pinTermData.length - 1; j++) { - var $selectedOptions = $('').appendTo("#termList") + var $selectedOptions = $('').appendTo("#termList") $compile($selectedOptions)($scope); @@ -1367,7 +1368,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou if ($scope.aaPinData[i]._TermId == $rootScope.bodySystemTermArray[j].termNumbr) { if ($rootScope.bodySystemTermArray[j].language == "1") { console.log($rootScope.bodySystemTermArray[j].text); - var $selectedOptions = $('').appendTo("#termList") + var $selectedOptions = $('').appendTo("#termList") $compile($selectedOptions)($scope); } } @@ -1617,11 +1618,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou } - $scope.highlightPinBasedOnSerachItem = function (event) { - - $scope.searchItemId = event.currentTarget.id; - $scope.searchItemText = event.currentTarget.innerHTML; - $rootScope.searchSelectedText = $("#" + event.currentTarget.id).text(); + $scope.highlightPinBasedOnSerachItem = function (id) { + $scope.searchItemId = id; + $scope.searchItemText = $("#" + id).text(); + $rootScope.searchSelectedText = $("#"+id).text(); $('#termList option[selected="selected"]').prop("selected", false); $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); @@ -1629,8 +1629,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" }); $("#termlistfilter li #" + $scope.searchItemId).css({ "background-color": "#3399FF", "color": "#ffffff" }); - $scope.searchFilter = event.currentTarget.innerHTML; - selectedTermName.placeholder = event.currentTarget.innerHTML; + $scope.searchFilter = $("#"+id).text(); + selectedTermName.placeholder = $("#"+id).text(); //get data from pindata for this trem @@ -1814,11 +1814,12 @@ function hideSearchList(event) { }); } -function onSearchItemSelection(event) { - console.log('AA hide search is called') +function onSearchItemSelection(id) { + + console.log('AA hide search is called'); var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); scope.$apply(function () { - scope.highlightPinBasedOnSerachItem(event); + scope.highlightPinBasedOnSerachItem(id); }); }