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
a1d7d606
Unverified
Commit
a1d7d606
authored
6 years ago
by
John Molakvoæ
Browse files
Options
Downloads
Patches
Plain Diff
Fix search on public pages
Signed-off-by:
John Molakvoæ (skjnldsv)
<
skjnldsv@protonmail.com
>
parent
fb77ff9d
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
core/search/js/search.js
+5
-2
5 additions, 2 deletions
core/search/js/search.js
core/search/js/searchprovider.js
+11
-10
11 additions, 10 deletions
core/search/js/searchprovider.js
with
16 additions
and
12 deletions
core/search/js/search.js
+
5
−
2
View file @
a1d7d606
...
@@ -52,10 +52,13 @@
...
@@ -52,10 +52,13 @@
var
self
=
this
;
var
self
=
this
;
if
(
typeof
searchCallback
!==
'
function
'
)
{
if
(
typeof
searchCallback
!==
'
function
'
)
{
throw
'
searchCallback must be a function
'
;
throw
new
Error
(
'
searchCallback must be a function
'
)
;
}
}
if
(
typeof
resetCallback
!==
'
function
'
)
{
if
(
typeof
resetCallback
!==
'
function
'
)
{
throw
'
resetCallback must be a function
'
;
throw
new
Error
(
'
resetCallback must be a function
'
);
}
if
(
!
document
.
getElementById
(
'
searchbox
'
))
{
throw
new
Error
(
'
searchBox not available
'
);
}
}
this
.
searchCallback
=
searchCallback
;
this
.
searchCallback
=
searchCallback
;
...
...
This diff is collapsed.
Click to expand it.
core/search/js/searchprovider.js
+
11
−
10
View file @
a1d7d606
...
@@ -413,26 +413,27 @@
...
@@ -413,26 +413,27 @@
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
var
$searchResults
=
$
(
'
#searchresults
'
);
var
$searchResults
=
$
(
'
#searchresults
'
);
if
(
$searchResults
.
length
>
0
)
{
var
$searchBox
=
$
(
'
#searchbox
'
);
if
(
$searchResults
.
length
>
0
&&
$searchBox
.
length
>
0
)
{
$searchResults
.
addClass
(
'
hidden
'
);
$searchResults
.
addClass
(
'
hidden
'
);
$
(
'
#app-content
'
)
.
find
(
'
.viewcontainer
'
)
.
css
(
'
min-height
'
,
'
initial
'
);
$searchResults
.
load
(
$searchResults
.
load
(
OC
.
webroot
+
'
/core/search/templates/part.results.html
'
,
OC
.
webroot
+
'
/core/search/templates/part.results.html
'
,
function
()
{
function
()
{
OC
.
Search
=
new
OCA
.
Search
.
Core
(
OC
.
Search
=
new
OCA
.
Search
.
Core
(
$
(
'
#
search
b
ox
'
)
,
$search
B
ox
,
$
(
'
#
search
r
esults
'
)
$search
R
esults
);
);
}
}
);
);
}
else
{
}
else
{
// check again later
_
.
defer
(
function
()
{
_
.
defer
(
function
()
{
OC
.
Search
=
new
OCA
.
Search
.
Core
(
if
(
$searchResults
.
length
>
0
&&
$searchBox
.
length
>
0
)
{
$
(
'
#searchbox
'
),
OC
.
Search
=
new
OCA
.
Search
.
Core
(
$
(
'
#searchresults
'
)
$searchBox
,
);
$searchResults
);
}
});
});
}
}
});
});
...
...
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