Commit 61c754de579b419528d4c33d47dab14d749adecb

Authored by unknown
1 parent 3a6e349a

Refactor Code

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -534,28 +534,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -534,28 +534,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
534 //} 534 //}
535 // $("#daImagePanel").resize(checkWidth); 535 // $("#daImagePanel").resize(checkWidth);
536 536
537 - $(document).on("mouseover", "#termList option", function (e) { 537 + $(document).on("mouseover", "#termList option", function (e) {
538 $('#termList option[selected="selected"]').attr("selected", false); 538 $('#termList option[selected="selected"]').attr("selected", false);
539 $(this).attr("selected", true); 539 $(this).attr("selected", true);
540 }); 540 });
541 541
542 -  
543 - $(document).keypress(function (e) { 542 + $(document).keypress(function (e) {
544 if ($('#termList option[selected="selected"]').attr("id") == "undefined") { 543 if ($('#termList option[selected="selected"]').attr("id") == "undefined") {
545 -  
546 return false; 544 return false;
547 } 545 }
548 else { 546 else {
549 var originator = e.keyCode || e.which; 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 $scope.loadSearchDataForBodyView = function () { 558 $scope.loadSearchDataForBodyView = function () {
561 559