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
517fa5bd
Commit
517fa5bd
authored
4 years ago
by
William Enright
Browse files
Options
Downloads
Patches
Plain Diff
Adjusted frontend ajax calls for user search to fit modified backend
Change-Id: I513c52e8acb31408193151bab983c6ef71d3f12b
parent
936e54a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
jams-server/src/main/resources/webapp/js/identity-management.js
+2
-3
2 additions, 3 deletions
...erver/src/main/resources/webapp/js/identity-management.js
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
9 additions
and
12 deletions
jams-server/src/main/resources/webapp/js/identity-management.js
+
2
−
3
View file @
517fa5bd
...
...
@@ -29,7 +29,8 @@ $("#HSQL-form").submit(function (event) {
event
.
preventDefault
();
var
authSource
=
{};
var
settings
=
{
"
CN
"
:
"
http://ns.jami.net
"
"
publicNameServer
"
:
"
http://ns.jami.net
"
,
"
publicNames
"
:
$
(
'
#publicNS
'
)[
0
].
checked
};
authSource
[
'
type
'
]
=
'
LOCAL
'
;
...
...
@@ -60,8 +61,6 @@ function setLDAPParametersData(form) {
else
settings
[
field
.
name
]
=
field
.
value
;
});
// settings['usernameField'] = "uid";
// settings['realm'] = "savoirfairelinux";
settings
[
'
fieldMappings
'
]
=
{};
settings
[
'
fieldMappings
'
][
'
givenName
'
]
=
"
FirstName
"
;
settings
[
'
fieldMappings
'
][
'
sn
'
]
=
"
LastName
"
;
...
...
This diff is collapsed.
Click to expand it.
jams-server/src/main/resources/webapp/js/search.js
+
7
−
9
View file @
517fa5bd
...
...
@@ -123,7 +123,6 @@ function listAllUsers(data, statusCode, jqXHR)
for
(
i
=
0
;
i
<
resultSet
.
length
;
i
++
)
{
var
firstName
=
''
;
var
lastName
=
''
;
console
.
log
(
resultSet
[
i
]);
if
(
resultSet
[
i
].
firstName
)
firstName
=
resultSet
[
i
].
firstName
;
...
...
@@ -263,8 +262,8 @@ function handleFileSelectUpdate(evt) {
function
isActivated
(
data
)
{
var
resultSet
=
data
;
$
(
'
#license-type-display
'
).
text
(
"
Current version JAMS Alpha
"
+
resultSet
.
currentV
ersion
);
isActive
=
resultSet
.
isA
ctiv
e
;
$
(
'
#license-type-display
'
).
text
(
"
Current version JAMS Alpha
"
+
resultSet
.
versions
[
"
jams-server.jar
"
][
"
v
ersion
"
]
);
isActive
=
resultSet
.
a
ctiv
ated
;
}
function
searchFunction
(
data
,
statusCode
,
jqXHR
)
{
...
...
@@ -314,14 +313,15 @@ function searchFunction(data, statusCode, jqXHR) {
function
handleUpdate
(
data
,
statusCode
,
jqXHR
)
{
ajaxApiCall
(
api_path_get_
auth_license
,
'
GET
'
,
null
,
null
,
isActivated
,
false
);
ajaxApiCall
(
api_path_get_
subscription_status
,
'
GET
'
,
null
,
null
,
isActivated
,
false
);
if
(
jqXHR
.
status
==
200
&&
data
.
length
!=
0
)
{
// parse JSON response
var
resultSet
=
data
;
if
(
resultSet
.
updateAvailable
==
true
)
{
$
(
'
#update-title-div
'
).
show
();
$
(
'
#update-title
'
).
text
(
"
UPGRADE TO JAMS
"
+
resultSet
.
remoteVersions
.
substring
(
resultSet
.
remoteVersions
.
indexOf
(
"
=
"
)
+
1
,
resultSet
.
remoteVersions
.
length
-
1
));
window
.
localStorage
.
setItem
(
'
test
'
,
resultSet
.
remoteVersions
);
$
(
'
#update-title
'
).
text
(
"
UPGRADE TO JAMS
"
+
resultSet
.
remoteVersions
[
"
jams-server.jar
"
][
"
version
"
]);
document
.
getElementsByClassName
(
"
update-title
"
)[
0
].
addEventListener
(
'
click
'
,
function
(){
if
(
isActive
==
true
)
{
...
...
@@ -358,11 +358,11 @@ function handleUserCreation(data, statusCode, jqXHR) {
else
$
(
'
#user-pw-modal-body
'
).
text
(
"
New user successfully created. Here is the one time password:
"
+
data
.
pw
);
ajaxApiCall
(
api_path_get_user_
extended_data
,
'
GET
'
,
null
,
null
,
listAllUsers
);
ajaxApiCall
(
api_path_get_user_
directory_search
,
'
GET
'
,
null
,
null
,
listAllUsers
);
}
function
handleUserUpdate
()
{
ajaxApiCall
(
api_path_get_user_
extended_data
,
'
GET
'
,
null
,
null
,
listAllUsers
);
ajaxApiCall
(
api_path_get_user_
directory_search
,
'
GET
'
,
null
,
null
,
listAllUsers
);
}
function
handleUserExists
(
data
)
{
...
...
@@ -438,8 +438,6 @@ function handleUserAutofill(data, statusCode, jqXHR) {
$
(
'
#input-telephoneNumber-update
'
).
val
(
resultSet
.
telephoneNumber
);
$
(
'
#input-extension-update
'
).
val
(
resultSet
.
extension
);
$
(
'
#input-mobile-update
'
).
val
(
resultSet
.
mobilePhoneNumber
);
}
}
...
...
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