Merge branch 'saas-dev' into saas-dev-facebook-radio
This commit is contained in:
commit
a2a30e5c42
|
@ -7,6 +7,15 @@ class ErrorController extends Zend_Controller_Action {
|
||||||
//We cannot show that.
|
//We cannot show that.
|
||||||
$this->view->layout()->disableLayout();
|
$this->view->layout()->disableLayout();
|
||||||
$this->setupCSS();
|
$this->setupCSS();
|
||||||
|
|
||||||
|
// TODO: set Help button URL based on whether or not user is logged in
|
||||||
|
try {
|
||||||
|
$service_user = new Application_Service_UserService();
|
||||||
|
$service_user->getCurrentUser();
|
||||||
|
$this->view->helpUrl = Application_Common_OsPath::getBaseDir() . 'dashboard/help';
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->view->helpUrl = HELP_URL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function errorAction() {
|
public function errorAction() {
|
||||||
|
|
|
@ -211,8 +211,10 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
||||||
$resourceName .= $controller;
|
$resourceName .= $controller;
|
||||||
|
|
||||||
/** Check if the controller/action can be accessed by the current user */
|
/** Check if the controller/action can be accessed by the current user */
|
||||||
if (!$this->getAcl()->has($resourceName)
|
if (!$this->getAcl()->has($resourceName)) {
|
||||||
|| !$this->getAcl()->isAllowed($this->_roleName,
|
$this->setErrorPage('error404');
|
||||||
|
$this->denyAccess();
|
||||||
|
} else if (!$this->getAcl()->isAllowed($this->_roleName,
|
||||||
$resourceName,
|
$resourceName,
|
||||||
$request->getActionName())) {
|
$request->getActionName())) {
|
||||||
/** Redirect to access denied page */
|
/** Redirect to access denied page */
|
||||||
|
|
|
@ -17,16 +17,6 @@ class Application_Form_PodcastPreferences extends Zend_Form_SubForm {
|
||||||
));
|
));
|
||||||
$stationPodcastPrivacy->setValue($isPrivate);
|
$stationPodcastPrivacy->setValue($isPrivate);
|
||||||
$this->addElement($stationPodcastPrivacy);
|
$this->addElement($stationPodcastPrivacy);
|
||||||
|
|
||||||
$stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId());
|
|
||||||
$url = $stationPodcast->getDbUrl();
|
|
||||||
$feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl");
|
|
||||||
$feedUrl->setAttrib('class', 'input_text')
|
|
||||||
->setAttrib('disabled', 'disabled')
|
|
||||||
->setRequired(false)
|
|
||||||
->setLabel(_("Feed URL"))
|
|
||||||
->setValue($url);
|
|
||||||
$this->addElement($feedUrl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1572,6 +1572,9 @@ class Application_Model_Preference
|
||||||
self::setValue("station_podcast_download_counter", empty($c) ? 0 : --$c);
|
self::setValue("station_podcast_download_counter", empty($c) ? 0 : --$c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int either 0 (public) or 1 (private)
|
||||||
|
*/
|
||||||
public static function getStationPodcastPrivacy() {
|
public static function getStationPodcastPrivacy() {
|
||||||
if (!Billing::isStationPodcastAllowed()) {
|
if (!Billing::isStationPodcastAllowed()) {
|
||||||
// return private setting
|
// return private setting
|
||||||
|
|
|
@ -482,10 +482,15 @@ class Application_Model_Scheduler
|
||||||
->orderByDbStarts()
|
->orderByDbStarts()
|
||||||
->find($this->con);
|
->find($this->con);
|
||||||
|
|
||||||
|
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||||
$itemStartDT = $instance->getDbStarts(null);
|
$itemStartDT = $instance->getDbStarts(null);
|
||||||
foreach ($schedule as $item) {
|
foreach ($schedule as $item) {
|
||||||
$itemEndDT = $this->findEndTime($itemStartDT, $item->getDbClipLength());
|
$itemEndDT = $this->findEndTime($itemStartDT, $item->getDbClipLength());
|
||||||
Logging::info($itemEndDT);
|
// If the track has already ended, don't change it.
|
||||||
|
if ($itemEndDT < $now) {
|
||||||
|
$itemStartDT = $itemEndDT;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$item->setDbStarts($itemStartDT)
|
$item->setDbStarts($itemStartDT)
|
||||||
->setDbEnds($itemEndDT)
|
->setDbEnds($itemEndDT)
|
||||||
->save($this->con);
|
->save($this->con);
|
||||||
|
@ -515,10 +520,15 @@ class Application_Model_Scheduler
|
||||||
->orderByDbStarts()
|
->orderByDbStarts()
|
||||||
->find($this->con);
|
->find($this->con);
|
||||||
|
|
||||||
|
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||||
$itemStartDT = $instance->getDbStarts(null);
|
$itemStartDT = $instance->getDbStarts(null);
|
||||||
foreach ($schedule as $item) {
|
foreach ($schedule as $item) {
|
||||||
|
|
||||||
$itemEndDT = $this->findEndTime($itemStartDT, $item->getDbClipLength());
|
$itemEndDT = $this->findEndTime($itemStartDT, $item->getDbClipLength());
|
||||||
|
// If the track has already ended, don't change it.
|
||||||
|
if ($itemEndDT < $now) {
|
||||||
|
$itemStartDT = $itemEndDT;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$item->setDbStarts($itemStartDT)
|
$item->setDbStarts($itemStartDT)
|
||||||
->setDbEnds($itemEndDT);
|
->setDbEnds($itemEndDT);
|
||||||
|
@ -1191,7 +1201,7 @@ class Application_Model_Scheduler
|
||||||
|
|
||||||
foreach ($removedItems as $removedItem) {
|
foreach ($removedItems as $removedItem) {
|
||||||
$instance = $removedItem->getCcShowInstances($this->con);
|
$instance = $removedItem->getCcShowInstances($this->con);
|
||||||
$effectedInstanceIds[] = $instance->getDbId();
|
$effectedInstanceIds[$instance->getDbId()] = $instance->getDbId();
|
||||||
|
|
||||||
//check if instance is linked and if so get the schedule items
|
//check if instance is linked and if so get the schedule items
|
||||||
//for all linked instances so we can delete them too
|
//for all linked instances so we can delete them too
|
||||||
|
|
|
@ -133,17 +133,23 @@ class Application_Service_MediaService
|
||||||
->filterByDbImportStatus(CcFiles::IMPORT_STATUS_PENDING)
|
->filterByDbImportStatus(CcFiles::IMPORT_STATUS_PENDING)
|
||||||
->filterByDbUtime($oneHourAgo, Criteria::LESS_EQUAL)
|
->filterByDbUtime($oneHourAgo, Criteria::LESS_EQUAL)
|
||||||
->find();
|
->find();
|
||||||
return !empty(self::$_pendingFiles);
|
$pendingEpisodes = Application_Service_PodcastEpisodeService::getStuckPendingImports();
|
||||||
|
return !empty(self::$_pendingFiles) && !empty($pendingEpisodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up stuck imports by changing their import status to Failed
|
* Clean up stuck imports by changing their import status to Failed
|
||||||
*/
|
*/
|
||||||
public static function clearStuckPendingImports() {
|
public static function clearStuckPendingImports() {
|
||||||
foreach(self::$_pendingFiles as $file) {
|
$pendingEpisodes = Application_Service_PodcastEpisodeService::getStuckPendingImports();
|
||||||
|
foreach (self::$_pendingFiles as $file) {
|
||||||
/** @var $file CcFiles */
|
/** @var $file CcFiles */
|
||||||
$file->setDbImportStatus(CcFiles::IMPORT_STATUS_FAILED)->save();
|
$file->setDbImportStatus(CcFiles::IMPORT_STATUS_FAILED)->save();
|
||||||
}
|
}
|
||||||
|
foreach ($pendingEpisodes as $episode) {
|
||||||
|
/** @var $episode PodcastEpisodes */
|
||||||
|
$episode->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
||||||
|
|
||||||
const DOWNLOAD = 'download';
|
const DOWNLOAD = 'download';
|
||||||
|
|
||||||
|
const PENDING_EPISODE_TIMEOUT_SECONDS = 3600;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string service name to store in ThirdPartyTrackReferences database
|
* @var string service name to store in ThirdPartyTrackReferences database
|
||||||
*/
|
*/
|
||||||
|
@ -143,7 +145,11 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
||||||
'callback_url' => Application_Common_HTTPHelper::getStationUrl() . '/rest/media',
|
'callback_url' => Application_Common_HTTPHelper::getStationUrl() . '/rest/media',
|
||||||
'api_key' => $apiKey = $CC_CONFIG["apiKey"][0],
|
'api_key' => $apiKey = $CC_CONFIG["apiKey"][0],
|
||||||
);
|
);
|
||||||
$this->_executeTask(static::$_CELERY_TASKS[self::DOWNLOAD], $data);
|
$task = $this->_executeTask(static::$_CELERY_TASKS[self::DOWNLOAD], $data);
|
||||||
|
// Get the created ThirdPartyTaskReference and set the episode ID so
|
||||||
|
// we can remove the placeholder if the import ends up stuck in a pending state
|
||||||
|
$ref = ThirdPartyTrackReferencesQuery::create()->findPk($task->getDbTrackReference());
|
||||||
|
$ref->setDbForeignId($id)->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -161,6 +167,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
||||||
*/
|
*/
|
||||||
public function updateTrackReference($task, $episodeId, $episode, $status) {
|
public function updateTrackReference($task, $episodeId, $episode, $status) {
|
||||||
$ref = parent::updateTrackReference($task, $episodeId, $episode, $status);
|
$ref = parent::updateTrackReference($task, $episodeId, $episode, $status);
|
||||||
|
$ref->setDbForeignId($episode->episodeid)->save();
|
||||||
$dbEpisode = PodcastEpisodesQuery::create()->findOneByDbId($episode->episodeid);
|
$dbEpisode = PodcastEpisodesQuery::create()->findOneByDbId($episode->episodeid);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -231,6 +238,32 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
||||||
return (int) $stationPodcast->hasEpisodeForFile($fileId);
|
return (int) $stationPodcast->hasEpisodeForFile($fileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find any episode placeholders that have been stuck pending (empty file ID) for over an hour
|
||||||
|
*
|
||||||
|
* @return array the episode imports stuck in pending
|
||||||
|
*/
|
||||||
|
public static function getStuckPendingImports() {
|
||||||
|
$oneHourAgo = gmdate(DEFAULT_TIMESTAMP_FORMAT, (microtime(true) - self::PENDING_EPISODE_TIMEOUT_SECONDS));
|
||||||
|
$episodes = PodcastEpisodesQuery::create()
|
||||||
|
->filterByDbFileId()
|
||||||
|
->find();
|
||||||
|
$stuckImports = array();
|
||||||
|
foreach ($episodes as $episode) {
|
||||||
|
$ref = ThirdPartyTrackReferencesQuery::create()
|
||||||
|
->findOneByDbForeignId(strval($episode->getDbId()));
|
||||||
|
if (!empty($ref)) {
|
||||||
|
$task = CeleryTasksQuery::create()
|
||||||
|
->filterByDbDispatchTime($oneHourAgo, Criteria::LESS_EQUAL)
|
||||||
|
->findOneByDbTrackReference($ref->getDbId());
|
||||||
|
if (!empty($task)) {
|
||||||
|
array_push($stuckImports, $episode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $stuckImports;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $episodeId
|
* @param $episodeId
|
||||||
* @return array
|
* @return array
|
||||||
|
|
|
@ -20,15 +20,20 @@ abstract class Application_Service_ThirdPartyCeleryService extends Application_S
|
||||||
* @param string $taskName the name of the celery task to execute
|
* @param string $taskName the name of the celery task to execute
|
||||||
* @param array $data the data array to send as task parameters
|
* @param array $data the data array to send as task parameters
|
||||||
* @param int $fileId the unique identifier for the file involved in the task
|
* @param int $fileId the unique identifier for the file involved in the task
|
||||||
|
*
|
||||||
|
* @return CeleryTasks the created task
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function _executeTask($taskName, $data, $fileId = null) {
|
protected function _executeTask($taskName, $data, $fileId = null) {
|
||||||
try {
|
try {
|
||||||
$brokerTaskId = CeleryManager::sendCeleryMessage($taskName,
|
$brokerTaskId = CeleryManager::sendCeleryMessage($taskName,
|
||||||
static::$_CELERY_EXCHANGE_NAME,
|
static::$_CELERY_EXCHANGE_NAME,
|
||||||
$data);
|
$data);
|
||||||
$this->_createTaskReference($fileId, $brokerTaskId, $taskName);
|
return $this->_createTaskReference($fileId, $brokerTaskId, $taskName);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Logging::info("Invalid request: " . $e->getMessage());
|
Logging::error("Invalid request: " . $e->getMessage());
|
||||||
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +46,8 @@ abstract class Application_Service_ThirdPartyCeleryService extends Application_S
|
||||||
* receive completed task messages
|
* receive completed task messages
|
||||||
* @param $taskName string broker task name
|
* @param $taskName string broker task name
|
||||||
*
|
*
|
||||||
|
* @return CeleryTasks the created task
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
|
@ -54,6 +61,7 @@ abstract class Application_Service_ThirdPartyCeleryService extends Application_S
|
||||||
$task->setDbStatus(CELERY_PENDING_STATUS);
|
$task->setDbStatus(CELERY_PENDING_STATUS);
|
||||||
$task->setDbTrackReference($trackReferenceId);
|
$task->setDbTrackReference($trackReferenceId);
|
||||||
$task->save();
|
$task->save();
|
||||||
|
return $task;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,12 +30,10 @@ abstract class Application_Service_ThirdPartyService {
|
||||||
public function createTrackReference($fileId) {
|
public function createTrackReference($fileId) {
|
||||||
// First, check if the track already has an entry in the database
|
// First, check if the track already has an entry in the database
|
||||||
// If the file ID given is null, create a new reference
|
// If the file ID given is null, create a new reference
|
||||||
$ref = is_null($fileId) ? null : ThirdPartyTrackReferencesQuery::create()
|
$ref = is_null($fileId) ? new ThirdPartyTrackReferences()
|
||||||
->filterByDbService(static::$_SERVICE_NAME)
|
: ThirdPartyTrackReferencesQuery::create()
|
||||||
->findOneByDbFileId($fileId);
|
->filterByDbService(static::$_SERVICE_NAME)
|
||||||
if (is_null($ref)) {
|
->findOneByDbFileId($fileId);
|
||||||
$ref = new ThirdPartyTrackReferences();
|
|
||||||
}
|
|
||||||
$ref->setDbService(static::$_SERVICE_NAME);
|
$ref->setDbService(static::$_SERVICE_NAME);
|
||||||
$ref->setDbFileId($fileId);
|
$ref->setDbFileId($fileId);
|
||||||
$ref->save();
|
$ref->save();
|
||||||
|
|
|
@ -193,13 +193,13 @@ $(document).ready(function() {
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>64kbps Stream Quality
|
<td>Up to 64kbps Stream Quality
|
||||||
</td>
|
</td>
|
||||||
<td>64kbps and 128kbps Stream Quality
|
<td>Up to 128kbps Stream Quality
|
||||||
</td>
|
</td>
|
||||||
<td>64kbps and 196kbps Stream Quality
|
<td>Up to 196kbps Stream Quality
|
||||||
</td>
|
</td>
|
||||||
<td class="last-column">64kbps, 128kbps, and 196kbps Stream Quality
|
<td class="last-column">Up to 196kbps Stream Quality
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -222,7 +222,18 @@ $(document).ready(function() {
|
||||||
<td class="last-column">
|
<td class="last-column">
|
||||||
150GB Storage
|
150GB Storage
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>No Built-in Podcast
|
||||||
|
</td>
|
||||||
|
<td>2,000 Podcast Episode Downloads
|
||||||
|
</td>
|
||||||
|
<td>5,000 Podcast Episode Downloads
|
||||||
|
</td>
|
||||||
|
<td class="last-column">
|
||||||
|
10,000 Podcast Episode Downloads
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Ticket, Email, Forum Support
|
<td>Ticket, Email, Forum Support
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN";
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
<h2><?php echo _("Bad Request!")?></h2>
|
<h2><?php echo _("Bad Request!")?></h2>
|
||||||
<p><?php echo _("The requested action is not supported!")?></p>
|
<p><?php echo _("The requested action is not supported!")?></p>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>
|
<a class="toggle-button" href="<?php echo $this->helpUrl; ?>"><?php echo _("Help") ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN";
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
<h2><?php echo _("Access Denied!")?></h2>
|
<h2><?php echo _("Access Denied!")?></h2>
|
||||||
<p><?php echo _("You do not have permission to access this page!")?></p>
|
<p><?php echo _("You do not have permission to access this page!")?></p>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>
|
<a class="toggle-button" href="<?php echo $this->helpUrl; ?>"><?php echo _("Help") ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN";
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
<h2><?php echo _("Page not found!")?></h2>
|
<h2><?php echo _("Page not found!")?></h2>
|
||||||
<p><?php echo _("We couldn't find the page you were looking for.")?></p>
|
<p><?php echo _("We couldn't find the page you were looking for.")?></p>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>
|
<a class="toggle-button" href="<?php echo $this->helpUrl; ?>"><?php echo _("Help") ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN";
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
<h2><?php echo _("Oops!")?></h2>
|
<h2><?php echo _("Oops!")?></h2>
|
||||||
<p><?php echo _("Something went wrong!")?></p>
|
<p><?php echo _("Something went wrong!")?></p>
|
||||||
<div class="button-bar">
|
<div class="button-bar">
|
||||||
<a class="toggle-button" href="<?php echo $this->baseUrl('dashboard/help'); ?>"><?php echo _("Help") ?></a>
|
<a class="toggle-button" href="<?php echo $this->helpUrl; ?>"><?php echo _("Help") ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<fieldset class="padded">
|
|
||||||
<?php echo $this->element->getElement('stationPodcastPrivacy')->render() ?>
|
|
||||||
<?php echo $this->element->getElement('stationPodcastFeedUrl')->render() ?>
|
|
||||||
</fieldset>
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="angular_wrapper" ng-controller="Podcast">
|
<div class="angular_wrapper" ng-controller="Podcast">
|
||||||
<div class="inner_editor_title">
|
<div class="inner_editor_title">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="station_podcast">
|
<div id="station_podcast">
|
||||||
<div class="angular_wrapper" ng-controller="StationPodcast">
|
<div class="angular_wrapper" ng-controller="StationPodcast">
|
||||||
<div class="station_podcast_wrapper">
|
<div class="station_podcast_wrapper content-pane">
|
||||||
<div class="inner_editor_title">
|
<div class="inner_editor_title">
|
||||||
<h2>
|
<h2>
|
||||||
<span class="title_obj_name"><?php echo _("My Podcast") ?></span>
|
<span class="title_obj_name"><?php echo _("My Podcast") ?></span>
|
||||||
|
@ -26,9 +26,6 @@
|
||||||
<label><?php echo _("Creator") ?></label>
|
<label><?php echo _("Creator") ?></label>
|
||||||
<input name="podcast_creator" ng-model="podcast.creator" type="text"/>
|
<input name="podcast_creator" ng-model="podcast.creator" type="text"/>
|
||||||
|
|
||||||
<label><?php echo _("URL") ?></label>
|
|
||||||
<input disabled name="podcast_url" ng-model="podcast.url" type="text"/>
|
|
||||||
|
|
||||||
<label><?php echo _("Description") ?></label>
|
<label><?php echo _("Description") ?></label>
|
||||||
<textarea name="podcast_description" ng-model="podcast.description"></textarea>
|
<textarea name="podcast_description" ng-model="podcast.description"></textarea>
|
||||||
|
|
||||||
|
@ -81,8 +78,12 @@
|
||||||
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastPrivacy")->renderViewHelper() ?>
|
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastPrivacy")->renderViewHelper() ?>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastFeedUrl") ?>
|
<dt>
|
||||||
|
<label for="stationPodcastFeedUrl" class="optional">Feed URL</label>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<input type="url" ng-model="podcast.url" disabled="disabled" class="input_text" />
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,5 +123,4 @@
|
||||||
$(this).toggleClass("closed");
|
$(this).toggleClass("closed");
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -739,7 +739,11 @@ div.ColVis_collectionBackground {
|
||||||
|
|
||||||
.fg-toolbar .btn-toolbar {
|
.fg-toolbar .btn-toolbar {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 6px 6px 5px;
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fg-toolbar .btn-toolbar .ColVis_MasterButton {
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
/* ~~~~~~~~~~~~~~~~ */
|
/* ~~~~~~~~~~~~~~~~ */
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#station_podcast .inner_editor_title h2 {
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
#station_podcast .inner_editor_title * {
|
#station_podcast .inner_editor_title * {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +35,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.station_podcast_wrapper {
|
.station_podcast_wrapper {
|
||||||
padding-right: 4px;
|
padding: 8px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2858,12 +2858,12 @@ dt.block-display.info-block {
|
||||||
/*---//////////////////// ERROR PAGE ////////////////////---*/
|
/*---//////////////////// ERROR PAGE ////////////////////---*/
|
||||||
|
|
||||||
.error-content {
|
.error-content {
|
||||||
background:url(images/maintenance.png) no-repeat 0 0;
|
position: relative;
|
||||||
width:360px;
|
background: url(images/maintenance.png) no-repeat 0 0;
|
||||||
height:350px;
|
width: 360px;
|
||||||
margin:auto;
|
height: 350px;
|
||||||
margin-top:25px;
|
margin: auto;
|
||||||
padding:auto;
|
top: 25px;
|
||||||
}
|
}
|
||||||
.error-content h2 {
|
.error-content h2 {
|
||||||
margin:0;
|
margin:0;
|
||||||
|
|
|
@ -132,7 +132,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"media": "podcasts",
|
"media": "podcasts",
|
||||||
"icon": "icon-headphones",
|
"icon": "icon-headphones",
|
||||||
"subtext": "Click 'Add' to create one now.",
|
"subtext": "Click 'Add' to create one now.",
|
||||||
"href": "http://sourcefabric.booktype.pro/airtime-pro-for-broadcasters/library/"
|
"href": "http://www.apple.com/ca/itunes/podcasts/fanfaq.html"
|
||||||
};
|
};
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -542,6 +542,18 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mod.handleAjaxError = function (r) {
|
||||||
|
// If the request was denied due to permissioning
|
||||||
|
if (r.status === 403) {
|
||||||
|
// Hide the processing div
|
||||||
|
var wrapper = $("#library_display_wrapper");
|
||||||
|
wrapper.find(".dt-process-rel").hide();
|
||||||
|
wrapper.find('.empty_placeholder_text').text($.i18n._("You don't have permission to view the library."));
|
||||||
|
wrapper.find('.empty_placeholder').show();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
libraryInit = function() {
|
libraryInit = function() {
|
||||||
|
|
||||||
$libContent = $("#library_content");
|
$libContent = $("#library_content");
|
||||||
|
@ -706,7 +718,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
"url": sSource,
|
"url": sSource,
|
||||||
"data": aoData,
|
"data": aoData,
|
||||||
"success": fnCallback,
|
"success": fnCallback,
|
||||||
"error": handleAjaxError
|
"error": mod.handleAjaxError
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
var filterMessage = $libContent.find('.filter-message');
|
var filterMessage = $libContent.find('.filter-message');
|
||||||
if (data.iTotalRecords > data.iTotalDisplayRecords) {
|
if (data.iTotalRecords > data.iTotalDisplayRecords) {
|
||||||
|
@ -904,17 +916,6 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleAjaxError(r) {
|
|
||||||
// If the request was denied due to permissioning
|
|
||||||
if (r.status === 403) {
|
|
||||||
// Hide the processing div
|
|
||||||
$("#library_display_wrapper").find(".dt-process-rel").hide();
|
|
||||||
$('.empty_placeholder_text').text($.i18n._("You don't have permission to view the library."));
|
|
||||||
|
|
||||||
$('.empty_placeholder').show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var selected = $("a[href$='"+location.hash+"']"), table;
|
var selected = $("a[href$='"+location.hash+"']"), table;
|
||||||
if (selected.parent().data("selection-id") == AIRTIME.library.MediaTypeIntegerEnum.PODCAST) {
|
if (selected.parent().data("selection-id") == AIRTIME.library.MediaTypeIntegerEnum.PODCAST) {
|
||||||
table = mod.DataTableTypeEnum.PODCAST;
|
table = mod.DataTableTypeEnum.PODCAST;
|
||||||
|
@ -1420,6 +1421,9 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
sAjaxSource : ajaxSourceURL,
|
sAjaxSource : ajaxSourceURL,
|
||||||
oColReorder: {
|
oColReorder: {
|
||||||
iFixedColumns: 1 // Checkbox
|
iFixedColumns: 1 // Checkbox
|
||||||
|
},
|
||||||
|
fnDrawCallback: function () {
|
||||||
|
AIRTIME.library.drawEmptyPlaceholder(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||||
data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() }
|
data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() }
|
||||||
}).success(function (data) {
|
}).success(function (data) {
|
||||||
$("#preferences_podcast-stationPodcastFeedUrl").val(data.url);
|
jQuery.extend($scope.podcast, data);
|
||||||
$(".success").text($.i18n._("Podcast settings saved")).slideDown("fast");
|
$(".success").text($.i18n._("Podcast settings saved")).slideDown("fast");
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$(".success").slideUp("fast");
|
$(".success").slideUp("fast");
|
||||||
|
@ -138,13 +138,6 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Open metadata editor tabs for each of the selected episodes.
|
|
||||||
*/
|
|
||||||
StationPodcastController.prototype.openSelectedTabEditors = function () {
|
|
||||||
mod.editSelectedEpisodes(this.episodeTable.getSelectedRows());
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the Station podcast episode table.
|
* Initialize the Station podcast episode table.
|
||||||
*
|
*
|
||||||
|
|
|
@ -399,15 +399,9 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
Table.prototype._handleAjaxError = function(r) {
|
Table.prototype._handleAjaxError = function(r) {
|
||||||
// If the request was denied due to permissioning
|
// If the request was denied due to permissioning
|
||||||
if (r.status === 403) {
|
if (r.status === 403) {
|
||||||
// Hide the processing div
|
$(".dt-process-rel").hide();
|
||||||
/*
|
$('.empty_placeholder_text').text($.i18n._("You don't have permission to view this resource."));
|
||||||
$("#library_display_wrapper").find(".dt-process-rel").hide();
|
$('.empty_placeholder').show();
|
||||||
$.getJSON( "ajax/library_placeholders.json", function( data ) {
|
|
||||||
$('.empty_placeholder_text').text($.i18n._(data.unauthorized));
|
|
||||||
}) ;
|
|
||||||
|
|
||||||
$('.empty_placeholder').show();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue