Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x
This commit is contained in:
commit
90f14584b5
|
@ -176,7 +176,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
if ($isAdminOrPM || $obj->getCreatorId() == $user->getId()) {
|
||||
if ($obj_sess->type === "playlist") {
|
||||
$menu["pl_add"] = array("name"=> "Add to Playlist", "icon" => "add-playlist", "icon" => "copy");
|
||||
} elseif ($obj_sess->type === "block") {
|
||||
} elseif ($obj_sess->type === "block" && $obj->isStatic()) {
|
||||
$menu["pl_add"] = array("name"=> "Add to Smart Block", "icon" => "add-playlist", "icon" => "copy");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -513,7 +513,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
} catch (BlockNotFoundException $e) {
|
||||
$this->playlistNotFound('block', true);
|
||||
} catch (Exception $e) {
|
||||
//Logging::info($e);
|
||||
Logging::info($e);
|
||||
$this->playlistUnknownError($e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1191,7 +1191,7 @@ SQL;
|
|||
$sizeOfInsert = count($insertList);
|
||||
|
||||
// if block is not full and reapeat_track is check, fill up more
|
||||
while (!$isBlockFull && $repeat == 1) {
|
||||
while (!$isBlockFull && $repeat == 1 && $sizeOfInsert > 0) {
|
||||
$randomEleKey = array_rand(array_slice($insertList, 0, $sizeOfInsert));
|
||||
$insertList[] = $insertList[$randomEleKey];
|
||||
$totalTime += $insertList[$randomEleKey]['length'];
|
||||
|
|
|
@ -193,7 +193,8 @@ class Application_Model_Scheduler
|
|||
}
|
||||
} else {
|
||||
$dynamicFiles = $bl->getListOfFilesUnderLimit();
|
||||
foreach ($dynamicFiles as $fileId=>$f) {
|
||||
foreach ($dynamicFiles as $f) {
|
||||
$fileId = $f['id'];
|
||||
$file = CcFilesQuery::create()->findPk($fileId);
|
||||
if (isset($file) && $file->getDbFileExists()) {
|
||||
$data["id"] = $file->getDbId();
|
||||
|
@ -250,7 +251,8 @@ class Application_Model_Scheduler
|
|||
}
|
||||
} else {
|
||||
$dynamicFiles = $bl->getListOfFilesUnderLimit();
|
||||
foreach ($dynamicFiles as $fileId=>$f) {
|
||||
foreach ($dynamicFiles as $f) {
|
||||
$fileId = $f['id'];
|
||||
$file = CcFilesQuery::create()->findPk($fileId);
|
||||
if (isset($file) && $file->getDbFileExists()) {
|
||||
$data["id"] = $file->getDbId();
|
||||
|
@ -445,7 +447,6 @@ class Application_Model_Scheduler
|
|||
} else {
|
||||
$sched = new CcSchedule();
|
||||
}
|
||||
Logging::info($file);
|
||||
$sched->setDbStarts($nextStartDT)
|
||||
->setDbEnds($endTimeDT)
|
||||
->setDbCueIn($file['cuein'])
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
<li id='lib-new-ws'><a href="#">New Webstream</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-inverse" type="submit" id="webstream_save" name="submit">Save</button>
|
||||
</div>
|
||||
<?php if (isset($this->obj)) : ?>
|
||||
<div class="btn-group pull-right">
|
||||
<button id="ws_delete" class="btn" <?php if ($this->action == "new"): ?>style="display:none;"<?php endif; ?>aria-disabled="false">Delete</button>
|
||||
</div>
|
||||
|
|
|
@ -8,10 +8,16 @@ var AIRTIME = (function(AIRTIME) {
|
|||
mod = AIRTIME.library;
|
||||
|
||||
mod.checkAddButton = function() {
|
||||
var selected = mod.getChosenItemsLength(), sortable = $('#spl_sortable'), check = false;
|
||||
|
||||
// make sure audioclips are selected and a playlist is currently open.
|
||||
if (selected !== 0 && sortable.length !== 0) {
|
||||
var selected = mod.getChosenItemsLength(),
|
||||
sortable = $('#spl_sortable:visible'),
|
||||
check = false,
|
||||
blockType = $('input[name=sp_type]:checked', '#smart-block-form').val();
|
||||
|
||||
// make sure audioclips are selected and a playlist or static block is currently open.
|
||||
// static blocks have value of 0
|
||||
// dynamic blocks have value of 1
|
||||
if (selected !== 0 && (sortable.length !== 0 || blockType === "0")) {
|
||||
check = true;
|
||||
}
|
||||
|
||||
|
@ -96,6 +102,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
return container;
|
||||
},
|
||||
cursor : 'pointer',
|
||||
cursorAt: {
|
||||
top: 30,
|
||||
left: 100
|
||||
},
|
||||
connectToSortable : '#spl_sortable'
|
||||
});
|
||||
};
|
||||
|
|
|
@ -201,7 +201,8 @@ function setSmartBlockEvents() {
|
|||
|
||||
/********** CHANGE PLAYLIST TYPE **********/
|
||||
form.find('dd[id="sp_type-element"]').live("change", function(){
|
||||
setupUI();
|
||||
setupUI();
|
||||
AIRTIME.library.checkAddButton();
|
||||
});
|
||||
|
||||
/********** CRITERIA CHANGE **********/
|
||||
|
|
Loading…
Reference in New Issue