| | |
| | | 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; // 통신 완료 후 화면 표시. |
| | |
| | | |
| | | // 검색된 아이템 클릭시 입력 필드 포커스 주기 |
| | | function searchInputField() { |
| | | if ($scope.selectedModel.length > 0) { |
| | | if (angular.isDefined($scope.selectedModel) && $scope.selectedModel.length > 0) { |
| | | $($element).find(".input-tag-search-field-readonly").focus(); |
| | | } |
| | | } |
| | |
| | | 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; |