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

Conflicts:
	airtime_mvc/application/models/Block.php
This commit is contained in:
James 2012-08-02 16:37:12 -04:00
commit 028e089c82
9 changed files with 193 additions and 55 deletions

View file

@ -128,11 +128,14 @@ var AIRTIME = (function(AIRTIME){
for (i = 0, length = aData.length; i < length; i++) {
temp = aData[i];
if (temp.ftype === "audioclip" || temp.ftype === "block") {
aMediaIds.push(temp.id);
aMediaIds.push(new Array (temp.id, temp.ftype));
}
}
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
if (aMediaIds.length > 0) {
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
} else {
alert('You cannot add playlists to smart playlists');
}
});
//delete from library.

View file

@ -642,7 +642,7 @@ var AIRTIME = (function(AIRTIME) {
//delete through the playlist controller, will reset
//playlist screen if this is the currently edited playlist.
if (data.ftype === "playlist" && screen === "playlist") {
if ((data.ftype === "playlist" || data.ftype === "block") && screen === "playlist") {
callback = function() {
if (confirm('Are you sure you want to delete the selected item?')) {

View file

@ -533,15 +533,30 @@ var AIRTIME = (function(AIRTIME){
var streamurl = $pl.find("#streamurl-element input").val();
var length = $pl.find("#streamlength-element input").val();
var name = $pl.find("#playlist_name_display").text();
//hide any previous errors (if any)
$("#side_playlist .errors").empty().hide();
var url = 'Webstream/save';
$.post(url,
{format: "json", description: description, url:streamurl, length: length, name: name},
function(json){
var $status = $("#side_playlist .status");
$status.html(json.statusMessage);
$status.show();
setTimeout(function(){$status.fadeOut("slow", function(){$status.empty()})}, 5000);
if (json.analysis){
for (var s in json.analysis){
var field = json.analysis[s];
if (!field[0]) {
var elemId = "#"+s+"-error";
var $div = $("#side_playlist " + elemId).text(field[1]).show();
}
}
} else {
var $status = $("#side_playlist .status");
$status.html(json.statusMessage);
$status.show();
setTimeout(function(){$status.fadeOut("slow", function(){$status.empty()})}, 5000);
}
});