diff --git a/.gitignore b/.gitignore index e7c26cd..6e642df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,38 +1,38 @@ -# git ignore file -[Bb]in/ -[Dd]ebug*/ -*.lib -Thumbs.db -obj/ -*.obj -*.exe -*.pdb -*.user -*.aps -*.pch -*.vspscc -*_i.c -*_p.c -*.ncb -*.suo -*.sln.docstates -*.tlb -*.tlh -*.bak -*.cache -*.ilk -*.log -[Bb]in -[Dd]ebug*/ -*.lib -*.sbr -obj/ -[Rr]elease*/ -_ReSharper*/ -[Tt]est[Rr]esult* -*.vssscc -$tf*/ -400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj.user +# git ignore file +[Bb]in/ +[Dd]ebug*/ +*.lib +Thumbs.db +obj/ +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.sln.docstates +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +*.vssscc +$tf*/ +400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj.user 300-PROTOTYPES/POC/AIAHTML5 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js.orig 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js.orig diff --git a/400-SOURCECODE/AIAHTML5.Web/Web.config b/400-SOURCECODE/AIAHTML5.Web/Web.config index 1bd0e8b..2c966b8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/Web.config +++ b/400-SOURCECODE/AIAHTML5.Web/Web.config @@ -17,8 +17,11 @@ + + + - + + - + diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js index 9c907f3..df21034 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js @@ -6,12 +6,17 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.CAAllBodyRegion = []; $scope.CAAllBodySystem = []; $scope.CAAllSpeciality = []; - $scope.selectedCAlistViewData = []; - $scope.searchCAlistViewData = []; + $scope.selectedCAListViewData = []; + $scope.searchCAListViewData = []; $scope.SelectedCAthumbImage = []; $scope.SelectedCAImage = []; $scope.SelectedCASummary = []; $scope.filterstring = false; + $scope.query = { + selectedbodyregion: null, + selectedbodysystem: null, + selectedspecialty: null, + }; $scope.$on('$viewContentLoaded', function (event) { // code that will be executed ... @@ -28,11 +33,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B promise.then( function (result) { $scope.AnimationData = result; - $scope.selectedCAlistViewData = $scope.AnimationData.root.CAData; + $scope.selectedCAListViewData = $scope.AnimationData.root.CAData; $('#grid-view').empty(); - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; @@ -70,7 +75,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B var SelectedCAthumbImage = []; SelectedCAthumbImage = new jinqJs() - .from($scope.selectedCAlistViewData) + .from($scope.selectedCAListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -82,11 +87,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B } else { - if ($scope.searchCAlistViewData.length > 0) { + if ($scope.searchCAListViewData.length > 0) { var SelectedCAthumbImage = []; SelectedCAthumbImage = new jinqJs() - .from($scope.searchCAlistViewData) + .from($scope.searchCAListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -101,16 +106,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.Reset = function (query) { - query.selectedbodyregion = ""; - query.selectedbodysystem = ""; - query.selectedspecialty = ""; + query.selectedbodyregion = null; + query.selectedbodysystem = null; + query.selectedspecialty = null; $scope.filterstring = false; - while ($scope.searchCAlistViewData.length) { - $scope.searchCAlistViewData.pop(); + while ($scope.searchCAListViewData.length) { + $scope.searchCAListViewData.pop(); } $('#grid-view').empty(); - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; var $el = $('
' @@ -134,8 +139,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $scope.filterstring = true; - while ($scope.searchCAlistViewData.length) { - $scope.searchCAlistViewData.pop(); + while ($scope.searchCAListViewData.length) { + $scope.searchCAListViewData.pop(); } $('#grid-view').empty(); @@ -151,7 +156,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B filtercount = filtercount + 1; } - angular.forEach($scope.selectedCAlistViewData, function (value, key) { + angular.forEach($scope.selectedCAListViewData, function (value, key) { var selectimg = true; var count = 0; @@ -213,7 +218,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B }); - $scope.searchCAlistViewData.push( + $scope.searchCAListViewData.push( { "_id": value._id, "_ImageId": value._ImageId, @@ -231,6 +236,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B }); + + //Show Error Message in case of gridview if no data is found + if ($scope.searchCAListViewData.length == 0) { + + var $el = $('
No animation found for the selected search criteria!
').appendTo('#grid-view'); + $compile($el)($scope); + } } @@ -248,12 +260,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { var CITitle = []; CITitle = new jinqJs() - .from($scope.selectedCAlistViewData) + .from($scope.selectedCAListViewData) .where('_id = ' + $event.currentTarget.id) .select('_Title'); //console.log(CITitle); - //console.log($scope.selectedCAlistViewData); + //console.log($scope.selectedCAListViewData); $rootScope.ViewTitle = CITitle[0]._Title; } @@ -360,7 +372,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B $rootScope.openViews.push( { - "module": $rootScope.currentActiveModuleTitle, "body-views": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, "slug": $rootScope.currentSlug }); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js index 2f83c02..c89ef1b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js @@ -8,14 +8,21 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.CIAllOrientation = []; $scope.CIAllImageType = []; $scope.CIAllSpeciality = []; - $scope.searchCIlistViewData = []; + $scope.searchCIListViewData = []; $scope.SelectedCIthumbImage = []; $scope.SelectedCIImage = []; $scope.SelectedCISummary = []; $scope.SelectedCIId = []; $scope.SelectedCITitle = []; - $scope.selectedCIlistViewData = []; + $scope.selectedCIListViewData = []; $scope.filterstring = false; + $scope.query = { + selectedbodyregion: null, + selectedbodysystem: null, + selectedorientation: null, + selectedimagetype: null, + selectedspecialty: null, + }; $scope.$on('$viewContentLoaded', function (event) { // code that will be executed ... @@ -36,11 +43,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout promise.then( function (result) { $scope.IllustrationData = result; - $scope.selectedCIlistViewData = $scope.IllustrationData.root.CIData; + $scope.selectedCIListViewData = $scope.IllustrationData.root.CIData; $('#grid-view').empty(); - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; var $el = $('
' @@ -77,7 +84,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout var SelectedCIthumbImage = []; SelectedCIthumbImage = new jinqJs() - .from($scope.selectedCIlistViewData) + .from($scope.selectedCIListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -88,11 +95,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout } else { - if ($scope.searchCIlistViewData.length > 0) { + if ($scope.searchCIListViewData.length > 0) { var SelectedCIthumbImage = []; SelectedCIthumbImage = new jinqJs() - .from($scope.searchCIlistViewData) + .from($scope.searchCIListViewData) .where('_id = ' + id) .select('_ThumbnailImage', '_Summary', '_id', '_Title'); @@ -107,21 +114,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.Reset = function (query) { - query.selectedbodyregion = ""; - query.selectedbodysystem = ""; - query.selectedorientation = ""; - query.selectedimagetype = ""; - query.selectedspecialty = ""; + //query.selectedbodyregion = ""; + //query.selectedbodysystem = ""; + //query.selectedorientation = ""; + //query.selectedimagetype = ""; + //query.selectedspecialty = ""; + query.selectedbodyregion = null; + query.selectedbodysystem = null; + query.selectedorientation = null; + query.selectedimagetype = null; + query.selectedspecialty = null; + $scope.filterstring = false; - while ($scope.searchCIlistViewData.length) { - $scope.searchCIlistViewData.pop(); + while ($scope.searchCIListViewData.length) { + $scope.searchCIListViewData.pop(); } $('#grid-view').empty(); - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -142,8 +155,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.filterstring = true; - while ($scope.searchCIlistViewData.length) { - $scope.searchCIlistViewData.pop(); + while ($scope.searchCIListViewData.length) { + $scope.searchCIListViewData.pop(); } $('#grid-view').empty(); @@ -165,7 +178,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout filtercount = filtercount + 1; } - angular.forEach($scope.selectedCIlistViewData, function (value, key) { + angular.forEach($scope.selectedCIListViewData, function (value, key) { var selectimg = true; var count = 0; @@ -239,7 +252,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $scope.imagePath = "~/../content/images/ci/thumbnails/" + value._ThumbnailImage; - var $el = $('
' + var $el = $('
' + '
' + '' + '

' + value._Title + '

').appendTo('#grid-view'); @@ -253,7 +266,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); - $scope.searchCIlistViewData.push( + $scope.searchCIListViewData.push( { "_id": value._id, "_ImageId": value._ImageId, @@ -273,6 +286,13 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout }); + + //Show Error Message in case of gridview if no data is found + if ($scope.searchCIListViewData.length == 0) { + + var $el = $('
No illustration found for the selected search criteria!
').appendTo('#grid-view'); + $compile($el)($scope); + } } @@ -288,12 +308,12 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { var CITitle = []; CITitle = new jinqJs() - .from($scope.selectedCIlistViewData) + .from($scope.selectedCIListViewData) .where('_id = ' + $event.currentTarget.id) .select('_Title'); // console.log(CITitle); - // console.log($scope.selectedCIlistViewData); + // console.log($scope.selectedCIListViewData); $rootScope.ViewTitle = CITitle[0]._Title; } @@ -426,7 +446,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout $rootScope.openViews.push( { - "module": $rootScope.currentActiveModuleTitle, "body-views": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, "slug": $rootScope.currentSlug }); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 5dc429f..5588b3f 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.imagePath = ""; $rootScope.BodyRegionData; $rootScope.BodyRegionCordinatesData; - $scope.isTransparencyActivated; + $scope.isTransparencyActivated = false; $rootScope.BodyLayerData; $rootScope.VocabTermData; @@ -45,7 +45,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.doHighlightOrExtract = false; $scope.isEligibleForHighlightBodyByTermList = false; - // $scope.AnteriorView = "active"; + // $scope.AnteriorView = "active"; $scope.zoomInOut = 75; $scope.speechBubbleCounter = 0; @@ -441,7 +441,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (openViews != null && openViews != undefined) { angular.forEach(openViews, function (value, key) { - if (value.body - views == tittle) { + if (value.bodyView == tittle) { tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; $rootScope.currentActiveViewTitle = tittle; localStorage.setItem("currentViewTitle", tittle); @@ -480,7 +480,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //0.2 $rootScope.openViews.push( { - "module": $rootScope.currentActiveModuleTitle, "body-views": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, "slug": $rootScope.currentSlug } ); @@ -943,17 +943,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var isiOSSafari = (navigator.userAgent.match(/iPad/i)) ? true : false; //set scrollbars on canvas and hide loading label - $('#daLoaderLabel').css('visibility', 'hidden') + $('#daLoaderLabel').css('visibility', 'hidden') - $('#canvasDiv').css('overflow', 'scroll') - if (isiOSSafari) { - $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) + $('#canvasDiv').css('overflow', 'scroll') + if (isiOSSafari) { + $('#canvasDiv').scrollLeft($('#canvasDiv').width() + 150) - } - else { - $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) - } + } + else { + $('#canvasDiv').scrollLeft($('#canvasDiv').width() / 2) + } // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) @@ -1420,16 +1420,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (isMaskImage == 'N') { - $scope.ColoredImageSRC.push( - { - "bodyRegionId": bodyRegionId, "SRC": src, - "Height": h, - "Width": w, - "x": x, - "y": y, - "haveMirror": 'true' - } - ); + + + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'true' + } + ); + // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) @@ -1454,11 +1457,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.isEligibleForHighlight == true) { - if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { - - $rootScope.isLoading = false; - $('#spinner').css('visibility', 'hidden'); - + if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -1734,6 +1733,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo img.src = src; + + function start() { //debugger; context.drawImage(img, 0, 0); @@ -1743,17 +1744,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //do nothing } else { - $scope.ColoredImageSRC.push( - { - "bodyRegionId": bodyRegionId, "SRC": src, - "Height": h, - "Width": w, - "x": x, - "y": y, - "haveMirror": 'false' - } - - ); + + $scope.ColoredImageSRC.push( + { + "bodyRegionId": bodyRegionId, "SRC": src, + "Height": h, + "Width": w, + "x": x, + "y": y, + "haveMirror": 'false' + } + + ); + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { @@ -1778,13 +1781,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { - $rootScope.isLoading = false; - $('#spinner').css('visibility', 'hidden'); - $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); - //$timeout(function () { + console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) $rootScope.isHighLight = true; @@ -1793,7 +1793,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.highLightBody(); console.log('just after highLightBody call'); - //}, 500); + } } } @@ -1851,10 +1851,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.isListManagerSelected) { - multiTermList = $scope.AllTerms; + multiTermList = $scope.AllTerms; - } - else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { + } + else if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) { angular.forEach($rootScope.previousHighlightList, function (value, key) { var ActualTermNo = $scope.getActualTermNumber(value); @@ -2052,6 +2052,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // $rootScope.updatedGrayDataList = null; // $rootScope.updatedGrayDataList = []; //} + $rootScope.isLoading = true; + $('#spinner').css('visibility', 'visible'); + if ($rootScope.isHighLight == true) { false; @@ -2246,7 +2249,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.highlightedBR.length == 5)) { $scope.doAligneCanvasWithTerm = true; } - else if ((($rootScope.viewOrientationId == '5')) && ($scope.highlightedBR.length == 4)) { + else if ((($rootScope.viewOrientationId == '5')) && ($scope.highlightedBR.length == 1)) { $scope.doAligneCanvasWithTerm = true; } else if ((($rootScope.viewOrientationId == '6')) && ($scope.highlightedBR.length == 1)) { @@ -2255,13 +2258,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.doAligneCanvasWithTerm == true) { //debugger; - if ($scope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) + if ( $rootScope.isHighlightBodyByBodySystem == true || $rootScope.isListManagerSelected == true) $rootScope.isLoading = false; - $('#spinner').css('visibility', 'hidden'); + $('#spinner').css('visibility', 'hidden'); - $scope.isHighlightBodyByBodySystem = false; + //$rootScope.isHighlightBodyByBodySystem = false; if ($rootScope.isListManagerSelected == true) $scope.aligneCanvasWithTerm(); @@ -2414,10 +2417,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.LayerChange = function () { - //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; + //if listanager is visisble then close it + // $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); + $rootScope.CloseListManager(); @@ -2506,6 +2509,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } else { + + //1. Dated:13-07-2016 Issue #4965 : The layer number should not extend beyond its level through layer text box. var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; if (parseInt($('#txtlayerNumber').val()) > (dataLength - 1)) { @@ -2516,6 +2521,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); + //$scope.isMousUp(); + + //alert('$scope.currentLayerNumber'); + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); var canDiv = document.getElementById('canvasDiv'); @@ -2524,6 +2533,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo canDiv.innerHTML = ''; } + + //2. $scope.CalculateImageCordinates($rootScope.viewOrientationId); @@ -2531,7 +2542,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) $('#canvasDiv').scrollTop($scope.imageVerticalScrollPosition) - if ($scope.isHighlightBodyByBodySystem) { + if ( $rootScope.isHighlightBodyByBodySystem) { $timeout(function () { $scope.DisableProgressBar() }, 20000); } else @@ -2543,6 +2554,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); } + $scope.LayerChangeOnMouseUpDown = function (e) + { + + $scope.LayerChange(); + + } + + $scope.DisableProgressBar = function () { // alert('Disabled wait cursor is called'); @@ -3403,30 +3422,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.createTransparencyBox = function () { + $scope.isTransparencyActivated = true; - //if listanager is visisble then close it - + //do not create TBOX if in extarct mode otherwise create + if ($rootScope.isExtract == false) { + + $("#btnExtract").addClass("disabled"); + + //if listanager is visisble then close it $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); - $scope.isTransparencyActivated = true; - // alert('transparencyClicked' + $scope.isTransparencyActivated) - $('#btnTranparency').addClass('tButtonActive'); - $('#btnIdentity').removeClass(' btn-primary'); - $('#btnIdentity').addClass('btn-black'); + + // alert('transparencyClicked' + $scope.isTransparencyActivated) + $('#btnTranparency').addClass('tButtonActive'); + $('#btnIdentity').removeClass(' btn-primary'); + $('#btnIdentity').addClass('btn-black'); - var canvasDiv = document.getElementById('canvasDiv'); - $scope.verticalScrollPosition = canvasDiv.scrollTop; - $scope.horizontlScrollPosition = canvasDiv.scrollLeft; + var canvasDiv = document.getElementById('canvasDiv'); + $scope.verticalScrollPosition = canvasDiv.scrollTop; + $scope.horizontlScrollPosition = canvasDiv.scrollLeft; - var canvasDiv = document.getElementById('canvasDiv'); - canvasDiv.addEventListener("mousedown", mouseDownListener); + var canvasDiv = document.getElementById('canvasDiv'); + canvasDiv.addEventListener("mousedown", mouseDownListener); + + canvasDiv.addEventListener("mousemove", mouseMoveListener); - canvasDiv.addEventListener("mousemove", mouseMoveListener); + canvasDiv.addEventListener("mouseup", mouseUpListener) + + } + else { - canvasDiv.addEventListener("mouseup", mouseUpListener) + // console.log("extract button is active"); + } } function mouseDownListener(e) { @@ -3511,6 +3541,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // $selection.remove(); // debugger; + //alert('mouse up'); + console.log('MOUSE UP'); + $scope.currentLayerNumber = parseInt($('#txtlayerNumber').val()); $('.rectangle').remove(); @@ -3650,7 +3683,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#btnTranparency').addClass('tButtonActive'); //debugger; - $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); + // $('#txtlayerNumber').val((parseInt($scope.currentLayerNumber)) + 1); //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. $('#btnTranparency').removeClass('tButtonActive'); $('#btnTranparency').addClass('btn-black'); @@ -3813,16 +3846,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //do nothing } else if (isLayerChanged) { - // debugger + + // alert('isMousUp on isLayerChanged'); + $scope.layerNumber = parseInt($('#txtlayerNumber').val()); } else { + //var currentLayer = parseInt($('#txtlayerNumber').val()); + + //var tranparencyLayer = currentLayer + 1; + //$scope.layerNumber = tranparencyLayer; + + var tranparencyLayer; var currentLayer = parseInt($('#txtlayerNumber').val()); + if (currentLayer == $rootScope.totalLayers) { + + tranparencyLayer = currentLayer; + + } + + else + { + + tranparencyLayer = currentLayer + 1; + + } + + $scope.layerNumber = tranparencyLayer; - var tranparencyLayer = currentLayer + 1; - $scope.layerNumber = tranparencyLayer; } + + $('#txtlayerNumber').val($scope.layerNumber); //dedebugger; //1. get the image source @@ -4497,6 +4552,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.CloseTransparencyBox = function () { + //To enable extract button + $scope.isTransparencyActivated = false; + $("#btnExtract").removeClass("disabled"); + $('.com_anno').css('display', 'none'); $('#sppeachBubble_annotation').css('display', 'none'); @@ -4632,12 +4691,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.enableZoom = function () { - + $("#btnExtract").removeClass("disabled"); + $("#btnTranparency").removeClass("disabled"); + $rootScope.isTransparencyBoxActivated = false; + $rootScope.isNormalMode = false; //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); + $rootScope.isHighlightBodyByBodySystem = false; + + $('#sppeachBubble').css('display', 'none'); $("#dot").css("display", "none"); @@ -4691,73 +4755,30 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.flushCanvas = function () { - //if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { - // angular.forEach($scope.ColoredImageSRC, function (value, key) { - - // var id; - // var maskId; - // if (value.haveMirror == 'true') { - // id = 'imageCanvas' + value.bodyRegionId + '_MR'; - // maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' - // } - // else { - // id = 'imageCanvas' + value.bodyRegionId; - // maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; - // } - - // var canvas = document.getElementById(id); - // if (canvas != null || canvas != undefined) { - // document.getElementById('canvasDiv').removeChild(canvas); - // } - - // var maskcanvas = document.getElementById(maskId); - // if (maskcanvas != null || maskcanvas != undefined) { - // document.getElementById('canvasDiv').removeChild(maskcanvas); - - // } - // if (i == 4 || i == 5 || i == 6) { - // id = 'imageCanvas' + i + '_MR'; - // maskId = 'imageCanvas' + i + '_MR_mci'; - - // var canvas = document.getElementById(id); - // if (canvas != null || canvas != undefined) - // document.getElementById('canvasDiv').removeChild(canvas); - - // var maskcanvas = document.getElementById(maskId); - // if (maskcanvas != null || maskcanvas != undefined) - // document.getElementById('canvasDiv').removeChild(maskcanvas); - // } - - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); - // for (var i = 0; i < modestyCanvases.length; i++) { - // modestyCanvases[i].remove(); - // } - // }); - // //remove modesty canavs - // var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); - // if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { - // for (var j = 0; j < modestyCanvases.length; j++) { - // modestyCanvases[j].remove(); - // } - // } - //} - - for (var i = 1; i < 7; i++) { - - var id; - var maskId; + if ($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) { + angular.forEach($scope.ColoredImageSRC, function (value, key) { - id = 'imageCanvas' + i; - maskId = 'imageCanvas' + i + '_mci'; + var id; + var maskId; + if (value.haveMirror == 'true') { + id = 'imageCanvas' + value.bodyRegionId + '_MR'; + maskId = 'imageCanvas' + value.bodyRegionId + '_MR_mci' + } + else { + id = 'imageCanvas' + value.bodyRegionId; + maskId = 'imageCanvas' + value.bodyRegionId + '_mci'; + } - var canvas = document.getElementById(id); - if (canvas != null || canvas != undefined) - document.getElementById('canvasDiv').removeChild(canvas); + var canvas = document.getElementById(id); + if (canvas != null || canvas != undefined) { + document.getElementById('canvasDiv').removeChild(canvas); + } - var maskcanvas = document.getElementById(maskId); - if (maskcanvas != null || maskcanvas != undefined) - document.getElementById('canvasDiv').removeChild(maskcanvas); + var maskcanvas = document.getElementById(maskId); + if (maskcanvas != null || maskcanvas != undefined) { + document.getElementById('canvasDiv').removeChild(maskcanvas); + } if (i == 4 || i == 5 || i == 6) { id = 'imageCanvas' + i + '_MR'; maskId = 'imageCanvas' + i + '_MR_mci'; @@ -4771,6 +4792,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo document.getElementById('canvasDiv').removeChild(maskcanvas); } + var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); + for (var i = 0; i < modestyCanvases.length; i++) { + modestyCanvases[i].remove(); + } + }); //remove modesty canavs var modestyCanvases = $("canvas[id*='imageCanvasmodestyImg']"); if (modestyCanvases != null || modestyCanvases != undefined && modestyCanvases.length > 0) { @@ -4779,6 +4805,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } } + + } $scope.terminateCurrentlyRunningWPs = function () { @@ -4798,14 +4826,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.enableHighlight = function () { - - + + // $("#btnExtract").removeClass("disabled"); + $("#btnTranparency").removeClass("disabled"); + // $rootScope.isTransparencyBoxActivated = false; + // $rootScope.isNormalMode = false; //if listanager is visisble then close it - // $rootScope.isListManagerSelected = false; + // $rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); + $rootScope.isHighlightBodyByBodySystem = false; + if ($rootScope.isHighLight == true) { } @@ -4857,19 +4890,24 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($("#btnNormalMode").hasClass("btn-primary")) { $("#btnNormalMode").removeClass("btn-primary"); } + } $scope.enableNormalMode = function () { - + $("#btnTranparency").removeClass("disabled"); + $rootScope.isNormalMode = false; console.log('enableNormalMode is called'); - // $rootScope.isHighLight = false; + // $rootScope.isHighLight = false; - //to do should not call every time - $rootScope.CloseListManager(); + //to do should not call every time + $rootScope.CloseListManager(); + $rootScope.isHighlightBodyByBodySystem = false; + + if ($rootScope.isNormalMode == true) { } @@ -4896,6 +4934,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //7. $scope.CalculateImageCordinates($rootScope.viewOrientationId); + $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition); + $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition); + } @@ -4924,66 +4965,84 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.enableExtract = function () { + $rootScope.isHighlightBodyByBodySystem = false; - //if listanager is visisble then close it + $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop(); - // $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); - //1. - $rootScope.isLoading = true; - $('#spinner').css('visibility', 'visible'); + $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); + - //2. - $scope.terminateCurrentlyRunningWPs(); - //3. - if ($rootScope.isExtract == true) { + if ($scope.isTransparencyActivated == true) { + + $("#btnExtract").addClass("disabled"); } + + else { - $rootScope.isExtract = true; + + $rootScope.CloseListManager(); + //1. + $rootScope.isLoading = true; + $('#spinner').css('visibility', 'visible'); + + //2. + $scope.terminateCurrentlyRunningWPs(); - if ($rootScope.isNormalMode == true) { + //3. + if ($rootScope.isExtract == true) { - $rootScope.isHighLight = false; - $rootScope.isNormalMode = false; } else { - $rootScope.isNormalMode = false; - $rootScope.isHighLight = false; - } + $rootScope.isExtract = true; + //disable transparency button + + $("#btnTranparency").addClass("disabled"); - //4. - console.log('highLightBody from enableExtract') - $scope.highLightBody(); + if ($rootScope.isNormalMode == true) { - } + $rootScope.isHighLight = false; + $rootScope.isNormalMode = false; + } + else { + $rootScope.isNormalMode = false; + $rootScope.isHighLight = false; + } - //5. unhighlight other - //$scope.Normal = ""; - //$scope.Extract = "LeftButtonsDefaultState"; - //$scope.Highlight = ""; + //4. + console.log('highLightBody from enableExtract') + $scope.highLightBody(); - $("#btnExtract").addClass("btn-primary"); - $("#btnExtract").removeClass("btn-black"); - if (!$("#btnNormalMode").hasClass("btn-black")) { - $("#btnNormalMode").addClass("btn-black"); - } + } - if (!$("#btnHighLight").hasClass("btn-black")) { - $("#btnHighLight").addClass("btn-black"); - } + //5. unhighlight other + //$scope.Normal = ""; + //$scope.Extract = "LeftButtonsDefaultState"; + //$scope.Highlight = ""; - if ($("#btnNormalMode").hasClass("btn-primary")) { - $("#btnNormalMode").removeClass("btn-primary"); - } + $("#btnExtract").addClass("btn-primary"); + $("#btnExtract").removeClass("btn-black"); - if ($("#btnHighLight").hasClass("btn-primary")) { - $("#btnHighLight").removeClass("btn-primary"); + if (!$("#btnNormalMode").hasClass("btn-black")) { + $("#btnNormalMode").addClass("btn-black"); + } + + if (!$("#btnHighLight").hasClass("btn-black")) { + $("#btnHighLight").addClass("btn-black"); + } + + if ($("#btnNormalMode").hasClass("btn-primary")) { + $("#btnNormalMode").removeClass("btn-primary"); + } + + if ($("#btnHighLight").hasClass("btn-primary")) { + $("#btnHighLight").removeClass("btn-primary"); + } } } @@ -4997,13 +5056,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $(".com").toggle(); $('#dot').toggle(); - $('#sppeachBubble').toggle() + $('#sppeachBubble').toggle(); + } $scope.highLightBody = function () { + $rootScope.isLoading = true; + $('#spinner').css('visibility', 'visible'); + + $scope.Normal = ""; $scope.Extract = ""; $scope.Highlight = "LeftButtonsDefaultState"; @@ -5174,7 +5238,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //} - if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { + if (( $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { $scope.isLoading = true; @@ -5187,6 +5251,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length); $timeout(function () { + $scope.isLoading = true; + $('#spinner').css('visibility', 'visible'); + $scope.HighlightBodyByTermList($scope.AllTerms) }, 800); @@ -5213,7 +5280,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo else if ($rootScope.isListManagerSelected == true) { console.log('1. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') - $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); + $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); } } @@ -5376,7 +5443,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('2. $rootScope.isExtract=true and $rootScope.isListManagerSelected == true') $timeout(function () { $scope.HighlightBodyOnExtract() }, 50); - } + } } } @@ -5456,10 +5523,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.OnGenderChange = function (event) { + + + $("#btnExtract").removeClass("disabled"); + $("#btnTranparency").removeClass("disabled"); + $rootScope.isTransparencyBoxActivated = false; + $rootScope.isNormalMode = false; + //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; - $rootScope.CloseListManager(); + // $rootScope.isListManagerSelected = false; + $rootScope.CloseListManager(); + + $rootScope.isHighlightBodyByBodySystem = false; + + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -5525,7 +5603,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.openViews.push( { - "module": $rootScope.currentActiveModuleTitle, "body-views": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId, + "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId, "slug": $rootScope.currentSlug } ); @@ -5599,7 +5677,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (canDivChildCount > 0) { canDiv.innerHTML = ''; } - $scope.CalculateImageCordinates($rootScope.viewOrientationId); + //if user seelcted any term and serached before gender cnage then itshould be highlighted in chnaged gender + + if (($rootScope.isListManagerSelected == true) && (($rootScope.isGenderChnage == true) || $rootScope.isViewChange == true)) { + + $scope.setLayerNumberAndHighlightByTermList(); + + } + + else { + + $scope.CalculateImageCordinates($rootScope.viewOrientationId); + + } + $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); }, function (error) { @@ -5618,11 +5709,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.OnViewChange = function (event) { + + $("#btnExtract").removeClass("disabled"); + $("#btnTranparency").removeClass("disabled"); + $rootScope.isTransparencyBoxActivated = false; + $rootScope.isNormalMode = false; + + //if listanager is visisble then close it - $rootScope.isListManagerSelected = false; + //$rootScope.isListManagerSelected = false; $rootScope.CloseListManager(); + $rootScope.isHighlightBodyByBodySystem = false; + $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); @@ -5701,7 +5801,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $rootScope.openViews.push( { - "module": $rootScope.currentActiveModuleTitle, "body-views": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, + "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, "slug": $rootScope.currentSlug } ); @@ -5778,25 +5878,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.$on('reloadDABodyViewEvent', function (event, data) { //console.log('reloadDABodyViewEvent'); $scope.layerNumber = parseInt($('#txtlayerNumber').val()); - //$scope.ReloadBodyViewId = data.reloadDABodyViewId; - // $scope.layerNumber = 0; - // debugger; - - //console.log('reloadDABodyViewEvent ' + $scope.ReloadBodyViewId); - - //if ($rootScope.isSettingEventAlredayDispachted == true) { + //alert('mouseUp'); - $scope.loadSelectedBodyView(data.reloadDABodyViewId); + + if ($scope.layerNumber == 0) { + $scope.loadSelectedBodyView(data.reloadDABodyViewId); + } + // $scope.loadSelectedBodyView(data.reloadDABodyViewId); $scope.loadSelectedBodyViewNavigator(data.reloadDABodyViewId); - $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); + // $scope.currentTitleFromJson = localStorage.getItem("currentViewTitle"); //$rootScope.isSettingEventAlredayDispachted = false; //} }) + + $scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) { //$rootScope.voId = currentBodyViewId; @@ -6877,7 +6977,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //NIKITA - $scope.isHighlightBodyByBodySystem = true; + $rootScope.isHighlightBodyByBodySystem = true; $scope.systemMatchedTermList = new jinqJs() .from($rootScope.BodySystemData.BodySystem.BodySystemTerm) .where('_SystemNumber == ' + event.currentTarget.id) @@ -6889,14 +6989,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo console.log('highLightBody from HighlightBodyByBodySystem') $scope.highLightBody(); } - //now highlight the selected body system in whole body + //$rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); //NIKITA - // $scope.isHighlightBodyByBodySystem = true; + // $rootScope.isHighlightBodyByBodySystem = true; //if (systemMatchedTermList != null || systemMatchedTermList != undefined) { @@ -7143,7 +7243,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.jumpToTerm = function (event) { - + $rootScope.isLoading = true; + + $('#spinner').css('visibility', 'visible'); //1. $scope.searchFilter = event.currentTarget.innerHTML; @@ -7191,7 +7293,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $("#canvasDiv").scrollTop(scrolly); $("#canvasDiv").scrollLeft(scrollx); - if (($scope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { + if (( $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) { $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100); } @@ -7201,7 +7303,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.$on('listManagerEvent', function (event, data) { $('#spinner').css('visibility', 'visible'); - console.log('listManagerEvent') + console.log('listManagerEvent'); + + + if ($rootScope.islistManagerEventAlredayDispachted == true) { @@ -7221,7 +7326,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo - + $('#viewName').empty(); var currentView = localStorage.getItem("currentViewTitle"); var viewNmeHtml = '' $('#viewName').append(viewNmeHtml); @@ -7291,6 +7396,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo for (var j = 0; j < $scope.VocabTermTxt.length; j++) { var $el = $('').appendTo('#termList') $compile($el)($scope); + $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); } @@ -7306,116 +7412,127 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.HighlightBodyOnListManagerSelection = function (event) { $scope.terminateCurrentlyRunningWPs(); - + //debugger $rootScope.isListManagerSelected = true; - - $rootScope.setScrollBasedOnSearch = true; - $rootScope.isLoading = true; $('#spinner').css('visibility', 'visible'); + + $rootScope.isHighlightBodyByBodySystem = false; + //1. - var actualTermNumber = event.currentTarget.id;//attributes[0].value; - $scope.TermList = $scope.getTermNumberList(actualTermNumber); + $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value; + console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber) //2. - var internalLayerNumberList = []; - for (var i = 0; i < $scope.TermList.length; i++) { - var layerNumber = $scope.TermList[i]._InternalLayerNumber - internalLayerNumberList[i] = parseInt(layerNumber); - } + $scope.setLayerNumberAndHighlightByTermList(); - internalLayerNumberList.sort(function (a, b) { return a - b }) - var internalLayerNumber = internalLayerNumberList[0]//.replace('00', ''); - //3. get layer number - if (internalLayerNumber >= DA[0].SKIN_START_INTERNAL_LAYER && internalLayerNumber <= DA[0].SKIN_END_INTERNAL_LAYER) { + } - internalLayerNumber = DA[0].SKIN_DEFAULT_INTERNAL_LAYER; - } + $scope.setLayerNumberAndHighlightByTermList = function () { + console.log(' $scope.actualTermNumber insde setLayerNumberAndHighlightByTermList= ' + $rootScope.actualTermNumber) - var layerNumber; - var matchedLayerNumber = new jinqJs() - .from($rootScope.BodyLayerData.Layers.DataLayer) - .where("_lni == " + internalLayerNumber) - .select('_LayerNumber'); + $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber); - if (matchedLayerNumber == null || matchedLayerNumber.length == 0) { - layerNumber = 0; - } - else { - layerNumber = matchedLayerNumber[0]._LayerNumber - } + if (($scope.TermList != null || $scope.TermList != undefined) && $scope.TermList.length > 0) { - if (layerNumber == 0) { - layerNumber = $rootScope.totalLayers; - } - else { - layerNumber = parseInt(layerNumber) - 1; - } + var internalLayerNumberList = []; + for (var i = 0; i < $scope.TermList.length; i++) { + var layerNumber = $scope.TermList[i]._InternalLayerNumber - $scope.layerNumber = layerNumber; + internalLayerNumberList[i] = parseInt(layerNumber); + } - //4.get scroll position - if (actualTermNumber != DA[0].SKIN_TERM_ID) { + internalLayerNumberList.sort(function (a, b) { return a - b }) + var internalLayerNumber = internalLayerNumberList[0]//.replace('00', ''); - $scope.termCoordinate = $scope.getTermCoordinate(actualTermNumber); + //3. get layer number + if (internalLayerNumber >= DA[0].SKIN_START_INTERNAL_LAYER && internalLayerNumber <= DA[0].SKIN_END_INTERNAL_LAYER) { - } + internalLayerNumber = DA[0].SKIN_DEFAULT_INTERNAL_LAYER; + } - //5. - $scope.matchdedDataOnLayer = new jinqJs() - .from($rootScope.TermNumberData.TermData.Term) - .where('_InternalLayerNumber == ' + internalLayerNumber) - .select(); + var layerNumber; + var matchedLayerNumber = new jinqJs() + .from($rootScope.BodyLayerData.Layers.DataLayer) + .where("_lni == " + internalLayerNumber) + .select('_LayerNumber'); - if ($scope.matchdedDataOnLayer != null || $scope.matchdedDataOnLayer != undefined) { + if (matchedLayerNumber == null || matchedLayerNumber.length == 0) { + layerNumber = 0; + } + else { + layerNumber = matchedLayerNumber[0]._LayerNumber + } - //6. - var matchedDataonActualTerm = new jinqJs() - .from($scope.matchdedDataOnLayer) - .where('_ActualTermNumber == ' + actualTermNumber) - .select('_TermNumber'); + if (layerNumber == 0) { + layerNumber = $rootScope.totalLayers; + } + else { + layerNumber = parseInt(layerNumber) - 1; + } - if (matchedDataonActualTerm != null || matchedDataonActualTerm != undefined) { + $scope.layerNumber = layerNumber; - var termNo = matchedDataonActualTerm[0]._TermNumber.toString(); + //4.get scroll position + if ($rootScope.actualTermNumber != DA[0].SKIN_TERM_ID) { - //7.get termList - $scope.fullTermlist = []; - $scope.AllTerms = []; + $scope.termCoordinate = $scope.getTermCoordinate($rootScope.actualTermNumber); - if (termNo != DA[0].figLeafTermId) { + } - $scope.getChildTermList(termNo); - // $timeout(function () { $scope.getSiblings(termNo) }, 50); - $scope.getSiblings(termNo) - } + //5. + $scope.matchdedDataOnLayer = new jinqJs() + .from($rootScope.TermNumberData.TermData.Term) + .where('_InternalLayerNumber == ' + internalLayerNumber) + .select(); - } - } + if ($scope.matchdedDataOnLayer != null || $scope.matchdedDataOnLayer != undefined) { - $('#txtlayerNumber').val((parseInt($scope.layerNumber))); - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); + //6. + var matchedDataonActualTerm = new jinqJs() + .from($scope.matchdedDataOnLayer) + .where('_ActualTermNumber == ' + $scope.actualTermNumber) + .select('_TermNumber'); - //8.remove current layer canavses - $scope.flushCanvas(); + if (matchedDataonActualTerm != null || matchedDataonActualTerm != undefined) { + var termNo = matchedDataonActualTerm[0]._TermNumber.toString(); + //7.get termList + $scope.fullTermlist = []; + $scope.AllTerms = []; - //9. - $timeout(function () { - $rootScope.isHighLight = false; - $('#sppeachBubble').css('display', 'none'); - $("#dot").css("display", "none"); + if (termNo != DA[0].figLeafTermId) { - //redraw body of respective layer - $scope.CalculateImageCordinates($rootScope.viewOrientationId) - }, 500); + $scope.getChildTermList(termNo); + // $timeout(function () { $scope.getSiblings(termNo) }, 50); + $scope.getSiblings(termNo) + } + } + } + } + $('#txtlayerNumber').val((parseInt($scope.layerNumber))); + $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); + + //8.remove current layer canavses + $scope.flushCanvas(); + + //9. + $timeout(function () { + $rootScope.isHighLight = false; + $('#sppeachBubble').css('display', 'none'); + $("#dot").css("display", "none"); + + //redraw body of respective layer + $scope.CalculateImageCordinates($rootScope.viewOrientationId) + }, 500); + } $scope.getChildTermList = function (termNo) { @@ -7485,6 +7602,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } + $scope.aligneCanvasWithTerm = function () { console.log('aligneCanvasWithTerm') var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); @@ -7492,30 +7610,46 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var canvasX = parseInt($('#canvasDiv').css('left')); var canvasY = parseInt($('#canvasDiv').css('top')); - var canvasWidth = parseInt($('#canvasDiv').css('width')); - var canvasHeight = parseInt($('#canvasDiv').css('height')); + var canvasHeight = $('#canvasDiv').height(); + var canvasWidth = $('#canvasDiv').width(); + var canvasBottom = canvasY + canvasHeight; var canvasRight = canvasX + canvasWidth - - if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) { - - } - else { + if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom) { + newX = newX - canvasWidth / 2; newY = newY - canvasHeight / 2; - } - + var maxVScrollPos = $('#canvasDiv')[0].scrollHeight; + var maxHScrollPos = $('#canvasDiv')[0].scrollWidth; + if (newY < maxVScrollPos) { + newY = newY; + } + else { + newY = maxVScrollPos; + } - console.log('newX =' + newX + ',newY= ' + newY) - $rootScope.xOnSearch= $('#canvasDiv').scrollLeft(newX); - $rootScope.yOnSearch = $('#canvasDiv').scrollTop(newY); + if (newX < maxHScrollPos) { + newX = newX; + } + else { + newX = maxHScrollPos; + } + $('#canvasDiv').scrollLeft(newX); + $('#canvasDiv').scrollTop(newY); + $scope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); + } + $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop(); + $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); + } + $scope.scaleValue = function (nValue, nNewZoom, nExistingZoom) { var iReturnValue = nValue * nNewZoom; @@ -7630,7 +7764,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - + $scope.LayerChangeBasedOnKeyPressed = function (e) { + + if(e.keyCode==13) + { + $scope.LayerChange(); + } + + } }] ); \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 6a2147f..d6de654 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -77,7 +77,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.openViews.push( { - "module": $rootScope.currentActiveModuleTitle, "body-views": title, "state": state, "BodyViewId": $rootScope.currentBodyViewId, + "module": $rootScope.currentActiveModuleTitle, "bodyView": title, "state": state, "BodyViewId": $rootScope.currentBodyViewId, "slug": $rootScope.currentSlug } ); @@ -120,13 +120,16 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.isAnnotationWindowOpen = true; $(".annotationTollbar").css("display", "block"); $rootScope.$broadcast('annotationToolEvent', true); - + $("#canvasPaint").css("display", "none"); + $("#canvas").css("display", "none"); } $rootScope.CloseAnnotationTool = function () { console.log('close') $(".annotationTollbar").css("display", "none"); $rootScope.isAnnotationWindowClose = true; + $("#canvasPaint").css("display", "none"); + $("#canvas").css("display", "none"); } $rootScope.OnIdentifyClick = function () { @@ -188,6 +191,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.DrawRectangle = function (e) { + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); $rootScope.switchCanvas(); $rootScope.shapeType = "Rectangle"; $('.btnCursor').removeClass('activebtncolor'); @@ -197,6 +202,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.paintBrush = function () { // debugger; // $('.btnCursor').addClass('activebtncolor'); + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); $rootScope.switchCanvasToPaintCanvas(); $rootScope.shapeType = "FreeStylePaint"; var a = $("#amount-2").val(); @@ -230,6 +237,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.DrawCircle = function (e) { + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); $rootScope.switchCanvas(); $rootScope.shapeType = "Circle"; $('.btnCursor').removeClass('activebtncolor'); @@ -238,6 +247,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.DrawArrow = function (e) { + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); $rootScope.switchCanvas(); $rootScope.shapeType = "Arrow"; $('.btnCursor').removeClass('activebtncolor'); @@ -245,6 +256,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $(".btn-annotation-arrow").addClass("activebtncolor"); } $rootScope.DrawText = function () { + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); $rootScope.switchCanvas(); $rootScope.shapeType = "TextArea"; @@ -256,6 +269,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.DrawPolygon = function () { + $("#canvasPaint").css("display", "block"); + $("#canvas").css("display", "block"); $rootScope.shapeType = "DrawPolygon"; } @@ -297,6 +312,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.shapestyle = function (id) { document.getElementById('modelbackground').style.display = "none"; + document.getElementById('modeleditstyle').style.display = "none"; $rootScope.shapestyleOpacity = $("#" + id).css('opacity'); $rootScope.shapestyleFillColor = $("#" + id).parent().css('background-color'); @@ -319,15 +335,17 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.enableAnnotationToolBar = function () { - + document.getElementById('modelbackground').style.display = "block"; - $("#editshapestyle").modal('show'); + //$("#editshapestyle").modal('show'); + document.getElementById('modeleditstyle').style.display = "block"; } $rootScope.disableAnnotationToolBar = function () { document.getElementById('modelbackground').style.display = "none"; + document.getElementById('modeleditstyle').style.display = "none"; } @@ -438,6 +456,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", //$rootScope.isListManagerSelected = false; $('#listManager').css('display', 'none'); $("#listManager").css("visibility", "hidden"); + + $rootScope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); + //$('#spinner').css('display', 'none'); // $rootScope.isAnnotationWindowClose = true; // if('#termList') if ($('#termList option').length > 0) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html index 356a62b..88551d6 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ca/ca-view.html @@ -57,7 +57,7 @@ - + {{item._Title}} @@ -73,7 +73,7 @@ - + {{item._Title}} @@ -87,6 +87,9 @@ {{item._MedicalSpecialty}} + + No animation found for the selected search criteria! +
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html index 30980cd..14f41b1 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html @@ -60,7 +60,7 @@
-
  • List Manager
  • -
  • Annotation Toolbar
  • +
  • Annotation Toolbar
  • Add to Existing Curriculum
  • Settings
  • diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index c0d7bfc..b02ef0a 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -1,7 +1,8 @@  - + + @@ -55,6 +56,24 @@ border-color: #1B92D0 !important; color: #ffffff !important; }*/ + + .custom-tooltip-annotation { + background-color: #fff; + border: 0 none; + color: #000; + left: -52px; + opacity: 0.9; + padding: 3px 0; + position: absolute; + text-align: center; + top: 41px; + width: 120px; + display: none; + z-index: 10000; + border: 1px solid #000; + color: #000; + border-radius: 0; + } @@ -395,11 +414,13 @@
    Mode
    -
    - +
    + +
    - + +
    @@ -430,7 +451,7 @@
      -
      +
     
    @@ -986,6 +1007,27 @@ div.style.display = 'block'; } + @@ -1033,7 +1075,7 @@ - +