From bac6a9d24097ffbb8b946838dd1a67f32f08d3db Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 13 Oct 2010 00:45:50 +0000 Subject: [PATCH] ENHANCEMENT: refactored requirements section to hide successful tests (from r101381) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111998 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- dev/install/config-form.html | 92 ++++++++++++------------------- dev/install/install.css | 104 ++++++++++++++++++++++++----------- dev/install/install.js | 23 +++++++- 3 files changed, 130 insertions(+), 89 deletions(-) diff --git a/dev/install/config-form.html b/dev/install/config-form.html index 4af58471d..b07d6e118 100644 --- a/dev/install/config-form.html +++ b/dev/install/config-form.html @@ -66,7 +66,7 @@

Note: It seems as though SilverStripe is already installed here.
- If you ask me to install, I will overwrite the .htaccess or web.config and mysite/_config.php files. + If you ask me to install, I will overwrite the .htaccess and mysite/_config.php files.

@@ -200,18 +200,20 @@ showTable("Database Configuration"); ?> -

CMS Admin Account

+

CMS Admin Account

+
-

- We will set up the first administrator account for you automatically. You can change these details later in the "Security" section within the CMS. -

-
-
+ +
+

We will set up the first administrator account for you automatically. You can change these details later in the "Security" section within the CMS.

+ +
>
+
@@ -219,63 +221,41 @@
+ +
+

+ Determines the default "locale" settings (for dates, currencies, etc.), + as well as setting the default language of the CMS interface. + This can be customized for any CMS user. +
+ Caution: Not all aspects of the interface might be localized yet. +

+ +
+ + + + +
+
-

Theme

+

Theme

You can change the theme or download another from the SilverStripe website after installation.

  • checked="checked">
  • checked="checked">
-

Server configuration

-
-
-
- - - - -
-
-

- SilverStripe allows you to run a site in development mode. - This shows all error messages in the web browser instead of emailing them to the administrator, and allows - the database to be built without logging in as administrator. Please enter the host/domain names for servers - you will be using for development. -

-
- - -
-
-
- - - - -
-
-

- Determines the default "locale" settings (for dates, currencies, etc.), - as well as setting the default language of the CMS interface. - This can be customized for any CMS user. -
- Caution: Not all aspects of the interface might be localized yet. -

-
- +

Requirements

showTable(); ?> diff --git a/dev/install/install.css b/dev/install/install.css index aa938dc8b..0b06c7d8c 100644 --- a/dev/install/install.css +++ b/dev/install/install.css @@ -32,17 +32,6 @@ ul#Themes{ ul#Themes label { margin: -2px 5px 0 15px; } -.good td { - color: green; -} - -.warning td { - color: #ef7f24; -} -.testResults .error td { - border: 1px #CCC solid; - color: red; -} h4.sectionHeading { margin-top: 20px; @@ -50,13 +39,13 @@ h4.sectionHeading { .error { padding: 0.5em; - background-color: #ffe9e9; + background-color: #fdf5f5; border: 1px #ff8e8e solid; color: #f03838; } .warning { padding: 0.5em; - background-color: #fef1e1; + background-color: #fcf8f2; border: 1px #ffc28b solid; color: #cb6a1c; } @@ -83,7 +72,7 @@ p.error a:hover { span.middleColumn { width: 297px; margin-right: 0; - margin-top: 0; + margin-top: 5px; padding: 4px; } input.text, textarea, select { @@ -107,13 +96,72 @@ table.testResults { } #Layout h4 { font-size: 2em; + margin-top: 18px; + line-height: 1.4; clear: left; } -.testResults td { - border: 1px #CCC solid; - width: 400px; - padding: 4px; + +/** + * Requirements and test results + * ------------------------------------------------ */ +table.testResults { + margin-top: 0; } + table.testResults td { + border: 1px #CCC solid; + border-top: none; + width: 400px; + padding: 6px; + } + table.testResults tr.good { + display: none; + border: none; + } + table.testResults tr.good td { + color: green; + } + + table.testResults tr.warning { + border: none; + } + table.testResults tr.warning td { + color: #ef7f24; + } + table.testResults tr.error { + border: none; + } + table.testResult tr.error { + color: red; + } + +h5.requirement { + padding: 10px; + background: #f1f1f1; + border: 1px solid #ccc; + border-width: 0 1px 1px 1px; + margin: 0; +} + h5.requirement span { + float: right; + } + h5.requirement.good { + color: #359318; + } + h5.requirement.warning { + color: #cb6a1c; + } + h5.requirement.error { + color: #F03838; + } + h5.requirement a { + font-size: 9px; + float: right; + line-height: 19px; + margin: 0 0 0 30px; + color: #666; + text-decoration: none; + font-weight: normal; + } .clear { clear: both; } @@ -127,26 +175,19 @@ table.testResults { margin-bottom: 0; } -.helpText { +#Layout .helpText { float: right; - padding-right: 40px; - width: 290px; - margin-bottom: 0; + width: 330px; + padding-right: 90px; } .section { - float: left; overflow: hidden; } .fields { float: left; - margin-right: 20px; -} - -#localeHelp, -#localeSection { - height: 15em; + width: 330px; } #devHelp, @@ -198,7 +239,8 @@ table.testResults { .databaseError { clear:both; overflow: hidden; - width: 250px; + width: 290px; + line-height: 1.2; margin: 10px; margin-bottom: 0; display: none; @@ -210,4 +252,4 @@ table.testResults { .databaseError ul, .databaseError li { margin-left: 0; padding-left: 0; - } \ No newline at end of file + } diff --git a/dev/install/install.js b/dev/install/install.js index afb2c3ae5..fe281a2b4 100644 --- a/dev/install/install.js +++ b/dev/install/install.js @@ -31,9 +31,28 @@ $(document).ready(function() { */ $('#ReIn').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('See All Requirements'); + } + else { + // show the requirements. + $(this).parents('h5').next('table.testResults').find('.good').show(); + $(this).text('Hide All Requirements'); + } + + return false; + }); }); \ No newline at end of file