Commit a32890031380273aae1fa639c3c6a13be75f73fe
Merge branch 'Develop-IPAD-MAC' of http://52.6.196.163/ADAM/AIAHTML5 into AndroidInputLayerIssue_1
Showing
8 changed files
with
307 additions
and
244 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -290,6 +290,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
290 | 290 | } |
291 | 291 | //to disbale layer change slider |
292 | 292 | $('.ui-slider').slider('disable'); |
293 | + | |
294 | + $scope.isLoading = true; | |
295 | + $('#spinner').css('visibility', 'visible'); | |
293 | 296 | } |
294 | 297 | |
295 | 298 | $scope.EnableUI = function () { |
... | ... | @@ -302,6 +305,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
302 | 305 | //to enable layer change slider |
303 | 306 | $('.ui-slider').slider('enable'); |
304 | 307 | |
308 | + $scope.isLoading = false; | |
309 | + | |
310 | + $('#spinner').css('visibility', 'hidden'); | |
305 | 311 | } |
306 | 312 | |
307 | 313 | $scope.openView = function ($event) { |
... | ... | @@ -469,8 +475,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
469 | 475 | |
470 | 476 | //disable whole div because till now jspanel is not created. enable when jspanel gets disabled because |
471 | 477 | //than jspanel will take care of disabling/enabling ui |
472 | - document.getElementById('daBodyview').style.pointerEvents = "none"; | |
473 | - document.getElementById('daBodyview').style.opacity = "0.5"; | |
478 | + | |
479 | + if (document.getElementById('daBodyview') != null) { | |
480 | + document.getElementById('daBodyview').style.pointerEvents = "none"; | |
481 | + document.getElementById('daBodyview').style.opacity = "0.5"; | |
482 | + } | |
474 | 483 | |
475 | 484 | //Check if browser 'REFRESHED' or 'RELOADED' |
476 | 485 | if ($rootScope.CommonData != null) { |
... | ... | @@ -501,7 +510,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
501 | 510 | |
502 | 511 | $rootScope.loadSearchData(); |
503 | 512 | |
504 | - console.log('currentBodyViewId pickjed from localStorage: ' + currentBodyViewId); | |
513 | + console.log('currentBodyViewId picked from localStorage: ' + currentBodyViewId); | |
505 | 514 | |
506 | 515 | var openViews; |
507 | 516 | if ($rootScope.openViews != null || $rootScope.openViews != undefined) { |
... | ... | @@ -578,15 +587,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
578 | 587 | console.log('html is compiled ' + document.getElementById('daView')) |
579 | 588 | |
580 | 589 | if (document.getElementById('daView') != null) { |
581 | - | |
582 | - $scope.loadDAView(currentBodyViewId); | |
590 | + $scope.loadDAView(currentBodyViewId); | |
583 | 591 | } |
584 | 592 | else |
585 | 593 | { |
586 | - $compile(daBodyviewElement.contents())($scope); | |
594 | + // this is a work around solution for a bug where DA does not load for long and user need to close the DA partially opened | |
595 | + // view, now we are programmatically closing the hung view and when user will reopen the DA view from tile then it will | |
596 | + // open without any issue. | |
597 | + $("#daImagePanel .jsglyph-remove").click(); | |
598 | + | |
587 | 599 | console.log('html is compiled in else ' + document.getElementById('daView')) |
588 | - | |
589 | - $scope.loadDAView(currentBodyViewId); | |
590 | 600 | |
591 | 601 | } |
592 | 602 | |
... | ... | @@ -718,11 +728,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
718 | 728 | }); |
719 | 729 | } |
720 | 730 | |
721 | - $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
731 | + $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { | |
732 | + | |
722 | 733 | $rootScope.selectedBodySystemName = 'All'; |
723 | 734 | $rootScope.selectedBodySystemId = 0; |
724 | 735 | $rootScope.searchSelectedText = ''; |
725 | 736 | }); |
737 | + | |
738 | + var sliderVal = document.getElementById('layerChangeSlider'); | |
739 | + | |
740 | + console.log('on slider initialize:' + sliderVal); | |
741 | + | |
742 | + | |
726 | 743 | $("#layerChangeSlider").slider({ |
727 | 744 | orientation: "vertical", |
728 | 745 | range: "max", |
... | ... | @@ -730,6 +747,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
730 | 747 | value: 0, |
731 | 748 | slide: function (event, ui) |
732 | 749 | { |
750 | + var sliderVal = document.getElementById('layerChangeSlider'); | |
751 | + | |
752 | + console.log('on slider slide :' + sliderVal); | |
753 | + | |
733 | 754 | var layerNum; |
734 | 755 | var daViewScope = angular.element(document.getElementById("daView")).scope(); |
735 | 756 | layerNum = parseInt(daViewScope.totalLayers) //- parseInt(scope.layerNumber); |
... | ... | @@ -913,6 +934,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
913 | 934 | $rootScope.totalLayers = dataLength - 1; |
914 | 935 | |
915 | 936 | $('#txtLayerNumber').attr('max', $rootScope.totalLayers); |
937 | + | |
938 | + var layerChangeSliderVal = document.getElementById('layerChangeSlider'); | |
939 | + | |
940 | + console.log('inside bodyViewWorker.onmessage. $rootScope.totalLayers = ' + $rootScope.totalLayers + ' #layerChangeSlider value: ' + layerChangeSliderVal); | |
941 | + | |
916 | 942 | $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); |
917 | 943 | |
918 | 944 | $scope.isBodylayerdataLoaded = true; |
... | ... | @@ -1332,9 +1358,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1332 | 1358 | |
1333 | 1359 | // $('#canvasDiv').scrollLeft($scope.imageHorizontlScrollPosition) |
1334 | 1360 | $('#canvasDiv').scrollTop(50) |
1335 | - var abc = $rootScope.BodyRegionCordinatesData; | |
1361 | + //var abc = $rootScope.BodyRegionCordinatesData; | |
1336 | 1362 | |
1337 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); | |
1363 | + var sliderVal = parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber); | |
1364 | + | |
1365 | + console.log('inside CalculateImageCordinates line no 1350. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + '- parseInt($scope.layerNumber)' + parseInt($scope.layerNumber) + 'set value: ' + sliderVal); | |
1366 | + | |
1367 | + $('#layerChangeSlider').slider("option", "value",sliderVal ); | |
1368 | + | |
1369 | + | |
1338 | 1370 | // $('#spinner').css('visibility', 'hidden'); |
1339 | 1371 | $rootScope.isLoading = false; |
1340 | 1372 | //Dated:16-07-2016 Issue #4957 :While selecting the Zoom-in\Zoom-out button scroll should be go on top. |
... | ... | @@ -1860,14 +1892,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1860 | 1892 | } |
1861 | 1893 | ); |
1862 | 1894 | } |
1863 | - //else if ($scope.ColoredImageSRC.length == totalCanvas) | |
1864 | - //{ | |
1865 | - // // dispatch event for enabling rest UI | |
1866 | - // alert('all canvas drawn'); | |
1867 | - // $scope.EnableUI(); | |
1868 | - //} | |
1869 | - | |
1870 | - //-NIKI-for solving extarct issue 8286 | |
1895 | + | |
1871 | 1896 | |
1872 | 1897 | var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId + '_MR'); |
1873 | 1898 | |
... | ... | @@ -1883,11 +1908,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1883 | 1908 | } |
1884 | 1909 | |
1885 | 1910 | |
1886 | - | |
1887 | - // | |
1888 | - | |
1889 | - // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length) | |
1890 | - | |
1911 | + | |
1891 | 1912 | if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { |
1892 | 1913 | |
1893 | 1914 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
... | ... | @@ -1931,18 +1952,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1931 | 1952 | $scope.highLightBody(); |
1932 | 1953 | } |
1933 | 1954 | else { |
1955 | + | |
1956 | + //This block is executed when normal body is created and no further process like highlight,extract, etc | |
1934 | 1957 | $rootScope.isLoading = false; |
1935 | 1958 | $('#spinner').css('visibility', 'hidden'); |
1936 | - //debugger; | |
1959 | + | |
1937 | 1960 | $scope.EnableUI(); |
1961 | + | |
1938 | 1962 | } |
1939 | 1963 | } |
1940 | - else { | |
1941 | - $rootScope.isLoading = false; | |
1942 | - $('#spinner').css('visibility', 'hidden'); | |
1943 | - //debugger; | |
1944 | - $scope.EnableUI(); | |
1945 | - } | |
1964 | + | |
1946 | 1965 | } |
1947 | 1966 | |
1948 | 1967 | console.log('DrawMirroredImage- ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length); |
... | ... | @@ -2299,8 +2318,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2299 | 2318 | ); |
2300 | 2319 | } |
2301 | 2320 | |
2302 | - //-NIKI-for solving extarct issue 8286 | |
2303 | - | |
2321 | + | |
2304 | 2322 | var imageCanvas = document.getElementById('imageCanvas' + bodyRegionId); |
2305 | 2323 | |
2306 | 2324 | if (imageCanvas != null || imageCanvas != undefined) { |
... | ... | @@ -2314,9 +2332,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2314 | 2332 | |
2315 | 2333 | $rootScope.coloredImageCanvasList[parseInt(bodyRegionId - 1)] = coloredImageDataVar; |
2316 | 2334 | } |
2317 | - // | |
2318 | - | |
2319 | - | |
2335 | + | |
2320 | 2336 | if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) { |
2321 | 2337 | |
2322 | 2338 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) { |
... | ... | @@ -2367,18 +2383,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2367 | 2383 | |
2368 | 2384 | } |
2369 | 2385 | else { |
2386 | + //This block is executed when normal body is created and no further process like highlight,extract, etc | |
2370 | 2387 | $rootScope.isLoading = false; |
2371 | 2388 | $('#spinner').css('visibility', 'hidden'); |
2372 | - //debugger; | |
2373 | 2389 | $scope.EnableUI(); |
2374 | 2390 | } |
2375 | 2391 | } |
2376 | - else { | |
2377 | - $rootScope.isLoading = false; | |
2378 | - $('#spinner').css('visibility', 'hidden'); | |
2379 | - //debugger; | |
2380 | - $scope.EnableUI(); | |
2381 | - } | |
2392 | + | |
2382 | 2393 | } |
2383 | 2394 | |
2384 | 2395 | console.log('DrawImage- ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length); |
... | ... | @@ -3031,9 +3042,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3031 | 3042 | grayCanvasContext.putImageData($rootScope.grayImageDataList[parseInt(i)], 0, 0); |
3032 | 3043 | } |
3033 | 3044 | } |
3034 | - $scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE; | |
3035 | - $("#daMessageModal").modal('show'); | |
3036 | - | |
3045 | + | |
3037 | 3046 | |
3038 | 3047 | $scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE; |
3039 | 3048 | $("#daMessageModal").modal('show'); |
... | ... | @@ -3611,7 +3620,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3611 | 3620 | |
3612 | 3621 | } |
3613 | 3622 | |
3614 | - | |
3623 | + else { | |
3624 | + $scope.EnableUI(); | |
3625 | + } | |
3615 | 3626 | }) |
3616 | 3627 | |
3617 | 3628 | } |
... | ... | @@ -3659,7 +3670,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
3659 | 3670 | } |
3660 | 3671 | } |
3661 | 3672 | |
3662 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); | |
3673 | + var sliderVal = parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber); | |
3674 | + | |
3675 | + console.log('inside CalculateImageCordinates. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + '- parseInt($scope.layerNumber) ' + parseInt($scope.layerNumber) + 'set value: ' + sliderVal); | |
3676 | + | |
3677 | + | |
3678 | + $('#layerChangeSlider').slider("option", "value", sliderVal); | |
3663 | 3679 | |
3664 | 3680 | // Annotations Closing Code |
3665 | 3681 | |
... | ... | @@ -4390,8 +4406,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4390 | 4406 | |
4391 | 4407 | |
4392 | 4408 | $('#btnTranparency').addClass('tButtonActive'); |
4393 | - $('#btnIdentity').removeClass(' btn-primary'); | |
4394 | - $('#btnIdentity').addClass('btn-black'); | |
4409 | + $('#btnIdentify').removeClass(' btn-primary'); | |
4410 | + $('#btnIdentify').addClass('btn-black'); | |
4395 | 4411 | |
4396 | 4412 | var canvasDiv = document.getElementById('canvasDiv'); |
4397 | 4413 | $scope.verticalScrollPosition = canvasDiv.scrollTop; |
... | ... | @@ -4494,8 +4510,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4494 | 4510 | |
4495 | 4511 | |
4496 | 4512 | //Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
4497 | - if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) { | |
4498 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber)); | |
4513 | + if ($("#txtlayerNumber").val() != 0 && $rootScope.currentLayerNumber != undefined) { | |
4514 | + | |
4515 | + var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber); | |
4516 | + console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal); | |
4517 | + | |
4518 | + $('#layerChangeSlider').slider("option", "value", sliderVal); | |
4519 | + | |
4499 | 4520 | $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber)); |
4500 | 4521 | } |
4501 | 4522 | |
... | ... | @@ -4792,8 +4813,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4792 | 4813 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
4793 | 4814 | $('#btnTranparency').removeClass('tButtonActive'); |
4794 | 4815 | $('#btnTranparency').addClass('btn-black'); |
4795 | - $('#btnIdentity').removeClass('btn-black'); | |
4796 | - $('#btnIdentity').addClass('btn-primary'); | |
4816 | + $('#btnIdentify').removeClass('btn-black'); | |
4817 | + $('#btnIdentify').addClass('btn-primary'); | |
4797 | 4818 | |
4798 | 4819 | // clear canvas before drawing transparency box |
4799 | 4820 | if ($rootScope.isAnnotationWindowOpen == true) { |
... | ... | @@ -5903,7 +5924,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5903 | 5924 | if (TBStartX <= bodyRegionRight && value.X <= TBRight && TBStartY <= bodyRegionBottom && value.Y <= TBBottom) { |
5904 | 5925 | |
5905 | 5926 | if ($scope.isTBDrawnOnBodyRegion == false) { |
5906 | - $scope.layerNumber = $scope.layerNumber + 1; | |
5927 | + | |
5928 | + | |
5929 | + if ($scope.layerNumber < $rootScope.totalLayers) { | |
5930 | + | |
5931 | + $scope.layerNumber = $scope.layerNumber + 1; | |
5932 | + | |
5933 | + } | |
5934 | + | |
5907 | 5935 | } |
5908 | 5936 | |
5909 | 5937 | if (value.bodyRegionId == '3') { |
... | ... | @@ -6626,9 +6654,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6626 | 6654 | //txtTransparencyChange.value = 0; |
6627 | 6655 | // document.getElementById('txtLayerNumber').value = 0; |
6628 | 6656 | |
6657 | + var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber); | |
6629 | 6658 | |
6659 | + console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal); | |
6630 | 6660 | |
6631 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber)); | |
6661 | + $('#layerChangeSlider').slider("option", "value", sliderVal); | |
6632 | 6662 | //if ($scope.isGenderChnage || $rootScope.isViewChange) { |
6633 | 6663 | // $("#txtlayerNumber").val(parseInt(0)); |
6634 | 6664 | //} |
... | ... | @@ -6678,9 +6708,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6678 | 6708 | // document.getElementById('btnTranparency').className = 't-transparency' |
6679 | 6709 | $('#btnTranparency').removeClass('tButtonActive'); |
6680 | 6710 | $('#btnTranparency').addClass('btn-black'); |
6681 | - $('#btnIdentity').removeClass('btn-black'); | |
6711 | + $('#btnIdentify').removeClass('btn-black'); | |
6682 | 6712 | |
6683 | - $('#btnIdentity').addClass('btn-primary'); | |
6713 | + $('#btnIdentify').addClass('btn-primary'); | |
6684 | 6714 | |
6685 | 6715 | document.getElementById('btnTranparency').removeEventListener("click", $scope.createTransparencyBox); |
6686 | 6716 | |
... | ... | @@ -6771,14 +6801,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6771 | 6801 | }; |
6772 | 6802 | |
6773 | 6803 | |
6774 | - $scope.IdentityClick = function () { | |
6804 | + $scope.IdentifyClick = function () { | |
6775 | 6805 | |
6776 | 6806 | |
6777 | 6807 | //if listanager is visisble then close it |
6778 | 6808 | |
6779 | 6809 | $rootScope.isListManagerSelected = false; |
6780 | 6810 | $rootScope.CloseListManager(); |
6781 | - // $('#btnIdentity').addClass('btn-primary'); | |
6811 | + // $('#btnIdentify').addClass('btn-primary'); | |
6782 | 6812 | |
6783 | 6813 | if ($scope.isTransparencyBtnClicked == true) { |
6784 | 6814 | |
... | ... | @@ -6792,6 +6822,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
6792 | 6822 | canvasDiv.removeEventListener("mouseup", mouseUpListener) |
6793 | 6823 | $('#btnTranparency').removeClass('tButtonActive'); |
6794 | 6824 | $('#btnTranparency').addClass('btn-black'); |
6825 | + | |
6826 | + $("#btnExtract").removeClass("disabled"); | |
6827 | + $("#btnExtract").css("pointer-events", "auto"); | |
6795 | 6828 | } |
6796 | 6829 | |
6797 | 6830 | } |
... | ... | @@ -7510,7 +7543,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7510 | 7543 | $scope.isLoading = true; |
7511 | 7544 | $('#spinner').css('visibility', 'visible'); |
7512 | 7545 | |
7513 | - $scope.HighlightBodyByTermList($scope.AllTerms) | |
7546 | + if ($scope.AllTerms != undefined && $scope.AllTerms.length > 0) { | |
7547 | + $scope.HighlightBodyByTermList($scope.AllTerms); | |
7548 | + } | |
7549 | + else { | |
7550 | + $scope.EnableUI(); | |
7551 | + } | |
7514 | 7552 | }, 800); |
7515 | 7553 | |
7516 | 7554 | } |
... | ... | @@ -7999,6 +8037,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
7999 | 8037 | $rootScope.totalLayers = dataLength - 1; |
8000 | 8038 | |
8001 | 8039 | $('#txtLayerNumber').attr('max', $rootScope.totalLayers); |
8040 | + | |
8041 | + console.log('inside DataService.getJson. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + 'set value: ' + $rootScope.totalLayers); | |
8042 | + | |
8002 | 8043 | $('#layerChangeSlider').slider("option", "max", $rootScope.totalLayers); |
8003 | 8044 | |
8004 | 8045 | //set max for LayerNumber input |
... | ... | @@ -8016,7 +8057,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8016 | 8057 | |
8017 | 8058 | //if user seelcted any term and serached before gender cnage then itshould be highlighted in chnaged gender |
8018 | 8059 | |
8019 | - if ((($rootScope.isListManagerSelected == true) || | |
8060 | + if ((($rootScope.isListManagerSelected == true) || $rootScope.isListManagerAlreadySelected == true || | |
8020 | 8061 | ($rootScope.isHighLight == true && $rootScope.previousHighlightList != null |
8021 | 8062 | && $rootScope.previousHighlightList.length > 0)) |
8022 | 8063 | && (($rootScope.isGenderChnage == true) || $rootScope.isViewChange == true)) { |
... | ... | @@ -8027,8 +8068,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
8027 | 8068 | else if ($rootScope.previousHighlightList != null && $rootScope.previousHighlightList.length > 0 && |
8028 | 8069 | ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true)) { |
8029 | 8070 | |
8030 | - $rootScope.isHighLight = true | |
8031 | - $scope.setLayerNumberAndHighlightByTermList(); | |
8071 | + $scope.AllTerms = []; | |
8072 | + $rootScope.isHighLight = true; | |
8073 | + | |
8074 | + if ($rootScope.TermNumberData != undefined) { | |
8075 | + $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber); | |
8076 | + if ($scope.TermList != null && $scope.TermList.length>0) { | |
8077 | + $scope.setLayerNumberAndHighlightByTermList(); | |
8078 | + } | |
8079 | + else { | |
8080 | + //actual term number is not found in thsi view menas previously selected body part does not exist in this view | |
8081 | + // $scope.EnableUI(); | |
8082 | + $scope.CalculateImageCordinates($rootScope.viewOrientationId) | |
8083 | + } | |
8084 | + } | |
8085 | + | |
8032 | 8086 | } |
8033 | 8087 | |
8034 | 8088 | else { |
... | ... | @@ -9086,6 +9140,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9086 | 9140 | } |
9087 | 9141 | |
9088 | 9142 | $scope.setLayerNumberAndHighlightByTermList = function () { |
9143 | + | |
9089 | 9144 | console.log(' $scope.actualTermNumber insde setLayerNumberAndHighlightByTermList= ' + $rootScope.actualTermNumber) |
9090 | 9145 | |
9091 | 9146 | $scope.TermList = $scope.getTermNumberList($rootScope.actualTermNumber); |
... | ... | @@ -9100,6 +9155,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9100 | 9155 | } |
9101 | 9156 | |
9102 | 9157 | internalLayerNumberList.sort(function (a, b) { return a - b }) |
9158 | + | |
9103 | 9159 | var internalLayerNumber = internalLayerNumberList[0]//.replace('00', ''); |
9104 | 9160 | |
9105 | 9161 | //3. get layer number |
... | ... | @@ -9158,7 +9214,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9158 | 9214 | //7.get termList |
9159 | 9215 | $scope.fullTermlist = []; |
9160 | 9216 | $scope.AllTerms = []; |
9161 | - | |
9217 | + console.log("initialised"); | |
9162 | 9218 | if (termNo != DA[0].figLeafTermId) { |
9163 | 9219 | |
9164 | 9220 | $scope.getChildTermList(termNo); |
... | ... | @@ -9186,7 +9242,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9186 | 9242 | } |
9187 | 9243 | |
9188 | 9244 | $('#txtlayerNumber').val((parseInt($scope.layerNumber))); |
9189 | - $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); | |
9245 | + | |
9246 | + var sliderVal = parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber); | |
9247 | + console.log('inside setLayerNumberAndHighlightByTermList. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - parseInt($scope.layerNumber): ' + parseInt($scope.layerNumber) + ' = set value for layerChangeSlider: ' + sliderVal); | |
9248 | + | |
9249 | + $('#layerChangeSlider').slider("option", "value",sliderVal ); | |
9190 | 9250 | |
9191 | 9251 | //8.remove current layer canavses |
9192 | 9252 | // $scope.flushCanvas(); |
... | ... | @@ -9244,6 +9304,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9244 | 9304 | var isFound = jQuery.inArray(serachTerm, $scope.fullTermlist) |
9245 | 9305 | if (isFound == -1) { |
9246 | 9306 | $scope.fullTermlist.push(serachTerm); |
9307 | + console.log("psudhed in getChildTermList") | |
9247 | 9308 | $scope.AllTerms.push({ '_TermNumber': serachTerm }) |
9248 | 9309 | $scope.getChildTermList(serachTerm); |
9249 | 9310 | } |
... | ... | @@ -9271,6 +9332,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9271 | 9332 | if ((data2 != null || data2 != undefined) && (data2.length > 0)) { |
9272 | 9333 | for (var i = 0; i < data2.length; i++) { |
9273 | 9334 | $scope.fullTermlist.push(data2[i]._TermNumber); |
9335 | + console.log("psudhed in getSiblings") | |
9336 | + | |
9274 | 9337 | $scope.AllTerms.push({ '_TermNumber': data2[i]._TermNumber }) |
9275 | 9338 | $scope.getChildTermList(data2[i]._TermNumber); |
9276 | 9339 | } |
... | ... | @@ -9701,11 +9764,11 @@ function OnEnableHighlight() { |
9701 | 9764 | }); |
9702 | 9765 | } |
9703 | 9766 | |
9704 | -function OnIdentityClick() { | |
9705 | - console.log('OnIdentityClick is called outside '); | |
9767 | +function OnIdentifyClick() { | |
9768 | + console.log('OnIdentifyClick is called outside '); | |
9706 | 9769 | var scope = angular.element(document.getElementById("daView")).scope(); |
9707 | 9770 | scope.$apply(function () { |
9708 | - scope.IdentityClick(); | |
9771 | + scope.IdentifyClick(); | |
9709 | 9772 | }); |
9710 | 9773 | } |
9711 | 9774 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
1 | 1 | ๏ปฟ'use strict'; |
2 | 2 | |
3 | -AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", "$timeout", "DataService", "AuthenticationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", | |
4 | -function ($rootScope, Modules, $log, $location, $timeout, DataService, AuthenticationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants) { | |
3 | +AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", "$timeout", "DataService", "AuthenticationService", "LoginConstants", "UserModules", "LoginMessageConstants", "AdminService", "$http", "AdminConstants", "UserTypeConstants", "AIAConstants", | |
4 | +function ($rootScope, Modules, $log, $location, $timeout, DataService, AuthenticationService, LoginConstants, UserModules, LoginMessageConstants, AdminService, $http, AdminConstants, UserTypeConstants,AIAConstants) { | |
5 | 5 | |
6 | 6 | //$scope.pageToOpen = { |
7 | 7 | // name: 'MainMenu' |
... | ... | @@ -111,117 +111,138 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
111 | 111 | $("body.modal-open").css("padding-right", "0px"); |
112 | 112 | |
113 | 113 | } |
114 | - $rootScope.initializeAIA = function () { | |
115 | 114 | |
116 | - $rootScope.isLoading = false; | |
117 | - | |
118 | - var url = $location.url(); | |
115 | + $rootScope.promptUserForCookies= function() | |
116 | + { | |
117 | + $rootScope.errorMessage = AIAConstants.COOKIES_MESSAGE; | |
118 | + $("#messageModal").modal('show'); | |
119 | + | |
120 | + } | |
121 | + | |
122 | + | |
123 | + $rootScope.initializeAIA = function () { | |
124 | + | |
125 | + if (navigator.cookieEnabled) { | |
119 | 126 | |
120 | - if (url.indexOf('?unb:') != -1) { | |
127 | + $rootScope.isLoading = false; | |
121 | 128 | |
122 | - $rootScope.isVisibleLogin = true; | |
123 | - $rootScope.UnblockUser(); | |
124 | - } | |
125 | - else if (url.indexOf('?em:') != -1) { | |
129 | + var url = $location.url(); | |
130 | + | |
131 | + //unblock user | |
132 | + if (url.indexOf('?unb:') != -1) { | |
133 | + | |
134 | + $rootScope.isVisibleLogin = true; | |
135 | + $rootScope.UnblockUser(); | |
136 | + } | |
137 | + else if (url.indexOf('?em:') != -1) { | |
126 | 138 | |
127 | - $rootScope.isVisibleLogin = false; | |
128 | - $rootScope.isVisibleResetPass = true; | |
139 | + $rootScope.isVisibleLogin = false; | |
140 | + $rootScope.isVisibleResetPass = true; | |
141 | + } | |
142 | + else { | |
143 | + $rootScope.isVisibleLogin = true; | |
144 | + $rootScope.isVisibleResetPass = false; | |
145 | + getUserDetails(); | |
146 | + } | |
129 | 147 | } |
148 | + | |
130 | 149 | else { |
150 | + | |
131 | 151 | $rootScope.isVisibleLogin = true; |
132 | - $rootScope.isVisibleResetPass = false; | |
133 | - getUserDetails(); | |
152 | + | |
153 | + $rootScope.promptUserForCookies(); | |
134 | 154 | } |
135 | 155 | |
136 | 156 | |
137 | 157 | } |
138 | 158 | |
139 | - $rootScope.AuthenticateUser = function (userInfo) { | |
140 | - $rootScope.errorMessage = ""; | |
141 | - if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { | |
159 | + $rootScope.AuthenticateUser = function (userInfo) | |
160 | + { | |
161 | + if (navigator.cookieEnabled) { | |
142 | 162 | |
143 | - // alert(LoginMessageConstants.USER_CREDENTIALS_MISSING); | |
144 | - $rootScope.errorMessage = LoginMessageConstants.USER_CREDENTIALS_MISSING; | |
145 | - $("#messageModal").modal('show'); | |
146 | - } | |
147 | - else { | |
163 | + $rootScope.errorMessage = ""; | |
164 | + if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { | |
148 | 165 | |
149 | - AuthenticationService.authenticateUser(userInfo) | |
150 | - .then( | |
166 | + // alert(LoginMessageConstants.USER_CREDENTIALS_MISSING); | |
167 | + $rootScope.errorMessage = LoginMessageConstants.USER_CREDENTIALS_MISSING; | |
168 | + $("#messageModal").modal('show'); | |
169 | + } | |
170 | + else { | |
151 | 171 | |
152 | - function (result) { | |
153 | - if (result == LoginConstants.USER_NOT_FOUND) { | |
154 | - $rootScope.isVisibleLogin = true; | |
155 | - // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); | |
156 | - $rootScope.errorMessage = LoginMessageConstants.INVALID_USER; | |
157 | - $("#messageModal").modal('show'); | |
158 | - } | |
159 | - else { | |
160 | - if (typeof result.LoginId != undefined || result.LoginId != "" || result.LoginId != null) { | |
172 | + AuthenticationService.authenticateUser(userInfo) | |
173 | + .then( | |
161 | 174 | |
162 | - if ($("#messageModal").length > 0) { | |
163 | - $("#messageModal").modal('hide'); | |
164 | - } | |
165 | - if (result.LoginFailureCauseId!=undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_PASSWORD_NOT_MATCH) { | |
166 | - $rootScope.isVisibleLogin = true; | |
167 | - $rootScope.errorMessage = LoginMessageConstants.INVALID_PASSWORD; | |
168 | - $("#messageModal").modal('show'); | |
169 | - } | |
170 | - else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_ID_BLOCKED_24_HRS) | |
171 | - { | |
172 | - $rootScope.isVisibleLogin = true; | |
173 | - $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED; | |
174 | - $("#messageModal").modal('show'); | |
175 | - } | |
176 | - else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) | |
177 | - { | |
178 | - $rootScope.isVisibleLogin = true; | |
179 | - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
180 | - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
181 | - $("#messageModal").modal('show'); | |
182 | - } | |
183 | - else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
184 | - $rootScope.isVisibleLogin = true; | |
185 | - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
186 | - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
187 | - $("#messageModal").modal('show'); | |
188 | - } | |
189 | - else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
190 | - $rootScope.isVisibleLogin = true; | |
191 | - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
192 | - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
193 | - $("#messageModal").modal('show'); | |
194 | - } | |
195 | - else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
196 | - $rootScope.isVisibleLogin = true; | |
197 | - $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
198 | - $("#messageModal").modal('show'); | |
199 | - } | |
200 | - else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) { | |
201 | - $rootScope.isVisibleLogin = true; | |
202 | - $rootScope.errorMessage = LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
203 | - $("#messageModal").modal('show'); | |
204 | - } | |
205 | - else if ( (result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (!result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
206 | - $rootScope.isVisibleLogin = true; | |
207 | - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
208 | - $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE; | |
209 | - $("#messageModal").modal('show'); | |
210 | - } | |
211 | - else if ((result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
212 | - $rootScope.isVisibleLogin = true; | |
213 | - $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
214 | - $("#messageModal").modal('show'); | |
215 | - } | |
216 | - else if ((result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
217 | - $rootScope.isVisibleLogin = true; | |
218 | - $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE; | |
219 | - $("#messageModal").modal('show'); | |
220 | - } | |
221 | - else { | |
222 | - | |
223 | - //if (result.UserType == UserTypeConstants.SUPER_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) && | |
224 | - if (result.LicenseId == 0 && result.IsActive) { | |
175 | + function (result) { | |
176 | + if (result == LoginConstants.USER_NOT_FOUND) { | |
177 | + $rootScope.isVisibleLogin = true; | |
178 | + // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); | |
179 | + $rootScope.errorMessage = LoginMessageConstants.INVALID_USER; | |
180 | + $("#messageModal").modal('show'); | |
181 | + } | |
182 | + else { | |
183 | + if (typeof result.LoginId != undefined || result.LoginId != "" || result.LoginId != null) { | |
184 | + | |
185 | + if ($("#messageModal").length > 0) { | |
186 | + $("#messageModal").modal('hide'); | |
187 | + } | |
188 | + if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_PASSWORD_NOT_MATCH) { | |
189 | + $rootScope.isVisibleLogin = true; | |
190 | + $rootScope.errorMessage = LoginMessageConstants.INVALID_PASSWORD; | |
191 | + $("#messageModal").modal('show'); | |
192 | + } | |
193 | + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_ID_BLOCKED_24_HRS) { | |
194 | + $rootScope.isVisibleLogin = true; | |
195 | + $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED; | |
196 | + $("#messageModal").modal('show'); | |
197 | + } | |
198 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
199 | + $rootScope.isVisibleLogin = true; | |
200 | + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
201 | + $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
202 | + $("#messageModal").modal('show'); | |
203 | + } | |
204 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
205 | + $rootScope.isVisibleLogin = true; | |
206 | + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
207 | + $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
208 | + $("#messageModal").modal('show'); | |
209 | + } | |
210 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
211 | + $rootScope.isVisibleLogin = true; | |
212 | + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
213 | + $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
214 | + $("#messageModal").modal('show'); | |
215 | + } | |
216 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
217 | + $rootScope.isVisibleLogin = true; | |
218 | + $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
219 | + $("#messageModal").modal('show'); | |
220 | + } | |
221 | + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) { | |
222 | + $rootScope.isVisibleLogin = true; | |
223 | + $rootScope.errorMessage = LoginMessageConstants.USER_INACTIVE_MESSAGE; | |
224 | + $("#messageModal").modal('show'); | |
225 | + } | |
226 | + else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
227 | + $rootScope.isVisibleLogin = true; | |
228 | + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
229 | + $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE; | |
230 | + $("#messageModal").modal('show'); | |
231 | + } | |
232 | + else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
233 | + $rootScope.isVisibleLogin = true; | |
234 | + $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | |
235 | + $("#messageModal").modal('show'); | |
236 | + } | |
237 | + else if ((result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
238 | + $rootScope.isVisibleLogin = true; | |
239 | + $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE; | |
240 | + $("#messageModal").modal('show'); | |
241 | + } | |
242 | + else { | |
243 | + | |
244 | + //if (result.UserType == UserTypeConstants.SUPER_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) && | |
245 | + if (result.LicenseId == 0 && result.IsActive) { | |
225 | 246 | $rootScope.userData = result; |
226 | 247 | $rootScope.userModules = result.Modules; |
227 | 248 | $rootScope.isVisibleLogin = false; |
... | ... | @@ -233,42 +254,49 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
233 | 254 | } |
234 | 255 | else { |
235 | 256 | if (result.LicenseInfo != null && result.LicenseInfo.IsTermAccepted) { |
236 | - $rootScope.userData = result; | |
237 | - $rootScope.userModules = result.Modules; | |
238 | - $rootScope.isVisibleLogin = false; | |
239 | - $rootScope.haveRoleAdmin = false; | |
240 | - localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
241 | - ShowAssignedModulesPopup(result.Modules); | |
242 | - $location.path('/'); | |
257 | + $rootScope.userData = result; | |
258 | + $rootScope.userModules = result.Modules; | |
259 | + $rootScope.isVisibleLogin = false; | |
260 | + $rootScope.haveRoleAdmin = false; | |
261 | + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
262 | + ShowAssignedModulesPopup(result.Modules); | |
263 | + $location.path('/'); | |
243 | 264 | |
265 | + } | |
266 | + else { | |
267 | + if ($('#dvTerms').length > 0) { | |
268 | + $('#dvTerms').html(result.TermsAndConditionsText); | |
244 | 269 | } |
245 | - else { | |
246 | - if ($('#dvTerms').length > 0) { | |
247 | - $('#dvTerms').html(result.TermsAndConditionsText); | |
248 | - } | |
249 | - $rootScope.isVisibleLogin = true; | |
250 | - $('#dvTermCondition').fadeIn(); | |
251 | - $rootScope.userData = result; | |
252 | - $rootScope.haveRoleAdmin = false; | |
253 | - localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
254 | - $location.path('/'); | |
255 | - } | |
270 | + $rootScope.isVisibleLogin = true; | |
271 | + $('#dvTermCondition').fadeIn(); | |
272 | + $rootScope.userData = result; | |
273 | + $rootScope.haveRoleAdmin = false; | |
274 | + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
275 | + $location.path('/'); | |
256 | 276 | } |
257 | - | |
258 | 277 | } |
259 | - | |
278 | + | |
260 | 279 | } |
280 | + | |
261 | 281 | } |
262 | - }), | |
263 | - | |
264 | - function (error) { | |
265 | - console.log(' Error in authentication = ' + error.statusText); | |
266 | - // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); | |
267 | - $rootScope.isVisibleLogin = true; | |
268 | - $rootScope.errorMessage = error; | |
269 | - $("#messageModal").modal('show'); | |
270 | - } | |
282 | + } | |
283 | + }), | |
284 | + | |
285 | + function (error) { | |
286 | + console.log(' Error in authentication = ' + error.statusText); | |
287 | + // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); | |
288 | + $rootScope.isVisibleLogin = true; | |
289 | + $rootScope.errorMessage = error; | |
290 | + $("#messageModal").modal('show'); | |
291 | + } | |
292 | + } | |
293 | + } | |
294 | + | |
295 | + else | |
296 | + { | |
297 | + $rootScope.promptUserForCookies(); | |
271 | 298 | } |
299 | + | |
272 | 300 | } |
273 | 301 | |
274 | 302 | function ShowAssignedModulesPopup(userModules) { |
... | ... | @@ -1716,49 +1744,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
1716 | 1744 | var btneraseBrushSizeValue = $("#btnBrushSize").val(); |
1717 | 1745 | $('#canvasPaint').sketch(); |
1718 | 1746 | $rootScope.eraseshapeSize = parseInt(btneraseBrushSizeValue); |
1719 | - $.sketch.tools.marker = { | |
1720 | - onEvent: function (e) { | |
1721 | - switch (e.type) { | |
1722 | - case 'mousedown': | |
1723 | - case 'touchstart': | |
1724 | - if (this.painting) { | |
1725 | - this.stopPainting(); | |
1726 | - } | |
1727 | - this.startPainting(); | |
1728 | - break; | |
1729 | - case 'mouseup': | |
1730 | - case 'mouseout': | |
1731 | - case 'mouseleave': | |
1732 | - case 'touchend': | |
1733 | - case 'touchcancel': | |
1734 | - this.stopPainting(); | |
1735 | - } | |
1736 | - if (this.painting) { | |
1737 | - this.action.events.push({ | |
1738 | - x: e.pageX - this.canvas.offset().left, | |
1739 | - y: e.pageY - this.canvas.offset().top, | |
1740 | - event: e.type | |
1741 | - }); | |
1742 | - return this.redraw(); | |
1743 | - } | |
1744 | - }, | |
1745 | - draw: function (action) { | |
1746 | - var event, previous, _i, _len, _ref; | |
1747 | - this.context.lineJoin = "round"; | |
1748 | - this.context.lineCap = "round"; | |
1749 | - this.context.beginPath(); | |
1750 | - this.context.moveTo(action.events[0].x, action.events[0].y); | |
1751 | - _ref = action.events; | |
1752 | - for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
1753 | - event = _ref[_i]; | |
1754 | - this.context.lineTo(event.x, event.y); | |
1755 | - previous = event; | |
1756 | - } | |
1757 | - this.context.strokeStyle = action.color; | |
1758 | - this.context.lineWidth = action.size; | |
1759 | - return this.context.stroke(); | |
1760 | - } | |
1761 | - }; | |
1747 | + | |
1762 | 1748 | $("#annotationpainteraser").attr("data-size", $rootScope.eraseshapeSize); |
1763 | 1749 | return $.sketch.tools.eraser = { |
1764 | 1750 | onEvent: function (e) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... | ... | @@ -492,11 +492,13 @@ AIA.constant("UserModules", [ |
492 | 492 | } |
493 | 493 | ]); |
494 | 494 | |
495 | -AIA.constant("AIAConstants", { | |
496 | 495 | |
496 | +AIA.constant("AIAConstants", { | |
497 | 497 | "NO_BODY_SYSTEM_AVAILABLE": "Selected body system is not available on this layer.", |
498 | + "COOKIES_MESSAGE": "You need to enable your browser's cookies to run this application.", | |
498 | 499 | }) |
499 | 500 | |
501 | + | |
500 | 502 | AIA.config(function ($routeProvider, pages, $locationProvider) { |
501 | 503 | |
502 | 504 | $locationProvider.html5Mode(true); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -139,7 +139,7 @@ |
139 | 139 | <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;"></div> |
140 | 140 | <div class="" style="top:20px"> |
141 | 141 | <div class="col-xs-6"> |
142 | - <button id="btnIdentity" onclick="OnIdentityClick()" class="btn btn-primary btn-sm tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Identify"> <img src="content/images/icon-identity.png" alt=""></button> | |
142 | + <button id="btnIdentify" onclick="OnIdentifyClick()" class="btn btn-primary btn-sm tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Identify"> <img src="content/images/icon-identity.png" alt=""></button> | |
143 | 143 | </div> |
144 | 144 | <div class="col-xs-6 pull-right"> |
145 | 145 | <button class="btn btn-black btn-sm pull-right tooltip-custom" onclick="OnZoom()" id="btnZoom" data-toggle="tooltip" data-placement="bottom" title="Zoom-in/Zoom-out"> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | </ul> |
54 | 54 | <ul class="nav navbar-nav navbar-right"> |
55 | 55 | <li class="visible-xs"><a href="" ng-click="LogoutUser()">Logout</a></li> |
56 | - <li class="hidden-xs marginR5" data-toggle="tooltip" data-placement="top" title="Logout"><a href="" ng-click="LogoutUser()"><i class="fa fa-power-off"></i></a></li> | |
56 | + <li class="hidden-xs marginR5 logOut" data-toggle="tooltip" data-placement="top" title="Logout"><a href="" ng-click="LogoutUser()"><i class="fa fa-power-off"></i></a></li> | |
57 | 57 | </ul> |
58 | 58 | <div id="imaginary_container"> |
59 | 59 | <div class="input-group stylish-input-group paddTop5 hidden-sm"> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -605,7 +605,7 @@ |
605 | 605 | </form> |
606 | 606 | </div> |
607 | 607 | </div> |
608 | - <div id="setting-spinner" style="display:none;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 1234; overflow: auto; width: 100px;"> | |
608 | + <div id="setting-spinner" style="display:none;position: fixed; top: 50%; left: 50%; margin-left: -50px; z-index: 15000; overflow: auto; width: 100px;"> | |
609 | 609 | <img id="img-spinner" src="content/images/common/loading.gif" alt="Loading"> |
610 | 610 | </div> |
611 | 611 | <!--Annotation Modal--> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/libs/sketch.js
... | ... | @@ -127,7 +127,10 @@ var __slice = Array.prototype.slice; |
127 | 127 | onEvent: function(e) { |
128 | 128 | switch (e.type) { |
129 | 129 | case 'mousedown': |
130 | - case 'touchstart': | |
130 | + case 'touchstart': | |
131 | + if (this.painting) { | |
132 | + this.stopPainting(); | |
133 | + } | |
131 | 134 | this.startPainting(); |
132 | 135 | break; |
133 | 136 | case 'mouseup': | ... | ... |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... | ... | @@ -777,7 +777,7 @@ textarea { |
777 | 777 | margin-left: -50px; / half width of the spinner gif / |
778 | 778 | margin-top: -50px; / half height of the spinner gif / |
779 | 779 | text-align: center; |
780 | - z-index: 1234; | |
780 | + z-index: 15000; | |
781 | 781 | overflow: auto; |
782 | 782 | width: 100px; / width of the spinner gif / |
783 | 783 | height: 102px; /*hight of the spinner gif +2px to fix IE8 issue */ |
... | ... | @@ -1188,3 +1188,12 @@ a[disabled] { |
1188 | 1188 | width:100%; |
1189 | 1189 | table-layout:fixed; |
1190 | 1190 | } |
1191 | + | |
1192 | + | |
1193 | + | |
1194 | +.navbar-right .logOut a | |
1195 | + { | |
1196 | + padding-top : 23px; | |
1197 | + padding-bottom : 11px; | |
1198 | + line-height : 14px; | |
1199 | +} | |
1191 | 1200 | \ No newline at end of file | ... | ... |