Commit 74b4c993a1dcff1610c8e25db8e0b1a25a932de4

Authored by Mukul Rajput
1 parent 5bd0714d

this is revert back of Tileviewcontroller and Tileviewhml with version 77

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -10,7 +10,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -10,7 +10,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
10 var CLINICAL_ILLUSTRATION = 'Clinical Illustrations'; 10 var CLINICAL_ILLUSTRATION = 'Clinical Illustrations';
11 var CLINICAL_ANIMATION = 'Clinical Animations'; 11 var CLINICAL_ANIMATION = 'Clinical Animations';
12 $rootScope.closeBtnImgPath = "~/../content/images/speeachBubbleClose.png"; 12 $rootScope.closeBtnImgPath = "~/../content/images/speeachBubbleClose.png";
13 - $rootScope.listArray = [];  
14 //variables to bind Filter by Controls 13 //variables to bind Filter by Controls
15 $scope.searchAAListViewData = []; 14 $scope.searchAAListViewData = [];
16 $scope.SelectedAAthumbImage = []; 15 $scope.SelectedAAthumbImage = [];
@@ -49,8 +48,61 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -49,8 +48,61 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
49 } 48 }
50 else { 49 else {
51 50
  51 +
52 $('#grid-view').css("display", "none"); 52 $('#grid-view').css("display", "none");
53 - $('#list-view').css("display", "block"); 53 + if ($scope.isListViewDataLoaded == true) {
  54 + var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName)
  55 + .then(
  56 + function (result) {
  57 + // alert(JSON.stringify($scope.moduleLandingData));
  58 + $scope.moduleLandingData = result;
  59 + $scope.selectedAAListViewData = new jinqJs()
  60 + .from($scope.moduleLandingData.data.root.Item)
  61 + .orderBy([{ field: '_Title', sort: 'asc' }])
  62 + .select();
  63 + var htm = '';
  64 + htm += "<table class='table table-hover table-fixed bg-white table-txt12'> <thead class='clsthead'><tr class='active'><th width='25%'>Title</th> <th width='15%'>Region</th> <th width='30%'>System</th><th width='15%'>View</th> <th width='15%'>Type</th></tr></thead><tbody class='clstbody'>";
  65 + angular.forEach($scope.selectedAAListViewData, function (value, key) {
  66 + htm += "<tr id=" + value._Id + " onclick='openListViewModuleItem(event)' ondblclick='openModuleItemView(event)'>"
  67 + htm += '<td width="25%">' + value._Title + '</td><td width="15%">' + value._BodyRegion + '</td><td width="30%">' + value._BodySystem + '</td><td width="15%">' + value._ViewOrientation + '</td><td width="15%">' + value._ImageType + '</td>';
  68 + htm += "</tr>"
  69 + });
  70 + htm += "</tbody></table>";
  71 + $("#list-view").html(htm);
  72 + $compile(htm)($scope);
  73 + });
  74 + $('#list-view').css("display", "block");
  75 + $scope.isListViewDataLoaded = false;
  76 + }
  77 + else {
  78 + $('#list-view').css("display", "block");
  79 + }
  80 +
  81 + $timeout(function () {
  82 + // if ($rootScope.isListViewRowClicked == true) {
  83 + // $rootScope.isListViewRowClicked = false;
  84 + $("#demoView").remove();
  85 + $("#viewList").append("<div class='col-xs-12 text-center' style='padding-top:15px;padding-bottom:15px;' id='demoView'><div class='col-xs-12' style='padding:15px;background-color:#fff;'><div class='col-xs-2' style='border:1px solid #000;padding:5px;color:#000;font-size:12px;'><div class='thumbnail' style='margin-bottom:10px;'><img style='width:auto;height:95px!important;' src=" + $rootScope.listArray[0].imageName + "></div><div class='col-xs-12' id='demoText' style='padding:0;'>" + $rootScope.listArray[0].text + "</div></div></div><a style='position:absolute;right:30px;bottom:34px;' onclick='openCurrentView(event)' href='javascript:void(0)' class='pull-right btn btn-primary'>Open</a></div>");
  86 + var moduleItemDataToBeSavedID
  87 + $("#list-view table tbody tr").removeClass("active");
  88 + var moduleItemDataToBeSavedID = $rootScope.getLocalStorageValue("listViewSelectedID");
  89 + $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active");
  90 + $scope.isListViewButtonClicked = true;
  91 + var curAAListViewScroll = $rootScope.getLocalStorageValue("AAListViewScroll");
  92 +
  93 + if (typeof (curAAListViewScroll) !== "undefined" && curAAListViewScroll !== null && curAAListViewScroll !== '') {
  94 + if (typeof InstallTrigger !== 'undefined') {
  95 +
  96 + $('#list-view table tbody').animate({ scrollTop: $rootScope.getLocalStorageValue("AAListViewScroll") });
  97 + }
  98 + else {
  99 +
  100 + $('#list-view table tbody').scrollTop($rootScope.getLocalStorageValue("AAListViewScroll"));
  101 + }
  102 +
  103 + }
  104 + // }
  105 + }, 2000);
54 } 106 }
55 }; 107 };
56 108
@@ -74,6 +126,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -74,6 +126,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
74 126
75 $scope.moduleLandingData = result; 127 $scope.moduleLandingData = result;
76 // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100); 128 // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100);
  129 +
77 setTimeout(function () { 130 setTimeout(function () {
78 if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) { 131 if ($rootScope.getLocalStorageValue('AAGridViewHighlightThumbnail') !== null) {
79 $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); 132 $('#' + $rootScope.getLocalStorageValue("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail');
@@ -82,6 +135,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -82,6 +135,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
82 $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow'); 135 $('html, body').animate({ scrollTop: $rootScope.getLocalStorageValue('AAGridViewScroll') }, 'slow');
83 } 136 }
84 }, 100); 137 }, 100);
  138 +
85 //console.log(JSON.stringify(result, null, 4)); 139 //console.log(JSON.stringify(result, null, 4));
86 }, 140 },
87 function (error) { 141 function (error) {
@@ -89,7 +143,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -89,7 +143,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
89 console.log(' error: ' + error.statusText); 143 console.log(' error: ' + error.statusText);
90 } 144 }
91 ) 145 )
92 - $('#list-view').css('display', 'none'); 146 +
93 } 147 }
94 148
95 //$scope.$on('$viewContentLoaded', function (event) { 149 //$scope.$on('$viewContentLoaded', function (event) {
@@ -99,19 +153,20 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -99,19 +153,20 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
99 //}); 153 //});
100 $scope.isOpenBtnClicked = false; 154 $scope.isOpenBtnClicked = false;
101 $scope.openModuleItemView = function (event) { 155 $scope.openModuleItemView = function (event) {
  156 +
102 $rootScope.MenuModuleName = "AA"; 157 $rootScope.MenuModuleName = "AA";
103 localStorage.setItem("activeTab", $scope.activeTab); 158 localStorage.setItem("activeTab", $scope.activeTab);
104 //0. Get selected Image Id 159 //0. Get selected Image Id
105 if ($scope.isListViewButtonClicked == true) { 160 if ($scope.isListViewButtonClicked == true) {
106 if ($scope.isOpenBtnClicked == true) { 161 if ($scope.isOpenBtnClicked == true) {
107 162
108 - var moduleItemDataToBeSaved = $("#demoText").text().trim(); 163 + var moduleItemDataToBeSaved = $("#demoText").html();
109 $scope.isOpenBtnClicked = false; 164 $scope.isOpenBtnClicked = false;
110 } 165 }
111 else { 166 else {
112 var moduleItemDataToBeSavedID = event.currentTarget.id; 167 var moduleItemDataToBeSavedID = event.currentTarget.id;
113 localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); 168 localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID);
114 - var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); 169 + var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text();
115 } 170 }
116 } 171 }
117 else { 172 else {
@@ -129,7 +184,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -129,7 +184,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
129 $rootScope.bodySystemName = $rootScope.OpenedTileData[2]; 184 $rootScope.bodySystemName = $rootScope.OpenedTileData[2];
130 $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; 185 $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3];
131 $scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; 186 $scope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3];
132 - //$rootScope.listArray = []; 187 + $rootScope.listArray = [];
133 $rootScope.listArray.push({ "imageName": $rootScope.OpenItemImagePath, "text": moduleItemDataToBeSaved }); 188 $rootScope.listArray.push({ "imageName": $rootScope.OpenItemImagePath, "text": moduleItemDataToBeSaved });
134 //3. set opened module item ti 189 //3. set opened module item ti
135 localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]); 190 localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]);
@@ -139,6 +194,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -139,6 +194,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
139 //3. Navigate to the Module-item-view 194 //3. Navigate to the Module-item-view
140 var u = $location.url(); 195 var u = $location.url();
141 $location.url('/module-item-view'); 196 $location.url('/module-item-view');
  197 +
142 } 198 }
143 199
144 200
@@ -150,7 +206,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -150,7 +206,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
150 localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID); 206 localStorage.setItem("listViewSelectedID", moduleItemDataToBeSavedID);
151 $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active"); 207 $("#list-view table tbody #" + moduleItemDataToBeSavedID).addClass("active");
152 localStorage.setItem("AAListViewScroll", $("#list-view table tbody").scrollTop()); 208 localStorage.setItem("AAListViewScroll", $("#list-view table tbody").scrollTop());
153 - var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text().trim(); 209 + var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text();
154 $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData); 210 $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData);
155 $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3]; 211 $rootScope.OpenItemImagePath = "../../../content/images/aa/images/" + $rootScope.OpenedTileData[3];
156 $rootScope.listArray = []; 212 $rootScope.listArray = [];
@@ -160,6 +216,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -160,6 +216,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
160 216
161 217
162 $scope.openModuleItem = function () { 218 $scope.openModuleItem = function () {
  219 +
163 if ($rootScope.refreshcheck == null) { 220 if ($rootScope.refreshcheck == null) {
164 $location.path('/'); 221 $location.path('/');
165 } 222 }
@@ -219,7 +276,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -219,7 +276,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
219 $scope.imageWidth = this.width; 276 $scope.imageWidth = this.width;
220 $scope.imageHeight = this.height; 277 $scope.imageHeight = this.height;
221 278
  279 + //$('#aaBodyView').css("height", $(window).outerHeight());
222 280
  281 + //$('#aaBodyView').css("width", $(window).outerWidth());
223 $timeout(function () { 282 $timeout(function () {
224 $compile(aaViewElement.contents())($scope); 283 $compile(aaViewElement.contents())($scope);
225 284
@@ -256,8 +315,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -256,8 +315,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
256 canvas.style.position = "absolute"; 315 canvas.style.position = "absolute";
257 $("#canvasDiv").append(canvas); 316 $("#canvasDiv").append(canvas);
258 $scope.context = canvas.getContext("2d") 317 $scope.context = canvas.getContext("2d")
  318 +
259 //6. Show all pins on AA opened item 319 //6. Show all pins on AA opened item
260 $scope.showAllPins(); 320 $scope.showAllPins();
  321 +
261 //7. Highlight all system body list in left side 322 //7. Highlight all system body list in left side
262 $scope.highlightBodySystemList(); 323 $scope.highlightBodySystemList();
263 } 324 }
@@ -275,12 +336,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -275,12 +336,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
275 var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a"); 336 var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a");
276 var bodySystemListlength = bodySystemListObj.length; 337 var bodySystemListlength = bodySystemListObj.length;
277 for (var i = 0; i < bodySystemListlength; i++) { 338 for (var i = 0; i < bodySystemListlength; i++) {
  339 +
278 //var boldTag = lis[i]; 340 //var boldTag = lis[i];
279 for (var j = 0; j < $rootScope.bodySystemNames.length; j++) { 341 for (var j = 0; j < $rootScope.bodySystemNames.length; j++) {
280 if ((bodySystemListObj[i].innerHTML) == ($rootScope.bodySystemNames[j])) { 342 if ((bodySystemListObj[i].innerHTML) == ($rootScope.bodySystemNames[j])) {
281 $("#" + i).parent().removeClass("disabledSelectedSystem"); 343 $("#" + i).parent().removeClass("disabledSelectedSystem");
282 344
283 } 345 }
  346 +
284 } 347 }
285 348
286 } 349 }
@@ -310,7 +373,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -310,7 +373,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
310 373
311 $scope.allPinDataArray = []; 374 $scope.allPinDataArray = [];
312 var promise = ModuleService.getPinDataForImage($rootScope.imageName) 375 var promise = ModuleService.getPinDataForImage($rootScope.imageName)
313 -  
314 .then( 376 .then(
315 function (result) { 377 function (result) {
316 378
@@ -333,9 +395,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -333,9 +395,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
333 $scope.allPinDataArray.push(value._PinId); 395 $scope.allPinDataArray.push(value._PinId);
334 $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY) 396 $scope.drawStaticPinsOnImage('aaDetailViewCanvas', value._PinId, value._PinX, value._PinY, value._HeadX, value._HeadY)
335 }) 397 })
336 -  
337 -  
338 -  
339 //load search/vocab data 398 //load search/vocab data
340 $rootScope.loadSearchData(); 399 $rootScope.loadSearchData();
341 } 400 }
@@ -356,11 +415,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -356,11 +415,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
356 415
357 416
358 $scope.FilterByImage = function (moduleId, query) { 417 $scope.FilterByImage = function (moduleId, query) {
359 - $scope.moduleId = moduleId;  
360 - $scope.filterstring = true;  
361 418
362 - console.log('loadForModuleById is called'); 419 + $scope.moduleId = moduleId;
363 420
  421 + console.log('loadForModuleById is called')
364 $rootScope.moduleName = Modules[moduleId].Name; 422 $rootScope.moduleName = Modules[moduleId].Name;
365 while ($scope.searchAAListViewData.length) { 423 while ($scope.searchAAListViewData.length) {
366 $scope.searchAAListViewData.pop(); 424 $scope.searchAAListViewData.pop();
@@ -469,11 +527,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -469,11 +527,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
469 527
470 if (selectimg === true && count >= filtercount) { 528 if (selectimg === true && count >= filtercount) {
471 529
  530 +
472 $scope.imagePath = "../content/images/aa/thumbnails/" + value._TileImageName; 531 $scope.imagePath = "../content/images/aa/thumbnails/" + value._TileImageName;
473 532
474 533
475 - var $el = $('<div id="' + value._Title + '" class="col-sm-3 col-lg-2" title = "' + value._Title + '" data-ng-click="openModuleItemView($event)">'  
476 - + '<div class="thumbnail" ><a href="#">' 534 + var $el = $('<div id="' + value._id + '" class="col-sm-3 col-lg-2" title = "' + value._Title + '" data-ng-click="openModuleItemView($event)">'
  535 + + '<div class="thumbnail" >'
477 + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >' 536 + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >'
478 + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view'); 537 + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view');
479 538
@@ -488,7 +547,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -488,7 +547,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
488 547
489 $scope.searchAAListViewData.push( 548 $scope.searchAAListViewData.push(
490 { 549 {
491 - "_Id": value._Id, 550 + "_id": value._id,
492 "_ImageId": value._ImageId, 551 "_ImageId": value._ImageId,
493 "_Title": value._Title, 552 "_Title": value._Title,
494 "_ImageName": value._contentImage, 553 "_ImageName": value._contentImage,
@@ -500,28 +559,29 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -500,28 +559,29 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
500 //"$$hashKey": value._Summary 559 //"$$hashKey": value._Summary
501 560
502 }); 561 });
503 - console.log($scope.searchAAListViewData);  
504 - if ($('#searchItem').length > 0)  
505 - $('#searchItem').remove(); 562 +
506 } 563 }
  564 +
  565 +
507 }); 566 });
508 567
509 - //Show Error Message in case of gridview/ ListView [if no data is found] 568 + //Show Error Message in case of gridview if no data is found
510 if ($scope.searchAAListViewData.length == 0) { 569 if ($scope.searchAAListViewData.length == 0) {
  570 +
511 var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white">No illustration found for the selected search criteria!</strong></div>').appendTo('#grid-view'); 571 var $el = $('<div class="col-sm-12" style="padding-left:25px;padding-top:10px;"><strong style="color:white">No illustration found for the selected search criteria!</strong></div>').appendTo('#grid-view');
512 $compile($el)($scope); 572 $compile($el)($scope);
513 $('table > #ListViewDiv > #searchItem').remove(); 573 $('table > #ListViewDiv > #searchItem').remove();
514 574
515 $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>'); 575 $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>');
516 } 576 }
517 - //console.log(JSON.stringify(result, null, 4));  
518 - console.log('SearchAAListViewData--' + $scope.searchAAListViewData); 577 + console.log(JSON.stringify(result, null, 4));
519 }, 578 },
520 function (error) { 579 function (error) {
521 // handle errors here 580 // handle errors here
522 console.log(' error: ' + error.statusText); 581 console.log(' error: ' + error.statusText);
523 } 582 }
524 ) 583 )
  584 +
525 } 585 }
526 586
527 $scope.Reset = function (moduleId, query) { 587 $scope.Reset = function (moduleId, query) {
@@ -545,8 +605,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -545,8 +605,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
545 605
546 $('#ListViewDiv').scrollTop(0); 606 $('#ListViewDiv').scrollTop(0);
547 607
548 - if ($('#demoView').length > 0)  
549 - $('#demoView').remove();  
550 // $scope.HideListViewDiv(); 608 // $scope.HideListViewDiv();
551 609
552 $scope.filterstring = false; 610 $scope.filterstring = false;
@@ -560,6 +618,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -560,6 +618,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
560 618
561 $scope.showSelectedSystemPins = function (event) { 619 $scope.showSelectedSystemPins = function (event) {
562 620
  621 +
563 var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a"); 622 var bodySystemListObj = document.getElementById("bodySystemList").getElementsByTagName("a");
564 var bodySystemListlength = bodySystemListObj.length; 623 var bodySystemListlength = bodySystemListObj.length;
565 for (var i = 0; i < bodySystemListlength; i++) { 624 for (var i = 0; i < bodySystemListlength; i++) {
@@ -1192,6 +1251,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1192,6 +1251,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1192 sortedTermTextArray.sort(); 1251 sortedTermTextArray.sort();
1193 } 1252 }
1194 1253
  1254 +
1195 for (var i = 0; i <= sortedTermTextArray.length - 1; i++) { 1255 for (var i = 0; i <= sortedTermTextArray.length - 1; i++) {
1196 for (var j = 0; j <= $scope.matchedLanguageTermData.length - 1; j++) { 1256 for (var j = 0; j <= $scope.matchedLanguageTermData.length - 1; j++) {
1197 if ($scope.matchedLanguageTermData[j]._TermText == sortedTermTextArray[i]) { 1257 if ($scope.matchedLanguageTermData[j]._TermText == sortedTermTextArray[i]) {
@@ -1203,9 +1263,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1203,9 +1263,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1203 1263
1204 1264
1205 $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) { 1265 $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) {
1206 -  
1207 if (($('#termlistfilter').html() != "")) 1266 if (($('#termlistfilter').html() != ""))
1208 -  
1209 $('#termlistfilter').empty(); 1267 $('#termlistfilter').empty();
1210 if ($scope.pinTermData.length > 0) { 1268 if ($scope.pinTermData.length > 0) {
1211 $timeout(function () { 1269 $timeout(function () {
@@ -1266,6 +1324,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1266,6 +1324,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1266 1324
1267 1325
1268 $rootScope.refreshTermListOnAASystemSelection = function (bodySystemId) { 1326 $rootScope.refreshTermListOnAASystemSelection = function (bodySystemId) {
  1327 +
1269 $rootScope.bodySystemSeletedId = bodySystemId; 1328 $rootScope.bodySystemSeletedId = bodySystemId;
1270 $('#termList').empty(); 1329 $('#termList').empty();
1271 var bodySystemName = $("#AABodySystems #" + bodySystemId).val(); 1330 var bodySystemName = $("#AABodySystems #" + bodySystemId).val();
@@ -1274,6 +1333,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1274,6 +1333,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1274 var $selectedOptions = $('<option title= "' + $scope.pinTermData[j].TermTxt + '" id= "' + $scope.pinTermData[j].TermNumber + '">' + $scope.pinTermData[j].TermTxt + '</option>').appendTo("#termList") 1333 var $selectedOptions = $('<option title= "' + $scope.pinTermData[j].TermTxt + '" id= "' + $scope.pinTermData[j].TermNumber + '">' + $scope.pinTermData[j].TermTxt + '</option>').appendTo("#termList")
1275 1334
1276 $compile($selectedOptions)($scope); 1335 $compile($selectedOptions)($scope);
  1336 +
1277 } 1337 }
1278 $("#totalTerms").empty(); 1338 $("#totalTerms").empty();
1279 $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>"); 1339 $("#totalTerms").html("<span class='pull-left marginTop5'>" + $("#termList option").length + " Structures</span>");
@@ -1370,7 +1430,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1370,7 +1430,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1370 1430
1371 $scope.showAllPinsAfterHide = function (event) { 1431 $scope.showAllPinsAfterHide = function (event) {
1372 1432
1373 -  
1374 $rootScope.isLoading = true; 1433 $rootScope.isLoading = true;
1375 $('#spinner').css('visibility', 'visible'); 1434 $('#spinner').css('visibility', 'visible');
1376 1435
@@ -1400,6 +1459,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1400,6 +1459,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1400 1459
1401 $scope.showSelectedPins = function () { 1460 $scope.showSelectedPins = function () {
1402 1461
  1462 +
1403 $rootScope.isLoading = true; 1463 $rootScope.isLoading = true;
1404 $('#spinner').css('visibility', 'visible'); 1464 $('#spinner').css('visibility', 'visible');
1405 1465
@@ -1435,7 +1495,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1435,7 +1495,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1435 } 1495 }
1436 1496
1437 } 1497 }
1438 -  
1439 }; 1498 };
1440 1499
1441 1500
@@ -1456,6 +1515,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1456,6 +1515,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1456 var pinName = 'Pin_' + value1.id; 1515 var pinName = 'Pin_' + value1.id;
1457 var pinArcName = 'PinArc_' + value1.id; 1516 var pinArcName = 'PinArc_' + value1.id;
1458 1517
  1518 +
1459 $('#aaDetailViewCanvas').setLayer(pinName, { 1519 $('#aaDetailViewCanvas').setLayer(pinName, {
1460 visible: true // set to true instead to show the layer again 1520 visible: true // set to true instead to show the layer again
1461 }).drawLayers(); 1521 }).drawLayers();
@@ -1463,6 +1523,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1463,6 +1523,8 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1463 $('#aaDetailViewCanvas').setLayer(pinArcName, { 1523 $('#aaDetailViewCanvas').setLayer(pinArcName, {
1464 visible: true // set to true instead to show the layer again 1524 visible: true // set to true instead to show the layer again
1465 }).drawLayers(); 1525 }).drawLayers();
  1526 +
  1527 +
1466 // } 1528 // }
1467 }) 1529 })
1468 1530
@@ -1478,8 +1540,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1478,8 +1540,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1478 $('#aaDetailViewCanvas').setLayer(pinArcName, { 1540 $('#aaDetailViewCanvas').setLayer(pinArcName, {
1479 visible: false // set to true instead to show the layer again 1541 visible: false // set to true instead to show the layer again
1480 }).drawLayers(); 1542 }).drawLayers();
  1543 +
1481 }) 1544 })
1482 1545
  1546 +
1483 } 1547 }
1484 1548
1485 else { 1549 else {
@@ -1603,6 +1667,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1603,6 +1667,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1603 $("#" + $rootScope.annotationArray[i].speechBuubleId).css("display", "none"); 1667 $("#" + $rootScope.annotationArray[i].speechBuubleId).css("display", "none");
1604 $("#" + $rootScope.annotationArray[i].speechBubbleLineId).css("display", "none"); 1668 $("#" + $rootScope.annotationArray[i].speechBubbleLineId).css("display", "none");
1605 } 1669 }
  1670 +
1606 } 1671 }
1607 else { 1672 else {
1608 $rootScope.isShowHideButtonClicked = true; 1673 $rootScope.isShowHideButtonClicked = true;
@@ -1615,8 +1680,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1615,8 +1680,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1615 $("#comment-box").addClass("btn-black"); 1680 $("#comment-box").addClass("btn-black");
1616 1681
1617 } 1682 }
  1683 +
1618 } 1684 }
1619 $scope.activePinOnLayerChange = function () { 1685 $scope.activePinOnLayerChange = function () {
  1686 +
1620 for (var i = 0; i <= $scope.activePinArray.length - 1; i++) { 1687 for (var i = 0; i <= $scope.activePinArray.length - 1; i++) {
1621 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({ 1688 var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
1622 x1: 50, y1: 50, 1689 x1: 50, y1: 50,
@@ -1633,6 +1700,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1633,6 +1700,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1633 } 1700 }
1634 } 1701 }
1635 1702
  1703 +
1636 $scope.activePinOnSliderChange = function () { 1704 $scope.activePinOnSliderChange = function () {
1637 if ($scope.activePinArray.length == 1) { 1705 if ($scope.activePinArray.length == 1) {
1638 for (var i = 0; i <= $scope.allPinDataArray.length - 1; i++) { 1706 for (var i = 0; i <= $scope.allPinDataArray.length - 1; i++) {
@@ -1804,7 +1872,6 @@ function openListViewModuleItem(event) { @@ -1804,7 +1872,6 @@ function openListViewModuleItem(event) {
1804 function openCurrentView(event) { 1872 function openCurrentView(event) {
1805 1873
1806 var scope = angular.element(document.getElementById("list-view")).scope(); 1874 var scope = angular.element(document.getElementById("list-view")).scope();
1807 - scope.isListViewButtonClicked = true;  
1808 scope.isOpenBtnClicked = true; 1875 scope.isOpenBtnClicked = true;
1809 scope.$apply(function () { 1876 scope.$apply(function () {
1810 scope.openModuleItemView(event); 1877 scope.openModuleItemView(event);
400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
@@ -55,8 +55,8 @@ @@ -55,8 +55,8 @@
55 <h6 class="text-center text-primary txt-white f11">Search</h6> 55 <h6 class="text-center text-primary txt-white f11">Search</h6>
56 56
57 <div class="btn-group col-xs-12" style="padding:0;"> 57 <div class="btn-group col-xs-12" style="padding:0;">
58 - <button type="button" class="btn btn-primary btn-sm col-xs-9" ng-click="Reset(1, query)"><i class="fa fa-eye"></i> Show All</button>  
59 - <button type="button" class="btn btn-primary btn-sm col-xs-3" ng-click="FilterByImage(1, query)"> 58 + <button type="button" class="btn btn-primary btn-sm col-xs-9" ng-click="Reset(1,query)"><i class="fa fa-eye"></i> Show All</button>
  59 + <button type="button" class="btn btn-primary btn-sm col-xs-3" ng-click="FilterByImage(1,query)">
60 <i class="fa fa-search"></i> 60 <i class="fa fa-search"></i>
61 </button> 61 </button>
62 62
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 <!--<div role="tabpanel" class="tab-pane active" id="grid-view">--> 86 <!--<div role="tabpanel" class="tab-pane active" id="grid-view">-->
87 <div role="tabpanel" class="tab-pane active" id="grid-view"> 87 <div role="tabpanel" class="tab-pane active" id="grid-view">
88 <div ng-repeat="(key,val) in moduleLandingData.data.root.Item | orderBy:'_Title' "> 88 <div ng-repeat="(key,val) in moduleLandingData.data.root.Item | orderBy:'_Title' ">
89 - <div id="{{val._Id}}" class="col-sm-3 col-lg-2" title="{{val._Title}}" data-ng-click="openModuleItemView($event)"> 89 + <div id="{{val._Id}}" class="col-sm-3 col-lg-2" title="{{val._Title}}" ng-click="openModuleItemView($event)">
90 <div class="thumbnail"> 90 <div class="thumbnail">
91 <a href="#"> 91 <a href="#">
92 <img class="tinyImg" id="{{val._Title}}" ng-src="../content/images/aa/thumbnails/{{val._TileImageName}}" data-ng-click="openModuleItemView($event)" alt="" title=""> 92 <img class="tinyImg" id="{{val._Title}}" ng-src="../content/images/aa/thumbnails/{{val._TileImageName}}" data-ng-click="openModuleItemView($event)" alt="" title="">
@@ -96,113 +96,31 @@ @@ -96,113 +96,31 @@
96 </div> 96 </div>
97 </div> 97 </div>
98 </div> 98 </div>
99 - <!--<div class="col-xs-12" id="list-view"></div>-->  
100 - <div role="tabpanel" id="list-view" class="col-xs-12">  
101 - <!--ng-class="{'tab-pane active' : activeTab === 2,'tab-pane' : activeTab !==2 }"-->  
102 - <!--<div class="col-sm-12 table-responsive">-->  
103 - <!--<div class="panel col-sm-12 table-responsive" style="padding-left:0px; padding-right:0; margin-left:11px; margin-bottom:0; width:99%;">-->  
104 - <!--<table class="table table-hover table-condensed bg-white" style="padding-left:25px; width:99%">-->  
105 - <table class="table table-hover table-fixed bg-white table-txt12" style="padding-left:25px; width:100%;">  
106 - <thead class="clsthead">  
107 - <tr class="active">  
108 - <th width="25%">Title</th>  
109 - <th width="15%">Region</th>  
110 - <th width="30%">System</th>  
111 - <th width="15%">View</th>  
112 - <th width="25%">Type</th>  
113 - <!--<th width="25%">Specialty</th>-->  
114 - </tr>  
115 - </thead>  
116 - <tbody id="ListViewDiv" ng-if="!filterstring" class="clstbody">  
117 - <tr id="{{val._Id}}" ng-class="{selected: val._Id === idSelected}" data-ng-click="openListViewModuleItem($event)" data-ng-dblclick=" openModuleItemView($event)" ng-repeat="(key,val) in moduleLandingData.data.root.Item | orderBy:'_Title'">  
118 - <td width="25%">  
119 - {{val._Title}}  
120 - </td>  
121 - <td width="15%">  
122 - {{val._BodyRegion}}  
123 - </td>  
124 - <td width="30%">  
125 - {{val._BodySystem}}  
126 - </td>  
127 - <td width="15%">  
128 - {{val._ViewOrientation}}  
129 - </td>  
130 - <td width="25%">  
131 - {{val._ImageType}}  
132 - </td>  
133 - <!--<td width="25%">  
134 - {{item._MedicalSpecialty}}  
135 - </td>-->  
136 - </tr>  
137 - </tbody>  
138 - <tbody id="ListViewDiv" ng-if="filterstring" class="clstbody">  
139 - <tr id="{{item._Id}}" ng-class="{selected: item._Id === idSelected}" data-ng-click="openListViewModuleItem($event)" data-ng-dblclick="openModuleItemView($event)" ng-repeat="item in searchAAListViewData">  
140 - <td width="25%">  
141 - {{item._Title}}  
142 - </td>  
143 - <td width="15%">  
144 - {{item._BodyRegion}}  
145 - </td>  
146 - <td width="30%">  
147 - {{item._BodySystem}}  
148 - </td>  
149 - <td width="15%">  
150 - {{item._ViewOrientation}}  
151 - </td>  
152 - <td width="25%">  
153 - {{item._ImageType}}  
154 - </td>  
155 - <!--<td width="25%">  
156 - {{item._MedicalSpecialty}}  
157 - </td>-->  
158 - </tr>  
159 - <!--<tr ng-if="typeof(searchCIListViewData) == 'undefined' || searchCIListViewData == null || searchCIListViewData == ''">  
160 - <td colspan="6"><strong id="searchItem" style="color:black;">No illustration found for the selected search criteria!</strong></td>  
161 - </tr>-->  
162 -  
163 - </tbody>  
164 - </table>  
165 - <!--</div>-->  
166 - <div class="col-sm-12" ng-show="hiderow" style="padding-left:25px;padding-top:10px;">  
167 - <div class="row well">  
168 - <div title="{{SelectedAATitle}}" class="col-sm-3 col-lg-2 no-padding">  
169 - <div class="thumbnail no-margin">  
170 - <img id="{{SelectedAAId}}" src="{{SelectedAAthumbImage}}" alt="" title="{{SelectedAATitle}}" data-ng-click="openCurrentView($event)">  
171 - </div>  
172 - </div>  
173 - <div class="col-sm-9 col-lg-9" style="padding-left:10px;">  
174 - <p class="f11" ng-bind-html="SelectedAASummary"></p>  
175 - <button id="{{SelectedAAId}}" type="button" class="btn btn-primary btn-sm pull-right" data-ng-click="openCurrentView($event)">Open</button>  
176 - </div>  
177 - </div>  
178 -  
179 - </div>  
180 - </div> 99 + <div class="col-xs-12" id="list-view"></div>
181 </div> 100 </div>
182 </div> 101 </div>
183 - </div>  
184 -</div>  
185 -<script>  
186 - $(function () {  
187 102
188 - $(function () {  
189 - $('[data-toggle="tooltip"]').tooltip();  
190 - })  
191 - });  
192 -</script>  
193 -<script>  
194 - (function ($) {  
195 - $(window).load(function () {  
196 - $(".sidebar").mCustomScrollbar({  
197 - autoHideScrollbar: true,  
198 - //theme:"rounded" 103 + <script>
  104 + $(function () {
  105 +
  106 + $(function () {
  107 + $('[data-toggle="tooltip"]').tooltip();
  108 + })
  109 + });
  110 + </script>
  111 + <script>
  112 + (function ($) {
  113 + $(window).load(function () {
  114 + $(".sidebar").mCustomScrollbar({
  115 + autoHideScrollbar: true,
  116 + //theme:"rounded"
  117 + });
  118 + //alert("side bar DA page");
  119 + });
  120 + })(jQuery);
  121 + </script>
  122 + <script>
  123 + $(function () {
  124 + $(".modal").draggable();
199 }); 125 });
200 - //alert("side bar DA page");  
201 - });  
202 - })(jQuery);  
203 -</script>  
204 -<script>  
205 - $(function () {  
206 - $(".modal").draggable();  
207 - });  
208 -</script>  
209 \ No newline at end of file 126 \ No newline at end of file
  127 + </script>