Commit 61c754de579b419528d4c33d47dab14d749adecb
1 parent
3a6e349a
Refactor Code
Showing
1 changed file
with
8 additions
and
10 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -534,28 +534,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
534 | 534 | //} |
535 | 535 | // $("#daImagePanel").resize(checkWidth); |
536 | 536 | |
537 | - $(document).on("mouseover", "#termList option", function (e) { | |
537 | + $(document).on("mouseover", "#termList option", function (e) { | |
538 | 538 | $('#termList option[selected="selected"]').attr("selected", false); |
539 | 539 | $(this).attr("selected", true); |
540 | 540 | }); |
541 | 541 | |
542 | - | |
543 | - $(document).keypress(function (e) { | |
542 | + $(document).keypress(function (e) { | |
544 | 543 | if ($('#termList option[selected="selected"]').attr("id") == "undefined") { |
545 | - | |
546 | 544 | return false; |
547 | 545 | } |
548 | 546 | else { |
549 | 547 | var originator = e.keyCode || e.which; |
550 | - if (e.keyCode == 13) { | |
551 | - onListManagerTermSelection($('#termList option[selected="selected"]').attr("id")); | |
548 | + // alert($('#termList option[selected="selected"]').attr("id")); | |
549 | + if ($('#termList option[selected="selected"]').attr("id")) { | |
550 | + if (e.keyCode == 13) { | |
551 | + onListManagerTermSelection($('#termList option[selected="selected"]').attr("id")); | |
552 | + } | |
552 | 553 | } |
553 | 554 | } |
554 | 555 | }); |
555 | - | |
556 | - | |
557 | - }) | |
558 | - | |
556 | + }) | |
559 | 557 | |
560 | 558 | $scope.loadSearchDataForBodyView = function () { |
561 | 559 | ... | ... |