Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
schedules
Commits
5bb04ff1
Commit
5bb04ff1
authored
Jan 16, 2020
by
Zac Wood
Browse files
possibly fix a bug with search and https?
parent
9c55e4b0
Pipeline
#5326
passed with stage
in 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
schedules/app/javascript/src/controllers/search_controller.js
View file @
5bb04ff1
...
...
@@ -7,6 +7,8 @@ export default class extends Controller {
search
(
event
)
{
event
.
preventDefault
()
Turbolinks
.
visit
(
buildUrl
(
`/search?query=
${
this
.
inputTarget
.
value
}
`
))
const
url
=
`/search?query=
${
this
.
inputTarget
.
value
}
`
Turbolinks
.
visit
(
url
)
}
}
console
.
log
(
'
AHHH
'
)
schedules/app/javascript/src/utils.js
View file @
5bb04ff1
...
...
@@ -2,7 +2,8 @@ import { saveAs } from 'file-saver'
export
function
buildUrl
(
url
,
protocol
=
window
.
location
.
protocol
)
{
const
port
=
window
.
location
.
port
===
'
3000
'
?
'
:3000
'
:
''
return
`
${
protocol
}
//
${
window
.
location
.
hostname
}${
port
}${
url
}
`
const
result
=
`
${
protocol
}
//
${
window
.
location
.
hostname
}${
port
}${
url
}
`
return
result
}
export
function
downloadIcal
(
url
,
filename
)
{
...
...
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