Closed
Merge Request #781 · created by Ayush Jain


Android input layer issue


From AndroidInputLayerIssue into Develop-IPAD-MAC

Closed by Amrita Vishnoi

Changes were not merged into target branch

3 participants



400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -8532,78 +8532,87 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
8532 8532  
8533 8533  
8534 8534 $scope.ShowSearch = function () {
8535   - var primaryLexiconIndex;
8536   - for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) {
8537   - if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) {
8538   - primaryLexiconIndex = i;
  8535 +
  8536 + if (($rootScope.vocabTermDataArray != null || $rootScope.vocabTermDataArray != undefined) && ($rootScope.vocabTermDataArray.length > 0)) {
  8537 + var primaryLexiconIndex;
  8538 + for (var i = 0; i <= $rootScope.vocabTermDataArray.length - 1; i++) {
  8539 + if ($rootScope.vocabTermDataArray[i].language == $rootScope.lexiconLanguageArray[0].language) {
  8540 + primaryLexiconIndex = i;
  8541 + }
  8542 + }
  8543 + console.log('ShowSearch is called');
  8544 + //this check is for log only because we are writing length so need to check if its not null or undefined
  8545 +
  8546 + if ($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) {
  8547 + console.log('$scope.VocabTermTxt.length= ' + $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt.length)
8539 8548 }
8540   - }
8541   - console.log('ShowSearch is called');
8542   - //this check is for log only because we are writing length so need to check if its not null or undefined
8543   - if ($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined)
8544   - console.log('$scope.VocabTermTxt.length= ' + $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt.length)
8545 8549  
8546   - $timeout(function () {
8547   -
8548   - if (($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) && ($rootScope.vocabTermDataArray[0].vocabTermTxt.length > 0)) {
8549   - //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed
8550   - //Remove the list and then Repopulate
8551   - if ($('#searchListDiv').html() != "")
8552   - $('#searchListDiv').empty()
8553   - //Delay compile of ul li so that the remove of li is completed.
8554   - $timeout(function () {
8555   - console.log("INSIDE WATCH. LIST IS CREATED");
8556   - $scope.isSearchDataLoaded = true;
  8550 + $timeout(function () {
8557 8551  
8558   - if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
  8552 + if (($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) && ($rootScope.vocabTermDataArray[0].vocabTermTxt.length > 0)) {
  8553 + //This is added as the $scope.VocabTermTxt can change while changing view also the li elements need to be removed
  8554 + //Remove the list and then Repopulate
  8555 + if ($('#searchListDiv').html() != "")
  8556 + $('#searchListDiv').empty()
  8557 + //Delay compile of ul li so that the remove of li is completed.
  8558 + $timeout(function () {
  8559 + console.log("INSIDE WATCH. LIST IS CREATED");
  8560 + $scope.isSearchDataLoaded = true;
8559 8561  
8560   - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
8561   - $rootScope.isLoading = false;
8562   - $('#spinner').css('visibility', 'hidden');
8563   - }
8564   - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
8565   - $rootScope.isLoading = false;
8566   - $('#spinner').css('visibility', 'hidden');
8567   - }
8568   - else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
8569   - $rootScope.isLoading = false;
8570   - $('#spinner').css('visibility', 'hidden');
8571   - }
8572   - else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
8573   - $rootScope.isLoading = false;
8574   - $('#spinner').css('visibility', 'hidden');
  8562 + if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
  8563 +
  8564 + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
  8565 + $rootScope.isLoading = false;
  8566 + $('#spinner').css('visibility', 'hidden');
  8567 + }
  8568 + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
  8569 + $rootScope.isLoading = false;
  8570 + $('#spinner').css('visibility', 'hidden');
  8571 + }
  8572 + else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
  8573 + $rootScope.isLoading = false;
  8574 + $('#spinner').css('visibility', 'hidden');
  8575 + }
  8576 + else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
  8577 + $rootScope.isLoading = false;
  8578 + $('#spinner').css('visibility', 'hidden');
  8579 + }
8575 8580 }
  8581 +
  8582 + }, 500);
  8583 + $scope.IsSearchVisible = true;
  8584 + console.log("s" + $rootScope.vocabTermDataArray[primaryLexiconIndex].language);
  8585 + $rootScope.a = primaryLexiconIndex;
  8586 + var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}">' +
  8587 + '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
  8588 + ' </li></ul>').appendTo('#searchListDiv')
  8589 + $compile($e2)($scope);
  8590 + document.getElementById("termlistfilter").style.display = "block";
  8591 + $timeout(function () {
  8592 + $rootScope.searchListArray = [];
  8593 + $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
  8594 + $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") });
  8595 + });
  8596 + }, 100);
  8597 + }
  8598 + else {
  8599 + $rootScope.loadSearchData();
  8600 + if (($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != null || $rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt != undefined) && ($rootScope.vocabTermDataArray[0].vocabTermTxt.length > 0)) {
  8601 + $scope.ShowSearch();
8576 8602 }
8577 8603  
8578   - }, 500);
8579   - $scope.IsSearchVisible = true;
8580   - console.log("s" + $rootScope.vocabTermDataArray[primaryLexiconIndex].language);
8581   - $rootScope.a = primaryLexiconIndex;
8582   - var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}">' +
8583   - '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
8584   - ' </li></ul>').appendTo('#searchListDiv')
8585   - $compile($e2)($scope);
8586   - document.getElementById("termlistfilter").style.display = "block";
8587   - $timeout(function () {
8588   - $rootScope.searchListArray = [];
8589   - $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
8590   - $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") });
8591   - });
8592   - }, 100);
8593   - }
8594   - else {
8595   - $rootScope.loadSearchData();
8596   - if ($rootScope.vocabTermDataArray[primaryLexiconIndex].vocabTermTxt.length > 0) {
8597   - $scope.ShowSearch();
8598 8604 }
8599   - }
8600   -
8601 8605  
8602   - }, 500);
8603 8606  
  8607 + }, 500);
  8608 + }
  8609 + else {
  8610 +
  8611 + $rootScope.loadSearchData();
  8612 + $scope.ShowSearch();
  8613 +
  8614 + }
8604 8615 }
8605   -
8606   -
8607 8616 $scope.HideSearch = function () {
8608 8617  
8609 8618 $timeout(function () {
... ... @@ -9250,8 +9259,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9250 9259  
9251 9260 $scope.LayerChangeBasedOnKeyPressed = function (e) {
9252 9261 // Dissectible Anatomy > Should not display blank page if no layer is selected.
9253   -
9254   -
  9262 +
  9263 +
  9264 +
9255 9265 if (e.keyCode == 13) {
9256 9266  
9257 9267 if ($("#txtlayerNumber").val() == '') {
... ... @@ -9291,14 +9301,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9291 9301 $rootScope.PreviouslayerNumbr = $scope.layerNumber;
9292 9302 }
9293 9303 }
9294   -
  9304 +
9295 9305 }
9296 9306  
9297 9307  
9298 9308 $scope.LayerValueChangeBasedOnKeyUp = function (e) {
9299   -
  9309 +
9300 9310 var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
9301   -
  9311 +
9302 9312 if (isNaN(keyUplayerNumber))
9303 9313 {
9304 9314 document.getElementById("txtlayerNumber").value = "";
... ... @@ -9320,8 +9330,11 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9320 9330 }
9321 9331  
9322 9332 }
9323   -
9324   -
  9333 + if ((navigator.userAgent.match(/Android/i))) {
  9334 + $("#txtlayerNumber").blur();
  9335 + }
  9336 +
  9337 +
9325 9338 }
9326 9339  
9327 9340  
... ...
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js
... ... @@ -1667,7 +1667,7 @@ console.log(&quot;jsPanel version: &quot; + jsPanel.version);
1667 1667 // jsPanel close
1668 1668 $('.jsPanel-btn-close', jsP).on('click', function (e) {
1669 1669 // alert('2')
1670   - //e.preventDefault();
  1670 + e.preventDefault();
1671 1671 //if (!jsP.option.controls.confirmClose) {
1672 1672 // jsPanel.close(jsP, jsP.parentElmtTagname);
1673 1673 //} else {
... ...