Commit 78bea9cf0a2ce68a98cb2d3b788d5f737e72ac30

Authored by Birendra
1 parent c98dcf1c

fixed list manager for mutiple DA,AA panel

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -839,7 +839,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
839 839  
840 840 // store image title for export image
841 841 $rootScope.StoreTitleName(currentViewTitle);
842   - $rootScope.loadSearchData(windowviewid);
  842 + $rootScope.daloadSearchData(windowviewid);
843 843  
844 844  
845 845 if ($rootScope.isCallFromOtherModule) {
... ... @@ -1390,10 +1390,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1390 1390  
1391 1391 $scope.RemoveJSPanel(panelid);
1392 1392  
1393   - $rootScope.selectedBodySystemName = 'All';
1394   - $rootScope.selectedBodySystemId = 0;
1395   - $rootScope.searchSelectedText = '';
1396   -
1397 1393 });
1398 1394  
1399 1395 $("#" + $scope.jsPanelID).resize(function (event) {
... ... @@ -1405,32 +1401,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1405 1401 $('#canvasDivDA_' + windowviewid).scrollTop(CanvasDivTopPosition);
1406 1402 });
1407 1403  
1408   - $(document).on("mouseover", "#termList option", function (e) {
1409   - $('#termList option[selected="selected"]').attr("selected", false);
1410   - $(this).attr("selected", true);
1411   - });
1412   -
1413   - $("#termList").unbind('keyup');
1414   - $("#termList").on('keyup', function (event) {
1415   - $('#termList option[selected="selected"]').attr("selected", false);
1416   - $(this.selectedOptions[0]).attr("selected", true);
1417   - });
1418   -
1419   - $(document).keypress(function (e) {
1420   - if ($('#termList option[selected="selected"]').attr("id") == "undefined") {
1421   - return false;
1422   - }
1423   - else {
1424   - var originator = e.keyCode || e.which;
1425   - if ($('#termList option[selected="selected"]').attr("id")) {
1426   - if (e.keyCode == 13) {
1427   - onListManagerTermSelection($('#termList option[selected="selected"]').attr("id"));
1428   - }
1429   - }
1430   - }
1431   - });
1432   -
1433   -
1434 1404 })
1435 1405  
1436 1406 $scope.RemoveJSPanel = function (panelid) {
... ... @@ -1459,7 +1429,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
1459 1429  
1460 1430 }
1461 1431  
1462   - $rootScope.loadSearchData = function (windowviewid) {
  1432 + $rootScope.daloadSearchData = function (windowviewid) {
1463 1433  
1464 1434 $scope.SetwindowStoreData(windowviewid, 'primaryLexiconInd', 0);
1465 1435  
... ... @@ -2632,7 +2602,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
2632 2602 annotationText = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid);
2633 2603 }
2634 2604 else {
2635   - $rootScope.loadSearchData(windowviewid);
  2605 + $rootScope.daloadSearchData(windowviewid);
2636 2606 annotationText = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid);
2637 2607 }
2638 2608 var TermAnnotationText=$scope.GetwindowStoreData(windowviewid,'TermAnnotationText');
... ... @@ -3010,7 +2980,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3010 2980  
3011 2981 }
3012 2982 else {
3013   - $rootScope.loadSearchData(windowviewid);
  2983 + $rootScope.daloadSearchData(windowviewid);
3014 2984 annotationText = $scope.GetAnnotationText(parseInt(RGBColor),windowviewid);
3015 2985  
3016 2986 }
... ... @@ -3970,7 +3940,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3970 3940 }
3971 3941  
3972 3942 $timeout(function () {
3973   - var termSelectedName =$scope.GetwindowStoreData(windowviewid,'searchSelectedText');// $rootScope.searchSelectedText;
  3943 + var termSelectedName =$scope.GetwindowStoreData(windowviewid,'searchSelectedText');
3974 3944 if (termSelectedName == "Cardiovascular") {
3975 3945 termSelectedName = "Skin";
3976 3946 }
... ... @@ -9067,7 +9037,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9067 9037 $scope.loadNavigatorForSelectedBodyView(currentBodyViewId, windowviewid);
9068 9038  
9069 9039 //5. change the search terms as per the selected bodyview
9070   - $rootScope.loadSearchData(windowviewid);
  9040 + $rootScope.daloadSearchData(windowviewid);
9071 9041  
9072 9042 $scope.GetBodySystemData(currentBodyViewId,windowviewid);
9073 9043 //6.
... ... @@ -9108,7 +9078,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9108 9078 $scope.loadNavigatorForSelectedBodyView(currentBodyViewId, windowviewid);
9109 9079  
9110 9080 //5. change the search terms as per the selected bodyview
9111   - $rootScope.loadSearchData(windowviewid);
  9081 + $rootScope.daloadSearchData(windowviewid);
9112 9082  
9113 9083 $scope.GetBodySystemData(currentBodyViewId,windowviewid);
9114 9084 //6.
... ... @@ -9383,7 +9353,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9383 9353 $scope.loadNavigatorForSelectedBodyView(bodyVid,windowviewid);
9384 9354  
9385 9355 //4. change the search terms as per the selected bodyview
9386   - $rootScope.loadSearchData(windowviewid);
  9356 + $rootScope.daloadSearchData(windowviewid);
9387 9357  
9388 9358 $scope.GetBodySystemData(bodyVid,windowviewid);
9389 9359  
... ... @@ -9418,7 +9388,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9418 9388 $scope.loadNavigatorForSelectedBodyView(bodyVid, windowviewid);
9419 9389  
9420 9390 //4. change the search terms as per the selected bodyview
9421   - $rootScope.loadSearchData(windowviewid);
  9391 + $rootScope.daloadSearchData(windowviewid);
9422 9392  
9423 9393 };
9424 9394  
... ... @@ -9908,7 +9878,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9908 9878  
9909 9879 }
9910 9880 else {
9911   - $rootScope.loadSearchData(windowviewid);
  9881 + $rootScope.daloadSearchData(windowviewid);
9912 9882 }
9913 9883  
9914 9884 }
... ... @@ -9936,8 +9906,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
9936 9906 $rootScope.isTermClicked = true;
9937 9907 var currenttermidTxt=$('#' + serachedTermId).text();
9938 9908  
9939   - $rootScope.searchSelectedText =currenttermidTxt; //using at home controller
9940   -
9941 9909 $scope.SetwindowStoreData(windowviewid,'searchSelectedText',currenttermidTxt);
9942 9910 $('#termList option[selected="selected"]').attr("selected", false);
9943 9911 $('#termList option[value="' + currenttermidTxt + '"]').attr("selected", true);
... ... @@ -10010,18 +9978,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
10010 9978 }
10011 9979  
10012 9980 //list manager
10013   - $scope.$on('listManagerEvent', function (event, windowviewid) {
  9981 + $scope.$on('dalistManagerEvent', function (event, windowviewid) {
10014 9982  
10015 9983 // var windowviewid= $rootScope.MULTI_VIEW_ID;
10016 9984 if ($rootScope.islistManagerEventAlredayDispachted == true) {
10017   - $rootScope.isLoading = true;
10018   - $('#spinner').css('visibility', 'visible');
  9985 + $scope.DisableUI();
10019 9986 var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item;
10020 9987  
10021   - // var optionsLength = $('#bodySystems option').length;//.children('option').length;
10022   - // console.log('optionsLength= ' + optionsLength)
10023   - // if (optionsLength > 0)
10024   - // $('#bodySystems').empty();
  9988 + $('#bodySystems').empty();
10025 9989 $("#bodySystems").css("display", "block");
10026 9990 $("#AABodySystems").css("display", "none");
10027 9991  
... ... @@ -10037,33 +10001,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
10037 10001 $scope.loadListManger(windowviewid);
10038 10002 $rootScope.islistManagerEventAlredayDispachted = false;
10039 10003  
10040   - // $('#viewName').empty();
10041   - // var currentView = $scope.GetwindowStoreData(windowviewid,'currentViewTitle');
10042   - // var viewNmeHtml = '<option>' + currentView + '</option>'
10043   - // $('#viewName').append(viewNmeHtml);
10044   -
10045   - //var len = $rootScope.openModules.length;
10046   -
10047   - // var currentOpenModuleId = $rootScope.openModules[len - 1].ModuleId;
10048   -
10049   - //confirm that this is DA module which is last open
10050   - // if (currentOpenModuleId == 1) {
10051   -
10052   - // $('#termList').empty();
10053   - // if ($scope.GetwindowStoreData(windowviewid,'TermNumberData') == null) {
10054   - // setTimeout(function () { $scope.loadListManger(windowviewid); }, 3000);
10055   - // }
10056   - // else {
10057   - // $scope.loadListManger(windowviewid);
10058   - // }
10059   - // $rootScope.islistManagerEventAlredayDispachted = false;
10060   - // }
10061   -
10062 10004 }
10063 10005 else
10064 10006 {
10065   - $rootScope.isLoading = false;
10066   - $('#spinner').css('visibility', 'hidden');
  10007 + $scope.EnableUI();
10067 10008 }
10068 10009 });
10069 10010  
... ... @@ -10123,9 +10064,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10123 10064 $compile($el)($scope);
10124 10065  
10125 10066 }
10126   -
10127   - $rootScope.isLoading = false;
10128   - $('#spinner').css('visibility', 'hidden');
  10067 + $scope.EnableUI();
10129 10068  
10130 10069 var termsTotal = '<span class="pull-left marginTop5">' + VocabTermTxtfilter.length + ' Structures</span>';
10131 10070 $("#totalTerms").empty();
... ... @@ -10135,12 +10074,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10135 10074 }
10136 10075 else {
10137 10076 console.log("$rootScope.TermNumberData NOT FOUND");
10138   - $rootScope.loadSearchData(windowviewid);
  10077 + $rootScope.daloadSearchData(windowviewid);
10139 10078  
10140 10079 }
10141 10080 }
10142 10081 else {
10143   - $rootScope.loadSearchData(windowviewid);
  10082 + $rootScope.daloadSearchData(windowviewid);
10144 10083  
10145 10084 }
10146 10085 }
... ... @@ -10149,8 +10088,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10149 10088  
10150 10089 var currenttermidTxt=$("#" + selectedtermid).text();
10151 10090  
10152   - $rootScope.searchSelectedText =currenttermidTxt; //using at home controller
10153   -
10154 10091 $scope.SetwindowStoreData(windowviewid,'searchSelectedText',currenttermidTxt);
10155 10092  
10156 10093 var actualTermNumber= selectedtermid.split('_')[0];
... ... @@ -10510,8 +10447,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10510 10447 var bodysystemId = (selectedBodysystemId).split("_")[0];
10511 10448 $rootScope.isLoading = true;
10512 10449 $('#spinner').css('visibility', 'visible');
10513   - $rootScope.selectedBodySystemId = selectedBodysystemId;
10514   - $rootScope.selectedBodySystemName = $('#bodySystems option[id="' + selectedBodysystemId + '"]').val();
10515 10450 $("#bodySystems").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
10516 10451 $("#bodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
10517 10452  
... ... @@ -10896,9 +10831,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
10896 10831 }
10897 10832 }
10898 10833  
10899   - $rootScope.selectedBodySystemName = 'All';
10900   - $rootScope.selectedBodySystemId = 0;
10901   - $rootScope.searchSelectedText = '';
10902 10834 });
10903 10835  
10904 10836 $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-max .jsglyph-maximize", function (event) {
... ... @@ -10988,13 +10920,13 @@ function selectTerm(event) {
10988 10920 });
10989 10921 }
10990 10922  
10991   -function HighlightBodyOnListManager(event) {
10992   - console.log('HighlightBodyOnListManager is called outside ');
10993   - var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
10994   - scope.$apply(function () {
10995   - scope.HighlightBodyOnListManagerSelection(event);
10996   - });
10997   -}
  10923 +// function HighlightBodyOnListManager(event) {
  10924 +// console.log('HighlightBodyOnListManager is called outside ');
  10925 +// var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
  10926 +// scope.$apply(function () {
  10927 +// scope.HighlightBodyOnListManagerSelection(event);
  10928 +// });
  10929 +// }
10998 10930  
10999 10931 function refreshTermListOnSystem(bodysystemId) {
11000 10932 console.log('refreshTermListOnSystem is called outside ');
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -473,8 +473,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
473 473  
474 474 $rootScope.initializeAIA = function () {
475 475  
  476 + var url = $location.url();
  477 + $('#login').css('visibility', 'visible');
  478 +
476 479 $rootScope.checkRefreshButtonClick = 1;
477   -
  480 +
478 481 if (params != null && params != undefined && params != "") {
479 482  
480 483 $scope.ValidateClientSiteUrl();
... ... @@ -485,8 +488,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
485 488  
486 489 $rootScope.isLoading = false;
487 490  
488   - var url = $location.url();
489   -
  491 +
490 492 //unblock user
491 493 if (url.indexOf('?unb:') != -1) {
492 494  
... ... @@ -532,8 +534,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
532 534 $rootScope.getConfigurationValues();
533 535 }
534 536  
535   - $timeout(function () {
536   -
  537 + $timeout(function () {
537 538 $scope.helpTopicLink();
538 539 }, 2000);
539 540  
... ... @@ -5844,6 +5845,41 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) {
5844 5845 $("#listManager").css("visibility", "visible");
5845 5846 $('#listManager').draggable();
5846 5847  
  5848 + // register event for search list manager
  5849 + $(document).on("mouseover", "#termList option", function (e) {
  5850 + $('#termList option[selected="selected"]').attr("selected", false);
  5851 + $(this).attr("selected", true);
  5852 + });
  5853 +
  5854 + $("#termList").unbind('keyup');
  5855 + $("#termList").on('keyup', function (event) {
  5856 + $('#termList option[selected="selected"]').attr("selected", false);
  5857 + $(this.selectedOptions[0]).attr("selected", true);
  5858 + });
  5859 +
  5860 + $("#termList").unbind('keypress');
  5861 + $("#termList").on('keypress', function (e) {
  5862 + if ($('#termList option[selected="selected"]').attr("id") == "undefined") {
  5863 + return false;
  5864 + }
  5865 + else {
  5866 + if ($('#termList option[selected="selected"]').attr("id")) {
  5867 + if (e.keyCode == 13) {
  5868 + var selectedPanel = $("#viewName option:selected").val();
  5869 + if(selectedPanel.match("daImagePanel"))
  5870 + {
  5871 + onListManagerTermSelection($('#termList option[selected="selected"]').attr("id"),true);
  5872 + }
  5873 + else if(selectedPanel.match("AAImagePanel"))
  5874 + {
  5875 + onSearchItemSelection($('#termList option[selected="selected"]').attr("id"));
  5876 + }
  5877 +
  5878 + }
  5879 + }
  5880 + }
  5881 + });
  5882 +
5847 5883 }
5848 5884  
5849 5885  
... ... @@ -5856,12 +5892,11 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) {
5856 5892 $('#termList').empty();
5857 5893  
5858 5894 $timeout(function () {
5859   - var selected_Id = $("#viewName option:selected").val();
  5895 + var selectedPanel = $("#viewName option:selected").val();
5860 5896  
5861   - if(selected_Id!="0" && selected_Id!=undefined)
5862   - {
5863   - var windowviewid=selected_Id.split('_')[1];
5864   - $rootScope.loadViewListManager(windowviewid);
  5897 + if(selectedPanel!="0" && selectedPanel!=undefined)
  5898 + {
  5899 + $rootScope.loadViewListManager(selectedPanel);
5865 5900 }
5866 5901 else
5867 5902 {
... ... @@ -5872,7 +5907,8 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) {
5872 5907 },100);
5873 5908 }
5874 5909  
5875   - $rootScope.loadViewListManager = function (windowviewid) {
  5910 + $rootScope.loadViewListManager = function (selectedPanel) {
  5911 + var windowviewid=selectedPanel.split('_')[1];
5876 5912 $("#listManagerContent *").prop('disabled',false);
5877 5913 $rootScope.switchCanvas();
5878 5914 $("#annotationpaintbrushsize").attr("href", "#");
... ... @@ -5887,86 +5923,22 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) {
5887 5923 $("#annotationpainteraser").css('pointer-events', 'none');
5888 5924  
5889 5925 $rootScope.islistManagerEventAlredayDispachted = true;
5890   -
5891   - $rootScope.$broadcast('listManagerEvent', windowviewid);
  5926 +
  5927 + if(selectedPanel.match("daImagePanel"))
  5928 + {
  5929 + $rootScope.$broadcast('dalistManagerEvent', windowviewid);
5892 5930  
5893   - if ($rootScope.selectedBodySystemName == undefined && $rootScope.slectedActualTermNumber == undefined) {
5894   - if ($location.path() == "/module-item-view") {
5895   - $timeout(function () {
5896   - // $('#termList option[selected="selected"]').prop("selected", false);
5897   - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
5898   - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
5899   - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
5900   -
5901   - }, 500);
5902   - }
5903   - else {
5904   - // $('#termList option[selected="selected"]').prop("selected", false);
5905   - // $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
5906   - // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
5907   - // $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
5908   - }
  5931 + $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)");
5909 5932 }
5910   - else {
5911   -
5912   - if ($rootScope.selectedBodySystemId == undefined) {
5913   - $rootScope.selectedBodySystemId = 0;
5914   - if ($location.path() == "/module-item-view") {
5915   - var MultiWinId = $rootScope.GetAAWindowId();
5916   - $rootScope.refreshTermListOnAASystemSelection($rootScope.selectedBodySystemId, MultiWinId);
5917   - }
5918   - else {
5919   - if ($location.path() == "/module-item-view") {
5920   - var MultiWinId = $rootScope.GetAAWindowId();
5921   - $rootScope.refreshTermListOnAASystemSelection($rootScope.selectedBodySystemId, MultiWinId);
5922   - }
5923   - else {
5924   - // $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId);
5925   - }
5926   -
5927   - }
5928   - }
5929   - else {
5930   - if ($location.path() == "/module-item-view") {
5931   - var MultiWinId = $rootScope.GetAAWindowId();
5932   - $rootScope.refreshTermListOnAASystemSelection($rootScope.selectedBodySystemId, MultiWinId);
5933   - }
5934   - else {
5935   - // $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId);
5936   - }
5937   -
5938   - }
5939   -
5940   - // $timeout(function () {
5941   - // $('#bodySystems option[selected="selected"]').prop("selected", false);
5942   - // $('#bodySystems option[value="' + $rootScope.selectedBodySystemName + '"]').prop("selected", true);
5943   - // $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
5944   - // $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
5945   - //
5946   - // }, 500);
5947   - }
5948   - // $("#optionsListManagerTab").addClass("active");
5949   - // var viewNameAftrSplit;
5950   - //if ($("#viewName").val() !== null) {
5951   - // viewNameAftrSplit = $("#viewName").val().split(" ");
5952   -
5953   - // if (viewNameAftrSplit[0] == "null") {
5954   - // document.location.href = "/";
5955   - // }
5956   - //}
5957   - if ($location.url() == "/module-item-view") {
  5933 + else if(selectedPanel.match("AAImagePanel"))
  5934 + {
  5935 + $rootScope.$broadcast('aalistManagerEvent', windowviewid);
5958 5936 $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onSearchItemSelection(this.options[this.selectedIndex].id)");
5959 5937 }
5960   - else {
5961   - $("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)");
5962   - }
5963 5938  
5964 5939 }
5965 5940  
5966   -
5967 5941 $rootScope.CloseListManager = function () {
5968   -
5969   -
5970 5942 $('#listManager').css('display', 'none');
5971 5943 $("#listManager").css("visibility", "hidden");
5972 5944  
... ... @@ -6002,29 +5974,10 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) {
6002 5974 }
6003 5975 }
6004 5976 }
6005   - if ($location.path() == "/module-item-view") {
6006   - $rootScope.selectedBodySystemName = $("#AABodySystems").val();
6007   - $rootScope.selectedBodySystemId = $('#AABodySystems option[value="' + $rootScope.selectedBodySystemName + '"]').attr("id");
6008   - }
6009   -
  5977 +
6010 5978 $rootScope.isLoading = false;
6011 5979 $('#spinner').css('visibility', 'hidden');
6012   - //$('#spinner').css('display', 'none');
6013   - // $rootScope.isAnnotationWindowClose = true;
6014   - // if('#termList')
6015   - if ($('#termList option').length > 0) {
6016   - //$('#termList option') = null;
6017   - //$('#termList').innerHTML='';
6018   - $('#termList')
6019   - .find('option')
6020   - .remove()
6021   - .end()
6022   - if ($('#termList option').length > 0) {
6023   -
6024   - }
6025   - }
6026 5980  
6027   - $rootScope.prevId = "";
6028 5981 }
6029 5982  
6030 5983 function fillListManagerTerms() {
... ... @@ -6161,11 +6114,11 @@ $rootScope.resetMenuOptionOnClick = function (moduleName) {
6161 6114 $rootScope.UpdateSetting(setting);
6162 6115 if ($rootScope.MenuModuleName == "DA") {
6163 6116 var MultiWinId = $rootScope.GetDaWindowId();
6164   - $rootScope.loadSearchData(MultiWinId);
  6117 + $rootScope.daloadSearchData(MultiWinId);
6165 6118 }
6166 6119 if ($rootScope.MenuModuleName == "AA") {
6167 6120 var MultiWinId = $rootScope.GetAAWindowId();
6168   - $rootScope.loadSearchData(MultiWinId);
  6121 + $rootScope.aaloadSearchData(MultiWinId);
6169 6122 }
6170 6123 $rootScope.isApplyBtnClicked = false;
6171 6124 //$timeout(function () {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -1040,10 +1040,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1040 1040  
1041 1041 $scope.setActiveTab(parseInt($rootScope.getLocalStorageValue("activeTab")));
1042 1042 $(".tools").css("z-index", "15000");
1043   - $rootScope.selectedBodySystemName = 'All';
1044   - $rootScope.selectedBodySystemId = 0;
1045   - $rootScope.searchSelectedText = '';
1046   -
  1043 +
1047 1044 });
1048 1045  
1049 1046 })
... ... @@ -1382,7 +1379,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1382 1379 if (isShowSelectedSystemPinsClicked == false) {
1383 1380 $scope.SetAAwindowStoreData(windowviewid,'isShowSelectedSystemPinsClicked',true);
1384 1381 //load search/vocab data
1385   - $rootScope.loadSearchData(windowviewid);
  1382 + $rootScope.aaloadSearchData(windowviewid);
1386 1383 }
1387 1384 else {
1388 1385 $scope.EnableUI();
... ... @@ -2536,7 +2533,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2536 2533 // $rootScope.FreeStylePaint();
2537 2534 });
2538 2535  
2539   - $rootScope.loadSearchData = function (windowviewid) {
  2536 + $rootScope.aaloadSearchData = function (windowviewid) {
2540 2537  
2541 2538 var imageId= $scope.GetAAwindowStoreData(windowviewid,'imageId');
2542 2539 var promise = ModuleService.getTermTextDataForAAImage(imageId)
... ... @@ -2583,9 +2580,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2583 2580 $('#termList').empty();
2584 2581 $('#termlistfilter_' + windowviewid).empty();
2585 2582 for (var j = 0; j < pinTermData.length; j++) {
2586   - var $el = $('<li><a id= "' + pinTermData[j].TermNumber + '" href="" onclick="onSearchItemSelection(this.id,' + windowviewid + ')" >' + pinTermData[j].TermTxt + '</a></li>').appendTo('#termlistfilter_' + windowviewid)
  2583 + var $el = $('<li><a id= "' + pinTermData[j].TermNumber +'_' +windowviewid+ '" href="" onclick="onSearchItemSelection(this.id)" >' + pinTermData[j].TermTxt + '</a></li>').appendTo('#termlistfilter_' + windowviewid)
2587 2584 $compile($el)($scope);
2588   - var $selectedOptions = $('<option title= "' + pinTermData[j].TermTxt + '" id= "' + pinTermData[j].TermNumber + '" >' + pinTermData[j].TermTxt + '</option>').appendTo('#termList')
  2585 + var $selectedOptions = $('<option title= "' + pinTermData[j].TermTxt + '" id= "' + pinTermData[j].TermNumber +'_' +windowviewid+ '" >' + pinTermData[j].TermTxt + '</option>').appendTo('#termList')
2589 2586  
2590 2587 $compile($selectedOptions)($scope);
2591 2588  
... ... @@ -2593,7 +2590,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2593 2590 $("#bodySystems").css("display", "none");
2594 2591 $("#AABodySystems").css("display", "block");
2595 2592 $("#bodySystemList_" + windowviewid + " li a").each(function (key, value) {
2596   - var $systemOptions = $('<option id=' + $(this).attr('id') + ' >' + $(this).text() + '</option>').appendTo("#AABodySystems")
  2593 + var $systemOptions = $('<option id=' + $(this).attr('id') + '_' +windowviewid+' >' + $(this).text() + '</option>').appendTo("#AABodySystems")
2597 2594 $compile($systemOptions)($scope);
2598 2595 });
2599 2596 }
... ... @@ -2610,48 +2607,30 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2610 2607  
2611 2608 }
2612 2609  
2613   - $scope.$on('listManagerEvent', function (event, data) {
2614   -
2615   - // $("#viewName").empty();
2616   - var windowviewid= $rootScope.MULTI_VIEW_ID;
2617   -
2618   - // var currentView = $rootScope.getLocalStorageValue("currentViewTitle");
2619   - // var viewNmeHtml = '<option>' + currentView + '</option>'
2620   - // $('#viewName').append(viewNmeHtml);
2621   -
2622   - $scope.EnableUI();
2623   - $rootScope.isLoading = false;
2624   - $('#spinner').css('visibility', 'hidden');
  2610 + $scope.$on('aalistManagerEvent', function (event, windowviewid) {
2625 2611  
2626   - if ($rootScope.bodySystemSeletedId == null) {
2627   -
2628   - $rootScope.loadSearchData(windowviewid);
2629   - }
2630   - else {
2631   -
2632   - $rootScope.refreshTermListOnAASystemSelection($rootScope.bodySystemSeletedId,windowviewid);
2633   - }
  2612 + $scope.DisableUI();
  2613 +
  2614 + $rootScope.aaloadSearchData(windowviewid);
  2615 +
2634 2616 $timeout(function () {
2635 2617 $("#totalTerms").empty();
2636 2618 $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>");
  2619 + $scope.EnableUI();
2637 2620 }, 1000);
2638 2621 });
2639 2622  
2640   - $rootScope.refreshTermListOnAASystemSelection = function (bodySystemId,windowviewid) {
2641   -
2642   - if(windowviewid==undefined) //body system change from list manager at home
2643   - windowviewid= $rootScope.MULTI_VIEW_ID;
2644   -
2645   - $rootScope.bodySystemSeletedId = bodySystemId;
  2623 + $rootScope.refreshTermListOnAASystemSelection = function (selectedBodysystemId) {
  2624 + var windowviewid = (selectedBodysystemId).split("_")[1];
2646 2625 $("#AABodySystems").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
2647   - $("#AABodySystems").find("option[id=" + bodySystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
  2626 + $("#AABodySystems").find("option[id=" + selectedBodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
2648 2627 $('#termList').empty();
2649   - var bodySystemName = $("#AABodySystems #" + bodySystemId).val();
  2628 + var bodySystemName = $("#AABodySystems #" + selectedBodysystemId).val();
2650 2629  
2651 2630 if (bodySystemName == "All") {
2652 2631 var pinTermData=$scope.GetAAwindowStoreData(windowviewid,'pinTermData');
2653 2632 for (var j = 0; j <= pinTermData.length - 1; j++) {
2654   - var $selectedOptions = $('<option title= "' + pinTermData[j].TermTxt + '" id= "' + pinTermData[j].TermNumber + '">' + pinTermData[j].TermTxt + '</option>').appendTo("#termList")
  2633 + var $selectedOptions = $('<option title= "' + pinTermData[j].TermTxt + '" id= "' + pinTermData[j].TermNumber +'_'+windowviewid+ '">' + pinTermData[j].TermTxt + '</option>').appendTo("#termList")
2655 2634  
2656 2635 $compile($selectedOptions)($scope);
2657 2636 }
... ... @@ -2720,7 +2699,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2720 2699 }
2721 2700  
2722 2701 for (var j = 0; j <= sortedListArray.length - 1; j++) {
2723   - var $selectedOptions = $('<option title= "' + sortedListArray[j].title + '" id= "' + sortedListArray[j].id + '" >' + sortedListArray[j].title + '</option>').appendTo("#termList");
  2702 + var $selectedOptions = $('<option title= "' + sortedListArray[j].title + '" id= "' + sortedListArray[j].id +'_'+windowviewid+ '" >' + sortedListArray[j].title + '</option>').appendTo("#termList");
2724 2703  
2725 2704 $compile($selectedOptions)($scope);
2726 2705 }
... ... @@ -2981,21 +2960,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
2981 2960  
2982 2961 }
2983 2962 else {
2984   - $rootScope.loadSearchData(windowviewid);
  2963 + $rootScope.aaloadSearchData(windowviewid);
2985 2964 if (AAPinTermData.length > 0) {
2986 2965 $scope.showItemsForSearch(event);
2987 2966 }
2988 2967 }
2989 2968  
2990   - // if ($rootScope.isSearchInputClicked == true) {
2991   - // $rootScope.isSearchInputClicked = false;
2992   - // $rootScope.searchListArray = [];
2993   - // $("#backdrop > #searchListDivAA > #termlistfilter_" + windowviewid + " > li").each(function (key, value) {
2994   - // $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") });
2995   - // });
2996   -
2997   - // }
2998   -
2999 2969 }, 500);
3000 2970  
3001 2971 }
... ... @@ -3012,30 +2982,21 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
3012 2982  
3013 2983 }
3014 2984  
3015   - $scope.highlightPinBasedOnSerachItem = function (id, windowviewid) {
3016   -
3017   - var currenttermidTxt = "";
3018   - if (windowviewid == undefined) // call also from also home controller list manager
3019   - {
3020   - windowviewid = $rootScope.MULTI_VIEW_ID;
3021   - }
3022   - else
3023   - {
3024   - currenttermidTxt = $('#' + event.currentTarget.id).text();
3025   - }
3026   -
  2985 + $scope.highlightPinBasedOnSerachItem = function (termid) {
  2986 +
  2987 + var windowviewid = (termid).split("_")[1];
  2988 + var id=(termid).split("_")[0];
  2989 + var currenttermidTxt = $('#' + termid).text();
  2990 +
3027 2991 $scope.showAllPinsAfterHide(windowviewid);
3028   - //if (id == undefined) {
3029   - // id = $scope.GetAAwindowStoreData(windowviewid, 'selectedSearchId');
3030   - //}
3031   - $rootScope.searchSelectedText = $("#" + id).val();
  2992 +
3032 2993 $('#termList option[selected="selected"]').prop("selected", false);
3033   - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
  2994 + $('#termList option[value="' + currenttermidTxt + '"]').attr("selected", true);
3034 2995 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
3035   - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
  2996 + $('#termList option[value="' + currenttermidTxt + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
3036 2997  
3037 2998 $("#termlistfilter_" + windowviewid + " li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
3038   - $("#termlistfilter_" + windowviewid + " li").find("a[id=" + id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
  2999 + $("#termlistfilter_" + windowviewid + " li").find("a[id=" + termid + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
3039 3000  
3040 3001 $('#selectedTermName_' + windowviewid).val(currenttermidTxt);
3041 3002  
... ... @@ -3330,9 +3291,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
3330 3291  
3331 3292 $scope.setActiveTab(parseInt($rootScope.getLocalStorageValue("activeTab")));
3332 3293 $(".tools").css("z-index", "15000");
3333   - $rootScope.selectedBodySystemName = 'All';
3334   - $rootScope.selectedBodySystemId = 0;
3335   - $rootScope.searchSelectedText = '';
  3294 +
3336 3295 });
3337 3296  
3338 3297 $(document).on("click", "#" + $scope.jsPanelID + " .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-max .jsglyph-maximize", function (event) {
... ... @@ -3424,12 +3383,12 @@ function hideSearchList(event) {
3424 3383 });
3425 3384 }
3426 3385  
3427   -function onSearchItemSelection(id,windowviewid) {
  3386 +function onSearchItemSelection(termid) {
3428 3387  
3429 3388 console.log('AA hide search is called');
3430 3389 var scope = angular.element(document.getElementById("aaBodyView")).scope();
3431 3390 scope.$apply(function () {
3432   - scope.highlightPinBasedOnSerachItem(id,windowviewid);
  3391 + scope.highlightPinBasedOnSerachItem(termid);
3433 3392 });
3434 3393 }
3435 3394  
... ...
400-SOURCECODE/AIAHTML5.Web/index.aspx
... ... @@ -172,7 +172,7 @@
172 172 </head>
173 173 <body ng-controller="HomeController" id="bo" ng-init="initializeAIA()" ng-keydown="CheckRefresh($event)">
174 174 <div ng-hide="isVisibleResetPass">
175   - <div id="login" ng-show="isVisibleLogin">
  175 + <div id="login" ng-show="isVisibleLogin" style="visibility:hidden ;">
176 176  
177 177 <div class="container-fluid loginBg">
178 178 <div class="row">
... ...