From f2af056789f0f89301a3e9efdaee34df1721d9db Mon Sep 17 00:00:00 2001
From: droplet <droplet@591932.no-reply.drupal.org>
Date: Fri, 25 May 2012 06:08:54 +0800
Subject: [PATCH] css clean up

---
 core/includes/unicode.inc                |    2 +-
 core/modules/color/color.install         |    5 +---
 core/modules/file/file.install           |    7 ------
 core/modules/image/image.install         |    5 +---
 core/modules/openid/openid.install       |    1 -
 core/modules/system/system.admin-rtl.css |    3 --
 core/modules/system/system.admin.css     |   30 +++++++++++++-------------
 core/modules/system/system.admin.inc     |   33 ++++++++++++++++++++---------
 core/modules/system/system.install       |    5 +--
 core/themes/seven/style.css              |    6 +---
 10 files changed, 45 insertions(+), 52 deletions(-)

diff --git a/core/includes/unicode.inc b/core/includes/unicode.inc
index 1450b43..1eedf25 100644
--- a/core/includes/unicode.inc
+++ b/core/includes/unicode.inc
@@ -138,7 +138,7 @@ function unicode_requirements() {
   );
   $severities = array(
     UNICODE_SINGLEBYTE => REQUIREMENT_WARNING,
-    UNICODE_MULTIBYTE => REQUIREMENT_OK,
+    UNICODE_MULTIBYTE => NULL,
     UNICODE_ERROR => REQUIREMENT_ERROR,
   );
   list($library, $description) = _unicode_check();
diff --git a/core/modules/color/color.install b/core/modules/color/color.install
index a1879f9..c3f9a74 100644
--- a/core/modules/color/color.install
+++ b/core/modules/color/color.install
@@ -20,10 +20,7 @@ function color_requirements($phase) {
       );
 
       // Check for PNG support.
-      if (function_exists('imagecreatefrompng')) {
-        $requirements['color_gd']['severity'] = REQUIREMENT_OK;
-      }
-      else {
+      if (!function_exists('imagecreatefrompng')) {
         $requirements['color_gd']['severity'] = REQUIREMENT_WARNING;
         $requirements['color_gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Check the <a href="@url">PHP image documentation</a> for information on how to correct this.', array('@url' => 'http://www.php.net/manual/ref.image.php'));
       }
diff --git a/core/modules/file/file.install b/core/modules/file/file.install
index dff930b..49fc458 100644
--- a/core/modules/file/file.install
+++ b/core/modules/file/file.install
@@ -60,36 +60,29 @@ function file_requirements($phase) {
     if (!$apache) {
       $value = t('Not enabled');
       $description = t('Your server is not capable of displaying file upload progress. File upload progress requires an Apache server running PHP with mod_php.');
-      $severity = REQUIREMENT_INFO;
     }
     elseif ($fastcgi) {
       $value = t('Not enabled');
       $description = t('Your server is not capable of displaying file upload progress. File upload progress requires PHP be run with mod_php and not as FastCGI.');
-      $severity = REQUIREMENT_INFO;
     }
     elseif (!$implementation && extension_loaded('apc')) {
       $value = t('Not enabled');
       $description = t('Your server is capable of displaying file upload progress through APC, but it is not enabled. Add <code>apc.rfc1867 = 1</code> to your php.ini configuration. Alternatively, it is recommended to use <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress</a>, which supports more than one simultaneous upload.');
-      $severity = REQUIREMENT_INFO;
     }
     elseif (!$implementation) {
       $value = t('Not enabled');
       $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress library</a> (preferred) or to install <a href="http://php.net/apc">APC</a>.');
-      $severity = REQUIREMENT_INFO;
     }
     elseif ($implementation == 'apc') {
       $value = t('Enabled (<a href="http://php.net/manual/apc.configuration.php#ini.apc.rfc1867">APC RFC1867</a>)');
       $description = t('Your server is capable of displaying file upload progress using APC RFC1867. Note that only one upload at a time is supported. It is recommended to use the <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress library</a> if possible.');
-      $severity = REQUIREMENT_OK;
     }
     elseif ($implementation == 'uploadprogress') {
       $value = t('Enabled (<a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress</a>)');
-      $severity = REQUIREMENT_OK;
     }
     $requirements['file_progress'] = array(
       'title' => t('Upload progress'),
       'value' => $value,
-      'severity' => $severity,
       'description' => $description,
     );
   }
diff --git a/core/modules/image/image.install b/core/modules/image/image.install
index 91349a9..735e007 100644
--- a/core/modules/image/image.install
+++ b/core/modules/image/image.install
@@ -86,10 +86,7 @@ function image_requirements($phase) {
       );
 
       // Check for filter and rotate support.
-      if (function_exists('imagefilter') && function_exists('imagerotate')) {
-        $requirements['image_gd']['severity'] = REQUIREMENT_OK;
-      }
-      else {
+      if (!function_exists('imagefilter') || !function_exists('imagerotate')) {
         $requirements['image_gd']['severity'] = REQUIREMENT_WARNING;
         $requirements['image_gd']['description'] = t('The GD Library for PHP is enabled, but was compiled without support for functions used by the rotate and desaturate effects. It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See <a href="http://www.php.net/manual/book.image.php">the PHP manual</a>.');
       }
diff --git a/core/modules/openid/openid.install b/core/modules/openid/openid.install
index d348043..3753f17 100644
--- a/core/modules/openid/openid.install
+++ b/core/modules/openid/openid.install
@@ -108,7 +108,6 @@ function openid_requirements($phase) {
     else {
       $requirements['openid_math'] = array(
         'value' => t('Installed'),
-        'severity' => REQUIREMENT_OK,
       );
     }
     $requirements['openid_math']['title'] = t('OpenID Math library');
diff --git a/core/modules/system/system.admin-rtl.css b/core/modules/system/system.admin-rtl.css
index e597e63..d7553b5 100644
--- a/core/modules/system/system.admin-rtl.css
+++ b/core/modules/system/system.admin-rtl.css
@@ -36,9 +36,6 @@ table.system-status-report td.status-icon {
   padding-left: 0;
   padding-right: 6px;
 }
-table.system-status-report tr.merge-up td {
-  padding: 0 28px 8px 6px;
-}
 
 /**
  * Appearance page.
diff --git a/core/modules/system/system.admin.css b/core/modules/system/system.admin.css
index 0f3c0e5..48d23d9 100644
--- a/core/modules/system/system.admin.css
+++ b/core/modules/system/system.admin.css
@@ -97,35 +97,35 @@ a.module-link-configure {
 /**
  * Status report.
  */
-table.system-status-report td {
+.system-status-report td,
+.system-status-report th{
   padding: 6px;
-  vertical-align: middle;
+  vertical-align: top;
 }
-table.system-status-report tr.merge-up td {
-  padding: 0 6px 8px 28px; /* LTR */
+.system-status-report th {
+  border-bottom: none;
+  width: 25%;
 }
-table.system-status-report td.status-icon {
+.system-status-report td.status-icon {
   width: 16px;
   padding-right: 0; /* LTR */
 }
-table.system-status-report td.status-icon div {
+.system-status-report .status-icon {
   background-repeat: no-repeat;
+  float: left;
   height: 16px;
   width: 16px;
+  padding-right: 6px;
 }
-table.system-status-report tr.error td.status-icon div {
+.system-status-report .error .status-icon {
   background-image: url(../../misc/message-16-error.png);
 }
-table.system-status-report tr.warning td.status-icon div {
+.system-status-report .warning .status-icon {
   background-image: url(../../misc/message-16-warning.png);
 }
-tr.merge-down,
-tr.merge-down td {
-  border-bottom-width: 0 !important;
-}
-tr.merge-up,
-tr.merge-up td {
-  border-top-width: 0 !important;
+.system-status-report .status-title {
+  display: block;
+  overflow: hidden;
 }
 
 /**
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index f3e2012..5041517 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -2508,25 +2508,38 @@ function theme_status_report($variables) {
       'class' => 'error',
     ),
   );
-  $output = '<table class="system-status-report">';
+  $output = '<table class="system-status-report"><tbody>';
 
   foreach ($requirements as $requirement) {
     if (empty($requirement['#type'])) {
-      $severity = $severities[isset($requirement['severity']) ? (int) $requirement['severity'] : 0];
-      $severity['icon'] = '<div title="' . $severity['title'] . '"><span class="element-invisible">' . $severity['title'] . '</span></div>';
-
-      // Output table row(s)
-      if (!empty($requirement['description'])) {
-        $output .= '<tr class="' . $severity['class'] . ' merge-down"><td class="status-icon">' . $severity['icon'] . '</td><td class="status-title">' . $requirement['title'] . '</td><td class="status-value">' . $requirement['value'] . '</td></tr>';
-        $output .= '<tr class="' . $severity['class'] . ' merge-up"><td colspan="3" class="status-description">' . $requirement['description'] . '</td></tr>';
+      // Always use the explicit requirement severity, if defined. Otherwise,
+      // default to REQUIREMENT_OK in the installer to visually confirm that
+      // installation requirements are met. And default to REQUIREMENT_INFO to
+      // denote neutral information without special visualization.
+      if (isset($requirement['severity'])) {
+        $severity = $severities[(int) $requirement['severity']];
+      }
+      elseif (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') {
+        $severity = $severities[REQUIREMENT_OK];
       }
       else {
-        $output .= '<tr class="' . $severity['class'] . '"><td class="status-icon">' . $severity['icon'] . '</td><td class="status-title">' . $requirement['title'] . '</td><td class="status-value">' . $requirement['value'] . '</td></tr>';
+        $severity = $severities[REQUIREMENT_INFO];
+      }
+
+      $severity['icon'] = '<div class="status-icon" title="' . $severity['title'] . '"><span class="element-invisible">' . $severity['title'] . '</span></div>';
+
+      // Output table rows.
+      $output .= '<tr class="' . $severity['class'] . '">';
+      $output .= '<th>' . $severity['icon'] . '<span class="status-title">'. $requirement['title'] . '</span></th>';
+      $output .= '<td class="status-value">' . $requirement['value'];
+      if (!empty($requirement['description'])) {
+        $output .= '<div class="description">' . $requirement['description'] . '</div>';
       }
+      $output .= '</td></tr>';
     }
   }
 
-  $output .= '</table>';
+  $output .= '</tbody></table>';
   return $output;
 }
 
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 199f8c0..f967bb6 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -268,7 +268,7 @@ function system_requirements($phase) {
     }
 
     // Determine severity based on time since cron last ran.
-    $severity = REQUIREMENT_OK;
+    $severity = REQUIREMENT_INFO;
     if (REQUEST_TIME - $cron_last > $threshold_error) {
       $severity = REQUIREMENT_ERROR;
     }
@@ -279,7 +279,7 @@ function system_requirements($phase) {
     // Set summary and description based on values determined above.
     $summary = $t('Last run !time ago', array('!time' => format_interval(REQUEST_TIME - $cron_last)));
     $description = '';
-    if ($severity != REQUIREMENT_OK) {
+    if ($severity != REQUIREMENT_INFO) {
       $description = $t('Cron has not run recently.') . ' ' . $help;
     }
 
@@ -385,7 +385,6 @@ function system_requirements($phase) {
   if ($phase == 'runtime') {
     $requirements['update'] = array(
       'title' => $t('Database updates'),
-      'severity' => REQUIREMENT_OK,
       'value' => $t('Up to date'),
     );
 
diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css
index a3d6773..380aec8 100644
--- a/core/themes/seven/style.css
+++ b/core/themes/seven/style.css
@@ -499,6 +499,7 @@ table tr.selected td {
   background: #ffc;
   border-color: #eeb;
 }
+
 table.system-status-report tr {
   border-bottom: 1px solid #ccc;
 }
@@ -506,10 +507,6 @@ table.system-status-report tr.ok {
   color: #255b1e;
   background-color: #e5ffe2;
 }
-table.system-status-report tr.info {
-  color: #040f37;
-  background-color: #bdf;
-}
 table.system-status-report tr.warning {
   color: #840;
   background-color: #fffce5;
@@ -518,6 +515,7 @@ table.system-status-report tr.error {
   color: #8c2e0b;
   background-color: #fef5f1;
 }
+
 /**
  * Exception for webkit bug with the right border of the last cell
  * in some tables, since it's webkit only, we can use :last-child
-- 
1.7.8.2

