Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
8fe8668802
|
@ -488,7 +488,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$obj = $this->getPlaylist($type);
|
||||
$obj->setName($name);
|
||||
$obj->setDescription($description);
|
||||
$this->view->description = $obj->getDescription();
|
||||
$this->view->description = $description;
|
||||
$this->view->playlistName = $name;
|
||||
$this->view->modified = $obj->getLastModified("U");
|
||||
} catch (PlaylistOutDatedException $e) {
|
||||
|
@ -499,27 +499,6 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$this->playlistUnknownError($e);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public function setPlaylistDescriptionAction()
|
||||
{
|
||||
$description = $this->_getParam('description', "");
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
try {
|
||||
$obj = $this->getPlaylist($type);
|
||||
$obj->setDescription($description);
|
||||
$this->view->description = $obj->getDescription();
|
||||
$this->view->modified = $obj->getLastModified("U");
|
||||
} catch (PlaylistOutDatedException $e) {
|
||||
$this->playlistOutdated($e);
|
||||
} catch (PlaylistNotFoundException $e) {
|
||||
$this->playlistNotFound($type);
|
||||
} catch (Exception $e) {
|
||||
$this->playlistUnknownError($e);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public function saveAction()
|
||||
{
|
||||
|
@ -534,7 +513,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$form->startForm($params['obj_id']);
|
||||
$bl = new Application_Model_Block($params['obj_id']);
|
||||
if ($form->isValid($params)) {
|
||||
$result = $bl->saveSmartBlockCriteria($params['data']);
|
||||
$bl->saveSmartBlockCriteria($params['data']);
|
||||
$result['html'] = $this->createFullResponse($bl, true);
|
||||
$result['result'] = 0;
|
||||
} else {
|
||||
|
|
|
@ -215,6 +215,11 @@ EOT;
|
|||
|
||||
$formatter = new LengthFormatter($offset_cliplength);
|
||||
$row['offset'] = $formatter->format();
|
||||
|
||||
//format the fades in format 00(.000000)
|
||||
$fades = $this->getFadeInfo($row['position']);
|
||||
$row['fadein'] = $fades[0];
|
||||
$row['fadeout'] = $fades[1];
|
||||
}
|
||||
|
||||
return $rows;
|
||||
|
@ -643,7 +648,7 @@ EOT;
|
|||
return array("fadeIn" => $fadeIn, "fadeOut" => $fadeOut);
|
||||
}
|
||||
|
||||
public function setBlockfades($fadein, $fadeout)
|
||||
public function setfades($fadein, $fadeout)
|
||||
{
|
||||
if (isset($fadein)) {
|
||||
Logging::log("Setting block fade in {$fadein}");
|
||||
|
@ -942,7 +947,6 @@ EOT;
|
|||
$this->storeCriteriaIntoDb($data);
|
||||
//get number of files that meet the criteria
|
||||
$files = $this->getListofFilesMeetCriteria();
|
||||
//$output['poolCount'] = $files["count"];
|
||||
// if the block is dynamic, put null to the length
|
||||
// as it cannot be calculated
|
||||
if ($blockType == 'dynamic') {
|
||||
|
@ -958,10 +962,8 @@ EOT;
|
|||
}
|
||||
$this->setLength($length);
|
||||
}
|
||||
//$output['blockLength'] = $this->getFormattedLength();
|
||||
|
||||
$this->updateBlockLengthInAllPlaylist();
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function hasItemLimit()
|
||||
|
@ -1013,17 +1015,13 @@ EOT;
|
|||
*/
|
||||
public function generateSmartBlock($p_criteria, $returnList=false)
|
||||
{
|
||||
$result = $this->saveSmartBlockCriteria($p_criteria);
|
||||
/*if ($result['result'] != 0) {
|
||||
return $result;
|
||||
} else {*/
|
||||
$insertList = $this->getListOfFilesUnderLimit();
|
||||
$this->deleteAllFilesFromBlock();
|
||||
$this->addAudioClips(array_keys($insertList));
|
||||
// update length in playlist contents.
|
||||
$this->updateBlockLengthInAllPlaylist();
|
||||
return array("result"=>0);
|
||||
//}
|
||||
$this->saveSmartBlockCriteria($p_criteria);
|
||||
$insertList = $this->getListOfFilesUnderLimit();
|
||||
$this->deleteAllFilesFromBlock();
|
||||
$this->addAudioClips(array_keys($insertList));
|
||||
// update length in playlist contents.
|
||||
$this->updateBlockLengthInAllPlaylist();
|
||||
return array("result"=>0);
|
||||
}
|
||||
|
||||
public function updateBlockLengthInAllPlaylist()
|
||||
|
|
|
@ -235,6 +235,11 @@ SQL;
|
|||
|
||||
$formatter = new LengthFormatter($offset_cliplength);
|
||||
$row['offset'] = $formatter->format();
|
||||
|
||||
//format the fades in format 00(.000000)
|
||||
$fades = $this->getFadeInfo($row['position']);
|
||||
$row['fadein'] = $fades[0];
|
||||
$row['fadeout'] = $fades[1];
|
||||
}
|
||||
|
||||
return $rows;
|
||||
|
|
|
@ -17,7 +17,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
width;
|
||||
|
||||
function isTimeValid(time) {
|
||||
var regExpr = new RegExp("^\\d{2}[:]\\d{2}[:]\\d{2}([.]\\d{1,6})?$");
|
||||
//var regExpr = new RegExp("^\\d{2}[:]\\d{2}[:]\\d{2}([.]\\d{1,6})?$");
|
||||
var regExpr = new RegExp("^\\d{2}[:]([0-5]){1}([0-9]){1}[:]([0-5]){1}([0-9]){1}([.]\\d{1,6})?$");
|
||||
|
||||
return regExpr.test(time);
|
||||
}
|
||||
|
@ -337,6 +338,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
.append(json.html);
|
||||
|
||||
setUpPlaylist();
|
||||
setCueEvents();
|
||||
setFadeEvents();
|
||||
|
||||
// functions in smart_playlistbuilder.js
|
||||
setupUI();
|
||||
|
|
|
@ -335,7 +335,7 @@ function setupUI() {
|
|||
var plContents = $('#spl_sortable').children();
|
||||
var shuffleButton = $('button[id="shuffle_button"]');
|
||||
|
||||
if (plContents.length > 1) {
|
||||
if (plContents.text() !== 'Empty playlist') {
|
||||
if (shuffleButton.hasClass('ui-state-disabled')) {
|
||||
shuffleButton.removeClass('ui-state-disabled');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue