Commit 5bc735ae0d70531d7c5cf6b6f0fb9cd35abc7e77

Authored by Nikita Kulshreshtha
1 parent 53eceac9

implemented feature in which all pins will be shown of searched item system

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -1170,6 +1170,39 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1170 1170 .where("_TermId == " + $scope.searchItemId)
1171 1171 .select();
1172 1172  
  1173 +
  1174 + //if any system is sleleted and the searched term is of another system then show all pins of that system
  1175 + var bodySystemNameOfSeletedPin = pinDataForTerm[0]._BodySystemName;
  1176 +
  1177 + if ($scope.selectedSystemName!=null && bodySystemNameOfSeletedPin != $scope.selectedSystemName) {
  1178 +
  1179 + $scope.selectedSystemPinData = new jinqJs()
  1180 + .from($scope.aaPinData)
  1181 + .where("_BodySystemName == " + bodySystemNameOfSeletedPin)
  1182 + .select();
  1183 +
  1184 + //remove other system pins
  1185 + if ($scope.selectedSystemPinData != null && $scope.selectedSystemPinData.length > 0) {
  1186 +
  1187 + angular.forEach($scope.aaPinData, function (aaPinDataValue, aaPinDataKey) {
  1188 +
  1189 + if (aaPinDataValue._BodySystemName != $scope.selectedSystemName)
  1190 + $scope.removePin('aaDetailViewCanvas', aaPinDataValue._PinId);
  1191 + })
  1192 +
  1193 + angular.forEach($scope.selectedSystemPinData, function (value, key) {
  1194 +
  1195 +
  1196 + $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
  1197 +
  1198 + })
  1199 + //show annotation on first pin of the sysyem
  1200 + // $scope.showAnnotation($scope.selectedSystemPinData, false, false, false);
  1201 +
  1202 + }
  1203 + }
  1204 +
  1205 +
1173 1206 $scope.showAnnotation(pinDataForTerm, false, false, true);
1174 1207  
1175 1208 $scope.IsSearchVisible = false;
... ...