Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
58174064
Commit
58174064
authored
3 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Hide and show search loader using jquery
parent
de614b6e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!688
Resolve "Fix search.js autocompletion"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/core/static/js/search.js
+4
-12
4 additions, 12 deletions
aleksis/core/static/js/search.js
aleksis/core/templates/core/base.html
+1
-0
1 addition, 0 deletions
aleksis/core/templates/core/base.html
with
5 additions
and
12 deletions
aleksis/core/static/js/search.js
+
4
−
12
View file @
58174064
...
...
@@ -13,7 +13,7 @@ var Autocomplete = function (options) {
this
.
form_elem
=
null
;
this
.
query_box
=
null
;
this
.
selected_element
=
null
;
this
.
loader
_shown
=
false
;
this
.
loader
=
$
(
"
#search-loader
"
)
;
};
Autocomplete
.
prototype
.
setup
=
function
()
{
...
...
@@ -133,18 +133,10 @@ Autocomplete.prototype.setSelectedResult = function (element) {
Autocomplete
.
prototype
.
setLoader
=
function
(
value
)
{
var
self
=
this
;
if
(
typeof
value
===
"
boolean
"
){
if
(
self
.
loader_shown
===
value
)
{
return
if
(
value
)
{
self
.
loader
.
show
();
}
else
{
self
.
loader_shown
=
value
if
(
!
value
)
{
$
(
"
#search-loader
"
).
remove
();
}
else
{
this
.
query_box
.
after
(
$
(
'
<div class="progress" id="search-loader"><div class="indeterminate"></div></div>
'
)
);
}
self
.
loader
.
hide
();
}
}
}
This diff is collapsed.
Click to expand it.
aleksis/core/templates/core/base.html
+
1
−
0
View file @
58174064
...
...
@@ -84,6 +84,7 @@
<button
class=
"btn btn-flat search-button"
type=
"submit"
aria-label=
"{% trans "
Search
"
%}"
>
<i
class=
"material-icons"
>
search
</i>
</button>
<div
class=
"progress"
style=
"display: none;"
id=
"search-loader"
><div
class=
"indeterminate"
></div></div>
</div>
</form>
</li>
...
...
This diff is collapsed.
Click to expand it.
Julian
@ZugBahnHof
mentioned in commit
dda6e440
·
3 years ago
mentioned in commit
dda6e440
mentioned in commit dda6e440aee57d6cf287fd44c1ddd85cb36a0ad2
Toggle commit list
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