Some TODO's

pull/919/head
Jamie.Rees 8 years ago
parent 2ab890e482
commit 32f044b4da

@ -30,6 +30,26 @@ var mixItUpDefault = {
},
callbacks: {
onMixStart: function (state, futureState) {
//futureState.activeSort // sort
//futureState.activeFilter // next filter
// The below is TODO for saving the users filter and sort order
//var url = createBaseUrl(base, '/requests/UpdateFilters');
//$.ajax({
// type: 'post',
// url: url,
// data: {sort:futureState.activeSort, filter:futureState.activeFilte},
// dataType: "json",
// success: function (response) {
// console.log("saved filter and sort order");
// },
// error: function (e) {
// console.log(e);
// generateNotify("Something went wrong saving your filter!", "danger");
// }
//});
$('.mix', this).removeAttr('data-bound').removeData('bound'); // fix for animation issues in other tabs
}
}

@ -91,6 +91,8 @@ namespace Ombi.UI.Modules
Post["/clearissues", true] = async (x, ct) => await ClearIssue((int)Request.Form.Id);
Post["/changeavailability", true] = async (x, ct) => await ChangeRequestAvailability((int)Request.Form.Id, (bool)Request.Form.Available);
Post["/UpdateFilters", true] = async (x, ct) => await UpdateFilters();
}
private static Logger Log = LogManager.GetCurrentClassLogger();
@ -388,7 +390,7 @@ namespace Ombi.UI.Modules
{
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Sorry, you do not have the correct permissions to change a request." });
}
Analytics.TrackEventAsync(Category.Requests, Action.Update, available ? "Make request available" : "Make request unavailable", Username, CookieHelper.GetAnalyticClientId(Cookies));
var originalRequest = await Service.GetAsync(requestId);
if (originalRequest == null)
@ -406,6 +408,11 @@ namespace Ombi.UI.Modules
: new { Result = false, Available = false, Message = "Could not update the availability, please try again or check the logs" });
}
private async Task<Response> UpdateFilters()
{
return Response.AsJson("");
}
}
}

Loading…
Cancel
Save