Commit 76339e8ca67fa9b12615ae70e3f80ed62d7b4137
Merge branch 'Develop' into QA
Showing
10 changed files
with
266 additions
and
80 deletions
400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj
... | ... | @@ -19,6 +19,7 @@ |
19 | 19 | <IISExpressAnonymousAuthentication /> |
20 | 20 | <IISExpressWindowsAuthentication /> |
21 | 21 | <IISExpressUseClassicPipelineMode /> |
22 | + <UseGlobalApplicationHostFile /> | |
22 | 23 | </PropertyGroup> |
23 | 24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
24 | 25 | <DebugSymbols>true</DebugSymbols> |
... | ... | @@ -109,11 +110,13 @@ |
109 | 110 | <Compile Include="Controllers\AdminAccessController.cs" /> |
110 | 111 | <Compile Include="Controllers\AuthenticateController.cs" /> |
111 | 112 | <Compile Include="Controllers\ForgotUserController.cs" /> |
113 | + <Compile Include="Controllers\PixelLocationsController.cs" /> | |
112 | 114 | <Compile Include="Controllers\ResetPasswordController.cs" /> |
113 | 115 | <Compile Include="Global.asax.cs"> |
114 | 116 | <DependentUpon>Global.asax</DependentUpon> |
115 | 117 | </Compile> |
116 | 118 | <Compile Include="Models\DBModel.cs" /> |
119 | + <Compile Include="Models\PixelLocator.cs" /> | |
117 | 120 | <Compile Include="Models\User.cs" /> |
118 | 121 | <Compile Include="Models\UserUtility.cs" /> |
119 | 122 | <Compile Include="Models\Users.cs" /> | ... | ... |
400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs
0 → 100644
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Linq; | |
4 | +using System.Net; | |
5 | +using System.Net.Http; | |
6 | +using System.Web.Http; | |
7 | +using AIAHTML5.API.Models; | |
8 | + | |
9 | +namespace AIAHTML5.API.Controllers | |
10 | +{ | |
11 | + public class PixelLocationsController : ApiController | |
12 | + { | |
13 | + // GET: api/PixelLocations | |
14 | + public IEnumerable<string> Get() | |
15 | + { | |
16 | + return new string[] { "value1", "value2" }; | |
17 | + } | |
18 | + | |
19 | + // GET: api/PixelLocations/5 | |
20 | + public HttpResponseMessage Get(string layerNumber, string bodyViewIndex, string systemNumber, string zoomLevel) | |
21 | + { | |
22 | + dynamic bodyRegions = PixelLocator.GetBodyRegionsPixelData(layerNumber, bodyViewIndex, systemNumber, zoomLevel); | |
23 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(bodyRegions) }; | |
24 | + } | |
25 | + | |
26 | + // POST: api/PixelLocations | |
27 | + public void Post([FromBody]string value) | |
28 | + { | |
29 | + } | |
30 | + | |
31 | + // PUT: api/PixelLocations/5 | |
32 | + public void Put(int id, [FromBody]string value) | |
33 | + { | |
34 | + } | |
35 | + | |
36 | + // DELETE: api/PixelLocations/5 | |
37 | + public void Delete(int id) | |
38 | + { | |
39 | + } | |
40 | + } | |
41 | +} | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs
0 → 100644
1 | +using MongoDB.Bson; | |
2 | +using MongoDB.Driver; | |
3 | +using System; | |
4 | +using System.Collections.Generic; | |
5 | +using System.Linq; | |
6 | +using System.Web; | |
7 | + | |
8 | +namespace AIAHTML5.API.Models | |
9 | +{ | |
10 | + public class PixelLocator | |
11 | + { | |
12 | + | |
13 | + internal static dynamic GetBodyRegionsPixelData(string layerNumber, string bodyViewIndex, string systemNumber, string zoom) | |
14 | + { | |
15 | + try | |
16 | + { | |
17 | + var client = new MongoClient("localhost:27017"); | |
18 | + var db = client.GetDatabase("AIAHTML5"); | |
19 | + | |
20 | + var col = db.GetCollection<BsonDocument>("DAImages"); | |
21 | + | |
22 | + var pipeline = new BsonDocument[] | |
23 | + { | |
24 | + new BsonDocument{ {"$match", new BsonDocument("terms.SystemNumbers", Convert.ToInt32(systemNumber)) }}, | |
25 | + new BsonDocument{{"$unwind", "$terms"}}, | |
26 | + new BsonDocument{ { "$match", new BsonDocument("terms.SystemNumbers", Convert.ToInt32(systemNumber)) }}, | |
27 | + new BsonDocument{ { "$match", new BsonDocument("bodyViewIndex", Convert.ToInt32(bodyViewIndex)) }}, | |
28 | + new BsonDocument{ { "$match", new BsonDocument("layerNumber", Convert.ToInt32(layerNumber)) }}, | |
29 | + new BsonDocument{ { "$match", new BsonDocument("zoom", Convert.ToInt32(zoom)) }}, | |
30 | + | |
31 | + new BsonDocument { {"$project", new BsonDocument() | |
32 | + .Add("_id", 0) | |
33 | + .Add("terms", 1) | |
34 | + .Add("bodyRegionId", 1) | |
35 | + .Add("layerNumber", 1) | |
36 | + .Add("bodyViewIndex", 1) | |
37 | + } } | |
38 | + }; | |
39 | + | |
40 | + | |
41 | + var pixelData = col.Aggregate<BsonDocument>(pipeline).ToList(); | |
42 | + | |
43 | + return pixelData.ToJson(); | |
44 | + } | |
45 | + catch (Exception e) | |
46 | + { | |
47 | + return "error"; | |
48 | + } | |
49 | + } | |
50 | +} | |
51 | +} | ... | ... |
400-SOURCECODE/AIAHTML5.API/bin/AIAHTML5.API.dll
No preview for this file type
400-SOURCECODE/AIAHTML5.API/bin/AIAHTML5.API.pdb
No preview for this file type
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
1 | 1 | |
2 | 2 | 'use strict'; |
3 | 3 | |
4 | -AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService", | |
5 | -function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService) { | |
4 | +AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$log", "$location", "$timeout", "DA", "Modules", "$routeParams", "DataService","TermService", | |
5 | + function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Modules, $routeParam, DataService, TermService) { | |
6 | 6 | |
7 | 7 | |
8 | 8 | $scope.genderId = ""; |
... | ... | @@ -594,7 +594,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
594 | 594 | } |
595 | 595 | |
596 | 596 | angular.element(document).ready(function (e) { |
597 | - | |
597 | + $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
598 | + $rootScope.selectedBodySystemName = 'All'; | |
599 | + $rootScope.selectedBodySystemId = 0; | |
600 | + $rootScope.searchSelectedText = ''; | |
601 | + }); | |
598 | 602 | $("#layerChangeSlider").slider({ |
599 | 603 | orientation: "vertical", |
600 | 604 | range: "max", |
... | ... | @@ -2831,12 +2835,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2831 | 2835 | |
2832 | 2836 | $scope.highlightedBR = []; |
2833 | 2837 | |
2834 | - if ($scope.layerNumber == 224) { | |
2838 | + // if ($scope.layerNumber == 224) { | |
2835 | 2839 | |
2836 | 2840 | var matchedTermListPath = '~/../content/data/json/da/body-views/1/BodySystem_' + $rootScope.systemNumber + '.json'; |
2837 | 2841 | var grayImageDataVar = null; |
2838 | 2842 | |
2839 | - DataService.getJson(matchedTermListPath) | |
2843 | + // DataService.getJson(matchedTermListPath) | |
2844 | + TermService.getTermData($scope.layerNumber, $rootScope.voId, $rootScope.systemNumber, $rootScope.zoomInOut) | |
2845 | + | |
2840 | 2846 | .then( |
2841 | 2847 | function (result) { |
2842 | 2848 | console.log('1. HighlightBodyByTermListForBodySystem is called'); |
... | ... | @@ -3032,7 +3038,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3032 | 3038 | |
3033 | 3039 | }); |
3034 | 3040 | |
3035 | - } | |
3041 | + // } | |
3036 | 3042 | } |
3037 | 3043 | |
3038 | 3044 | |
... | ... | @@ -8256,7 +8262,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
8256 | 8262 | |
8257 | 8263 | //list manager |
8258 | 8264 | $scope.$on('listManagerEvent', function (event, data) { |
8259 | - | |
8265 | + | |
8260 | 8266 | if ($rootScope.islistManagerEventAlredayDispachted == true) { |
8261 | 8267 | |
8262 | 8268 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -8267,7 +8273,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
8267 | 8273 | console.log('optionsLength= ' + optionsLength) |
8268 | 8274 | if (optionsLength > 0) |
8269 | 8275 | $('#bodySystems').empty(); |
8270 | - | |
8276 | + $("#bodySystems").css("display", "block"); | |
8277 | + $("#AABodySystems").css("display", "none"); | |
8271 | 8278 | |
8272 | 8279 | var $all = $('<option id="0" selected="">All</option>').appendTo('#bodySystems'); |
8273 | 8280 | $compile($all)($scope); |
... | ... | @@ -8309,7 +8316,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
8309 | 8316 | |
8310 | 8317 | |
8311 | 8318 | }); |
8312 | - | |
8319 | + | |
8313 | 8320 | $scope.loadListManger = function () { |
8314 | 8321 | |
8315 | 8322 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -3148,7 +3148,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3148 | 3148 | |
3149 | 3149 | $rootScope.disableAnnotationtoolOnListManager = false; |
3150 | 3150 | $rootScope.ShowListManager = function () { |
3151 | - | |
3151 | + | |
3152 | 3152 | $rootScope.switchCanvas(); |
3153 | 3153 | $("#annotationpaintbrushsize").attr("href", "#"); |
3154 | 3154 | $("#annotationpainteraser").attr("href", "#"); |
... | ... | @@ -3168,30 +3168,58 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3168 | 3168 | |
3169 | 3169 | $('#listManager').draggable(); |
3170 | 3170 | $rootScope.islistManagerEventAlredayDispachted = true; |
3171 | - | |
3171 | + | |
3172 | 3172 | $rootScope.$broadcast('listManagerEvent', true); |
3173 | - | |
3173 | + | |
3174 | 3174 | if ($rootScope.selectedBodySystemName == undefined && $rootScope.slectedActualTermNumber == undefined) { |
3175 | - $('#termList option[selected="selected"]').prop("selected", false); | |
3176 | - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | |
3177 | - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
3178 | - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
3179 | - } | |
3175 | + if ($location.path() == "/module-item-view") { | |
3176 | + $timeout(function () { | |
3177 | + $('#termList option[selected="selected"]').prop("selected", false); | |
3178 | + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | |
3179 | + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
3180 | + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
3181 | + }, 1000); | |
3182 | + } | |
3183 | + else { | |
3184 | + $('#termList option[selected="selected"]').prop("selected", false); | |
3185 | + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | |
3186 | + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
3187 | + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
3188 | + } | |
3189 | + } | |
3180 | 3190 | else { |
3181 | 3191 | |
3182 | 3192 | if ($rootScope.selectedBodySystemId == undefined) { |
3183 | 3193 | $rootScope.selectedBodySystemId = 0; |
3184 | - $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId); | |
3194 | + if ($location.path() == "/module-item-view") { | |
3195 | + $rootScope.refreshTermListOnAASystemSelection($rootScope.selectedBodySystemId); | |
3196 | + } | |
3197 | + else { | |
3198 | + if ($location.path() == "/module-item-view") { | |
3199 | + $rootScope.refreshTermListOnAASystemSelection($rootScope.selectedBodySystemId); | |
3200 | + } | |
3201 | + else { | |
3202 | + $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId); | |
3203 | + } | |
3204 | + | |
3205 | + } | |
3185 | 3206 | } |
3186 | 3207 | else { |
3187 | - $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId); | |
3208 | + if ($location.path() == "/module-item-view") { | |
3209 | + $rootScope.refreshTermListOnAASystemSelection($rootScope.selectedBodySystemId); | |
3210 | + } | |
3211 | + else { | |
3212 | + $rootScope.refreshTermListOnSystemSelection($rootScope.selectedBodySystemId); | |
3213 | + } | |
3214 | + | |
3188 | 3215 | } |
3189 | - | |
3216 | + | |
3217 | + $timeout(function () { | |
3190 | 3218 | $('#bodySystems option[selected="selected"]').prop("selected", false); |
3191 | 3219 | $('#bodySystems option[value="' + $rootScope.selectedBodySystemName + '"]').prop("selected", true); |
3192 | 3220 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
3193 | 3221 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); |
3194 | - | |
3222 | + }, 1000); | |
3195 | 3223 | } |
3196 | 3224 | $("#optionsListManagerTab").addClass("active"); |
3197 | 3225 | var viewNameAftrSplit = $("#viewName").val().split(" "); |
... | ... | @@ -3201,7 +3229,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3201 | 3229 | } |
3202 | 3230 | |
3203 | 3231 | $rootScope.CloseListManager = function () { |
3204 | - | |
3232 | + | |
3205 | 3233 | $("#btnTranparency").removeAttr('disabled', 'disabled'); |
3206 | 3234 | $("#optionsListManagerTab").removeClass("active"); |
3207 | 3235 | console.log('close'); |
... | ... | @@ -3219,6 +3247,10 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3219 | 3247 | $rootScope.switchCanvasToPaintCanvas(); |
3220 | 3248 | } |
3221 | 3249 | } |
3250 | + if ($location.path() == "/module-item-view") { | |
3251 | + $rootScope.selectedBodySystemName = $("#AABodySystems").val(); | |
3252 | + $rootScope.selectedBodySystemId = $('#AABodySystems option[value="' + $rootScope.selectedBodySystemName + '"]').attr("id"); | |
3253 | + } | |
3222 | 3254 | $('#listManager').css('display', 'none'); |
3223 | 3255 | $("#listManager").css("visibility", "hidden"); |
3224 | 3256 | |
... | ... | @@ -3505,6 +3537,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
3505 | 3537 | }; |
3506 | 3538 | |
3507 | 3539 | $rootScope.ShowPrintPreviewWindow = function (event) { // Print Preview |
3540 | + $(".tools").css("z-index", "1029"); | |
3508 | 3541 | $rootScope.CloseListManager(); |
3509 | 3542 | $rootScope.CloseAnnotationTool(); |
3510 | 3543 | $("#annotationButton").parent().addClass("disableMenuannotation"); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -316,11 +316,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
316 | 316 | }); |
317 | 317 | $(document).on("click", "#ImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { |
318 | 318 | $scope.setActiveTab(parseInt(localStorage.getItem("activeTab"))); |
319 | - //if (localStorage.getItem("activeTab") != null) { | |
320 | - | |
321 | - // $rootScope.isListViewRowClicked = true; | |
322 | - | |
323 | - //} | |
319 | + $(".tools").css("z-index", "15000"); | |
320 | + $rootScope.selectedBodySystemName = 'All'; | |
321 | + $rootScope.selectedBodySystemId = 0; | |
322 | + $rootScope.searchSelectedText = ''; | |
323 | + | |
324 | 324 | }); |
325 | 325 | }) |
326 | 326 | |
... | ... | @@ -1170,10 +1170,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1170 | 1170 | $rootScope.onDrawingCanvasClick(); |
1171 | 1171 | $rootScope.FreeStylePaint(); |
1172 | 1172 | }); |
1173 | - | |
1173 | + | |
1174 | 1174 | $rootScope.loadSearchData = function () { |
1175 | - | |
1176 | - | |
1175 | + | |
1176 | + //$("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
1177 | 1177 | var imageId = $rootScope.imageId; |
1178 | 1178 | var promise = ModuleService.getTermTextDataForAAImage(imageId) |
1179 | 1179 | .then( |
... | ... | @@ -1190,32 +1190,49 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1190 | 1190 | .from($scope.AAPinTermData) |
1191 | 1191 | .where('_LanguageId == ' + primaryLexicon) |
1192 | 1192 | .select(); |
1193 | - | |
1193 | + var sortedTermTextArray = []; | |
1194 | 1194 | for (var i = 0; i < $scope.matchedLanguageTermData.length; i++) { |
1195 | - $scope.pinTermData.push({ "LanguageId": $scope.matchedLanguageTermData[i]._LanguageId, "TermNumber": $scope.matchedLanguageTermData[i]._TermNumber, "TermTxt": $scope.matchedLanguageTermData[i]._TermText}); | |
1195 | + sortedTermTextArray.push($scope.matchedLanguageTermData[i]._TermText); | |
1196 | + sortedTermTextArray.sort(); | |
1196 | 1197 | } |
1198 | + | |
1199 | + for (var i = 0; i <= sortedTermTextArray.length - 1; i++) { | |
1200 | + for (var j = 0; j <= $scope.matchedLanguageTermData.length - 1; j++) { | |
1201 | + if ($scope.matchedLanguageTermData[j]._TermText == sortedTermTextArray[i]) { | |
1202 | + $scope.pinTermData.push({ "LanguageId": $scope.matchedLanguageTermData[j]._LanguageId, "TermNumber": $scope.matchedLanguageTermData[j]._TermNumber, "TermTxt": $scope.matchedLanguageTermData[j]._TermText }); | |
1203 | + break; | |
1204 | + } | |
1205 | + } | |
1206 | + } | |
1207 | + | |
1208 | + | |
1197 | 1209 | $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) { |
1198 | - if ($('#termlistfilter').html() != "") | |
1199 | - $('#termList').empty(); | |
1200 | - $('#termlistfilter').empty() | |
1210 | + | |
1211 | + if (($('#termlistfilter').html() != "")) | |
1212 | + | |
1213 | + $('#termlistfilter').empty(); | |
1201 | 1214 | if ($scope.pinTermData.length > 0) { |
1202 | 1215 | $timeout(function () { |
1203 | 1216 | console.log('pinTermData= ' + $scope.pinTermData.length); |
1217 | + $('#termList').empty(); | |
1204 | 1218 | for (var j = 0; j < $scope.pinTermData.length; j++) { |
1205 | 1219 | var $el = $('<li><a id= "' + $scope.pinTermData[j].TermNumber + '" href="" onclick="onSearchItemSelection(event)" >' + $scope.pinTermData[j].TermTxt + '</a></li>').appendTo('#termlistfilter') |
1206 | 1220 | $compile($el)($scope); |
1207 | - var $selectedOptions = $('<option id= "' + $scope.pinTermData[j].TermNumber + '" onclick="onSearchItemSelection(event)" >' + $scope.pinTermData[j].TermTxt + '</option>').appendTo("#termList") | |
1221 | + var $selectedOptions = $('<option title= "' + $scope.pinTermData[j].TermTxt + '" id= "' + $scope.pinTermData[j].TermNumber + '" onclick="onSearchItemSelection(event)" >' + $scope.pinTermData[j].TermTxt + '</option>').appendTo("#termList") | |
1222 | + | |
1208 | 1223 | $compile($selectedOptions)($scope); |
1209 | - $("#bodySystems").empty(); | |
1224 | + | |
1225 | + $("#AABodySystems").empty(); | |
1226 | + $("#bodySystems").css("display","none"); | |
1227 | + $("#AABodySystems").css("display","block"); | |
1210 | 1228 | $("#bodySystemList li a").each(function (key, value) { |
1211 | - var $systemOptions = $('<option id=' + $(this).attr('id') + '>' + $(this).text() + '</option>').appendTo("#bodySystems") | |
1229 | + var $systemOptions = $('<option id=' + $(this).attr('id') + ' >' + $(this).text() + '</option>').appendTo("#AABodySystems") | |
1212 | 1230 | $compile($systemOptions)($scope); |
1213 | 1231 | }); |
1214 | 1232 | } |
1215 | 1233 | }, 500); |
1216 | 1234 | } |
1217 | 1235 | }) |
1218 | - | |
1219 | 1236 | }, |
1220 | 1237 | function (error) { |
1221 | 1238 | // handle errors here |
... | ... | @@ -1228,30 +1245,47 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1228 | 1245 | |
1229 | 1246 | |
1230 | 1247 | $scope.$on('listManagerEvent', function (event, data) { |
1248 | + | |
1231 | 1249 | $("#viewName").empty(); |
1232 | 1250 | $("#viewName").append("<option>" + $rootScope.listArray[0].text + "</option>"); |
1233 | - | |
1234 | 1251 | $rootScope.isLoading = false; |
1235 | 1252 | $('#spinner').css('visibility', 'hidden'); |
1236 | - | |
1253 | + | |
1254 | + if ($rootScope.bodySystemSeletedId == null) { | |
1255 | + | |
1256 | + $rootScope.loadSearchData(); | |
1257 | + } | |
1258 | + else | |
1259 | + { | |
1260 | + | |
1261 | + $rootScope.refreshTermListOnAASystemSelection($rootScope.bodySystemSeletedId); | |
1262 | + } | |
1263 | + $timeout(function () { | |
1264 | + $("#totalTerms").empty(); | |
1265 | + $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
1266 | + }, 1000); | |
1237 | 1267 | }); |
1238 | 1268 | |
1239 | 1269 | |
1240 | 1270 | |
1241 | - $scope.refreshTermListOnSystemSelection = function (bodySystemId) { | |
1242 | - var bodySystemName = $("#bodySystems #" + bodySystemId).val(); | |
1243 | - | |
1271 | + $rootScope.refreshTermListOnAASystemSelection = function (bodySystemId) { | |
1272 | + | |
1273 | + $rootScope.bodySystemSeletedId = bodySystemId; | |
1274 | + $('#termList').empty(); | |
1275 | + var bodySystemName = $("#AABodySystems #" + bodySystemId).val(); | |
1244 | 1276 | if (bodySystemName == "All") { |
1245 | 1277 | for (var j = 0; j <= $scope.pinTermData.length - 1; j++) { |
1246 | - var $selectedOptions = $('<option id= "' + $scope.pinTermData[j].TermNumber + '" >' + $scope.pinTermData[j].TermTxt + '</option>').appendTo("#termList") | |
1278 | + var $selectedOptions = $('<option title= "' + $scope.pinTermData[j].TermTxt + '" id= "' + $scope.pinTermData[j].TermNumber + '" onclick="onSearchItemSelection(event)">' + $scope.pinTermData[j].TermTxt + '</option>').appendTo("#termList") | |
1247 | 1279 | $compile($selectedOptions)($scope); |
1248 | 1280 | } |
1281 | + $("#totalTerms").empty(); | |
1282 | + $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
1249 | 1283 | } |
1250 | 1284 | else { |
1251 | 1285 | var imageId = $rootScope.imageId; |
1252 | 1286 | $scope.pinDataUrl = "aa_dat_pinterm_" + imageId; |
1253 | 1287 | $rootScope.bodySystemTermArray = []; |
1254 | - $('#termList').empty(); | |
1288 | + | |
1255 | 1289 | $.ajax({ |
1256 | 1290 | url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json', |
1257 | 1291 | type: 'GET', |
... | ... | @@ -1267,7 +1301,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1267 | 1301 | if ($scope.aaPinData[i]._TermId == $rootScope.bodySystemTermArray[j].termNumbr) { |
1268 | 1302 | if ($rootScope.bodySystemTermArray[j].language == "1") { |
1269 | 1303 | console.log($rootScope.bodySystemTermArray[j].text); |
1270 | - var $selectedOptions = $('<option id= "' + $rootScope.bodySystemTermArray[j].termNumbr + '" >' + $rootScope.bodySystemTermArray[j].text + '</option>').appendTo("#termList") | |
1304 | + var $selectedOptions = $('<option title= "' + $rootScope.bodySystemTermArray[j].text + '" id= "' + $rootScope.bodySystemTermArray[j].termNumbr + '" onclick="onSearchItemSelection(event)">' + $rootScope.bodySystemTermArray[j].text + '</option>').appendTo("#termList") | |
1271 | 1305 | $compile($selectedOptions)($scope); |
1272 | 1306 | } |
1273 | 1307 | } |
... | ... | @@ -1275,8 +1309,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1275 | 1309 | } |
1276 | 1310 | } |
1277 | 1311 | } |
1278 | - | |
1279 | 1312 | }); |
1313 | + $("#totalTerms").empty(); | |
1314 | + $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); | |
1280 | 1315 | } |
1281 | 1316 | } |
1282 | 1317 | $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) { |
... | ... | @@ -1496,31 +1531,19 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1496 | 1531 | |
1497 | 1532 | $scope.highlightPinBasedOnSerachItem = function (event) { |
1498 | 1533 | |
1499 | - if ($scope.isTermListOptionClicked == true) { | |
1500 | - $scope.searchItemId = event; | |
1501 | - $scope.searchItemText = event.innerHTML; | |
1502 | - $('#termList option[selected="selected"]').prop("selected", false); | |
1503 | - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); | |
1504 | - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); | |
1505 | - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
1506 | - $scope.searchFilter = event.innerHTML; | |
1507 | - selectedTermName.placeholder = event.innerHTML; | |
1508 | - $scope.isTermListOptionClicked = false; | |
1509 | - } | |
1510 | - else | |
1511 | - { | |
1512 | 1534 | $scope.searchItemId = event.currentTarget.id; |
1513 | 1535 | $scope.searchItemText = event.currentTarget.innerHTML; |
1536 | + $rootScope.searchSelectedText = $("#" + event.currentTarget.id).text(); | |
1514 | 1537 | $('#termList option[selected="selected"]').prop("selected", false); |
1515 | 1538 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); |
1516 | 1539 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
1517 | 1540 | $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); |
1518 | 1541 | |
1542 | + $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" }); | |
1543 | + $("#termlistfilter li #" + $scope.searchItemId).css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
1519 | 1544 | $scope.searchFilter = event.currentTarget.innerHTML; |
1520 | 1545 | selectedTermName.placeholder = event.currentTarget.innerHTML; |
1521 | 1546 | |
1522 | - } | |
1523 | - | |
1524 | 1547 | |
1525 | 1548 | //get data from pindata for this trem |
1526 | 1549 | |
... | ... | @@ -1566,20 +1589,19 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1566 | 1589 | } |
1567 | 1590 | } |
1568 | 1591 | } |
1569 | - | |
1570 | - | |
1571 | - | |
1592 | + | |
1572 | 1593 | }]); |
1573 | 1594 | |
1574 | 1595 | |
1575 | -function refreshTermListOnSystem(bodySystemId) { | |
1576 | - // alert('refreshTermListOnSystem is called outside'); | |
1577 | - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1578 | - scope.$apply(function () { | |
1579 | - scope.refreshTermListOnSystemSelection(bodySystemId); | |
1596 | +function refreshTermListOnSystemSel(bodySystemId) { | |
1597 | + | |
1598 | + var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1599 | + rootScope.$apply(function () { | |
1600 | + rootScope.refreshTermListOnAASystemSelection(bodySystemId); | |
1580 | 1601 | }); |
1581 | 1602 | } |
1582 | 1603 | |
1604 | + | |
1583 | 1605 | function showSelectedSystemPins(event) { |
1584 | 1606 | console.log('OnBodySystem chnaged is called outside '); |
1585 | 1607 | var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); |
... | ... | @@ -1628,14 +1650,14 @@ function onSearchItemSelection(event) { |
1628 | 1650 | }); |
1629 | 1651 | } |
1630 | 1652 | |
1631 | -function onListManagerTermSelection(event) { | |
1632 | - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1633 | - scope.isTermListOptionClicked = true; | |
1634 | - scope.$apply(function () { | |
1635 | - scope.highlightPinBasedOnSerachItem(event); | |
1636 | - }); | |
1653 | +//function onListManagerTermSelection(event) { | |
1654 | +// var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1655 | +// scope.isTermListOptionClicked = true; | |
1656 | +// scope.$apply(function () { | |
1657 | +// scope.highlightPinBasedOnSerachItem1(event); | |
1658 | +// }); | |
1637 | 1659 | |
1638 | -} | |
1660 | +//} | |
1639 | 1661 | |
1640 | 1662 | |
1641 | 1663 | function showHideAnnotation(event) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/TermService.js
0 → 100644
1 | +AIA.factory('TermService', function ($http, $q) { | |
2 | + return { | |
3 | + getTermData: function (layerNo, BodyViewId, systemNo, zoomLevel) { | |
4 | + | |
5 | + var deferred = $q.defer(); | |
6 | + //var URL = 'http://localhost:86/api/PixelLocations?layerNumber=' + layerNo + '&bodyViewIndex=' + BodyViewId + '&systemNumber=' + systemNo + '&zoomLevel=' + zoomLevel + '' | |
7 | + var URL = '/API/api/PixelLocations?layerNumber=' + layerNo + '&bodyViewIndex=' + BodyViewId + '&systemNumber=' + systemNo + '&zoomLevel=' + zoomLevel + '' | |
8 | + | |
9 | + $http({ | |
10 | + method: 'get', | |
11 | + url: URL, | |
12 | + headers: { | |
13 | + 'Content-Type': 'application/json', | |
14 | + } | |
15 | + | |
16 | + }) | |
17 | + .success(function (data, status, headers, config) { | |
18 | + | |
19 | + console.log('success') | |
20 | + deferred.resolve(data); | |
21 | + }).error(function (data, status, headers, config) { | |
22 | + console.log('error status= ' + status) | |
23 | + deferred.reject(status); | |
24 | + }); | |
25 | + return deferred.promise; | |
26 | + }, | |
27 | + } | |
28 | +}) | |
0 | 29 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -597,7 +597,7 @@ |
597 | 597 | </div> |
598 | 598 | <div id="setting-spinner" style="display:none;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 1234; overflow: auto; width: 100px;"> |
599 | 599 | <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading"> |
600 | - </div> | |
600 | + </div> | |
601 | 601 | <!--Annotation Modal--> |
602 | 602 | <div class="annotationTollbar" style="width: 300px;position: fixed; top: 80px; right: 20px; display: none; z-index: 1200000;"> |
603 | 603 | <div class="annotationbar"> |
... | ... | @@ -846,13 +846,13 @@ |
846 | 846 | </div> |
847 | 847 | |
848 | 848 | <div id="restrictListDiv" style="display:none;"> |
849 | - | |
850 | 849 | <div class="well well-sm marginTopBtm10"> |
851 | 850 | <div class="form-horizontal"> |
852 | 851 | <div class="form-group"> |
853 | 852 | <label class="col-sm-4 control-label" for="System">System</label> |
854 | 853 | <div class="col-sm-8"> |
855 | 854 | <select id="bodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystem(this.options[this.selectedIndex].id)"></select> |
855 | + <select id="AABodySystems" class="form-control" onchange="if (typeof (this.selectedIndex) != 'undefined') refreshTermListOnSystemSel(this.options[this.selectedIndex].id)" style="display:none;" ></select> | |
856 | 856 | </div> |
857 | 857 | </div> |
858 | 858 | <div class="form-group"> |
... | ... | @@ -1433,6 +1433,7 @@ |
1433 | 1433 | <script src="app/services/ModuleService.js"></script> |
1434 | 1434 | |
1435 | 1435 | <script src="app/services/DataService.js"></script> |
1436 | + <script src="app/services/TermService.js"></script> | |
1436 | 1437 | <script src="libs/jquery/jquery_plugin/jqueryui.js"></script> |
1437 | 1438 | |
1438 | 1439 | <script src="libs/jquery/jquery_plugin/color-picker/jquery.minicolors.min.js"></script> | ... | ... |