Dangerous options subform on Preferences page and Delete all tracks button
This commit is contained in:
parent
fc36ff5797
commit
15bebc6267
8 changed files with 151 additions and 23 deletions
|
@ -1,18 +1,13 @@
|
|||
function showErrorSections() {
|
||||
if($("#soundcloud-settings .errors").length > 0) {
|
||||
$("#soundcloud-settings").show();
|
||||
$(window).scrollTop($("#soundcloud-settings .errors").position().top);
|
||||
}
|
||||
|
||||
if($("#email-server-settings .errors").length > 0) {
|
||||
$("#email-server-settings").show();
|
||||
$(window).scrollTop($("#email-server-settings .errors").position().top);
|
||||
}
|
||||
|
||||
if($("#livestream-settings .errors").length > 0) {
|
||||
$("#livestream-settings").show();
|
||||
$(window).scrollTop($("#livestream-settings .errors").position().top);
|
||||
}
|
||||
var selector = $("[id$=-settings]");
|
||||
selector.each(function(i) {
|
||||
var el = $(this);
|
||||
var errors = el.find(".errors");
|
||||
if (errors.length > 0) {
|
||||
el.show();
|
||||
$(window).scrollTop(errors.position().top);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setConfigureMailServerListener() {
|
||||
|
@ -120,6 +115,14 @@ function removeLogo() {
|
|||
location.reload();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.collapsible-header').live('click',function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue