From 61c754de579b419528d4c33d47dab14d749adecb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Dec 2016 12:08:16 +0530 Subject: [PATCH] Refactor Code --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index a31769f..7d1eb52 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -534,28 +534,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //} // $("#daImagePanel").resize(checkWidth); - $(document).on("mouseover", "#termList option", function (e) { + $(document).on("mouseover", "#termList option", function (e) { $('#termList option[selected="selected"]').attr("selected", false); $(this).attr("selected", true); }); - - $(document).keypress(function (e) { + $(document).keypress(function (e) { if ($('#termList option[selected="selected"]').attr("id") == "undefined") { - return false; } else { var originator = e.keyCode || e.which; - if (e.keyCode == 13) { - onListManagerTermSelection($('#termList option[selected="selected"]').attr("id")); + // alert($('#termList option[selected="selected"]').attr("id")); + if ($('#termList option[selected="selected"]').attr("id")) { + if (e.keyCode == 13) { + onListManagerTermSelection($('#termList option[selected="selected"]').attr("id")); + } } } }); - - - }) - + }) $scope.loadSearchDataForBodyView = function () { -- libgit2 0.21.4