Skip to content

Commit

Permalink
Modify filter user (#4562)
Browse files Browse the repository at this point in the history
* Modify Filter User button
  • Loading branch information
zcy1010 authored Sep 9, 2022
1 parent cb62807 commit 70791c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ function UserController($scope, $window, $translate, toastr, AppUtil, UserServic
$scope.createdUsers = [];
$scope.filterUser = [];
$scope.status = '1'
$scope.showSearchUsernameInput = false
$scope.searchKey = ''
$scope.changeStatus = changeStatus
$scope.toggleUsernameSearchInput = toggleUsernameSearchInput
$scope.searchUsers = searchUsers
$scope.resetSearchUser = resetSearchUser

Expand Down Expand Up @@ -70,10 +68,6 @@ function UserController($scope, $window, $translate, toastr, AppUtil, UserServic
}
}

function toggleUsernameSearchInput() {
$scope.showSearchUsernameInput = !$scope.showSearchUsernameInput
}

function searchUsers() {
$scope.searchKey = $scope.searchKey.toLowerCase();
var filterUser = []
Expand Down
30 changes: 14 additions & 16 deletions apollo-portal/src/main/resources/static/user-manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,23 @@
class="btn btn-primary">
{{'UserMange.Add' | translate }}
</button>
<button type="button" class="btn btn-default" data-tooltip="tooltip" data-placement="bottom"
title="{{'UserMange.SortByUserLoginName' | translate }}" ng-click="toggleUsernameSearchInput()">
<span class="glyphicon glyphicon-filter"></span>
{{'UserMange.FilterUser' | translate }}
</button>
<form class="form-inline" style="display:inline">
<div class="form-group">
<input type="text" class="form-control" id="searchUserInput"
placeholder="{{'UserMange.SortByUserLoginName' | translate }}"
ng-model="searchKey">
</div>
<button type="button" class="btn btn-default" ng-click="searchUsers()">
<span class="glyphicon glyphicon-filter"></span>
{{'UserMange.FilterUser' | translate }}
</button>
<button type="button" class="btn btn-default" ng-click="resetSearchUser()">
{{'UserMange.Reset' | translate }}
</button>
</form>
</div>
<div style="height: 15px"></div>
</div>
<div class="search-input" ng-show="showSearchUsernameInput">
<form class="form-inline">
<div class="form-group">
<input type="text" class="form-control" id="searchUserInput"
placeholder="{{'UserMange.SortByUserLoginName' | translate }}"
ng-model="searchKey" ng-change="searchUsers()">
</div>
<button type="button" class="btn btn-default" ng-click="resetSearchUser()">{{'UserMange.Reset' | translate }}</button>
</form>
<div style="height: 15px"></div>
</div>
<table class="table table-bordered table-striped table-hover">
<tr>
<th style="text-align: left">{{'UserMange.UserName' | translate }}</th>
Expand Down

0 comments on commit 70791c8

Please sign in to comment.