Merge branch 'saas-dev' into saas-speedy
This commit is contained in:
commit
e86e1cb4ac
20 changed files with 553 additions and 55 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() {
|
||||
|
@ -63,6 +58,30 @@ function setMailServerInputReadonly() {
|
|||
setMsAuthenticationFieldsReadonly(requiresAuthCB);
|
||||
}
|
||||
|
||||
function setTuneInSettingsListener() {
|
||||
var enableTunein = $("#enable_tunein");
|
||||
enableTunein.click(function(event){
|
||||
setTuneInSettingsReadonly();
|
||||
});
|
||||
}
|
||||
|
||||
function setTuneInSettingsReadonly() {
|
||||
var enableTunein = $("#enable_tunein");
|
||||
var stationId = $("#tunein_station_id");
|
||||
var partnerKey = $("#tunein_partner_key");
|
||||
var partnerId = $("#tunein_partner_id");
|
||||
|
||||
if (enableTunein.is(':checked')) {
|
||||
stationId.removeAttr("readonly");
|
||||
partnerKey.removeAttr("readonly");
|
||||
partnerId.removeAttr("readonly");
|
||||
} else {
|
||||
stationId.attr("readonly", "readonly");
|
||||
partnerKey.attr("readonly", "readonly");
|
||||
partnerId.attr("readonly", "readonly");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable/disable mail server authentication fields
|
||||
*/
|
||||
|
@ -120,6 +139,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() {
|
||||
|
@ -128,6 +155,10 @@ $(document).ready(function() {
|
|||
return false;
|
||||
}).next().hide();
|
||||
|
||||
if ($("#tunein-settings").find(".errors").length > 0) {
|
||||
$(".collapsible-content#tunein-settings").show();
|
||||
}
|
||||
|
||||
/* No longer using AJAX for this form. Zend + our code makes it needlessly hard to deal with. -- Albert
|
||||
$('#pref_save').live('click', function() {
|
||||
var data = $('#pref_form').serialize();
|
||||
|
@ -151,4 +182,6 @@ $(document).ready(function() {
|
|||
setConfigureMailServerListener();
|
||||
setEnableSystemEmailsListener();
|
||||
setCollapsibleWidgetJsCode();
|
||||
setTuneInSettingsReadonly();
|
||||
setTuneInSettingsListener();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue