@tidusjar pointed out runtime error!!

pull/1047/head
dhruvb14 8 years ago
parent 8f3c4ca1b2
commit 7a2a057346

@ -49,6 +49,7 @@ namespace Ombi.UI.NinjectModules
Bind<ISonarrCacher>().To<SonarrCacher>();
Bind<ISickRageCacher>().To<SickRageCacher>();
Bind<IRecentlyAdded>().To<RecentlyAdded>();
Bind<IMassEmail>().To<RecentlyAdded>();
Bind<IRadarrCacher>().To<RadarrCacher>();
Bind<IPlexContentCacher>().To<PlexContentCacher>();
Bind<IJobFactory>().To<CustomJobFactory>();

@ -64,6 +64,11 @@
<small>Supports HTML</small>
</div>
<div class="form-group">
<div>
<button id="testSendMassEmailBtn" class="btn btn-primary-outline">Send Test to Admin<div id="testSendMassEmailSpinner"></div></button>
</div>
</div>
<div class="form-group">
<div>
<button id="sendMassEmailBtn" class="btn btn-primary-outline">Send Mass Email (WIP Needs Backend Code Still)<div id="sendMassEmailSpinner"></div></button>
@ -116,26 +121,26 @@
success: function (response) {
if (response) {
generateNotify(response.message, "success");
$('#testEmailSpinner').attr("class", "fa fa-check");
$('#testSendMassEmailSpinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "danger");
$('#testEmailSpinner').attr("class", "fa fa-times");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
$('#testEmailSpinner').attr("class", "fa fa-times");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
});
});
$('#sendMassEmailBtn').click(function (e) {
$('#testSendMassEmailBtn').click(function (e) {
e.preventDefault();
var base = '@Html.GetBaseUrl()';
var url = createBaseUrl(base, '/admin/testmassadminemail');
$('#sendMassEmailSpinner').attr("class", "fa fa-spinner fa-spin");
$('#testSendMassEmailSpinner').attr("class", "fa fa-spinner fa-spin");
$.ajax({
type: "post",
url: url,
@ -144,17 +149,17 @@
success: function (response) {
if (response) {
generateNotify(response.message, "success");
$('#sendMassEmailSpinner').attr("class", "fa fa-check");
$('#testSendMassEmailSpinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "danger");
$('#sendMassEmailSpinner').attr("class", "fa fa-times");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
$('#sendMassEmailSpinner').attr("class", "fa fa-times");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
}
});
});

Loading…
Cancel
Save