* SAAS-1168, SAAS-1153 - work on station podcast frontend
* SAAS-1164 - Styling fixes for publishing and podcast editors
This commit is contained in:
parent
4cd00b50ee
commit
c0d8b8b39c
14 changed files with 246 additions and 149 deletions
|
@ -7,8 +7,9 @@ class FeedsController extends Zend_Controller_Action
|
|||
$this->view->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender(true);
|
||||
|
||||
if (Application_Model_Preference::getStationPodcastPrivacy()
|
||||
&& $this->getRequest()->getParam("sharing_token") != Application_Model_Preference::getStationPodcastDownloadKey()) {
|
||||
if (!RestAuth::verifyAuth(true, true, $this)
|
||||
&& (Application_Model_Preference::getStationPodcastPrivacy()
|
||||
&& $this->getRequest()->getParam("sharing_token") != Application_Model_Preference::getStationPodcastDownloadKey())) {
|
||||
$this->getResponse()
|
||||
->setHttpResponseCode(401);
|
||||
return;
|
||||
|
|
|
@ -239,10 +239,8 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
|||
$isStationPodcast = $podcastId === Application_Model_Preference::getStationPodcastId();
|
||||
|
||||
$episodes = PodcastEpisodesQuery::create()
|
||||
->joinWith('PodcastEpisodes.CcFiles')
|
||||
->joinWithCcFiles('files')
|
||||
->filterByDbPodcastId($podcastId);
|
||||
// TODO: how should we limit the number of episodes for imported podcasts (since they include feed episodes?)
|
||||
// FIXME
|
||||
if ($isStationPodcast) {
|
||||
$episodes = $episodes->setLimit($limit);
|
||||
}
|
||||
|
@ -259,7 +257,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
|||
foreach ($episodes as $episode) {
|
||||
/** @var PodcastEpisodes $episode */
|
||||
$episodeArr = $episode->toArray(BasePeer::TYPE_FIELDNAME, true, [], true);
|
||||
// $episodeArr["cc_files"] = CcFiles::getSanitizedFileById($episode->getDbFileId());
|
||||
Logging::info($episodeArr);
|
||||
array_push($episodesArray, $episodeArr);
|
||||
}
|
||||
return $episodesArray;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<div class="inner_editor_title">
|
||||
<div class="angular_wrapper" ng-controller="Publish">
|
||||
<div class="inner_editor_title">
|
||||
<h2>
|
||||
<?php echo _("Publishing") ?> "<span ng-bind="media.track_title" class="title_obj_name"></span>"
|
||||
</h2>
|
||||
</div>
|
||||
<div class="inner_editor_wrapper">
|
||||
<button ng-click="openEditDialog()" class="btn publish-edit-md"><?php echo _("Edit Metadata") ?></button>
|
||||
</div>
|
||||
<div class="inner_editor_wrapper">
|
||||
<form class="media-metadata">
|
||||
<input ng-value="media.id" class="obj_id" type="hidden"/>
|
||||
<button ng-click="openEditDialog()" class="btn publish-edit-md"><?php echo _("Edit Metadata") ?></button>
|
||||
<label class="publish-md-field">
|
||||
<?php echo _("Title") ?>
|
||||
<input disabled ng-model="media.track_title" type="text"/>
|
||||
|
@ -43,9 +44,9 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-toolbar clearfix">
|
||||
<div class="btn-toolbar clearfix">
|
||||
<div class="btn-group pull-right">
|
||||
<button ng-click="discard()" class="btn" type="button" name="cancel">
|
||||
<?php echo _("Cancel") ?>
|
||||
|
@ -57,5 +58,5 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class='success' style='display:none'></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -7,24 +7,14 @@
|
|||
<div class="inner_editor_wrapper">
|
||||
<form class="podcast-metadata">
|
||||
<input ng-value="podcast.id" class="obj_id" type="hidden"/>
|
||||
<p>
|
||||
<label for="podcast_name">
|
||||
<?php echo _("Podcast Name") ?>
|
||||
</label>
|
||||
<label for="podcast_name"><?php echo _("Podcast Name") ?></label>
|
||||
<input disabled name="podcast_name" ng-model="podcast.title" type="text"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="podcast_url">
|
||||
<?php echo _("Podcast URL") ?>
|
||||
</label>
|
||||
|
||||
<label for="podcast_url"><?php echo _("Podcast URL") ?></label>
|
||||
<input disabled name="podcast_url" ng-model="podcast.url" type="text"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="podcast_auto_ingest">
|
||||
<?php echo _("Automatically download latest episodes?") ?>
|
||||
</label>
|
||||
|
||||
<label for="podcast_auto_ingest"><?php echo _("Automatically download latest episodes?") ?></label>
|
||||
<input name="podcast_auto_ingest" ng-model="podcast.auto_ingest" type="checkbox"/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -3,28 +3,75 @@
|
|||
<h2>
|
||||
<?php echo _("Editing ") ?>"<span ng-bind="podcast.title" class="title_obj_name"></span>"
|
||||
</h2>
|
||||
<a href="{{podcast.url}}" target="_blank">
|
||||
<button class="btn"><?php echo _("View Feed") ?></button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="inner_editor_wrapper">
|
||||
<form class="podcast-metadata">
|
||||
<p>
|
||||
<?php echo _("Check out the ") ?><a target="_blank" href="http://cyber.law.harvard.edu/rss/rss.html#requiredChannelElements"><?php echo _("RSS specification") ?></a>
|
||||
<?php echo _(" or the ") ?><a target="_blank" href="http://www.apple.com/ca/itunes/podcasts/specs.html"><?php echo _("Apple podcasting specification") ?></a>
|
||||
<?php echo _(" for more information.") ?>
|
||||
</p>
|
||||
|
||||
<input ng-value="podcast.id" class="obj_id" type="hidden"/>
|
||||
<p>
|
||||
<label for="podcast_name">
|
||||
<?php echo _("Podcast Name") ?>
|
||||
</label>
|
||||
|
||||
<div>
|
||||
<label><?php echo _("Name") ?></label>
|
||||
<input name="podcast_name" ng-model="podcast.title" type="text"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="podcast_creator">
|
||||
<?php echo _("Podcast Creator") ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label><?php echo _("Creator") ?></label>
|
||||
<input name="podcast_creator" ng-model="podcast.creator" type="text"/>
|
||||
</p>
|
||||
<p>
|
||||
<label for="podcast_url">
|
||||
<?php echo _("Podcast URL") ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label><?php echo _("URL") ?></label>
|
||||
<input disabled name="podcast_url" ng-model="podcast.url" type="text"/>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label><?php echo _("Description") ?></label>
|
||||
<textarea name="podcast_description" ng-model="podcast.description"></textarea>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label><?php echo _("Language") ?></label>
|
||||
<input name="podcast_language" ng-model="podcast.language" type="text"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label><?php echo _("Copyright") ?></label>
|
||||
<input name="podcast_copyright" ng-model="podcast.copyright" type="text"/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label><?php echo _("Link") ?></label>
|
||||
<input name="podcast_link" ng-model="podcast.link" type="text"/>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo _("iTunes Fields") ?></legend>
|
||||
<label><?php echo _("iTunes Author") ?></label>
|
||||
<input name="podcast_itunes_author" ng-model="podcast.itunes_author" type="text"/>
|
||||
|
||||
<label><?php echo _("iTunes Keywords") ?></label>
|
||||
<input name="podcast_itunes_keywords" ng-model="podcast.itunes_keywords" type="text"/>
|
||||
|
||||
<label><?php echo _("iTunes Summary") ?></label>
|
||||
<textarea name="podcast_itunes_summary" ng-model="podcast.itunes_summary"></textarea>
|
||||
|
||||
<label><?php echo _("iTunes Subtitle") ?></label>
|
||||
<textarea name="podcast_itunes_subtitle" ng-model="podcast.itunes_subtitle"></textarea>
|
||||
|
||||
<label><?php echo _("iTunes Category") ?></label>
|
||||
<input name="podcast_itunes_category" ng-model="podcast.itunes_category" type="text"/>
|
||||
|
||||
<label><?php echo _("iTunes Explicit") ?></label>
|
||||
<input name="podcast_itunes_explicit" ng-model="podcast.itunes_explicit" type="checkbox"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
.content-pane {
|
||||
height: auto !important;
|
||||
width: 100% !important;
|
||||
min-height: 500px;
|
||||
}
|
||||
.spl_sortable {
|
||||
max-height: 50%;
|
||||
|
@ -303,10 +304,6 @@ thead th.ui-state-default:focus {
|
|||
float: right;
|
||||
}
|
||||
|
||||
#show_builder .fg-toolbar.ui-corner-tl.ui-corner-tr {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.sb-content .dataTables_wrapper {
|
||||
margin: 0;
|
||||
}
|
||||
|
@ -489,6 +486,11 @@ li.ui-state-default {
|
|||
top: 4px;
|
||||
left: 4px;
|
||||
overflow-x: hidden; /* Show the y-direction scrollbar (magic!) */
|
||||
color: #efefef;
|
||||
}
|
||||
|
||||
.editor_pane_wrapper a:visited, .angular_wrapper a:visited {
|
||||
color: #cecece;
|
||||
}
|
||||
|
||||
.tab-name {
|
||||
|
@ -512,7 +514,7 @@ li.ui-state-default {
|
|||
|
||||
.inner_editor_title h2 {
|
||||
margin: 10px 0 0 10px;
|
||||
width: 85%;
|
||||
width: 70%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -639,24 +641,30 @@ li.ui-state-default {
|
|||
padding-top: 4px;
|
||||
}
|
||||
|
||||
/* DataTables */
|
||||
/* Schedule tab DataTable */
|
||||
|
||||
#show_builder .fg-toolbar > .btn-toolbar,
|
||||
#show_builder .ColVis.TableTools {
|
||||
#show_builder_table_wrapper .fg-toolbar.ui-corner-tl.ui-corner-tr {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
#show_builder_table_wrapper .fg-toolbar > .btn-toolbar,
|
||||
#show_builder_table_wrapper .ColVis.TableTools {
|
||||
position: absolute;
|
||||
top: 35px;
|
||||
}
|
||||
|
||||
#show_builder .fg-toolbar > .btn-toolbar {
|
||||
#show_builder_table_wrapper .fg-toolbar > .btn-toolbar {
|
||||
left: 6px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#show_builder .ColVis.TableTools {
|
||||
#show_builder_table_wrapper .ColVis.TableTools {
|
||||
right: 6px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* DataTables */
|
||||
|
||||
div.ColVis_collectionBackground {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
@ -679,6 +687,10 @@ div.ColVis_collectionBackground {
|
|||
color: #000;
|
||||
}
|
||||
|
||||
.ColVis {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Hacky stuff here */
|
||||
#show_builder .dataTables_scrolling {
|
||||
top: 66px;
|
||||
|
|
|
@ -41,13 +41,14 @@
|
|||
}
|
||||
|
||||
.sb-content fieldset legend {
|
||||
font-size: 13px;
|
||||
font-size: 16px;
|
||||
white-space: nowrap;
|
||||
width: 110px;
|
||||
}
|
||||
|
||||
.sb-content fieldset label {
|
||||
padding: 2px;
|
||||
/*padding: 2px;*/
|
||||
padding: 0 16px 0 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
|
|
@ -3949,7 +3949,7 @@ li .ui-state-hover {
|
|||
height: 100%;
|
||||
float: left;
|
||||
flex: 1 100%;
|
||||
margin: 4px 0;
|
||||
margin: 4px 0 !important;
|
||||
min-height: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
|
@ -3963,13 +3963,54 @@ li .ui-state-hover {
|
|||
max-width: 300px;
|
||||
}
|
||||
|
||||
.podcast-metadata label {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
.inner_editor_title > h2 {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.podcast-metadata input[type="text"] {
|
||||
.inner_editor_title button {
|
||||
float: right;
|
||||
margin: 5px 10px 0 0;
|
||||
}
|
||||
|
||||
.angular_wrapper .inner_editor_wrapper {
|
||||
flex: 1 100%;
|
||||
}
|
||||
|
||||
.angular_wrapper legend {
|
||||
background-color: #242424;
|
||||
color: #efefef;
|
||||
}
|
||||
|
||||
.angular_wrapper .dataTables_scrolling {
|
||||
/* Should find a better way to do this... */
|
||||
top: 74px !important;
|
||||
}
|
||||
|
||||
.podcast-metadata p {
|
||||
text-align: center;
|
||||
padding: 0 5%;
|
||||
}
|
||||
|
||||
.podcast-metadata label,
|
||||
.podcast-metadata input,
|
||||
.podcast-metadata textarea {
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.podcast-metadata input[type="checkbox"] {
|
||||
margin: 8px 60% 0 0;
|
||||
}
|
||||
|
||||
.podcast-metadata label {
|
||||
display: block;
|
||||
width: 20%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.podcast-metadata input[type="text"],
|
||||
.podcast-metadata textarea {
|
||||
width: 60%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* UI Revamp Video */
|
||||
|
|
|
@ -1264,9 +1264,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
podcastToolbarButtons[AIRTIME.widgets.Table.TOOLBAR_BUTTON_ROLES.DELETE].eventHandlers.click = AIRTIME.podcast.deleteSelectedPodcasts;
|
||||
// Add a button to view the station podcast
|
||||
podcastToolbarButtons["StationPodcast"] = {
|
||||
'title' : $.i18n._("My Station Podcast"),
|
||||
'iconClass' : "icon-music",
|
||||
extraBtnClass : "",
|
||||
title : $.i18n._("My Station Podcast"),
|
||||
iconClass : "icon-music",
|
||||
extraBtnClass : "btn-small",
|
||||
elementId : "",
|
||||
eventHandlers : {
|
||||
click: AIRTIME.podcast.openStationPodcast
|
||||
|
@ -1279,10 +1279,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
true, //Enable item selection
|
||||
podcastToolbarButtons, //Toolbar buttons
|
||||
{ //Datatables overrides.
|
||||
'aoColumns' : aoColumns,
|
||||
'sAjaxSource' : ajaxSourceURL,
|
||||
'oColReorder': {
|
||||
'iFixedColumns': 1 // Checkbox
|
||||
aoColumns : aoColumns,
|
||||
sAjaxSource : ajaxSourceURL,
|
||||
oColReorder: {
|
||||
iFixedColumns: 1 // Checkbox
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -186,9 +186,9 @@ var AIRTIME = (function (AIRTIME) {
|
|||
var $scope = this.$scope,
|
||||
buttons = {
|
||||
deleteBtn: {
|
||||
'title' : $.i18n._('Delete'),
|
||||
'iconClass' : "icon-trash",
|
||||
extraBtnClass : "btn-danger",
|
||||
title : $.i18n._('Delete'),
|
||||
iconClass : 'icon-trash',
|
||||
extraBtnClass : 'btn-small btn-danger',
|
||||
elementId : '',
|
||||
eventHandlers : {
|
||||
click: $scope.deleteSelectedEpisodes
|
||||
|
@ -213,7 +213,7 @@ var AIRTIME = (function (AIRTIME) {
|
|||
* @override
|
||||
*/
|
||||
StationPodcastController.prototype.reloadEpisodeTable = function() {
|
||||
self.episodeTable.getDatatable().fnDraw();
|
||||
this.episodeTable.getDatatable().fnDraw();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -397,14 +397,23 @@ var AIRTIME = (function (AIRTIME) {
|
|||
* @returns {*} the created Table object
|
||||
*/
|
||||
mod.initPodcastEpisodeDatatable = function(podcast, tab, params, buttons) {
|
||||
buttons = $.extend({
|
||||
slideToggle: {
|
||||
title : '',
|
||||
iconClass : 'spl-no-r-margin icon-chevron-up',
|
||||
extraBtnClass : 'toggle-editor-form',
|
||||
elementId : '',
|
||||
eventHandlers : {}
|
||||
}
|
||||
}, buttons);
|
||||
params = $.extend(params,
|
||||
{
|
||||
oColVis : {
|
||||
sAlign: "right",
|
||||
aiExclude: [0, 1],
|
||||
buttonText: $.i18n._("Columns"),
|
||||
oColVis: {
|
||||
sAlign : 'right',
|
||||
aiExclude : [0, 1],
|
||||
buttonText : $.i18n._("Columns"),
|
||||
iOverlayFade: 0,
|
||||
oColReorder: {
|
||||
oColReorder : {
|
||||
iFixedColumns: 1 // Checkbox
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,8 +99,7 @@ var AIRTIME = (function (AIRTIME) {
|
|||
function _bootstrapAngularApp(mediaId, tab) {
|
||||
publishApp.value('mediaId', mediaId);
|
||||
publishApp.value('tab', tab);
|
||||
var wrapper = AIRTIME.tabs.getActiveTab().contents.find(".editor_pane_wrapper");
|
||||
wrapper.attr("ng-controller", "Publish");
|
||||
var wrapper = AIRTIME.tabs.getActiveTab().contents.find(".angular_wrapper");
|
||||
angular.bootstrap(wrapper.get(0), [PUBLISH_APP_NAME]);
|
||||
}
|
||||
|
||||
|
|
|
@ -912,13 +912,6 @@ var AIRTIME = (function(AIRTIME){
|
|||
oData = {};
|
||||
playlistRequest(sUrl, oData);
|
||||
});
|
||||
|
||||
$pl.find(".toggle-editor-form").unbind().on("click", function(event) {
|
||||
$pl.find(".inner_editor_wrapper").slideToggle(200);
|
||||
var buttonIcon = $(this).find('span.icon-white');
|
||||
buttonIcon.toggleClass('icon-chevron-up');
|
||||
buttonIcon.toggleClass('icon-chevron-down');
|
||||
});
|
||||
}
|
||||
|
||||
function setUpPlaylist() {
|
||||
|
@ -1138,9 +1131,6 @@ var AIRTIME = (function(AIRTIME){
|
|||
type = pl.find('.obj_type').val();
|
||||
url = baseUrl+'playlist/delete';
|
||||
|
||||
console.log(id);
|
||||
console.log(type);
|
||||
|
||||
$.post(url,
|
||||
{format: "json", ids: id, modified: lastMod, type: type},
|
||||
function(json) {
|
||||
|
|
|
@ -131,6 +131,13 @@ var AIRTIME = (function(AIRTIME){
|
|||
AIRTIME.library.fnDrawCallback();
|
||||
self.close();
|
||||
});
|
||||
|
||||
self.contents.on("click", ".toggle-editor-form", function(event) {
|
||||
self.contents.find(".inner_editor_wrapper").slideToggle(200);
|
||||
var buttonIcon = $(this).find('.icon-white');
|
||||
buttonIcon.toggleClass('icon-chevron-up');
|
||||
buttonIcon.toggleClass('icon-chevron-down');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -210,7 +210,8 @@ var AIRTIME = (function(AIRTIME) {
|
|||
outerDiv.className = 'btn-group';
|
||||
outerDiv.title = title;
|
||||
var innerButton = document.createElement("button");
|
||||
innerButton.className = 'btn btn-small ' + extraBtnClass;
|
||||
//innerButton.className = 'btn btn-small ' + extraBtnClass;
|
||||
innerButton.className = 'btn ' + extraBtnClass;
|
||||
innerButton.id = elementId;
|
||||
var innerIcon = document.createElement("i");
|
||||
innerIcon.className = 'icon-white ' + iconClass;
|
||||
|
@ -440,9 +441,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
//Set of standard buttons. Use getStandardToolbarButtons() to grab these and pass them to the init() function.
|
||||
Table._STANDARD_TOOLBAR_BUTTONS = {};
|
||||
Table._STANDARD_TOOLBAR_BUTTONS[Table.TOOLBAR_BUTTON_ROLES.NEW] = { 'title' : $.i18n._('New'), 'iconClass' : "icon-plus", extraBtnClass : "btn-new", elementId : '', eventHandlers : {} };
|
||||
Table._STANDARD_TOOLBAR_BUTTONS[Table.TOOLBAR_BUTTON_ROLES.EDIT] = { 'title' : $.i18n._('Edit'), 'iconClass' : "icon-pencil", extraBtnClass : "", elementId : '', eventHandlers : {} };
|
||||
Table._STANDARD_TOOLBAR_BUTTONS[Table.TOOLBAR_BUTTON_ROLES.DELETE] = { 'title' : $.i18n._('Delete'), 'iconClass' : "icon-trash", extraBtnClass : "btn-danger", elementId : '', eventHandlers : {} };
|
||||
Table._STANDARD_TOOLBAR_BUTTONS[Table.TOOLBAR_BUTTON_ROLES.NEW] = { 'title' : $.i18n._('New'), 'iconClass' : "icon-plus", extraBtnClass : "btn-small btn-new", elementId : '', eventHandlers : {} };
|
||||
Table._STANDARD_TOOLBAR_BUTTONS[Table.TOOLBAR_BUTTON_ROLES.EDIT] = { 'title' : $.i18n._('Edit'), 'iconClass' : "icon-pencil", extraBtnClass : "btn-small", elementId : '', eventHandlers : {} };
|
||||
Table._STANDARD_TOOLBAR_BUTTONS[Table.TOOLBAR_BUTTON_ROLES.DELETE] = { 'title' : $.i18n._('Delete'), 'iconClass' : "icon-trash", extraBtnClass : "btn-small btn-danger", elementId : '', eventHandlers : {} };
|
||||
Object.freeze(Table._STANDARD_TOOLBAR_BUTTONS);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue