Merge branch 'saas-dev' into saas-dev-facebook-radio

This commit is contained in:
drigato 2015-11-24 11:22:18 -05:00
commit a2a30e5c42
23 changed files with 153 additions and 94 deletions

View file

@ -132,7 +132,7 @@ var AIRTIME = (function(AIRTIME) {
"media": "podcasts",
"icon": "icon-headphones",
"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:
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() {
$libContent = $("#library_content");
@ -706,7 +718,7 @@ var AIRTIME = (function(AIRTIME) {
"url": sSource,
"data": aoData,
"success": fnCallback,
"error": handleAjaxError
"error": mod.handleAjaxError
}).done(function (data) {
var filterMessage = $libContent.find('.filter-message');
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;
if (selected.parent().data("selection-id") == AIRTIME.library.MediaTypeIntegerEnum.PODCAST) {
table = mod.DataTableTypeEnum.PODCAST;
@ -1420,6 +1421,9 @@ var AIRTIME = (function(AIRTIME) {
sAjaxSource : ajaxSourceURL,
oColReorder: {
iFixedColumns: 1 // Checkbox
},
fnDrawCallback: function () {
AIRTIME.library.drawEmptyPlaceholder(this);
}
});

View file

@ -107,7 +107,7 @@ var AIRTIME = (function (AIRTIME) {
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() }
}).success(function (data) {
$("#preferences_podcast-stationPodcastFeedUrl").val(data.url);
jQuery.extend($scope.podcast, data);
$(".success").text($.i18n._("Podcast settings saved")).slideDown("fast");
setTimeout(function () {
$(".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.
*

View file

@ -399,15 +399,9 @@ var AIRTIME = (function(AIRTIME) {
Table.prototype._handleAjaxError = function(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();
$.getJSON( "ajax/library_placeholders.json", function( data ) {
$('.empty_placeholder_text').text($.i18n._(data.unauthorized));
}) ;
$('.empty_placeholder').show();
*/
$(".dt-process-rel").hide();
$('.empty_placeholder_text').text($.i18n._("You don't have permission to view this resource."));
$('.empty_placeholder').show();
}
};