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

@ -304,6 +304,20 @@ function getUsabilityHint() {
});
}
// TODO: build this out so we can use it as a fallback in fail cases
function buildErrorDialog(message) {
var el = $("<div id='error_dialog'></div>");
el.text(message);
$(document.body).append(el);
$("#error_dialog").dialog({
title: $.i18n._("Something went wrong!"),
resizable: false,
modal: true,
width: "auto",
height: "auto"
});
}
/**
* Add title attributes (whose values are their inner text) to all elements in the calling parent matching selector
*