Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
5d9feee1
Commit
5d9feee1
authored
Mar 04, 2022
by
Thibault Grandjean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use autocomplete for select member
parent
e6707456
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
45 deletions
+0
-45
manage_attached.js
members/static/js/admin/manage_attached.js
+0
-45
No files found.
members/static/js/admin/manage_attached.js
View file @
5d9feee1
...
...
@@ -40,53 +40,8 @@ function display_member_infos(memberData) {
shifts
=
memberData
.
incoming_shifts
}
/**
* Display the members from the search result
*/
function
display_possible_members
()
{
$
(
'.search_member_results_area'
).
show
();
$
(
'.search_member_results'
).
empty
();
$
(
'.btn_possible_member'
).
off
();
let
no_result
=
true
;
if
(
members_search_results
.
length
>
0
)
{
for
(
member
of
members_search_results
)
{
$
(
".search_results_text"
).
show
();
no_result
=
false
;
// Display results (possible members) as buttons
var
member_button
=
'<button class="btn--success btn_possible_member" member_id="'
+
member
.
id
+
'">'
+
member
.
barcode_base
+
' - '
+
member
.
name
+
'</button>'
;
$
(
'.search_member_results'
).
append
(
member_button
);
}
// Set action on member button click
$
(
'.btn_possible_member'
).
on
(
'click'
,
function
()
{
for
(
member
of
members_search_results
)
{
if
(
member
.
id
==
$
(
this
).
attr
(
'member_id'
))
{
selected_member
=
member
;
load_member_infos
();
$
(
'.search_member_results'
).
empty
();
$
(
'.search_member_results_area'
).
hide
();
$
(
'#search_member_input'
).
val
(
''
);
break
;
}
}
});
}
if
(
no_result
===
true
)
{
$
(
".search_results_text"
).
hide
();
$
(
'.search_member_results'
).
html
(
`<p>
<i>Aucun résultat ! Vérifiez votre recherche, ou si le.la membre n'est pas déjà dans le tableau...</i>
</p>`
);
}
}
$
(
document
).
ready
(
function
()
{
if
(
coop_is_connected
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment