Merge branch 'saas-dev-publishing' into saas-dev-publishing-episode-view
Conflicts: airtime_mvc/public/js/airtime/library/podcast.js
This commit is contained in:
commit
6cb28e0911
|
@ -15,7 +15,7 @@ class FeedsController extends Zend_Controller_Action
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-Type: text/xml');
|
header('Content-Type: text/xml; charset=UTF-8');
|
||||||
|
|
||||||
echo Application_Service_PodcastService::createStationRssFeed();
|
echo Application_Service_PodcastService::createStationRssFeed();
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
|
||||||
}
|
}
|
||||||
// XXX: We should maybe try to alias this so we don't pass CcFiles as an array key to the frontend.
|
// XXX: We should maybe try to alias this so we don't pass CcFiles as an array key to the frontend.
|
||||||
// It would require us to iterate over all the episodes and change the key for the response though...
|
// It would require us to iterate over all the episodes and change the key for the response though...
|
||||||
$episodes = $episodes->joinWith('PodcastEpisodes.CcFiles')
|
$episodes = $episodes->joinWith('PodcastEpisodes.CcFiles', Criteria::LEFT_JOIN)
|
||||||
->setOffset($offset)
|
->setOffset($offset)
|
||||||
->orderBy($sortColumn, $sortDir)
|
->orderBy($sortColumn, $sortDir)
|
||||||
->find();
|
->find();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="angular_wrapper" ng-controller="StationPodcast">
|
<div class="angular_wrapper" ng-controller="StationPodcast">
|
||||||
<div class="inner_editor_title">
|
<div class="inner_editor_title">
|
||||||
<h2>
|
<h2>
|
||||||
<?php echo _("Editing ") ?>"<span ng-bind="podcast.title" class="title_obj_name"></span>"
|
<span class="title_obj_name"><?php echo _("My Station Podcast") ?></span>
|
||||||
</h2>
|
</h2>
|
||||||
<a href="{{podcast.url}}" target="_blank">
|
<a href="{{podcast.url}}" target="_blank">
|
||||||
<button class="btn"><?php echo _("View Feed") ?></button>
|
<button class="btn"><?php echo _("View Feed") ?></button>
|
||||||
|
|
|
@ -603,7 +603,7 @@ li.ui-state-default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-md-dialog .zend_form dd:last-child {
|
.edit-md-dialog .zend_form dd:last-child {
|
||||||
width: 160px;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Smart Block Editor */
|
/* Smart Block Editor */
|
||||||
|
|
|
@ -2444,7 +2444,7 @@ dd.radio-inline-list, .preferences dd.radio-inline-list, .stream-config dd.radio
|
||||||
}
|
}
|
||||||
|
|
||||||
.md-publish {
|
.md-publish {
|
||||||
width: 160px;
|
width: 100%;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4086,6 +4086,11 @@ li .ui-state-hover {
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.publish-sources {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.publish-sources input[type="checkbox"] {
|
.publish-sources input[type="checkbox"] {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 8px 20px 0 7px;
|
margin: 8px 20px 0 7px;
|
||||||
|
@ -4095,6 +4100,7 @@ li .ui-state-hover {
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.published-sources > .checked-icon {
|
.published-sources > .checked-icon {
|
||||||
|
|
|
@ -30,7 +30,6 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
//a roundtrip by not fetching it again here.
|
//a roundtrip by not fetching it again here.
|
||||||
$scope.podcast = podcast;
|
$scope.podcast = podcast;
|
||||||
$scope.tab = tab;
|
$scope.tab = tab;
|
||||||
tab.setName($scope.podcast.title);
|
|
||||||
$scope.csrf = jQuery("#csrf").val();
|
$scope.csrf = jQuery("#csrf").val();
|
||||||
tab.contents.find("table").attr("id", "podcast_episodes_" + podcast.id);
|
tab.contents.find("table").attr("id", "podcast_episodes_" + podcast.id);
|
||||||
|
|
||||||
|
@ -50,36 +49,28 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal function.
|
* Save and update the podcast object.
|
||||||
*
|
|
||||||
* Make a PUT request to the server to update the podcast object.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
*/
|
*/
|
||||||
self._updatePodcast = function () {
|
$scope.savePodcast = function () {
|
||||||
$http.put(endpoint + $scope.podcast.id, {csrf_token: $scope.csrf, podcast: $scope.podcast})
|
$http.put(endpoint + $scope.podcast.id, {csrf_token: $scope.csrf, podcast: $scope.podcast})
|
||||||
.success(function () {
|
.success(function () {
|
||||||
self.episodeTable.getDatatable().fnDraw();
|
|
||||||
AIRTIME.library.podcastDataTable.fnDraw();
|
AIRTIME.library.podcastDataTable.fnDraw();
|
||||||
tab.setName($scope.podcast.title);
|
tab.setName($scope.podcast.title);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
$scope.importEpisodes = function () {
|
||||||
* For imported podcasts.
|
|
||||||
*
|
|
||||||
* Save each of the selected episodes and update the podcast object.
|
|
||||||
*/
|
|
||||||
$scope.savePodcast = function () {
|
|
||||||
var episodes = self.episodeTable.getSelectedRows();
|
var episodes = self.episodeTable.getSelectedRows();
|
||||||
// TODO: Should we implement a batch endpoint for this instead?
|
// TODO: Should we implement a batch endpoint for this instead?
|
||||||
jQuery.each(episodes, function () {
|
jQuery.each(episodes, function () {
|
||||||
$http.post(endpoint + $scope.podcast.id + '/episodes', {
|
$http.post(endpoint + $scope.podcast.id + '/episodes', {
|
||||||
csrf_token: $scope.csrf,
|
csrf_token: $scope.csrf,
|
||||||
episode: this
|
episode: this
|
||||||
|
}).success(function () {
|
||||||
|
self.reloadEpisodeTable();
|
||||||
|
self.episodeTable.getDatatable().fnDraw();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
self._updatePodcast();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -122,7 +113,20 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
/* Publication Date */ { "sTitle" : $.i18n._("Publication Date") , "mDataProp" : "pub_date" , "sClass" : "podcast_episodes_pub_date" , "sWidth" : "170px" }
|
/* Publication Date */ { "sTitle" : $.i18n._("Publication Date") , "mDataProp" : "pub_date" , "sClass" : "podcast_episodes_pub_date" , "sWidth" : "170px" }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
buttons = { slideToggle: {} };
|
buttons = {
|
||||||
|
slideToggle: {},
|
||||||
|
importBtn: {
|
||||||
|
title : $.i18n._('Import Selected'),
|
||||||
|
iconClass : '',
|
||||||
|
extraBtnClass : 'btn-new',
|
||||||
|
elementId : '',
|
||||||
|
eventHandlers : {
|
||||||
|
click: function () {
|
||||||
|
$scope.importEpisodes();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
self.episodeTable = AIRTIME.podcast.initPodcastEpisodeDatatable(
|
self.episodeTable = AIRTIME.podcast.initPodcastEpisodeDatatable(
|
||||||
$scope.tab.contents.find('.podcast_episodes'),
|
$scope.tab.contents.find('.podcast_episodes'),
|
||||||
params,
|
params,
|
||||||
|
@ -146,6 +150,7 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
PodcastController.prototype.initialize = function() {
|
PodcastController.prototype.initialize = function() {
|
||||||
// TODO: this solves a race condition, but we should look for the root cause
|
// TODO: this solves a race condition, but we should look for the root cause
|
||||||
AIRTIME.tabs.onResize();
|
AIRTIME.tabs.onResize();
|
||||||
|
this.$scope.tab.setName(this.$scope.podcast.title);
|
||||||
this._initTable();
|
this._initTable();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -176,15 +181,6 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
$stationPodcastTab = undefined;
|
$stationPodcastTab = undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* For the station podcast.
|
|
||||||
*
|
|
||||||
* Update the station podcast object.
|
|
||||||
*/
|
|
||||||
$scope.savePodcast = function () {
|
|
||||||
self._updatePodcast();
|
|
||||||
};
|
|
||||||
|
|
||||||
self.deleteSelectedEpisodes = function () {
|
self.deleteSelectedEpisodes = function () {
|
||||||
var episodes = self.episodeTable.getSelectedRows();
|
var episodes = self.episodeTable.getSelectedRows();
|
||||||
jQuery.each(episodes, function () {
|
jQuery.each(episodes, function () {
|
||||||
|
@ -261,6 +257,11 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
StationPodcastController.prototype.initialize = function() {
|
||||||
|
PodcastController.prototype.initialize.call(this);
|
||||||
|
this.$scope.tab.setName(jQuery.i18n._("Station Podcast"));
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reload the Station podcast episode table.
|
* Reload the Station podcast episode table.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue