| | |
| | | page : "=", |
| | | totalPage : "=", |
| | | inputDisabled : "=", |
| | | customInput : "=", |
| | | }, |
| | | templateUrl : "custom_components/js-autocomplete-single/js-autocomplete-single.html", |
| | | link : function ($scope, $element, $attrs) { |
| | |
| | | if (!angular.isDefined($scope.inputDisabled)) { |
| | | $scope.inputDisabled = false; |
| | | } |
| | | |
| | | /*if (!angular.isDefined($scope.customInput)) { |
| | | $scope.customInput = false; |
| | | }*/ |
| | | |
| | | $scope.options = []; // 전체 목록 |
| | | $scope.networkSuccess = false; // 통신 완료 후 화면 표시. |
| | |
| | | switch (event.keyCode) { |
| | | case 9 : // 탭키 닫기 |
| | | $scope.open = false; |
| | | $scope.search = ""; |
| | | if (!angular.isDefined($scope.customInput) && !$scope.customInput) { |
| | | $scope.search = ""; |
| | | } |
| | | $scope.page = 0; |
| | | $scope.totalPage = 0; |
| | | $scope.options = []; |
| | |
| | | $scope.$apply(function () { |
| | | $scope.open = false; |
| | | if ($scope.selectedModel == null || $scope.selectedModel.length == 0) { |
| | | $scope.search = ""; |
| | | if (!angular.isDefined($scope.customInput) && !$scope.customInput) { |
| | | $scope.search = ""; |
| | | } |
| | | } |
| | | $scope.page = 0; |
| | | $scope.totalPage = 0; |