Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
85f5c722
Commit
85f5c722
authored
4 years ago
by
William Enright
Browse files
Options
Downloads
Patches
Plain Diff
fixed user rows not being clickable when searching
Change-Id: Id65a84bf3b5c79029ba12c7dacbdeb89ba777945
parent
231cf1dc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jams-server/src/main/resources/webapp/js/search.js
+7
-9
7 additions, 9 deletions
jams-server/src/main/resources/webapp/js/search.js
with
7 additions
and
9 deletions
jams-server/src/main/resources/webapp/js/search.js
+
7
−
9
View file @
85f5c722
...
...
@@ -106,10 +106,6 @@ $('#search').keyup(function(e) {
// reset previous resultset
$
(
'
.user-data
'
).
remove
();
$
(
'
.empty-results
'
).
remove
();
$
(
'
*[data-href]
'
).
on
(
'
click
'
,
function
()
{
window
.
location
=
$
(
this
).
data
(
"
href
"
);
});
});
function
listAllUsers
(
data
,
statusCode
,
jqXHR
)
...
...
@@ -163,11 +159,9 @@ function listAllUsers(data, statusCode, jqXHR)
function
addListenersForActions
()
{
// revoke user
$
(
'
.de-authorize-user
'
).
on
(
'
click
'
,
function
(
e
)
{
console
.
log
(
"
revoke user
"
);
userRevoke
=
(
e
.
currentTarget
.
getAttribute
(
'
user-id
'
));
$
(
'
#deAuthorizeModalCenter
'
).
modal
(
'
show
'
);
$
(
'
#de-authorize-user-button
'
).
on
(
'
click
'
,
function
()
{
console
.
log
(
"
click event
"
);
$
(
'
#deAuthorizeModalCenter
'
).
modal
(
'
hide
'
);
var
w
=
$
(
'
.de-authorize-user
'
).
width
();
isSearch
=
false
;
...
...
@@ -179,7 +173,7 @@ function addListenersForActions() {
});
});
// edit user
$
(
'
.user-information-search
'
).
on
(
'
click
'
,
'
.edit-user
'
,
function
(
e
)
{
userEdit
=
(
e
.
currentTarget
.
getAttribute
(
'
user-id
'
));
...
...
@@ -290,8 +284,8 @@ function searchFunction(data, statusCode, jqXHR) {
'
</td><td class="mobile">First Name</td><td style="cursor:pointer;" data-href="user.html?username=
'
+
encodeURIComponent
(
resultSet
[
i
].
username
)
+
'
">
'
+
firstName
+
''
+
'
</td><td class="mobile">Last Name</td><td style="cursor:pointer;" data-href="user.html?username=
'
+
encodeURIComponent
(
resultSet
[
i
].
username
)
+
'
">
'
+
lastName
+
'
</td><td class="mobile">Devices</td><td style="cursor:pointer;" data-href="user.html?username=
'
+
encodeURIComponent
(
resultSet
[
i
].
username
)
+
'
"><i class="fa fa-mobile"></i></td><td class="spacer--table">spacer</td>
'
+
'
<td class="mobile">Actions</td><td class="user-information-search"><button class="edit-user" user-id="
'
+
encodeURIComponent
(
resultSet
[
i
].
username
)
+
'
"><i class="fa fa-edit"></i></button>
'
+
'
<button type="button" id="de-authorize-user" class="btn-danger de-authorize-user" user-id="
'
+
encodeURIComponent
(
resultSet
[
i
].
username
)
+
'
"
'
+
'
><i class="fa fa-trash"></i></button>
'
+
'
<td class="mobile">
<
Actions</td><td class="user-information-search"><button class="edit-user"
title="Edit User" style="display: none;"
user-id="
'
+
encodeURIComponent
(
resultSet
[
i
].
username
)
+
'
"><i class="fa fa-edit"></i></button>
'
+
'
<button type="button" id="de-authorize-user" class="btn-danger de-authorize-user"
title="Revoke User"
user-id="
'
+
encodeURIComponent
(
resultSet
[
i
].
username
)
+
'
"
'
+
'
><i class="fa fa-trash"></i></button>
'
+
'
</td><td class="spacer--table">spacer</td></tr>
'
}
...
...
@@ -306,6 +300,10 @@ function searchFunction(data, statusCode, jqXHR) {
$
(
'
tbody
'
).
append
(
'
<tr class="empty-results bubble"><td colspan="5" class="text-alert">No users found</td></tr>
'
).
fadeIn
(
'
slow
'
);
}
$
(
'
*[data-href]
'
).
on
(
'
click
'
,
function
()
{
window
.
location
=
$
(
this
).
data
(
"
href
"
);
});
addListenersForActions
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment