diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 3cab69c..23e1263 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -424,7 +424,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (posbodyregion > -1) {
selectimg = true;
count = count + 1;
-
}
else {
selectimg = false;
@@ -575,12 +574,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else {
$scope.showAllPins();
}
- }
+ }
else {
$scope.selectedSystemName = event.currentTarget.title;
-
-
// get termText info
var promise = ModuleService.getTermTextDataForPin($scope.moduleName)
.then(
@@ -1176,6 +1173,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
function (response) {
$scope.AAPinTermData = response.data.PinTermData.TermData;
+
$rootScope.isLoading = false;
$('#setting-spinner').css('visibility', 'hidden');
@@ -1185,10 +1183,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
.from($scope.AAPinTermData)
.where('_LanguageId == ' + primaryLexicon)
.select();
-
+
for (var i = 0; i < $scope.matchedLanguageTermData.length; i++) {
- $scope.pinTermData.push({ "LanguageId": $scope.matchedLanguageTermData[i]._LanguageId, "TermNumber": $scope.matchedLanguageTermData[i]._TermNumber, "TermTxt": $scope.matchedLanguageTermData[i]._TermText });
- // console.log($scope.pinTermData);
+ $scope.pinTermData.push({ "LanguageId": $scope.matchedLanguageTermData[i]._LanguageId, "TermNumber": $scope.matchedLanguageTermData[i]._TermNumber, "TermTxt": $scope.matchedLanguageTermData[i]._TermText});
}
$scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) {
if ($('#termlistfilter').html() != "")
@@ -1202,8 +1199,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$compile($el)($scope);
var $selectOptions = $('').appendTo("#termList")
$compile($selectOptions)($scope);
+ $("#bodySystems").empty();
+ $("#bodySystemList li a").each(function (key, value) {
+ var $systemOptions = $('').appendTo("#bodySystems")
+ $compile($systemOptions)($scope);
+ });
}
-
}, 500);
}
})
@@ -1214,19 +1215,66 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
console.log(' error: ' + error.statusText);
}
)
-
}
+
+
+
+
$scope.$on('listManagerEvent', function (event, data) {
$("#viewName").empty();
- $("#viewName").append("");
+ $("#viewName").append("");
+
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
});
- $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) {
+ $scope.refreshTermListOnSystemSelection = function (bodySystemId) {
+ var bodySystemText = $("#bodySystems #" + bodySystemId).val();
+ alert(bodySystemText);
+ if (bodySystemText == "All") {
+ for (var j = 0; j <= $scope.pinTermData.length - 1; j++) {
+ var $selectOptions = $('').appendTo("#termList")
+ $compile($selectOptions)($scope);
+ }
+ }
+ else {
+ var imageId = $rootScope.imageId;
+ $scope.pinDataUrl = "aa_dat_pinterm_" + imageId;
+ $rootScope.bodySystemTermArray = [];
+ $('#termList').empty();
+ $.ajax({
+ url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json',
+ type: 'GET',
+ dataType: "json",
+ async: false,
+ success: function (result) {
+ $(result.PinTermData.TermData).each(function (key, value) {
+ $rootScope.bodySystemTermArray.push({ "termNumbr": result.PinTermData.TermData[key]._TermNumber, "text": result.PinTermData.TermData[key]._TermText, "language": result.PinTermData.TermData[key]._LanguageId });
+ });
+ for (var i = 0; i <= $scope.aaPinData.length - 1; i++) {
+ if ($scope.aaPinData[i]._BodySystemName.toLowerCase() == bodySystemText.toLowerCase()) {
+ for (var j = 0 ; j <= $rootScope.bodySystemTermArray.length - 1; j++) {
+ if ($scope.aaPinData[i]._TermId == $rootScope.bodySystemTermArray[j].termNumbr) {
+ if ($rootScope.bodySystemTermArray[j].language == "1") {
+ console.log($rootScope.bodySystemTermArray[j].text);
+ var $selectOptions = $('').appendTo("#termList")
+ $compile($selectOptions)($scope);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ });
+ }
+ }
+ $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) {
+
+
var languageArray = $rootScope.lexiconLanguageArray;
if ($scope.AAPinTermData != null || $scope.AAPinTermData != undefined) {
@@ -1235,34 +1283,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
.from($scope.AAPinTermData)
.where('_TermNumber == ' + actualTermNo)
.select();
-
+
if ($scope.matchedTermNoData != null || $scope.matchedTermNoData != undefined) {
-
+
for (var j = 0; j <= languageArray.length - 1; j++) {
-
+
$scope.matchedLanguageTermNoData = new jinqJs()
.from($scope.matchedTermNoData)
.where('_LanguageId == ' + languageArray[j].id)
.select();
-
var termText = $scope.matchedLanguageTermNoData[0]._TermText;
-
$scope.MultiLanguageAnnationArray.push(termText);
-
-
};
-
-
-
}
-
}
}
-
-
-
-
$scope.hidePins = function () {
$rootScope.isLoading = true;
@@ -1444,16 +1480,32 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.highlightPinBasedOnSerachItem = function (event) {
+
+ if ($scope.isTermListOptionClicked == true) {
+ $scope.searchItemId = event;
+ $scope.searchItemText = event.innerHTML;
+ $('#termList option[selected="selected"]').prop("selected", false);
+ $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
+ $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
+ $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
+ $scope.searchFilter = event.innerHTML;
+ selectedTermName.placeholder = event.innerHTML;
+ $scope.isTermListOptionClicked = false;
+ }
+ else
+ {
+ $scope.searchItemId = event.currentTarget.id;
+ $scope.searchItemText = event.currentTarget.innerHTML;
+ $('#termList option[selected="selected"]').prop("selected", false);
+ $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
+ $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
+ $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
- $scope.searchItemId = event.currentTarget.id;
- $scope.searchItemText = event.currentTarget.innerHTML;
- $('#termList option[selected="selected"]').prop("selected", false);
- $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
- $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
- $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
+ $scope.searchFilter = event.currentTarget.innerHTML;
+ selectedTermName.placeholder = event.currentTarget.innerHTML;
+
+ }
- $scope.searchFilter = event.currentTarget.innerHTML;
- selectedTermName.placeholder = event.currentTarget.innerHTML;
//get data from pindata for this trem
@@ -1500,8 +1552,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
+
+
}]);
+
+function refreshTermListOnSystem(bodySystemId) {
+ // alert('refreshTermListOnSystem is called outside');
+ var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
+ scope.$apply(function () {
+ scope.refreshTermListOnSystemSelection(bodySystemId);
+ });
+}
+
function showSelectedSystemPins(event) {
console.log('OnBodySystem chnaged is called outside ');
var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
@@ -1550,6 +1613,16 @@ function onSearchItemSelection(event) {
});
}
+function onListManagerTermSelection(event) {
+ var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
+ scope.isTermListOptionClicked = true;
+ scope.$apply(function () {
+ scope.highlightPinBasedOnSerachItem(event);
+ });
+
+}
+
+
function showHideAnnotation(event) {
var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();