Show collapsible sections (other than 'dangerous settings') by default on preferences page

This commit is contained in:
Duncan Sommerville 2015-06-25 17:43:15 -04:00
parent 87bdc01318
commit 6497bc28c5
3 changed files with 6 additions and 44 deletions

View File

@ -9,10 +9,11 @@
</div>
<?php //No soundcloud stuff on Airtime Pro -- Albert ?>
<!-- No soundcloud stuff on Airtime Pro -- Albert -->
<h3 class="collapsible-header" id="dangerous-heading"><span class="arrow-icon"></span><?php echo _("Dangerous Options") ?></h3>
<div class="collapsible-content" id="dangerous-settings">
<!-- Hide the 'dangerous settings' by default -->
<h3 class="collapsible-header closed" id="dangerous-heading"><span class="arrow-icon"></span><?php echo _("Dangerous Options") ?></h3>
<div class="collapsible-content" id="dangerous-settings" style="display:none;">
<?php echo $this->element->getSubform('preferences_danger') ?>
</div>

View File

@ -1841,7 +1841,6 @@ span.errors.sp-errors{
}
.collapsible-content {
margin-top:-1px;
display:none;
}
.collapsible-header .arrow-icon, .collapsible-header-disabled .arrow-icon {
display:block;
@ -1853,9 +1852,8 @@ span.errors.sp-errors{
top:8px;
}
.collapsible-header.closed .arrow-icon, collapsible-header-disabled.close .arrow-icon {
.collapsible-header.closed .arrow-icon, .collapsible-header-disabled.close .arrow-icon {
background-position: 0 -11px !important;
}
#schedule-add-show .button-bar {
height: 28px;

View File

@ -99,41 +99,6 @@ function setMsAuthenticationFieldsReadonly(ele) {
}
}
function setCollapsibleWidgetJsCode() {
var x = function() {
var val = $('input:radio[name=thirdPartyApi]:checked').val();
if (val == "1") {
//show js textarea
$('#widgetCode-label').show("fast");
$('#widgetCode-element').show("fast");
} else {
if ($('#widgetCode-label').is(":visible")) {
//hide js textarea
$('#widgetCode-label').hide();
$('#widgetCode-element').hide();
}
}
}
x();
$('#thirdPartyApi-element input').click(x);
}
function setSoundCloudCheckBoxListener() {
var subCheckBox= $("#UseSoundCloud,#SoundCloudDownloadbleOption");
var mainCheckBox= $("#UploadToSoundcloudOption");
subCheckBox.change(function(e){
if (subCheckBox.is(':checked')) {
mainCheckBox.attr("checked", true);
}
});
mainCheckBox.change(function(e){
if (!mainCheckBox.is(':checked')) {
$("#UseSoundCloud,#SoundCloudDownloadbleOption").attr("checked", false);
}
});
}
function removeLogo() {
$.post(baseUrl+'Preference/remove-logo', function(json){});
location.reload();
@ -153,7 +118,7 @@ $(document).ready(function() {
$(this).next().toggle('fast');
$(this).toggleClass("closed");
return false;
}).next().hide();
});
if ($("#tunein-settings").find(".errors").length > 0) {
$(".collapsible-content#tunein-settings").show();
@ -176,12 +141,10 @@ $(document).ready(function() {
showErrorSections();
setSoundCloudCheckBoxListener();
setMailServerInputReadonly();
setSystemFromEmailReadonly();
setConfigureMailServerListener();
setEnableSystemEmailsListener();
setCollapsibleWidgetJsCode();
setTuneInSettingsReadonly();
setTuneInSettingsListener();
});