Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
d05661afff
26 changed files with 244 additions and 160 deletions
|
@ -543,6 +543,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
.append('<option value="1">Files</option>')
|
||||
.append('<option value="2">Playlists</option>')
|
||||
.append('<option value="3">Smart Playlists</option>')
|
||||
.append('<option value="4">Web Streams</option>')
|
||||
.end()
|
||||
.change(function(ev){
|
||||
oTable.fnDraw();
|
||||
|
@ -613,12 +614,18 @@ var AIRTIME = (function(AIRTIME) {
|
|||
callback = function() {
|
||||
document.location.href = oItems.edit.url;
|
||||
};
|
||||
}
|
||||
else {
|
||||
} else if (data.ftype === "playlist" || data.ftype === "block") {
|
||||
callback = function() {
|
||||
//TODO
|
||||
AIRTIME.playlist.fnEdit(data.id, data.ftype);
|
||||
var url = '/Playlist/edit';
|
||||
AIRTIME.playlist.fnEdit(data.id, data.ftype, url);
|
||||
};
|
||||
} else if (data.ftype === "stream") {
|
||||
callback = function() {
|
||||
var url = '/Webstream/edit';
|
||||
AIRTIME.playlist.fnEdit(data.id, data.ftype, url);
|
||||
}
|
||||
} else {
|
||||
throw new Exception("Unknown type: " + data.ftype);
|
||||
}
|
||||
oItems.edit.callback = callback;
|
||||
}
|
||||
|
|
|
@ -532,6 +532,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
//stream url
|
||||
//default_length
|
||||
//playlist name
|
||||
var id = $pl.find("#ws_id").attr("value");
|
||||
var description = $pl.find("#description").val();
|
||||
var streamurl = $pl.find("#streamurl-element input").val();
|
||||
var length = $pl.find("#streamlength-element input").val();
|
||||
|
@ -542,7 +543,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
|
||||
var url = 'Webstream/save';
|
||||
$.post(url,
|
||||
{format: "json", description: description, url:streamurl, length: length, name: name},
|
||||
{format: "json", id:id, description: description, url:streamurl, length: length, name: name},
|
||||
function(json){
|
||||
if (json.analysis){
|
||||
for (var s in json.analysis){
|
||||
|
@ -730,8 +731,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
});
|
||||
};
|
||||
|
||||
mod.fnEdit = function(id, type) {
|
||||
var url = '/Playlist/edit';
|
||||
mod.fnEdit = function(id, type, url) {
|
||||
|
||||
stopAudioPreview();
|
||||
|
||||
|
@ -741,6 +741,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
openPlaylist(json);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
mod.fnDelete = function(plid) {
|
||||
var url, id, lastMod;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue