Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
ba931d21
Commit
ba931d21
authored
10 years ago
by
Jörn Friedrich Dreyer
Browse files
Options
Downloads
Patches
Plain Diff
search with endless scrolling
parent
23900a5a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
search/css/results.css
+0
-2
0 additions, 2 deletions
search/css/results.css
search/js/search.js
+7
-3
7 additions, 3 deletions
search/js/search.js
with
7 additions
and
5 deletions
search/css/results.css
+
0
−
2
View file @
ba931d21
...
@@ -5,10 +5,8 @@
...
@@ -5,10 +5,8 @@
#searchresults
{
#searchresults
{
background-color
:
#fff
;
background-color
:
#fff
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
padding-top
:
65px
;
padding-top
:
65px
;
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
z-index
:
75
;
z-index
:
75
;
}
}
...
...
This diff is collapsed.
Click to expand it.
search/js/search.js
+
7
−
3
View file @
ba931d21
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
var
currentResult
=
-
1
;
var
currentResult
=
-
1
;
var
lastQuery
=
''
;
var
lastQuery
=
''
;
var
lastInApps
=
[];
var
lastPage
=
0
;
var
lastPage
=
0
;
var
lastSize
=
30
;
var
lastSize
=
30
;
var
lastResults
=
{};
var
lastResults
=
{};
...
@@ -115,6 +116,7 @@
...
@@ -115,6 +116,7 @@
return
;
return
;
}
}
lastQuery
=
query
;
lastQuery
=
query
;
lastInApps
=
inApps
;
lastPage
=
page
;
lastPage
=
page
;
lastSize
=
size
;
lastSize
=
size
;
...
@@ -234,9 +236,11 @@
...
@@ -234,9 +236,11 @@
*/
*/
function
onScroll
(
e
)
{
function
onScroll
(
e
)
{
if
(
$searchResults
)
{
if
(
$searchResults
)
{
//if ( $searchResults && $searchResults.scrollTop() + $searchResults.height() > $searchResults.find('table').height() - 300 ) {
var
resultsBottom
=
$searchResults
.
offset
().
top
+
$searchResults
.
height
();
// self.search(lastQuery, lastPage + 1);
var
containerBottom
=
$searchResults
.
offsetParent
().
offset
().
top
+
$searchResults
.
offsetParent
().
height
();
//}
if
(
resultsBottom
<
containerBottom
*
1.2
)
{
self
.
search
(
lastQuery
,
lastInApps
,
lastPage
+
1
);
}
placeStatus
();
placeStatus
();
}
}
}
}
...
...
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