Merge branch 'saas-dev-publishing' of github.com:sourcefabric/airtime into saas-dev-publishing

This commit is contained in:
Duncan Sommerville 2015-11-16 15:44:13 -05:00
commit dc5e81ee9b
2 changed files with 42 additions and 35 deletions

View File

@ -82,6 +82,7 @@ class IndexController extends Zend_Controller_Action
$stationName = Application_Model_Preference::GetStationName();
$this->view->podcastTitle = sprintf(_("%s Podcast"), !empty($stationName) ? $stationName : $CC_CONFIG["stationId"]);
$this->view->emptyPodcastMessage = _("No tracks have been published yet.");
}

View File

@ -243,11 +243,16 @@
ready: function () {
var episodes = <?php echo $this->episodes ?>;
var empty_podcast_message = "<?php echo $this->emptyPodcastMessage ?>";
if (Object.keys(episodes).length <= 0) {
$(".jp-playlist").append(empty_podcast_message);
} else {
buildJplayerPlaylist(0, episodes);
// update current track metadata on player bar
$("#jquery_jplayer_1").bind(jQuery.jPlayer.event.play, function (event)
{
$("#jquery_jplayer_1").bind(jQuery.jPlayer.event.play, function (event) {
var current = _playlist_jplayer.current;
$('.current-track span').html(playlist[current].title);
});
@ -285,6 +290,7 @@
});
}
}
}
);
</script>