| | |
| | | //} |
| | | }); |
| | | |
| | | $rootScope.$on("$stateChangeStart", function (event, toState, toStateParams) { |
| | | var keyWord = $rootScope.getCookie("searchKeyword"); |
| | | |
| | | if (keyWord == null || keyWord === '') { |
| | | $scope.vm.searchAll.keyWord = ""; |
| | | } |
| | | }); |
| | | |
| | | // 메인 상단 검색 |
| | | function searchAll() { |
| | | if ($state.current.name !== "issues.list") { |
| | | // $state.go("issues.list"); |
| | | var myUrl = window.location.href.split('#/'); |
| | | location.href = myUrl[0] + "#/issues/issueList?keyWord=" + $scope.vm.searchAll.keyWord; |
| | | if ($rootScope.isDefined($scope.vm.searchAll.keyWord)) { |
| | | $rootScope.setCookie("searchKeyword", $scope.vm.searchAll.keyWord, 60000); |
| | | moveMenu("issues.list"); |
| | | } else { |
| | | $rootScope.$broadcast("searchIssueList", {keyWord: $scope.vm.searchAll.keyWord}); |
| | | SweetAlert.warning($filter("translate")("common.alertSystem"), $filter("translate")("issue.pleaseEnterIssueKeyWord")); |
| | | } |
| | | |
| | | } |
| | | |
| | | function setLastIssueType() { |
| | |
| | | |
| | | function changeIssueListMenu(issueTypeId, changeProject = true) { |
| | | $rootScope.issueTypeMenu = null; |
| | | for (var issueType of $rootScope.workIssueTypes) { |
| | | if (issueType.id === issueTypeId) { |
| | | $rootScope.issueTypeMenu = issueType; |
| | | break; |
| | | $rootScope.allIssueList = false; |
| | | if (issueTypeId == null) { |
| | | $rootScope.allIssueList = true; |
| | | moveMenu("issues.list"); |
| | | }else { |
| | | for (var issueType of $rootScope.workIssueTypes) { |
| | | if (issueType.id === issueTypeId) { |
| | | $rootScope.issueTypeMenu = issueType; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | }); |
| | | }); |
| | | |
| | | // 사용자 관리 - 사용자 등급 변경 했을 때 |
| | | $rootScope.webSocket.client.subscribe('/user/notification/changeUserLevel', function (notification) { |
| | | SweetAlert.warning($filter("translate")("common.changeUserLevel"), $filter("translate")("common.logoutForLevelChange")); |
| | | $rootScope.$broadcast("logout"); |
| | | }); |
| | | |
| | | // 사용자 관리 - 사용자 부서 변경 했을 때 |
| | | $rootScope.webSocket.client.subscribe('/user/notification/changeUserDepartment', function (notification) { |
| | | SweetAlert.warning($filter("translate")("common.changeUserDepartment"), $filter("translate")("common.logoutForDepartmentChange")); |
| | | $rootScope.$broadcast("logout"); |
| | | }); |
| | | |
| | | // 참여 업무 공간 비활성화 알림 - 해당 업무 공간를 보고 있을 때 |
| | | $rootScope.webSocket.client.subscribe('/user/notification/workspace-disabled', function (notification) { |
| | | // edit by zenith at 20200801 |