Better errors from podcast 'Add' dialog

This commit is contained in:
Duncan Sommerville 2015-11-10 19:26:25 -05:00
parent de380369ed
commit c5a5839eff
10 changed files with 44 additions and 14 deletions

View file

@ -524,6 +524,12 @@ var AIRTIME = (function (AIRTIME) {
AIRTIME.library.podcastTableWidget.clearSelection();
AIRTIME.library.setCurrentTable(AIRTIME.library.DataTableTypeEnum.PODCAST_EPISODES);
$("#podcast_url_dialog").dialog("close");
}).fail(function (e) {
var errors = $("#podcast_url_dialog").find(".errors");
errors.show(200).text(e.responseText);
setTimeout(function () {
errors.hide(200);
}, 3000);
});
};
@ -679,3 +685,10 @@ var AIRTIME = (function (AIRTIME) {
return AIRTIME;
}(AIRTIME || {}));
$(document).ready(function() {
$(document).on("submit", "#podcast_url_form", function (e) {
e.preventDefault();
AIRTIME.podcast.addPodcast();
});
});