Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Naomi Aro 2012-03-20 11:14:26 +01:00
commit ff2907823b
7 changed files with 56 additions and 20 deletions

View file

@ -1876,7 +1876,7 @@ div.errors{
}
.stream-config {
width: 1080px;
width: 1100px;
}
.preferences .padded {

View file

@ -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()
})
}

View file

@ -7,11 +7,6 @@ var _idToPostionLookUp;
*or a playlist or a show.
*/
$(document).ready(function(){
if (useFlash())
mySupplied = "oga, mp3, m4v";
else
mySupplied = "oga, mp3";
_playlist_jplayer = new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
@ -19,7 +14,12 @@ $(document).ready(function(){
},[], //array of songs will be filled with below's json call
{
swfPath: "/js/jplayer",
supplied:mySupplied,
supplied:"oga, mp3, m4v",
size: {
width: "0px",
height: "0px",
cssClass: "jp-video-270p"
},
wmode: "window"
});
@ -41,10 +41,6 @@ $(document).ready(function(){
}
});
function useFlash() {
console.log(navigator.userAgent);
return navigator.userAgent.toLowerCase().match('firefox');
}
/**
* Sets up the jPlayerPlaylist to play.
* - Get the playlist info based on the playlistID give.