Commit 43fbaf7767a7db0e8ec18055b596d1112084dad8

Authored by Utkarsh Singh
1 parent f4688c92

Committing updated code

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -36,24 +36,22 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
36 36 $scope.activePinArray = [];
37 37 $scope.showTabButton = true;
38 38 $scope.isListViewDataLoaded = true;
39   - $rootScope.myModuleId = 1;
  39 +
40 40 $scope.setActiveTab = function (tabToSet) {
41   -
  41 +
42 42 $scope.activeTab = tabToSet;
43   - $rootScope.myModuleId = $scope.activeTab;
44 43 localStorage.setItem("activeTab", $scope.activeTab);
45 44 if ($scope.activeTab == 1) {
46   - $('#grid-view').css("display","block");
  45 + $('#grid-view').css("display", "block");
47 46 $('#list-view').css("display", "none");
48 47 $("#demoView").remove();
49 48 }
50   - else
51   - {
52   -
  49 + else {
  50 +
53 51 $('#grid-view').css("display", "none");
54 52 if ($scope.isListViewDataLoaded == true) {
55 53 var htm = '';
56   - htm += "<table class='table table-hover table-fixed bg-white table-txt12'> <thead class='clsthead'><tr class='active'><th width='25%'>Titlemukul</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'>";
  54 + 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'>";
57 55 $.ajax({
58 56 url: '~/../content/data/json/aa/aa_dat_contentlist.json',
59 57 dataType: "json",
... ... @@ -72,11 +70,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
72 70 $('#list-view').css("display", "block");
73 71 $scope.isListViewDataLoaded = false;
74 72 }
75   - else
76   - {
  73 + else {
77 74 $('#list-view').css("display", "block");
78 75 }
79   -
  76 +
80 77 $timeout(function () {
81 78 // if ($rootScope.isListViewRowClicked == true) {
82 79 // $rootScope.isListViewRowClicked = false;
... ... @@ -104,9 +101,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
104 101 }, 2000);
105 102 }
106 103 };
107   -
  104 +
108 105 $scope.loadForModuleById = function (moduleId) {
109   -
  106 + if ($rootScope.refreshcheck == null) {
  107 + $location.path('/');
  108 + }
110 109 $scope.moduleId = moduleId;
111 110 $scope.activeTab = 1;
112 111 console.log('loadForModuleById is called')
... ... @@ -121,7 +120,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
121 120 function (result) {
122 121  
123 122 $scope.moduleLandingData = result;
124   - // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100);
  123 + // setTimeout(function () { $('#' + $rootScope.highlightid).find('.thumbnail').addClass('hightlightstate'); }, 100);
125 124 if (localStorage.getItem('AAGridViewHighlightThumbnail') !== null) {
126 125 setTimeout(function () { $('#' + localStorage.getItem("AAGridViewHighlightThumbnail")).find('.thumbnail').addClass('HightLightThumbnail'); }, 100);
127 126 }
... ... @@ -145,11 +144,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
145 144 $scope.isOpenBtnClicked = false;
146 145 $scope.openModuleItemView = function (event) {
147 146 $rootScope.MenuModuleName = "AA";
148   - localStorage.setItem("activeTab", $scope.activeTab);
  147 + localStorage.setItem("activeTab", $scope.activeTab);
149 148 //0. Get selected Image Id
150 149 if ($scope.isListViewButtonClicked == true) {
151 150 if ($scope.isOpenBtnClicked == true) {
152   -
  151 +
153 152 var moduleItemDataToBeSaved = $("#demoText").html();
154 153 $scope.isOpenBtnClicked = false;
155 154 }
... ... @@ -159,13 +158,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
159 158 var moduleItemDataToBeSaved = $("#list-view table tbody #" + moduleItemDataToBeSavedID).find('td:eq(0)').text();
160 159 }
161 160 }
162   - else
163   - {
  161 + else {
164 162 var moduleItemDataToBeSaved = event.target.id;
165 163 localStorage.setItem("listViewSelectedID", event.currentTarget.id);
166 164 $scope.isListViewButtonClicked = false;
167 165 }
168   -
  166 +
169 167 //1.Filter selected module ietem data and get the pushed opened moduile array object
170 168 $rootScope.OpenedTileData = ModuleService.GetOpenedTileData(moduleItemDataToBeSaved, $scope.moduleLandingData);
171 169  
... ... @@ -181,7 +179,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
181 179 localStorage.setItem("currentViewTitle", $rootScope.OpenedTileData[6]);
182 180 localStorage.setItem("AAGridViewScroll", $($window).scrollTop());
183 181 localStorage.setItem("AAGridViewHighlightThumbnail", $(event.target).parent().parent().parent().attr('id'));
184   -
  182 +
185 183 //3. Navigate to the Module-item-view
186 184 var u = $location.url();
187 185 $location.url('/module-item-view');
... ... @@ -189,7 +187,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
189 187  
190 188  
191 189 $scope.openListViewModuleItem = function (event) {
192   -
  190 +
193 191 $("#demoView").remove();
194 192 var moduleItemDataToBeSavedID = event.currentTarget.id;
195 193 $("#list-view table tbody tr").removeClass("active");
... ... @@ -206,7 +204,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
206 204  
207 205  
208 206 $scope.openModuleItem = function () {
209   -
  207 + if ($rootScope.refreshcheck == null) {
  208 + $location.path('/');
  209 + }
210 210 var jsContentURL;
211 211 var moduleItemViewDivId;
212 212  
... ... @@ -256,7 +256,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
256 256 var openedImage = new Image();
257 257 openedImage.id = 'modItemImage';
258 258 openedImage.name = $rootScope.OpenItemImagePath;
259   -
  259 +
260 260 openedImage.onload = function () {
261 261 $scope.imageWidth = this.width;
262 262 $scope.imageHeight = this.height;
... ... @@ -268,7 +268,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
268 268 if (document.getElementById('aaDetailPageDiv') != null) {
269 269  
270 270 //0.4 added some stylesheets
271   -
  271 +
272 272 $rootScope.canvasDivHeight = $('.jsPanel-content').height() - $('.main2 .stickey-area').height();
273 273  
274 274 $('.canvasDivClass').css("height", $rootScope.canvasDivHeight);
... ... @@ -328,7 +328,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
328 328 return true;
329 329 }
330 330  
331   -
  331 +
332 332 angular.element(document).ready(function (e) {
333 333 $("#ImagePanel").resize(function () {
334 334 $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition);
... ... @@ -340,12 +340,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
340 340 $rootScope.selectedBodySystemName = 'All';
341 341 $rootScope.selectedBodySystemId = 0;
342 342 $rootScope.searchSelectedText = '';
343   -
  343 +
344 344 });
345 345 })
346 346  
347 347 $scope.showAllPins = function () {
348   -
  348 +
349 349 var promise = ModuleService.getPinDataForImage($rootScope.imageName)
350 350  
351 351 .then(
... ... @@ -386,135 +386,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
386 386 $timeout(function () {
387 387 $scope.activePinOnLayerChange();
388 388 }, 1000);
389   -
  389 +
390 390 }
391 391  
392 392 }
393   - //$scope.FilterByImage = function (query) {
394   - // alert("$rootScope.moduleId" + $rootScope.myModuleId);
395   - // //alert(JSON.stringify(query));
396   - // // $scope.moduleId = moduleId;
397   - // if ($rootScope.myModuleId == 2) {
398   - // $('#grid-view').css("display", "none");
399   -
400   - // if ($scope.isListViewDataLoaded == false) {
401   - // $rootScope.selectedbodyregion = query.selectedbodyregion;
402   - // $rootScope.selectedbodysystem = query.selectedbodysystem;
403   - // alert($rootScope.selectedbodyregion);
404   - // alert($rootScope.selectedbodysystem);
405   - // var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName)
406   - // .then(
407   - // function (result) {
408   - // // alert(JSON.stringify($scope.moduleLandingData));
409   - // $scope.moduleLandingData = result;
410   - // $scope.selectedAAListViewData = new jinqJs()
411   - // .from($scope.moduleLandingData.data.root.Item)
412   - // .where('_BodyRegion = ' + $rootScope.selectedbodyregion, '_BodySystem = ' + $rootScope.selectedbodysystem)
413   - // .orderBy([{ field: '_Title', sort: 'asc' }])
414   - // .select();
415   - // var htm = '';
416   - // 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'>";
417   - // angular.forEach($scope.selectedAAListViewData, function (value, key) {
418   - // htm += "<tr id=" + value._Id + " onclick='openListViewModuleItem(event)' ondblclick='openModuleItemView(event)'>"
419   - // 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>';
420   - // htm += "</tr>"
421   - // });
422   - // htm += "</tbody></table>";
423   - // $("#list-view").html(htm);
424   - // $compile(htm)($scope);
425   -
426   -
427   -
428   - // // $(result.root.Item).each(function (key, value) {
429   - // // console.log(key + " " + value);
430   - // // htm += "<tr id=" + value._Id + " onclick='openListViewModuleItem(event)' ondblclick='openModuleItemView(event)'>"
431   - // // 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>';
432   - // // htm += "</tr>"
433   - // // });
434   - // // htm += "</tbody></table>";
435   - // // $("#list-view").html(htm);
436   - // // $compile(htm)($scope);
437   - // });
438   -
439   - // $('#list-view').css("display", "block");
440   - // $scope.isListViewDataLoaded = false;
441   - // }
442   - // }
443   - //}
444   - $scope.FilterByImage = function (query) {
445   - alert("$rootScope.moduleId" + $rootScope.myModuleId);
446   - //alert(JSON.stringify(query));
447   - // $scope.moduleId = moduleId;
448   - if ($rootScope.myModuleId == 2) {
449   - $('#grid-view').css("display", "none");
450   -
451   - if ($scope.isListViewDataLoaded == false) {
452   - $rootScope.selectedbodyregion = query.selectedbodyregion;
453   - $rootScope.selectedbodysystem = query.selectedbodysystem;
454   - alert($rootScope.selectedbodyregion);
455   - alert($rootScope.selectedbodysystem);
456   - var promise = ModuleService.loadModuleDataBasedOnModuleName($scope.moduleName)
457   - .then(
458   - function (result) {
459   - // alert(JSON.stringify($scope.moduleLandingData));
460   - $scope.moduleLandingData = result;
461   - if (typeof (query.selectedbodyregion) !== "undefined" && (query.selectedbodyregion !== null && query.selectedbodyregion !== "")) {
462   - }
463   - else {
464   -
465   - }
466   - if (typeof (query.selectedbodysystem) !== "undefined" && (query.selectedbodysystem !== null && query.selectedbodysystem !== "")) {
467   - }
468   - else {
469 393  
470   - } if (typeof (query.selectedorientation) !== "undefined" && (query.selectedorientation !== null && query.selectedorientation !== "")) {
471   - }
472   - else
473   - {
474 394  
475   - }
476   - if (typeof (query.selectedimagetype) !== "undefined" && (query.selectedimagetype !== null && query.selectedimagetype !== "")) {
477   - }
478   - else
479   - {
  395 + $scope.FilterByImage = function (moduleId, query) {
  396 + //alert(JSON.stringify(query));
  397 + $scope.moduleId = moduleId;
480 398  
481   - }
482   - $scope.selectedAAListViewData = new jinqJs()
483   - .from($scope.moduleLandingData.data.root.Item)
484   - .where('_BodyRegion = ' + $rootScope.selectedbodyregion, '_BodySystem = ' + $rootScope.selectedbodysystem)
485   - .orderBy([{ field: '_Title', sort: 'asc' }])
486   - .select();
487   -
488   - var htm = '';
489   - 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'>";
490   - angular.forEach($scope.selectedAAListViewData, function (value, key) {
491   - htm += "<tr id=" + value._Id + " onclick='openListViewModuleItem(event)' ondblclick='openModuleItemView(event)'>"
492   - 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>';
493   - htm += "</tr>"
494   - });
495   - htm += "</tbody></table>";
496   - $("#list-view").html(htm);
497   - $compile(htm)($scope);
498   -
499   -
500   -
501   - // $(result.root.Item).each(function (key, value) {
502   - // console.log(key + " " + value);
503   - // htm += "<tr id=" + value._Id + " onclick='openListViewModuleItem(event)' ondblclick='openModuleItemView(event)'>"
504   - // 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>';
505   - // htm += "</tr>"
506   - // });
507   - // htm += "</tbody></table>";
508   - // $("#list-view").html(htm);
509   - // $compile(htm)($scope);
510   - });
511   -
512   - $('#list-view').css("display", "block");
513   - $scope.isListViewDataLoaded = false;
514   - }
515   - }
516 399 console.log('loadForModuleById is called')
517   - $rootScope.moduleName = Modules[$rootScope.myModuleId].Name;
  400 + $rootScope.moduleName = Modules[moduleId].Name;
518 401 while ($scope.searchAAListViewData.length) {
519 402 $scope.searchAAListViewData.pop();
520 403 }
... ... @@ -622,17 +505,30 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
622 505  
623 506 if (selectimg === true && count >= filtercount) {
624 507  
  508 + if ($scope.activeTab == 1) {
  509 + $scope.imagePath = "../content/images/aa/thumbnails/" + value._TileImageName;
625 510  
626   - $scope.imagePath = "../content/images/aa/thumbnails/" + value._TileImageName;
627 511  
628   -
629 512 var $el = $('<div id="' + value._id + '" class="col-sm-3 col-lg-2" title = "' + value._Title + '" data-ng-click="openModuleItemView($event)">'
630 513 + '<div class="thumbnail" >'
631 514 + '<img class="tinyImg" id="' + value._Title + '"ng-src="' + $scope.imagePath + '" alt="" title="" >'
632 515 + '<div class="caption"><p>' + value._Title + '</p></div></a></div></div>').appendTo('#grid-view');
633 516  
634   -
635   - $compile($el)($scope);
  517 +
  518 + $compile($el)($scope);
  519 + }
  520 + else {
  521 + var htm = '';
  522 + 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'>";
  523 + //angular.forEach($scope.selectedAAListViewData, function (value, key) {
  524 + htm += "<tr id=" + value._Id + " onclick='openListViewModuleItem(event)' ondblclick='openModuleItemView(event)'>"
  525 + 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>';
  526 + htm += "</tr>"
  527 + //});
  528 + htm += "</tbody></table>";
  529 + $("#list-view").html(htm);
  530 + $compile(htm)($scope);
  531 + }
636 532  
637 533 $(".sidebar").mCustomScrollbar({
638 534 autoHideScrollbar: true,
... ... @@ -660,11 +556,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
660 556  
661 557 });
662 558  
663   - //Show Error Message in case of gridview if no data is found
664   - if ($scope.searchCIListViewData.length == 0) {
665   -
  559 + //Show Error Message in case of gridview/ ListView [if no data is found]
  560 + if ($scope.searchAAListViewData.length == 0) {
666 561 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');
667 562 $compile($el)($scope);
  563 + $('table > #ListViewDiv > #searchItem').remove();
  564 +
  565 + $('#ListViewDiv').append('<tr id="searchItem"><td colspan="6"><strong style="color:black;">No illustration found for the selected search criteria!</strong></td></tr>');
668 566 }
669 567 console.log(JSON.stringify(result, null, 4));
670 568 },
... ... @@ -676,7 +574,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
676 574  
677 575 }
678 576  
679   - $scope.Reset = function (query) {
  577 + $scope.Reset = function (moduleId, query) {
680 578  
681 579 query.selectedbodyregion = "";
682 580 query.selectedbodysystem = "";
... ... @@ -704,7 +602,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
704 602 // $scope.searchCIListViewData.pop();
705 603 //}
706 604  
707   - $scope.FilterByImage(query);
  605 + $scope.FilterByImage(1, query);
708 606  
709 607 }
710 608  
... ... @@ -725,7 +623,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
725 623 else {
726 624 $scope.showAllPins();
727 625 }
728   - }
  626 + }
729 627 else {
730 628  
731 629 $scope.selectedSystemName = event.currentTarget.title;
... ... @@ -1044,8 +942,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1044 942 if ($scope.sliderVal == 25) {
1045 943 document.getElementById('speechBubbleLine' + PinId + '').style.top = ((speechBubbleDims[0].currentY + 5)) + 'px';
1046 944 }
1047   - else
1048   - {
  945 + else {
1049 946 document.getElementById('speechBubbleLine' + PinId + '').style.top = ((speechBubbleDims[0].currentY)) + 'px';
1050 947 }
1051 948 document.getElementById('speechBubble' + PinId + '').style.display = 'block';
... ... @@ -1148,7 +1045,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1148 1045 else {
1149 1046 $("#speechBubbleDraggedLine" + id).css({ 'display': 'block', 'width': d + 'px', 'top': (e - 10) + 'px', 'left': (f - 5) + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' });
1150 1047 }
1151   -
  1048 +
1152 1049 }
1153 1050 else {
1154 1051 $("#bord_annotation").css({ 'display': 'block', 'width': d + 'px', 'top': e + 'px', 'left': f + 'px', 'transform': 'rotate(' + theta + 'deg)', '-moz-transform': 'rotate(' + theta + 'deg)', '-webkit-transform': 'rotate(' + theta + 'deg)', 'transform-origin': '0% 0%' });
... ... @@ -1161,118 +1058,118 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1161 1058  
1162 1059 $scope.drawStaticPinsOnImage = function (canvasId, PinId, offsetX1, offsetY1, x, y) {
1163 1060 $scope.clickedPins = [];
1164   - // if ($scope.isSliderChange == true) {
1165   - console.log('isSliderrChange')
1166   - var radial = $('#' + canvasId).createGradient({
1167   - x1: 50, y1: 50,
1168   - x2: 50, y2: 50,
1169   - r1: 10, r2: 30,
1170   - c1: 'rgba(100, 50, 0,0)',
1171   - c2: 'rgb(216, 216, 216)'
1172   - });
1173   - $('#' + canvasId).drawLine({
1174   - layer: true,
1175   - name: "Pin_" + PinId,
1176   - groups: ["Pin_" + PinId],
1177   - strokeStyle: '#565656',
1178   - strokeWidth: 2,
1179   - visible: true,
1180   - x1: offsetX1 * $scope.sliderPercentValue, y1: offsetY1 * $scope.sliderPercentValue,
1181   - x2: x * $scope.sliderPercentValue, y2: y * $scope.sliderPercentValue,
1182   -
1183   -
1184   - }).drawArc({
1185   - name: "PinArc_" + PinId,
1186   - layer: true,
1187   - groups: ["Pin_" + PinId],
1188   - strokeStyle: 'grey',
1189   - strokeWidth: 2,
1190   - visible: true,
1191   - fillStyle: radial,
1192   - x: x * $scope.sliderPercentValue, y: y * $scope.sliderPercentValue,
1193   - radius: 5 * $scope.sliderPercentValue,
  1061 + // if ($scope.isSliderChange == true) {
  1062 + console.log('isSliderrChange')
  1063 + var radial = $('#' + canvasId).createGradient({
  1064 + x1: 50, y1: 50,
  1065 + x2: 50, y2: 50,
  1066 + r1: 10, r2: 30,
  1067 + c1: 'rgba(100, 50, 0,0)',
  1068 + c2: 'rgb(216, 216, 216)'
  1069 + });
  1070 + $('#' + canvasId).drawLine({
  1071 + layer: true,
  1072 + name: "Pin_" + PinId,
  1073 + groups: ["Pin_" + PinId],
  1074 + strokeStyle: '#565656',
  1075 + strokeWidth: 2,
  1076 + visible: true,
  1077 + x1: offsetX1 * $scope.sliderPercentValue, y1: offsetY1 * $scope.sliderPercentValue,
  1078 + x2: x * $scope.sliderPercentValue, y2: y * $scope.sliderPercentValue,
  1079 +
  1080 +
  1081 + }).drawArc({
  1082 + name: "PinArc_" + PinId,
  1083 + layer: true,
  1084 + groups: ["Pin_" + PinId],
  1085 + strokeStyle: 'grey',
  1086 + strokeWidth: 2,
  1087 + visible: true,
  1088 + fillStyle: radial,
  1089 + x: x * $scope.sliderPercentValue, y: y * $scope.sliderPercentValue,
  1090 + radius: 5 * $scope.sliderPercentValue,
  1091 +
  1092 + click: function (clickedPin) {
  1093 + if (clickedPin.event.ctrlKey == false) {
  1094 + $scope.clickedPins = [];
  1095 + }
  1096 + var pinID = (clickedPin.name).substring(7, (clickedPin.name).length);
  1097 + var pinData = new jinqJs()
  1098 + .from($scope.aaPinData)
  1099 + .where("_PinId == " + pinID)
  1100 + .select();
1194 1101  
1195   - click: function (clickedPin) {
1196   - if (clickedPin.event.ctrlKey == false) {
1197   - $scope.clickedPins = [];
1198   - }
1199   - var pinID = (clickedPin.name).substring(7, (clickedPin.name).length);
1200   - var pinData = new jinqJs()
1201   - .from($scope.aaPinData)
1202   - .where("_PinId == " + pinID)
1203   - .select();
1204 1102  
  1103 + var pinTermNumber = pinData[0]._TermId;
1205 1104  
1206   - var pinTermNumber = pinData[0]._TermId;
  1105 + var pinWithSameTerm = new jinqJs()
1207 1106  
1208   - var pinWithSameTerm = new jinqJs()
  1107 + .from($scope.aaPinData)
  1108 + .where("_TermId == " + pinTermNumber)
  1109 + .select();
1209 1110  
1210   - .from($scope.aaPinData)
1211   - .where("_TermId == " + pinTermNumber)
1212   - .select();
1213 1111  
  1112 + if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) {
1214 1113  
1215   - if (pinWithSameTerm != undefined && pinWithSameTerm != null && pinWithSameTerm.length > 0) {
  1114 + for (var i = 0; i < pinWithSameTerm.length; i++) {
1216 1115  
1217   - for (var i = 0; i < pinWithSameTerm.length; i++) {
  1116 + $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId })
  1117 + }
1218 1118  
1219   - $scope.clickedPins.push({ 'id': pinWithSameTerm[i]._PinId })
1220   - }
  1119 + }
1221 1120  
1222   - }
  1121 + var selectedPinData = new jinqJs()
  1122 + .from($scope.aaPinData)
  1123 + .where("_PinId == " + pinID)
  1124 + .select();
  1125 + if (clickedPin.event.ctrlKey == true) {
  1126 +
  1127 + $scope.activePinArray.push(clickedPin.name);
  1128 + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
  1129 + x1: 50, y1: 50,
  1130 + x2: 50, y2: 50,
  1131 + r1: 10, r2: 30,
  1132 + c1: 'rgba(100, 50, 0,0)',
  1133 + c2: 'rgb(126, 187, 83)'
  1134 + });
  1135 + clickedPin.fillStyle = radialAfterClick;
  1136 + $scope.showAnnotation(selectedPinData, true, true, false);
  1137 + }
  1138 + else {
  1139 + $scope.activePinArray = [];
  1140 + $scope.activePinArray.push(clickedPin.name);
  1141 + var radial = $('#aaDetailViewCanvas').createGradient({
  1142 + x1: 50, y1: 50,
  1143 + x2: 50, y2: 50,
  1144 + r1: 10, r2: 30,
  1145 + c1: 'rgba(100, 50, 0,0)',
  1146 + c2: 'rgb(216, 216, 216)'
  1147 + });
1223 1148  
1224   - var selectedPinData = new jinqJs()
1225   - .from($scope.aaPinData)
1226   - .where("_PinId == " + pinID)
1227   - .select();
1228   - if (clickedPin.event.ctrlKey == true) {
1229   -
1230   - $scope.activePinArray.push(clickedPin.name);
1231   - var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
1232   - x1: 50, y1: 50,
1233   - x2: 50, y2: 50,
1234   - r1: 10, r2: 30,
1235   - c1: 'rgba(100, 50, 0,0)',
1236   - c2: 'rgb(126, 187, 83)'
1237   - });
1238   - clickedPin.fillStyle = radialAfterClick;
1239   - $scope.showAnnotation(selectedPinData, true, true, false);
1240   - }
1241   - else {
1242   - $scope.activePinArray = [];
1243   - $scope.activePinArray.push(clickedPin.name);
1244   - var radial = $('#aaDetailViewCanvas').createGradient({
1245   - x1: 50, y1: 50,
1246   - x2: 50, y2: 50,
1247   - r1: 10, r2: 30,
1248   - c1: 'rgba(100, 50, 0,0)',
1249   - c2: 'rgb(216, 216, 216)'
1250   - });
1251 1149  
  1150 + $('#aaDetailViewCanvas').setLayers({
  1151 + fillStyle: radial,
  1152 + }).drawLayers();
1252 1153  
1253   - $('#aaDetailViewCanvas').setLayers({
1254   - fillStyle: radial,
1255   - }).drawLayers();
  1154 + //change the head color to green
  1155 + var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
  1156 + x1: 50, y1: 50,
  1157 + x2: 50, y2: 50,
  1158 + r1: 10, r2: 30,
  1159 + c1: 'rgba(100, 50, 0,0)',
  1160 + c2: 'rgb(126, 187, 83)'
  1161 + });
1256 1162  
1257   - //change the head color to green
1258   - var radialAfterClick = $('#aaDetailViewCanvas').createGradient({
1259   - x1: 50, y1: 50,
1260   - x2: 50, y2: 50,
1261   - r1: 10, r2: 30,
1262   - c1: 'rgba(100, 50, 0,0)',
1263   - c2: 'rgb(126, 187, 83)'
1264   - });
  1163 + clickedPin.fillStyle = radialAfterClick;
  1164 + $scope.showAnnotation(selectedPinData, false, true, false);
1265 1165  
1266   - clickedPin.fillStyle = radialAfterClick;
1267   - $scope.showAnnotation(selectedPinData, false, true, false);
  1166 + }
1268 1167  
1269   - }
1270 1168  
  1169 + }
1271 1170  
1272   - }
  1171 + }).drawLayers();
1273 1172  
1274   - }).drawLayers();
1275   -
1276 1173  
1277 1174 }
1278 1175  
... ... @@ -1287,12 +1184,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1287 1184  
1288 1185 $scope.removePin = function (canvasId, pinId) {
1289 1186  
1290   - var pinName = 'Pin_' + pinId;
1291   - var pinArcName = 'PinArc_' + pinId;
1292   - $('#' + canvasId).removeLayer(pinName).drawLayers();
1293   - $('#' + canvasId).removeLayer(pinArcName).drawLayers();
  1187 + var pinName = 'Pin_' + pinId;
  1188 + var pinArcName = 'PinArc_' + pinId;
  1189 + $('#' + canvasId).removeLayer(pinName).drawLayers();
  1190 + $('#' + canvasId).removeLayer(pinArcName).drawLayers();
1294 1191  
1295   - $scope.removeSpeechBubble();
  1192 + $scope.removeSpeechBubble();
1296 1193  
1297 1194 //$rootScope.isSliderChanged = true;
1298 1195 //$('#aaDetailViewCanvas').removeLayers();
... ... @@ -1309,9 +1206,9 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1309 1206 $rootScope.onDrawingCanvasClick();
1310 1207 $rootScope.FreeStylePaint();
1311 1208 });
1312   -
  1209 +
1313 1210 $rootScope.loadSearchData = function () {
1314   -
  1211 +
1315 1212 //$("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
1316 1213 var imageId = $rootScope.imageId;
1317 1214 var promise = ModuleService.getTermTextDataForAAImage(imageId)
... ... @@ -1319,32 +1216,31 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1319 1216 function (response) {
1320 1217  
1321 1218 $scope.AAPinTermData = response.data.PinTermData.TermData;
1322   -
  1219 +
1323 1220 $rootScope.isLoading = false;
1324 1221 $('#setting-spinner').css('visibility', 'hidden');
1325   -
  1222 +
1326 1223 $scope.pinTermData = [];
1327 1224 var primaryLexicon = $rootScope.lexiconLanguageArray[0].id;
1328 1225 $scope.matchedLanguageTermData = new jinqJs()
1329 1226 .from($scope.AAPinTermData)
1330 1227 .where('_LanguageId == ' + primaryLexicon)
1331 1228 .select();
1332   - var sortedTermTextArray = [];
  1229 + var sortedTermTextArray = [];
1333 1230 for (var i = 0; i < $scope.matchedLanguageTermData.length; i++) {
1334 1231 sortedTermTextArray.push($scope.matchedLanguageTermData[i]._TermText);
1335 1232 sortedTermTextArray.sort();
1336 1233 }
1337   -
  1234 +
1338 1235 for (var i = 0; i <= sortedTermTextArray.length - 1; i++) {
1339   - for(var j = 0;j<= $scope.matchedLanguageTermData.length-1;j++){
1340   - if ($scope.matchedLanguageTermData[j]._TermText == sortedTermTextArray[i])
1341   - {
  1236 + for (var j = 0; j <= $scope.matchedLanguageTermData.length - 1; j++) {
  1237 + if ($scope.matchedLanguageTermData[j]._TermText == sortedTermTextArray[i]) {
1342 1238 $scope.pinTermData.push({ "LanguageId": $scope.matchedLanguageTermData[j]._LanguageId, "TermNumber": $scope.matchedLanguageTermData[j]._TermNumber, "TermTxt": $scope.matchedLanguageTermData[j]._TermText });
1343 1239 break;
1344 1240 }
1345 1241 }
1346 1242 }
1347   -
  1243 +
1348 1244 for (var i = 0; i <= sortedTermTextArray.length - 1; i++) {
1349 1245 for (var j = 0; j <= $scope.matchedLanguageTermData.length - 1; j++) {
1350 1246 if ($scope.matchedLanguageTermData[j]._TermText == sortedTermTextArray[i]) {
... ... @@ -1354,12 +1250,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1354 1250 }
1355 1251 }
1356 1252  
1357   -
  1253 +
1358 1254 $scope.$watch('$scope.pinTermData', function (newValue, oldValue, scope) {
1359   -
  1255 +
1360 1256 if (($('#termlistfilter').html() != ""))
1361   -
1362   - $('#termlistfilter').empty();
  1257 +
  1258 + $('#termlistfilter').empty();
1363 1259 if ($scope.pinTermData.length > 0) {
1364 1260 $timeout(function () {
1365 1261 console.log('pinTermData= ' + $scope.pinTermData.length);
... ... @@ -1368,12 +1264,12 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1368 1264 var $el = $('<li><a id= "' + $scope.pinTermData[j].TermNumber + '" href="" onclick="onSearchItemSelection(event)" >' + $scope.pinTermData[j].TermTxt + '</a></li>').appendTo('#termlistfilter')
1369 1265 $compile($el)($scope);
1370 1266 var $selectedOptions = $('<option title= "' + $scope.pinTermData[j].TermTxt + '" id= "' + $scope.pinTermData[j].TermNumber + '" onclick="onSearchItemSelection(event)" >' + $scope.pinTermData[j].TermTxt + '</option>').appendTo("#termList")
1371   -
  1267 +
1372 1268 $compile($selectedOptions)($scope);
1373   -
  1269 +
1374 1270 $("#AABodySystems").empty();
1375   - $("#bodySystems").css("display","none");
1376   - $("#AABodySystems").css("display","block");
  1271 + $("#bodySystems").css("display", "none");
  1272 + $("#AABodySystems").css("display", "block");
1377 1273 $("#bodySystemList li a").each(function (key, value) {
1378 1274 var $systemOptions = $('<option id=' + $(this).attr('id') + ' >' + $(this).text() + '</option>').appendTo("#AABodySystems")
1379 1275 $compile($systemOptions)($scope);
... ... @@ -1394,19 +1290,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1394 1290  
1395 1291  
1396 1292 $scope.$on('listManagerEvent', function (event, data) {
1397   -
  1293 +
1398 1294 $("#viewName").empty();
1399 1295 $("#viewName").append("<option>" + $rootScope.listArray[0].text + "</option>");
1400 1296 $rootScope.isLoading = false;
1401 1297 $('#spinner').css('visibility', 'hidden');
1402   -
  1298 +
1403 1299 if ($rootScope.bodySystemSeletedId == null) {
1404   -
  1300 +
1405 1301 $rootScope.loadSearchData();
1406 1302 }
1407   - else
1408   - {
1409   -
  1303 + else {
  1304 +
1410 1305 $rootScope.refreshTermListOnAASystemSelection($rootScope.bodySystemSeletedId);
1411 1306 }
1412 1307 $timeout(function () {
... ... @@ -1418,13 +1313,13 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1418 1313  
1419 1314  
1420 1315 $rootScope.refreshTermListOnAASystemSelection = function (bodySystemId) {
1421   - $('#termList').empty();
  1316 + $('#termList').empty();
1422 1317 $rootScope.bodySystemSeletedId = bodySystemId;
1423 1318 $('#termList').empty();
1424 1319 var bodySystemName = $("#AABodySystems #" + bodySystemId).val();
1425 1320 if (bodySystemName == "All") {
1426 1321 for (var j = 0; j <= $scope.pinTermData.length - 1; j++) {
1427   -
  1322 +
1428 1323 $compile($selectedOptions)($scope);
1429 1324 }
1430 1325 $("#totalTerms").empty();
... ... @@ -1434,7 +1329,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1434 1329 var imageId = $rootScope.imageId;
1435 1330 $scope.pinDataUrl = "aa_dat_pinterm_" + imageId;
1436 1331 $rootScope.bodySystemTermArray = [];
1437   -
  1332 +
1438 1333 $.ajax({
1439 1334 url: '~/../content/data/json/aa/aa_pinterm/' + $scope.pinDataUrl + '.json',
1440 1335 type: 'GET',
... ... @@ -1464,7 +1359,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1464 1359 }
1465 1360 }
1466 1361 $scope.GetAnnotationBasedOnActualTermNo = function (actualTermNo) {
1467   -
  1362 +
1468 1363  
1469 1364 var languageArray = $rootScope.lexiconLanguageArray;
1470 1365  
... ... @@ -1474,11 +1369,11 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1474 1369 .from($scope.AAPinTermData)
1475 1370 .where('_TermNumber == ' + actualTermNo)
1476 1371 .select();
1477   -
  1372 +
1478 1373 if ($scope.matchedTermNoData != null || $scope.matchedTermNoData != undefined) {
1479   -
  1374 +
1480 1375 for (var j = 0; j <= languageArray.length - 1; j++) {
1481   -
  1376 +
1482 1377 $scope.matchedLanguageTermNoData = new jinqJs()
1483 1378 .from($scope.matchedTermNoData)
1484 1379 .where('_LanguageId == ' + languageArray[j].id)
... ... @@ -1542,27 +1437,27 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1542 1437 $("#allPinBtn").addClass("btn-primary");
1543 1438 };
1544 1439  
1545   -
  1440 +
1546 1441 $scope.showSelectedPins = function () {
1547   -
1548   - $rootScope.isLoading = true;
1549   - $('#spinner').css('visibility', 'visible');
1550 1442  
1551   - $scope.isHidePinBtnClicked = false;
  1443 + $rootScope.isLoading = true;
  1444 + $('#spinner').css('visibility', 'visible');
  1445 +
  1446 + $scope.isHidePinBtnClicked = false;
1552 1447  
1553   - if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) {
  1448 + if ($scope.selectedSystemName != null && $scope.selectedSystemName != undefined) {
1554 1449  
1555   - $scope.showSystemPins($scope.selectedSystemPinData, true);
  1450 + $scope.showSystemPins($scope.selectedSystemPinData, true);
1556 1451  
1557   - }
1558   - else {
1559   - $scope.showSystemPins($scope.aaPinData, true);
  1452 + }
  1453 + else {
  1454 + $scope.showSystemPins($scope.aaPinData, true);
1560 1455  
1561   - }
1562   - $scope.showSpeechBubble();
1563   - $(".tooltip-custom").removeClass("btn-primary");
1564   - $(".tooltip-custom").addClass("btn-black");
1565   - $("#selectedPin").addClass("btn-primary");
  1456 + }
  1457 + $scope.showSpeechBubble();
  1458 + $(".tooltip-custom").removeClass("btn-primary");
  1459 + $(".tooltip-custom").addClass("btn-black");
  1460 + $("#selectedPin").addClass("btn-primary");
1566 1461 };
1567 1462  
1568 1463  
... ... @@ -1592,7 +1487,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1592 1487 }).drawLayers();
1593 1488 // }
1594 1489 })
1595   -
  1490 +
1596 1491 angular.forEach(seletedSystemPinData, function (aaPinDataValue, aaPinDataKey) {
1597 1492  
1598 1493 // if (aaPinDataValue._PinId != value.id) {
... ... @@ -1610,7 +1505,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1610 1505 })
1611 1506  
1612 1507 // })
1613   - // $scope.clickedPins = [];
  1508 + // $scope.clickedPins = [];
1614 1509 }
1615 1510  
1616 1511 else {
... ... @@ -1679,19 +1574,19 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1679 1574 }
1680 1575  
1681 1576 $scope.highlightPinBasedOnSerachItem = function (event) {
1682   -
1683   - $scope.searchItemId = event.currentTarget.id;
1684   - $scope.searchItemText = event.currentTarget.innerHTML;
1685   - $rootScope.searchSelectedText = $("#" + event.currentTarget.id).text();
1686   - $('#termList option[selected="selected"]').prop("selected", false);
1687   - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
1688   - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
1689   - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
1690 1577  
1691   - $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" });
1692   - $("#termlistfilter li #" + $scope.searchItemId).css({ "background-color": "#3399FF", "color": "#ffffff" });
1693   - $scope.searchFilter = event.currentTarget.innerHTML;
1694   - selectedTermName.placeholder = event.currentTarget.innerHTML;
  1578 + $scope.searchItemId = event.currentTarget.id;
  1579 + $scope.searchItemText = event.currentTarget.innerHTML;
  1580 + $rootScope.searchSelectedText = $("#" + event.currentTarget.id).text();
  1581 + $('#termList option[selected="selected"]').prop("selected", false);
  1582 + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
  1583 + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
  1584 + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
  1585 +
  1586 + $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" });
  1587 + $("#termlistfilter li #" + $scope.searchItemId).css({ "background-color": "#3399FF", "color": "#ffffff" });
  1588 + $scope.searchFilter = event.currentTarget.innerHTML;
  1589 + selectedTermName.placeholder = event.currentTarget.innerHTML;
1695 1590  
1696 1591  
1697 1592 //get data from pindata for this trem
... ... @@ -1705,7 +1600,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1705 1600 // maintaing scroll position on selection of options in list manager.
1706 1601 var annotationTopPos = $(".common-drag").css("top").split("p");
1707 1602 $("#canvasDiv").scrollTop(annotationTopPos[0]);
1708   -
  1603 +
1709 1604 $scope.IsSearchVisible = false;
1710 1605 }
1711 1606  
... ... @@ -1747,14 +1642,14 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1747 1642 x1: 50, y1: 50,
1748 1643 x2: 50, y2: 50,
1749 1644 r1: 10, r2: 30,
1750   - c1: 'rgba(100, 50, 0,0)',
1751   - c2: 'rgb(126, 187, 83)'
  1645 + c1: 'rgba(100, 50, 0,0)',
  1646 + c2: 'rgb(126, 187, 83)'
1752 1647 });
1753 1648 var clickedPin = $scope.activePinArray[i];
1754 1649 $('#aaDetailViewCanvas').setLayer(clickedPin, {
1755 1650 fillStyle: radialAfterClick
1756 1651 }).drawLayers();
1757   -
  1652 +
1758 1653 }
1759 1654 }
1760 1655 }]);
... ... @@ -1853,7 +1748,7 @@ function openModuleItemView(event) {
1853 1748 }
1854 1749  
1855 1750 function openListViewModuleItem(event) {
1856   -
  1751 +
1857 1752 var scope = angular.element(document.getElementById("list-view")).scope();
1858 1753 scope.isListViewButtonClicked = true;
1859 1754 scope.$apply(function () {
... ... @@ -1872,7 +1767,7 @@ function openCurrentView(event) {
1872 1767 }
1873 1768  
1874 1769 function onZoom(scope) {
1875   -
  1770 +
1876 1771 //$(".common-drag").remove();
1877 1772 //$(".commonDot").remove();
1878 1773 //$(".commonDraggedLine").remove();
... ... @@ -1888,14 +1783,14 @@ function onZoom(scope) {
1888 1783 //}).drawLayers();
1889 1784 // scope.removePin();
1890 1785 // scope.showAllPins();
1891   -
  1786 +
1892 1787  
1893 1788 //6. Show all pins on AA opened item
1894 1789 }
1895 1790  
1896 1791  
1897 1792 $(document).ready(function () {
1898   -
  1793 +
1899 1794 $(".slider").slider({
1900 1795 min: 25,
1901 1796 max: 100,
... ... @@ -1910,40 +1805,40 @@ $(document).ready(function () {
1910 1805 var relativeWidth = 0;
1911 1806 var relativeHeight = 0;
1912 1807 if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
1913   - if (ui.value == 100) {
1914   - relativeWidth = scope.ViewImageWidth;
1915   - relativeHeight = scope.ViewImageHeight
1916   - scope.sliderPercentValue = 1.0;
1917   - }
1918   - else if (ui.value == 85) {
1919   - relativeWidth = scope.ViewImageWidth * 0.85;
1920   - relativeHeight = scope.ViewImageHeight * 0.85;
1921   - scope.sliderPercentValue = 0.85;
  1808 + if (ui.value == 100) {
  1809 + relativeWidth = scope.ViewImageWidth;
  1810 + relativeHeight = scope.ViewImageHeight
  1811 + scope.sliderPercentValue = 1.0;
  1812 + }
  1813 + else if (ui.value == 85) {
  1814 + relativeWidth = scope.ViewImageWidth * 0.85;
  1815 + relativeHeight = scope.ViewImageHeight * 0.85;
  1816 + scope.sliderPercentValue = 0.85;
1922 1817  
1923   - } else if (ui.value == 70) {
1924   - relativeWidth = scope.ViewImageWidth * 0.70;
1925   - relativeHeight = scope.ViewImageHeight * 0.70;
1926   - scope.sliderPercentValue = 0.70;
1927   - } else if (ui.value == 55) {
  1818 + } else if (ui.value == 70) {
  1819 + relativeWidth = scope.ViewImageWidth * 0.70;
  1820 + relativeHeight = scope.ViewImageHeight * 0.70;
  1821 + scope.sliderPercentValue = 0.70;
  1822 + } else if (ui.value == 55) {
1928 1823  
1929   - relativeWidth = scope.ViewImageWidth * 0.55;
1930   - relativeHeight = scope.ViewImageHeight * 0.55;
1931   - scope.sliderPercentValue = 0.55;
  1824 + relativeWidth = scope.ViewImageWidth * 0.55;
  1825 + relativeHeight = scope.ViewImageHeight * 0.55;
  1826 + scope.sliderPercentValue = 0.55;
1932 1827  
1933   - } else if (ui.value == 40) {
  1828 + } else if (ui.value == 40) {
1934 1829  
1935   - relativeWidth = scope.ViewImageWidth * 0.40;
1936   - relativeHeight = scope.ViewImageHeight * 0.40;
1937   - scope.sliderPercentValue = 0.40;
  1830 + relativeWidth = scope.ViewImageWidth * 0.40;
  1831 + relativeHeight = scope.ViewImageHeight * 0.40;
  1832 + scope.sliderPercentValue = 0.40;
1938 1833  
1939   - } else if (ui.value == 25) {
  1834 + } else if (ui.value == 25) {
1940 1835  
1941   - relativeWidth = scope.ViewImageWidth * 0.25;
1942   - relativeHeight = scope.ViewImageHeight * 0.25;
1943   - scope.sliderPercentValue = 0.25;
  1836 + relativeWidth = scope.ViewImageWidth * 0.25;
  1837 + relativeHeight = scope.ViewImageHeight * 0.25;
  1838 + scope.sliderPercentValue = 0.25;
1944 1839  
  1840 + }
1945 1841 }
1946   - }
1947 1842  
1948 1843 if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
1949 1844 $("#modItemImage").css("width", relativeWidth + "px");
... ... @@ -1953,7 +1848,7 @@ $(document).ready(function () {
1953 1848  
1954 1849 $("#modItemImage").attr('src', '');
1955 1850  
1956   -
  1851 +
1957 1852 $("#aaDetailViewCanvas").remove();
1958 1853 //0.5 create canvas on the top of image so that I can draw a line over the canvas.
1959 1854 var canvas = document.createElement('canvas');
... ... @@ -1964,16 +1859,16 @@ $(document).ready(function () {
1964 1859 canvas.style.left = '0px';
1965 1860 canvas.style.top = '0px';
1966 1861 canvas.style.position = "absolute";
1967   -
  1862 +
1968 1863 $("#canvasDiv").append(canvas);
1969 1864 scope.context = canvas.getContext("2d")
1970 1865 $("#modItemImage").attr('src', scope.OpenItemImagePath);
1971 1866 scope.isSliderChange = true;
1972   -
  1867 +
1973 1868 scope.showAllPins();
1974   -
  1869 +
1975 1870 }
1976   -
  1871 +
1977 1872 });
1978 1873 }
1979 1874 })
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/tile-view.html
... ... @@ -55,8 +55,8 @@
55 55 <h6 class="text-center text-primary txt-white f11">Search</h6>
56 56  
57 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(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(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 60 <i class="fa fa-search"></i>
61 61 </button>
62 62  
... ...