Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify filter user #4562

Merged
merged 24 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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