silverstripe-framework/dev/install/install.js
Sam Minnee 3ee8f505b7 MINORE: Remove training whitespace.
The main benefit of this is so that authors who make use of
.editorconfig don't end up with whitespace changes in their PRs.

Spaces vs. tabs has been left alone, although that could do with a
tidy-up in SS4 after the switch to PSR-1/2.

The command used was this:

for match in '*.ss' '*.css' '*.scss' '*.html' '*.yml' '*.php' '*.js' '*.csv' '*.inc' '*.php5'; do
	find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" -exec sed -E -i '' 's/[[:space:]]+$//' {} \+
	find . -path ./thirdparty -not -prune -o -path ./admin/thirdparty -not -prune -o -type f -name "$match" | xargs perl -pi -e 's/ +$//'
done
2016-01-07 10:15:54 +13:00

59 lines
1.6 KiB
JavaScript

$(document).ready(function() {
/**
* Toggle field readonly modes, if check configuration comes from
* _ss_environment (values populated on reload).
*/
$('#use_environment').click(function(e) {
if(!$(this).is(':checked')) {
$('.configured-by-env').removeAttr('disabled');
} else {
$('.configured-by-env').attr('disabled', 'disabled');
}
});
/**
* Hide all existing database warnings, and show only current one
*/
$('#database_selection li label, #database_selection input:radio').click(function(e) {
$('.dbfields').hide();
// only show fields if there's no db error
if(!$('.databaseError', $(this).parent()).length) $('.dbfields', $(this).parent()).show();
$('.databaseError').hide();
$('.databaseError', $(this).parent()).show();
});
// Select first
$('#database_selection li input:checked').siblings('label').click();
/**
* Install button
*/
$('#reinstall_confirmation').click(function() {
$('#install_button').attr('disabled', !$(this).is(':checked'));
});
$('#install_button').click(function() {
$('#saving_top').hide();
$(this).val('Installing SilverStripe...');
});
/**
* Show all the requirements
*/
$('h5.requirement a').click(function() {
if($(this).text() == 'Hide All Requirements') {
// hide the shown requirements
$(this).parents('h5').next('table.testResults').find('.good').hide();
$(this).text('Show All Requirements');
}
else {
// show the requirements.
$(this).parents('h5').next('table.testResults').find('.good').show();
$(this).text('Hide All Requirements');
}
return false;
});
});