Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
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
Container Registry
Model registry
Monitor
Service Desk
Analyze
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
TeDomum
Nextcloud
Commits
10038640
Commit
10038640
authored
10 years ago
by
Jörn Friedrich Dreyer
Browse files
Options
Downloads
Patches
Plain Diff
fix onScroll breaking search, fix keyboard navigation, fix filter for files in other dirs
parent
ba931d21
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
apps/files/js/search.js
+6
-1
6 additions, 1 deletion
apps/files/js/search.js
search/js/search.js
+2
-2
2 additions, 2 deletions
search/js/search.js
with
8 additions
and
3 deletions
apps/files/js/search.js
+
6
−
1
View file @
10038640
...
@@ -34,7 +34,12 @@
...
@@ -34,7 +34,12 @@
return
!!
OCA
.
Files
&&
!!
OCA
.
Files
.
App
;
return
!!
OCA
.
Files
&&
!!
OCA
.
Files
.
App
;
};
};
function
inFileList
(
$row
,
result
)
{
function
inFileList
(
$row
,
result
)
{
return
self
.
fileAppLoaded
()
&&
self
.
fileList
.
inList
(
result
.
name
);
if
(
!
self
.
fileAppLoaded
())
{
return
false
;
}
var
dir
=
self
.
fileList
.
getCurrentDirectory
().
replace
(
/
\/
+$/
,
''
);
var
resultDir
=
OC
.
dirname
(
result
.
path
);
return
dir
===
resultDir
&&
self
.
fileList
.
inList
(
result
.
name
);
}
}
function
updateLegacyMimetype
(
result
)
{
function
updateLegacyMimetype
(
result
)
{
// backward compatibility:
// backward compatibility:
...
...
This diff is collapsed.
Click to expand it.
search/js/search.js
+
2
−
2
View file @
10038640
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
var
result
=
$searchResults
.
find
(
'
tr.result
'
)[
currentResult
];
var
result
=
$searchResults
.
find
(
'
tr.result
'
)[
currentResult
];
if
(
result
)
{
if
(
result
)
{
var
$result
=
$
(
result
);
var
$result
=
$
(
result
);
var
currentOffset
=
$
searchResults
.
scrollTop
();
var
currentOffset
=
$
(
'
#app-content
'
)
.
scrollTop
();
$
(
'
#app-content
'
).
animate
({
$
(
'
#app-content
'
).
animate
({
// Scrolling to the top of the new result
// Scrolling to the top of the new result
scrollTop
:
currentOffset
+
$result
.
offset
().
top
-
$result
.
height
()
*
2
scrollTop
:
currentOffset
+
$result
.
offset
().
top
-
$result
.
height
()
*
2
...
@@ -235,7 +235,7 @@
...
@@ -235,7 +235,7 @@
* This appends/renders the next page of entries when reaching the bottom.
* This appends/renders the next page of entries when reaching the bottom.
*/
*/
function
onScroll
(
e
)
{
function
onScroll
(
e
)
{
if
(
$searchResults
)
{
if
(
$searchResults
&&
lastQuery
!==
false
)
{
var
resultsBottom
=
$searchResults
.
offset
().
top
+
$searchResults
.
height
();
var
resultsBottom
=
$searchResults
.
offset
().
top
+
$searchResults
.
height
();
var
containerBottom
=
$searchResults
.
offsetParent
().
offset
().
top
+
$searchResults
.
offsetParent
().
height
();
var
containerBottom
=
$searchResults
.
offsetParent
().
offset
().
top
+
$searchResults
.
offsetParent
().
height
();
if
(
resultsBottom
<
containerBottom
*
1.2
)
{
if
(
resultsBottom
<
containerBottom
*
1.2
)
{
...
...
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