Commit 3ad07e0b77ce7ffcd2e9b9492e2e3b42164e2eef

Authored by unknown
1 parent 6436ddf2

List in the List Manager is not select when press "Enter" button from the Keyboard.

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -527,13 +527,34 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -527,13 +527,34 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
527 $('#daBodyview').css("width", $(window).outerWidth()); 527 $('#daBodyview').css("width", $(window).outerWidth());
528 } 528 }
529 529
530 - angular.element(document).ready(function () { 530 + angular.element(document).ready(function (e) {
531 function checkWidth() { 531 function checkWidth() {
532 var CanvasDivWidthAftrMin = $("#canvasDiv").width() / 2; 532 var CanvasDivWidthAftrMin = $("#canvasDiv").width() / 2;
533 $("#canvasDiv").scrollLeft(CanvasDivWidthAftrMin); 533 $("#canvasDiv").scrollLeft(CanvasDivWidthAftrMin);
534 } 534 }
535 - $("#daImagePanel").resize(checkWidth);  
536 - }) 535 + $("#daImagePanel").resize(checkWidth);
  536 +
  537 + $(document).on("mouseover", "#termList option", function (e) {
  538 + $('#termList option[selected="selected"]').attr("selected", false);
  539 + $(this).attr("selected", true);
  540 + });
  541 +
  542 +
  543 + $(document).keypress(function (e) {
  544 + if ($('#termList option[selected="selected"]').attr("id") == "undefined") {
  545 +
  546 + return false;
  547 + }
  548 + else {
  549 + var originator = e.keyCode || e.which;
  550 + if (e.keyCode == 13) {
  551 + onListManagerTermSelection($('#termList option[selected="selected"]').attr("id"));
  552 + }
  553 + }
  554 + });
  555 +
  556 +
  557 + })
537 558
538 559
539 $scope.loadSearchDataForBodyView = function () { 560 $scope.loadSearchDataForBodyView = function () {
@@ -7038,7 +7059,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -7038,7 +7059,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7038 7059
7039 7060
7040 $rootScope.prevId = actualTermNumber; 7061 $rootScope.prevId = actualTermNumber;
7041 - $("#termList").find("option").attr('selected', false); 7062 + // $("#termList").find("option").attr('selected', false);
7042 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); 7063 $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
7043 $("#termList").find("option[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); 7064 $("#termList").find("option[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
7044 $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" }); 7065 $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" });
@@ -7399,7 +7420,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -7399,7 +7420,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7399 7420
7400 7421
7401 for (var j = 0; j < $scope.VocabTermTxt.length; j++) { 7422 for (var j = 0; j < $scope.VocabTermTxt.length; j++) {
7402 - var $el = $('<option id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList') 7423 + var $el = $('<option id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList')
7403 $compile($el)($scope); 7424 $compile($el)($scope);
7404 } 7425 }
7405 7426
@@ -7514,7 +7535,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -7514,7 +7535,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7514 7535
7515 } 7536 }
7516 7537
  7538 + //$rootScope.termListEnterEvent = function (event) {
  7539 + // $(document).("")
  7540 + //debugger;
  7541 + //alert(event.currentTarget.id);
  7542 + //$('#termList option[selected="selected"]').attr("selected", false);
  7543 + // alert("sss");
7517 7544
  7545 + //}
7518 7546
7519 }] 7547 }]
7520 7548
@@ -7655,4 +7683,6 @@ function onListManagerTermSelection(id) { @@ -7655,4 +7683,6 @@ function onListManagerTermSelection(id) {
7655 scope.HighlightBodyOnListManagerSelection(id); 7683 scope.HighlightBodyOnListManagerSelection(id);
7656 }); 7684 });
7657 7685
7658 -}  
7659 \ No newline at end of file 7686 \ No newline at end of file
  7687 +}
  7688 +
  7689 +
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -49,8 +49,9 @@ @@ -49,8 +49,9 @@
49 49
50 50
51 #termList option:hover { 51 #termList option:hover {
52 - background-color: #3399FF;  
53 - color:#fff; 52 + background-color: #3399FF !important;
  53 + color: #fff !important;
  54 +
54 } 55 }
55 56
56 57
@@ -743,10 +744,9 @@ @@ -743,10 +744,9 @@
743 744
744 </div> 745 </div>
745 746
746 -  
747 <!--DA > List Manager > Multiple structure selection should not be available.--> 747 <!--DA > List Manager > Multiple structure selection should not be available.-->
748 <div class="form-group"> 748 <div class="form-group">
749 - <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id)"></select> 749 + <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id)"></select>
750 </div> 750 </div>
751 751
752 </div> 752 </div>