Commit f67064b1f1230be971ae66975f923d9e9f473769

Authored by Amrita Vishnoi
2 parents 18b54aa5 e7fc4dad

Merge branch 'ipadIssue' of http://52.6.196.163/ADAM/AIAHTML5 into Develop-IPAD-MAC

# Conflicts:
#	400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -389,7 +389,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -389,7 +389,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
389 $rootScope.male = ""; 389 $rootScope.male = "";
390 $rootScope.female = "active"; 390 $rootScope.female = "active";
391 } 391 }
  392 +
  393 +
392 394
  395 +
393 396
394 } 397 }
395 398
@@ -621,8 +624,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -621,8 +624,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
621 624
622 } 625 }
623 626
  627 +
  628 +
  629 +
624 angular.element(document).ready(function (e) { 630 angular.element(document).ready(function (e) {
625 631
  632 + var $ua = navigator.userAgent;
  633 + // var $event = ($ua.match(/(iPod|iPhone|iPad|android)/i));
  634 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  635 + $("#layerChangeSlider").css("pointer-events", "auto");
  636 + }
  637 +
626 $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { 638 $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
627 $rootScope.selectedBodySystemName = 'All'; 639 $rootScope.selectedBodySystemName = 'All';
628 $rootScope.selectedBodySystemId = 0; 640 $rootScope.selectedBodySystemId = 0;
@@ -4278,7 +4290,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4278,7 +4290,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4278 4290
4279 4291
4280 $scope.createTransparencyBox = function () { 4292 $scope.createTransparencyBox = function () {
4281 - 4293 +
4282 $scope.isTransparencyBtnClicked = true; 4294 $scope.isTransparencyBtnClicked = true;
4283 4295
4284 //do not create TBOX if in extarct mode otherwise create 4296 //do not create TBOX if in extarct mode otherwise create
@@ -4302,11 +4314,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4302,11 +4314,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4302 $scope.horizontlScrollPosition = canvasDiv.scrollLeft; 4314 $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
4303 4315
4304 var canvasDiv = document.getElementById('canvasDiv'); 4316 var canvasDiv = document.getElementById('canvasDiv');
  4317 + canvasDiv.addEventListener("touchstart", mouseDownListener);
  4318 +
  4319 + canvasDiv.addEventListener("touchmove", mouseMoveListener);
  4320 +
  4321 + canvasDiv.addEventListener("touchend", mouseUpListener);
  4322 +
4305 canvasDiv.addEventListener("mousedown", mouseDownListener); 4323 canvasDiv.addEventListener("mousedown", mouseDownListener);
4306 4324
4307 canvasDiv.addEventListener("mousemove", mouseMoveListener); 4325 canvasDiv.addEventListener("mousemove", mouseMoveListener);
4308 4326
4309 - canvasDiv.addEventListener("mouseup", mouseUpListener) 4327 + canvasDiv.addEventListener("mouseup", mouseUpListener);
  4328 +
4310 4329
4311 } 4330 }
4312 else { 4331 else {
@@ -4335,7 +4354,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4335,7 +4354,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4335 } 4354 }
4336 4355
4337 function mouseDownListener(e) { 4356 function mouseDownListener(e) {
4338 - 4357 + e.preventDefault();
4339 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. 4358 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
4340 var tCanvas = document.getElementById('transparencyCanvas'); 4359 var tCanvas = document.getElementById('transparencyCanvas');
4341 if ($('#transparencyScale').css("visibility") == 'visible') { 4360 if ($('#transparencyScale').css("visibility") == 'visible') {
@@ -4383,6 +4402,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4383,6 +4402,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4383 } 4402 }
4384 4403
4385 document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener); 4404 document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
  4405 +
  4406 + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
  4407 +
  4408 +
4386 //Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. 4409 //Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
4387 if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) { 4410 if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) {
4388 $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber)); 4411 $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber));
@@ -4392,7 +4415,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4392,7 +4415,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4392 } 4415 }
4393 4416
4394 function mouseMoveListener(e) { 4417 function mouseMoveListener(e) {
4395 - 4418 + e.preventDefault();
4396 var canvasDiv = document.getElementById('canvasDiv'); 4419 var canvasDiv = document.getElementById('canvasDiv');
4397 $scope.verticalScrollPosition = canvasDiv.scrollTop; 4420 $scope.verticalScrollPosition = canvasDiv.scrollTop;
4398 $scope.horizontlScrollPosition = canvasDiv.scrollLeft; 4421 $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
@@ -4419,7 +4442,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4419,7 +4442,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4419 4442
4420 4443
4421 function mouseUpListener(e) { 4444 function mouseUpListener(e) {
4422 - 4445 + e.preventDefault();
4423 $scope.DisableUI(); 4446 $scope.DisableUI();
4424 4447
4425 $scope.isTBDrawnOnBodyRegion = false; 4448 $scope.isTBDrawnOnBodyRegion = false;
@@ -4641,8 +4664,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4641,8 +4664,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4641 } 4664 }
4642 4665
4643 4666
4644 -  
4645 -  
4646 // 4667 //
4647 4668
4648 // $('#transparencyScale').modal('show'); 4669 // $('#transparencyScale').modal('show');
@@ -4658,8 +4679,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -4658,8 +4679,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4658 4679
4659 document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener); 4680 document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
4660 document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener); 4681 document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
4661 -  
4662 document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener); 4682 document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener);
  4683 +
  4684 +
  4685 + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
  4686 + document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener);
  4687 + document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener);
  4688 +
  4689 +
4663 // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener); 4690 // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
4664 $('#btnTranparency').removeClass('btn-black'); 4691 $('#btnTranparency').removeClass('btn-black');
4665 4692
@@ -8519,6 +8546,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l @@ -8519,6 +8546,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8519 8546
8520 8547
8521 $scope.ShowSearch = function () { 8548 $scope.ShowSearch = function () {
  8549 +
8522 var primaryLexiconIndex; 8550 var primaryLexiconIndex;
8523 for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { 8551 for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) {
8524 if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) { 8552 if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) {
@@ -8577,6 +8605,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8577,6 +8605,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8577 $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") }); 8605 $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") });
8578 }); 8606 });
8579 }, 100); 8607 }, 100);
  8608 +
8580 } 8609 }
8581 else { 8610 else {
8582 $rootScope.loadSearchData(); 8611 $rootScope.loadSearchData();
@@ -8584,9 +8613,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8584,9 +8613,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8584 $scope.ShowSearch(); 8613 $scope.ShowSearch();
8585 } 8614 }
8586 } 8615 }
8587 - 8616 + }, 500);
8588 8617
8589 - }, 500); 8618 +
8590 8619
8591 } 8620 }
8592 8621
@@ -8799,7 +8828,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8799,7 +8828,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8799 8828
8800 8829
8801 $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber, isTermListOptionClicked) { 8830 $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber, isTermListOptionClicked) {
8802 - 8831 +
8803 $scope.DisableUI(); 8832 $scope.DisableUI();
8804 8833
8805 $rootScope.searchSelectedText = $("#" + actualTermNumber).text(); 8834 $rootScope.searchSelectedText = $("#" + actualTermNumber).text();
@@ -8829,9 +8858,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -8829,9 +8858,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8829 // $("#termList").find("option").attr('selected', false); 8858 // $("#termList").find("option").attr('selected', false);
8830 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 8859 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
8831 $("#termList").find("option[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); 8860 $("#termList").find("option[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
8832 - $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });  
8833 - $("div#backdrop #termlistfilter li").find("a[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });  
8834 -  
8835 $scope.terminateCurrentlyRunningWPs(); 8861 $scope.terminateCurrentlyRunningWPs();
8836 8862
8837 $rootScope.isListManagerSelected = true; 8863 $rootScope.isListManagerSelected = true;
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -3758,7 +3758,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -3758,7 +3758,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3758 3758
3759 $rootScope.disableAnnotationtoolOnListManager = false; 3759 $rootScope.disableAnnotationtoolOnListManager = false;
3760 $rootScope.ShowListManager = function () { 3760 $rootScope.ShowListManager = function () {
3761 - 3761 +
3762 $rootScope.switchCanvas(); 3762 $rootScope.switchCanvas();
3763 $("#annotationpaintbrushsize").attr("href", "#"); 3763 $("#annotationpaintbrushsize").attr("href", "#");
3764 $("#annotationpainteraser").attr("href", "#"); 3764 $("#annotationpainteraser").attr("href", "#");
@@ -3788,6 +3788,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -3788,6 +3788,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3788 $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); 3788 $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true);
3789 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 3789 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
3790 $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); 3790 $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
  3791 + $rootScope.searchOption = $('#termList option[value="' + $rootScope.searchSelectedText + '"]').attr("id");
  3792 + $("div#backdrop #searchListDivAA #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
  3793 + $("div#backdrop #searchListDivAA #termlistfilter li").find("a[id=" + $rootScope.searchOption + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
3791 }, 1000); 3794 }, 1000);
3792 } 3795 }
3793 else { 3796 else {
@@ -3829,6 +3832,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -3829,6 +3832,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3829 $('#bodySystems option[value="' + $rootScope.selectedBodySystemName + '"]').prop("selected", true); 3832 $('#bodySystems option[value="' + $rootScope.selectedBodySystemName + '"]').prop("selected", true);
3830 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 3833 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
3831 $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); 3834 $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
  3835 +
3832 }, 1000); 3836 }, 1000);
3833 } 3837 }
3834 $("#optionsListManagerTab").addClass("active"); 3838 $("#optionsListManagerTab").addClass("active");
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -854,12 +854,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -854,12 +854,18 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
854 if ($scope.MultiLanguageAnnationArray.length > 0) { 854 if ($scope.MultiLanguageAnnationArray.length > 0) {
855 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { 855 for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) {
856 var MultipleLanguage = $scope.MultiLanguageAnnationArray[i]; 856 var MultipleLanguage = $scope.MultiLanguageAnnationArray[i];
  857 + $rootScope.clickedPinAnnotation = $scope.MultiLanguageAnnationArray[0];
857 $("#speechBubble" + PinId).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>"); 858 $("#speechBubble" + PinId).append("<p style='margin-bottom:2px;'>" + MultipleLanguage + "</p>");
858 } 859 }
859 } 860 }
860 else { 861 else {
861 console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length) 862 console.log('MultiLanguageAnnationArray.length is :' + $scope.MultiLanguageAnnationArray.length)
862 } 863 }
  864 +
  865 +
  866 +
  867 +
  868 +
863 if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) { 869 if ($scope.longestAnnotation != null || $scope.longestAnnotation != undefined) {
864 if ($scope.longestAnnotation.length <= 10) { 870 if ($scope.longestAnnotation.length <= 10) {
865 871
@@ -1139,13 +1145,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1139,13 +1145,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1139 $scope.showAnnotation(selectedPinData, false, true, false); 1145 $scope.showAnnotation(selectedPinData, false, true, false);
1140 1146
1141 } 1147 }
1142 -  
1143 - 1148 + $('#termList option[selected="selected"]').prop("selected", false);
  1149 + $('#termList option[value="' + $rootScope.clickedPinAnnotation + '"]').prop("selected", true);
  1150 + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
  1151 + $('#termList option[value="' + $rootScope.clickedPinAnnotation + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" });
  1152 + $rootScope.clickedPinAnnotationID = $('#termList option[value="' + $rootScope.clickedPinAnnotation + '"]').attr("id");
  1153 + $("div#backdrop #searchListDivAA #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
  1154 + $("div#backdrop #searchListDivAA #termlistfilter li").find("a[id=" + $rootScope.clickedPinAnnotationID + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
1144 } 1155 }
1145 1156
1146 }).drawLayers(); 1157 }).drawLayers();
1147 -  
1148 -  
1149 } 1158 }
1150 1159
1151 1160