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

This commit is contained in:
Martin Konecny 2012-08-17 15:08:10 -04:00
commit 99437147dc
11 changed files with 133 additions and 38 deletions

View file

@ -484,16 +484,10 @@ class ApiController extends Zend_Controller_Action
if (is_null($file)) {
$file = Application_Model_StoredFile::Insert($md);
} else {
// path already exist
if ($file->getFileExistsFlag()) {
// file marked as exists
$return_hash['error'] = "File already exists in Airtime.";
return $return_hash;
} else {
// file marked as not exists
$file->setFileExistsFlag(true);
$file->setMetadata($md);
}
// If the file already exists we will update and make sure that
// it's marked as 'exists'.
$file->setFileExistsFlag(true);
$file->setMetadata($md);
}
}
else if ($mode == "modify") {

View file

@ -311,11 +311,25 @@ var AIRTIME = (function(AIRTIME){
}
function setFadeIcon(){
var contents = $("#spl_sortable");
var show = contents.is(":visible");
var empty = $(".spl_empty");
if (empty.length > 0) {
if (!show || empty.length > 0) {
$("#spl_crossfade").hide();
} else {
$("#spl_crossfade").show();
//get list of playlist contents
var list = contents.children();
//if first and last items are blocks, hide the fade icon
var first = list.first();
var last = list.last();
if (first.find(':first-child').children().attr('blockid') !== undefined &&
last.find(':first-child').children().attr('blockid') !== undefined) {
$("#spl_crossfade").hide();
} else {
$("#spl_crossfade").show();
}
}
}
@ -468,7 +482,9 @@ var AIRTIME = (function(AIRTIME){
fadeOut.show();
fadeOut.empty().append(json.fadeOut);
}
$pl.find("#crossfade_main").show();
if (json.fadeIn != null || json.fadeOut != null) {
$pl.find("#crossfade_main").show();
}
}
});
}
@ -889,6 +905,7 @@ var AIRTIME = (function(AIRTIME){
setPlaylistEntryEvents();
setCueEvents();
setFadeEvents();
setFadeIcon();
initialEvents();
setUpPlaylist();

View file

@ -239,16 +239,6 @@ function getRowIndex(ele) {
return index;
}
function setFadeIcon(){
var contents = $("#spl_sortable");
var show = contents.is(":visible");
if (show) {
$("#spl_crossfade").show();
} else {
$("#spl_crossfade").hide();
}
}
/* This function appends a '+' button for the last
* modifier row of each criteria.
* If there are no modifier rows, the '+' button