Improvements to the preferences screen

This commit is contained in:
Albert Santoni 2015-09-23 18:21:30 -04:00
parent 13d1534042
commit a86e3ed4a8
3 changed files with 32 additions and 4 deletions

View file

@ -114,15 +114,18 @@ function setMsAuthenticationFieldsReadonly(ele) {
}
function removeLogo() {
$.post(baseUrl+'Preference/remove-logo', function(json){});
location.reload();
$.post(baseUrl+'preference/remove-logo', {'csrf_token' : $('#csrf').val()}, function(json){
// Reload without resubmitting the form
location.href = location.href.replace(location.hash,"");
});
}
function deleteAllFiles() {
var resp = confirm($.i18n._("Are you sure you want to delete all the tracks in your library?"))
if (resp) {
$.post(baseUrl+'Preference/delete-all-files', function(json){});
location.reload();
$.post(baseUrl+'preference/delete-all-files', {'csrf_token' : $('#csrf').val()}, function(json){
location.reload();
});
}
}