diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-12-03 15:00:02 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-12-03 15:00:02 +0000 |
commit | 17519d3ea0be83e05f32f0618a066b660f9a1b51 (patch) | |
tree | 048b386f74fd1ac8a48f17e4ccef053e70973ab7 | |
parent | 4fc259d78d4775679b3d961d795208c348a6592f (diff) | |
download | brdo-17519d3ea0be83e05f32f0618a066b660f9a1b51.tar.gz brdo-17519d3ea0be83e05f32f0618a066b660f9a1b51.tar.bz2 |
- Patch 0178 by eafarris: moved the watchdog colors to CSS so they are themeable.
-rw-r--r-- | misc/drupal.css | 19 | ||||
-rw-r--r-- | modules/watchdog.module | 17 | ||||
-rw-r--r-- | modules/watchdog/watchdog.module | 17 |
3 files changed, 33 insertions, 20 deletions
diff --git a/misc/drupal.css b/misc/drupal.css index 9bcf56b4d..0121ba412 100644 --- a/misc/drupal.css +++ b/misc/drupal.css @@ -306,3 +306,22 @@ pre, code { list-style-type: square; list-style-image: url(menu-leaf.gif); } +td.watchdog-user { + background: #ffeeaa; +} +td.watchdog-message { + background: #ffffff; +} +td.watchdog-special { + background: #a49fff; +} +td.watchdog-warning { + background: #ffaa22; +} +td.watchdog-httpd { + background: #99dd99; +} +td.watchdog-error { + background: #ee4c4c; +} + diff --git a/modules/watchdog.module b/modules/watchdog.module index 44332e703..b03e75802 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -72,7 +72,6 @@ function watchdog_cron() { } function watchdog_overview($type) { - $color = array("user" => "#FFEEAA", "message" => "#FFFFFF", "special" => "#A49FFF", "warning" => "#FFAA22", "httpd" => "#99DD99", "error" => "#EE4C4C"); $query = array("user" => "WHERE type = 'user'", "regular" => "WHERE type = 'message'", "special" => "WHERE type = 'special'", "warning" => "WHERE type = 'warning'", "error" => "WHERE type = 'error'", "httpd" => "WHERE type = 'httpd'", "actions" => "WHERE link != ''"); $header = array( @@ -86,15 +85,13 @@ function watchdog_overview($type) { $result = pager_query($sql, 50); while ($watchdog = db_fetch_object($result)) { - if ($background = $color[$watchdog->type]) { - $rows[] = array( - array("data" => format_date($watchdog->timestamp, "small"), "style" => "background-color: $background"), - array("data" => substr(strip_tags($watchdog->message), 0, 64), "style" => "background-color: $background"), - array("data" => format_name($watchdog), "style" => "background-color: $background"), - array("data" => $watchdog->link, "style" => "background-color: $background"), - array("data" => l(t("view details"), "admin/watchdog/view/$watchdog->wid"), "style" => "background-color: $background") - ); - } + $rows[] = array( + array("data" => format_date($watchdog->timestamp, "small"), "class" => "watchdog-$watchdog->type"), + array("data" => substr(strip_tags($watchdog->message), 0, 64), "class" => "watchdog-$watchdog->type"), + array("data" => format_name($watchdog), "class" => "watchdog-$watchdog->type"), + array("data" => $watchdog->link, "class" => "watchdog-$watchdog->type"), + array("data" => l(t("view details"), "admin/watchdog/view/$watchdog->wid"), "class" => "watchdog-$watchdog->type") + ); } if (!$rows) { diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 44332e703..b03e75802 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -72,7 +72,6 @@ function watchdog_cron() { } function watchdog_overview($type) { - $color = array("user" => "#FFEEAA", "message" => "#FFFFFF", "special" => "#A49FFF", "warning" => "#FFAA22", "httpd" => "#99DD99", "error" => "#EE4C4C"); $query = array("user" => "WHERE type = 'user'", "regular" => "WHERE type = 'message'", "special" => "WHERE type = 'special'", "warning" => "WHERE type = 'warning'", "error" => "WHERE type = 'error'", "httpd" => "WHERE type = 'httpd'", "actions" => "WHERE link != ''"); $header = array( @@ -86,15 +85,13 @@ function watchdog_overview($type) { $result = pager_query($sql, 50); while ($watchdog = db_fetch_object($result)) { - if ($background = $color[$watchdog->type]) { - $rows[] = array( - array("data" => format_date($watchdog->timestamp, "small"), "style" => "background-color: $background"), - array("data" => substr(strip_tags($watchdog->message), 0, 64), "style" => "background-color: $background"), - array("data" => format_name($watchdog), "style" => "background-color: $background"), - array("data" => $watchdog->link, "style" => "background-color: $background"), - array("data" => l(t("view details"), "admin/watchdog/view/$watchdog->wid"), "style" => "background-color: $background") - ); - } + $rows[] = array( + array("data" => format_date($watchdog->timestamp, "small"), "class" => "watchdog-$watchdog->type"), + array("data" => substr(strip_tags($watchdog->message), 0, 64), "class" => "watchdog-$watchdog->type"), + array("data" => format_name($watchdog), "class" => "watchdog-$watchdog->type"), + array("data" => $watchdog->link, "class" => "watchdog-$watchdog->type"), + array("data" => l(t("view details"), "admin/watchdog/view/$watchdog->wid"), "class" => "watchdog-$watchdog->type") + ); } if (!$rows) { |