CC-3469: Stream settings: Connection URLs are not generated correctly
- done
This commit is contained in:
parent
b7634098d3
commit
e194ff0dc8
3 changed files with 44 additions and 5 deletions
|
@ -107,10 +107,11 @@ function checkLiquidsoapStatus(){
|
|||
}
|
||||
|
||||
function setLiveSourceConnectionOverrideListener(){
|
||||
$("[id=connection_url_override]").click(function(){
|
||||
$("[id=connection_url_override]").click(function(event){
|
||||
var div_ele = $(this).parent().find("div[id$='_dj_connection_url_tb']")
|
||||
div_ele.find(":input").val("")
|
||||
div_ele.show()
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
// set action for "OK" and "X"
|
||||
|
@ -119,36 +120,42 @@ function setLiveSourceConnectionOverrideListener(){
|
|||
var master_dj_input = $("#master_dj_connection_url_tb")
|
||||
var master_dj_label = master_dj_input.parent().find("span")
|
||||
|
||||
live_dj_input.find("#ok").click(function(){
|
||||
live_dj_input.find("#ok").click(function(event){
|
||||
event.preventDefault()
|
||||
var url = $(this).parent().find(":input").val()
|
||||
live_dj_label.html(url)
|
||||
live_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url/", {format: "json", type: "livedj", url:encodeURIComponent(url)});
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
live_dj_input.find("#reset").click(function(){
|
||||
live_dj_input.find("#reset").click(function(event){
|
||||
event.preventDefault()
|
||||
var port = $("#dj_harbor_input_port").val()
|
||||
var mount = $("#dj_harbor_input_mount_point").val()
|
||||
var url = "http://"+location.hostname+":"+port+"/"+mount
|
||||
live_dj_label.html(url)
|
||||
live_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url", {format: "json", type: "livedj", url:encodeURIComponent(url)});
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
master_dj_input.find("#ok").click(function(){
|
||||
master_dj_input.find("#ok").click(function(event){
|
||||
var url = $(this).parent().find(":input").val()
|
||||
master_dj_label.html(url)
|
||||
master_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url)})
|
||||
event.preventDefault()
|
||||
})
|
||||
|
||||
master_dj_input.find("#reset").click(function(){
|
||||
master_dj_input.find("#reset").click(function(event){
|
||||
var port = $("#master_harbor_input_port").val()
|
||||
var mount = $("#master_harbor_input_mount_point").val()
|
||||
var url = "http://"+location.hostname+":"+port+"/"+mount
|
||||
master_dj_label.html(url)
|
||||
master_dj_input.hide()
|
||||
$.get("/Preference/set-source-connection-url", {format: "json", type: "masterdj", url:encodeURIComponent(url)})
|
||||
event.preventDefault()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue