restore station podcast onSaveCallback

This commit is contained in:
ryan 2018-12-26 18:06:07 -06:00
parent bd409fa100
commit e672e81d8f
1 changed files with 15 additions and 16 deletions

View File

@ -145,21 +145,20 @@ var AIRTIME = (function (AIRTIME) {
function StationPodcastController($scope, $http, podcast, tab) {
// Super call to parent controller
PodcastController.call(this, $scope, $http, podcast, tab);
// @frecuencialibre commenting this out since i think it is never called. @todo delete once confirmed
// this.onSaveCallback = function () {
// $http({
// method: 'POST',
// url: '/preference/station-podcast-settings',
// headers: {'Content-Type': 'application/x-www-form-urlencoded'},
// data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() }
// }).success(function (data) {
// jQuery.extend($scope.podcast, data);
// $(".success").text($.i18n._("Podcast settings saved")).slideDown("fast");
// setTimeout(function () {
// $(".success").slideUp("fast");
// }, 2000);
// });
// };
this.onSaveCallback = function () {
$http({
method: 'POST',
url: '/preference/station-podcast-settings',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() }
}).success(function (data) {
jQuery.extend($scope.podcast, data);
$(".success").text($.i18n._("Podcast settings saved")).slideDown("fast");
setTimeout(function () {
$(".success").slideUp("fast");
}, 2000);
});
};
return this;
}