Add processing div to podcast episodes table
This commit is contained in:
parent
840f446e07
commit
3010fa01fa
|
@ -1379,6 +1379,15 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
return this.getSelectedRows().length >= 1;
|
return this.getSelectedRows().length >= 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var openPodcastEpisodeTable = function (podcast) {
|
||||||
|
mod.podcastEpisodeTableWidget.reload(podcast.id);
|
||||||
|
mod.podcastTableWidget.clearSelection();
|
||||||
|
mod.setCurrentTable(mod.DataTableTypeEnum.PODCAST_EPISODES);
|
||||||
|
mod.podcastEpisodeDataTable.closest(".dataTables_wrapper").find(".dataTables_processing")
|
||||||
|
.addClass("block-overlay").css("visibility", "visible");
|
||||||
|
};
|
||||||
|
|
||||||
podcastToolbarButtons["ViewEpisodes"] = {
|
podcastToolbarButtons["ViewEpisodes"] = {
|
||||||
title : $.i18n._("View Episodes"),
|
title : $.i18n._("View Episodes"),
|
||||||
iconClass : "icon-chevron-right",
|
iconClass : "icon-chevron-right",
|
||||||
|
@ -1387,9 +1396,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
eventHandlers : {
|
eventHandlers : {
|
||||||
click: function () {
|
click: function () {
|
||||||
var podcast = mod.podcastTableWidget.getSelectedRows()[0];
|
var podcast = mod.podcastTableWidget.getSelectedRows()[0];
|
||||||
mod.podcastEpisodeTableWidget.reload(podcast.id);
|
openPodcastEpisodeTable(podcast);
|
||||||
mod.podcastTableWidget.clearSelection();
|
|
||||||
mod.setCurrentTable(mod.DataTableTypeEnum.PODCAST_EPISODES);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validateConstraints: function () {
|
validateConstraints: function () {
|
||||||
|
@ -1427,9 +1434,7 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
// in the left-hand pane.
|
// in the left-hand pane.
|
||||||
mod.podcastTableWidget.assignDblClickHandler(function () {
|
mod.podcastTableWidget.assignDblClickHandler(function () {
|
||||||
var podcast = mod.podcastDataTable.fnGetData(this);
|
var podcast = mod.podcastDataTable.fnGetData(this);
|
||||||
mod.podcastEpisodeTableWidget.reload(podcast.id);
|
openPodcastEpisodeTable(podcast);
|
||||||
mod.podcastTableWidget.clearSelection();
|
|
||||||
mod.setCurrentTable(mod.DataTableTypeEnum.PODCAST_EPISODES);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();
|
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();
|
||||||
|
|
|
@ -539,6 +539,7 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
*/
|
*/
|
||||||
mod.importSelectedEpisodes = function (episodes, dt) {
|
mod.importSelectedEpisodes = function (episodes, dt) {
|
||||||
$.each(episodes, function () {
|
$.each(episodes, function () {
|
||||||
|
// remainingDiskSpace is defined in layout.phtml
|
||||||
if (this.enclosure.length > remainingDiskSpace) {
|
if (this.enclosure.length > remainingDiskSpace) {
|
||||||
alert("You don't have enough disk space to import " + this.title);
|
alert("You don't have enough disk space to import " + this.title);
|
||||||
return false;
|
return false;
|
||||||
|
@ -623,6 +624,9 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
},
|
},
|
||||||
fnDrawCallback: function () {
|
fnDrawCallback: function () {
|
||||||
AIRTIME.library.drawEmptyPlaceholder(this);
|
AIRTIME.library.drawEmptyPlaceholder(this);
|
||||||
|
// Hide the processing div
|
||||||
|
var dt = this.getDatatable();
|
||||||
|
!dt || dt.closest(".dataTables_wrapper").find(".dataTables_processing").css("visibility", "hidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue