diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 379e44c..46df765 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -276,6 +276,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l }; $scope.DisableUI = function () { + + //enable daBodyViewDiv which was disabled on thumbnail click so need not bother where to enable + //as jspanel disable/enable is working for all features + document.getElementById('daBodyview').style.pointerEvents = "auto"; + document.getElementById('daBodyview').style.opacity = "1"; + var daImagePanelConetent = document.getElementsByClassName("jsPanel-content"); for (var i = 0; i < daImagePanelConetent.length; i++) { daImagePanelConetent[i].style.pointerEvents = "none"; @@ -299,8 +305,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.openView = function ($event) { - $scope.DisableUI(); - + $rootScope.disableAnnotationTB = false; $rootScope.MenuModuleName = "DA"; $rootScope.isLoading = true; @@ -316,6 +321,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var u = $location.url(); $location.url('/da-body-view'); + + var view_list = angular.element($event.currentTarget); var view_list_male_female = view_list.attr('title'); @@ -459,6 +466,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //da-body-views functions $scope.openBodyView = function () { + + //disable whole div because till now jspanel is not created. enable when jspanel gets disabled because + //than jspanel will take care of disabling/enabling ui + document.getElementById('daBodyview').style.pointerEvents = "none"; + document.getElementById('daBodyview').style.opacity = "0.5"; + //Check if browser 'REFRESHED' or 'RELOADED' if ($rootScope.CommonData != null) { //0. we will initially append container to load body @@ -1720,7 +1733,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); } else { - $scope.loadSearchData(); + $rootScope.loadSearchData(); annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); } @@ -2095,7 +2108,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } else { - $scope.loadSearchData(); + $rootScope.loadSearchData(); annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); } @@ -4367,6 +4380,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if ($rootScope.isExtract == false) { $("#btnExtract").addClass("disabled"); + $("#btnExtract").css("pointer-events", "none"); //if listanager is visisble then close it $rootScope.isListManagerSelected = false; @@ -6508,6 +6522,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //To enable extract button $rootScope.isTransparencyActivated = false; $("#btnExtract").removeClass("disabled"); + $("#btnExtract").css("pointer-events", "auto"); $('.com_anno').remove(); @@ -6728,13 +6743,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $("#annotationButton").removeClass("active"); if ($scope.isTransparencyBtnClicked == true && !$scope.isTransparencyActivated) { $("#btnExtract").addClass("disabled"); + $("#btnExtract").css("pointer-events", "none"); + $('#btnTranparency').addClass('tButtonActive'); $('#btnTranparency').removeClass('btn-black'); } else $("#btnExtract").removeClass("disabled"); + $("#btnExtract").css("pointer-events", "auto"); + $("#btnTranparency").removeClass("disabled"); + $("#btnTranparency").css("pointer-events", "auto"); + $rootScope.isTransparencyBoxActivated = false; $rootScope.isNormalMode = false; $rootScope.isGenderChnage = false; @@ -6971,6 +6992,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.enableNormalMode = function () { $("#btnTranparency").removeClass("disabled"); + $("#btnTranparency").css("pointer-events", "auto"); if ($rootScope.isTransparencyActivated) { $scope.layerNumber = $rootScope.currentLayerNumber; @@ -7089,6 +7111,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l if ($rootScope.isTransparencyActivated == true) { $("#btnExtract").addClass("disabled"); + $("#btnExtract").css("pointer-events", "none"); } @@ -7113,6 +7136,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $("#btnTranparency").addClass("disabled"); + $("#btnTranparency").css("pointer-events", "none"); if ($rootScope.isNormalMode == true) { @@ -7139,7 +7163,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l //disable transparency button $("#btnTranparency").addClass("disabled"); - + $("#btnTranparency").css("pointer-events", "none"); if ($rootScope.isNormalMode == true) { @@ -7222,6 +7246,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.CloseTransparencyBox(); if ($scope.isTransparencyBtnClicked == true && !$scope.isTransparencyActivated) { $("#btnExtract").addClass("disabled"); + $("#btnExtract").css("pointer-events", "none"); $('#btnTranparency').addClass('tButtonActive'); $('#btnTranparency').removeClass('btn-black'); } @@ -7730,7 +7755,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; $("#btnExtract").removeClass("disabled"); + $("#btnExtract").css("pointer-events", "auto"); + $("#btnTranparency").removeClass("disabled"); + $("#btnTranparency").css("pointer-events", "auto"); $rootScope.isTransparencyBoxActivated = false; $rootScope.isNormalMode = false; @@ -7738,6 +7766,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.CloseTransparencyBox(); if ($scope.isTransparencyBtnClicked == true && !$scope.isTransparencyActivated) { $("#btnExtract").addClass("disabled"); + $("#btnExtract").css("pointer-events", "none"); + $('#btnTranparency').addClass('tButtonActive'); $('#btnTranparency').removeClass('btn-black'); } @@ -7979,7 +8009,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.imageHorizontlScrollPosition = canvasDiv.scrollLeft; $("#btnExtract").removeClass("disabled"); + $("#btnExtract").css("pointer-events", "auto"); + $("#btnTranparency").removeClass("disabled"); + $("#btnTranparency").css("pointer-events", "auto"); + $rootScope.isTransparencyBoxActivated = false; $rootScope.isNormalMode = false; @@ -7987,6 +8021,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.CloseTransparencyBox(); if ($scope.isTransparencyBtnClicked == true && !$scope.isTransparencyActivated) { $("#btnExtract").addClass("disabled"); + $("#btnExtract").css("pointer-events", "none"); + $('#btnTranparency').addClass('tButtonActive'); $('#btnTranparency').removeClass('btn-black'); } @@ -8834,76 +8870,84 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.loadListManger = function () { var primaryLexiconIndex; - for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { - if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) { - primaryLexiconIndex = i; + if ($rootScope.vocabTermDataArray != null && $rootScope.vocabTermDataArray != undefined && $rootScope.vocabTermDataArray.length > 0) { + + for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) { + if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) { + primaryLexiconIndex = i; + } } - } - console.log($rootScope.vocabTermDataArray[primaryLexiconIndex].language); - $rootScope.isListManagerMenuSelected = true; + console.log($rootScope.vocabTermDataArray[primaryLexiconIndex].language); + $rootScope.isListManagerMenuSelected = true; - var vocabTermTxt = []; - if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined && $rootScope.TermNumberData.length > 0) { - angular.forEach($rootScope.TermNumberData.TermData.Term, function (value1, key1) { + var vocabTermTxt = []; + if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined && $rootScope.TermNumberData.length > 0) { + angular.forEach($rootScope.TermNumberData.TermData.Term, function (value1, key1) { - angular.forEach($rootScope.vocabTermDataArray[primaryLexiconIndex].VocabTermData.VocabTerms.Term, function (value2, key2) { + angular.forEach($rootScope.vocabTermDataArray[primaryLexiconIndex].VocabTermData.VocabTerms.Term, function (value2, key2) { - if (value1._ActualTermNumber === value2._ActualTermNumber) { - vocabTermTxt.push( + if (value1._ActualTermNumber === value2._ActualTermNumber) { + vocabTermTxt.push( - { + { - "_ActualTermNumber": value2._ActualTermNumber, - "_TermText": value2._TermText, - "_cdId": value2._cdId + "_ActualTermNumber": value2._ActualTermNumber, + "_TermText": value2._TermText, + "_cdId": value2._cdId - } + } - ); + ); - } + } - }) + }) - }) + }) - $scope.VocabTermTxt = new jinqJs() - .from(vocabTermTxt) - .distinct('_TermText', '_ActualTermNumber') - .orderBy([{ field: '_TermText', sort: 'asc' }]) - .select('_ActualTermNumber', '_TermText', '_cdId'); + $scope.VocabTermTxt = new jinqJs() + .from(vocabTermTxt) + .distinct('_TermText', '_ActualTermNumber') + .orderBy([{ field: '_TermText', sort: 'asc' }]) + .select('_ActualTermNumber', '_TermText', '_cdId'); - if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) { + if ($scope.VocabTermTxt != null || $scope.VocabTermTxt != undefined) { - for (var j = 0; j < $scope.VocabTermTxt.length; j++) { - var $el = $('').appendTo('#termList') - $compile($el)($scope); + for (var j = 0; j < $scope.VocabTermTxt.length; j++) { + var $el = $('').appendTo('#termList') + $compile($el)($scope); - } + } - $rootScope.isLoading = false; - $('#spinner').css('visibility', 'hidden'); + $rootScope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); - var termsTotal = '' + $scope.VocabTermTxt.length + ' Structures'; - $("#totalTerms").empty(); - $('#totalTerms').append(termsTotal); + var termsTotal = '' + $scope.VocabTermTxt.length + ' Structures'; + $("#totalTerms").empty(); + $('#totalTerms').append(termsTotal); + } + } + else { + console.log("$rootScope.TermNumberData NOT FOUND"); + $rootScope.loadSearchData(); + } } else { - console.log("$rootScope.TermNumberData NOT FOUND"); - $scope.loadSearchData(); + $rootScope.loadSearchData(); } } + $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber, isTermListOptionClicked) { @@ -9572,6 +9616,7 @@ function OnEnableNormalMode() { console.log('OnEnableNormalMode is called outside '); $("#btnTranparency").removeClass("disabled"); + $("#btnTranparency").css("pointer-events", "auto"); var scope = angular.element(document.getElementById("daView")).scope(); scope.$apply(function () { 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 819bf23..24b1b1c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/ci/ci-view.html @@ -1,77 +1,77 @@ - -
-
-
-
- -
- - -
- - + +
+
+
+
+ +
+ + +
+ +
-
- +
+
@@ -175,12 +175,12 @@
-
-
-
+
+
+
-
- - + + + +