From b56b6e3614b90a29a89300666801ad558e6f346b Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 1 Sep 2011 21:40:20 +0100 Subject: [PATCH 01/12] Making error messages look a bit fancier. --- app/webroot/css/cake.generic.css | 44 ++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index 8d81bfce9..e3c947602 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -343,15 +343,51 @@ div.message { background: #c73e14; padding: 5px; } + +.notice, +.error, +div.error-message { + background: #ffcc00; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800)); + background-image: -moz-linear-gradient(top, #ffcc00, #E6B800); + background-image: -ms-linear-gradient(top, #ffcc00, #E6B800); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffcc00), color-stop(100%, #E6B800)); + background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800); + background-image: -o-linear-gradient(top, #ffcc00, #E6B800); + background-image: linear-gradient(top, #ffcc00, #E6B800); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + border: 1px solid rgba(0, 0, 0, 0.2); + margin-bottom: 18px; + padding: 7px 14px; + color: #404040; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + border-width: 1px; + border-style: solid; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); +} +p.error, div.error-message { clear: both; color: #fff; font-weight: bold; - background: #c73e14; + border: 1px solid rgba(0, 0, 0, 0.5); + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35)); + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(top, #ee5f5b, #c43c35); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); } p.error { - background-color: #e32; - color: #fff; font-family: Courier, monospace; font-size: 120%; line-height: 140%; @@ -359,12 +395,10 @@ p.error { margin: 1em 0; } p.error em { - color: #000; font-weight: normal; line-height: 140%; } .notice { - background: #ffcc00; color: #000; display: block; font-family: Courier, monospace; From ec9d29fca52a86d732f7fa5105cd0a5c5af5ad83 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 1 Sep 2011 21:44:19 +0100 Subject: [PATCH 02/12] Removing the trailing ?> from the suggested error code text. --- lib/Cake/View/Errors/missing_action.ctp | 1 - lib/Cake/View/Errors/missing_behavior_class.ctp | 1 - lib/Cake/View/Errors/missing_behavior_file.ctp | 1 - lib/Cake/View/Errors/missing_component_class.ctp | 1 - lib/Cake/View/Errors/missing_component_file.ctp | 1 - lib/Cake/View/Errors/missing_controller.ctp | 1 - lib/Cake/View/Errors/missing_helper_class.ctp | 1 - lib/Cake/View/Errors/missing_helper_file.ctp | 1 - lib/Cake/View/Errors/missing_plugin.ctp | 2 +- lib/Cake/View/Errors/scaffold_error.ctp | 2 +- 10 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/Cake/View/Errors/missing_action.ctp b/lib/Cake/View/Errors/missing_action.ctp index b85413f47..893b62ebc 100644 --- a/lib/Cake/View/Errors/missing_action.ctp +++ b/lib/Cake/View/Errors/missing_action.ctp @@ -34,7 +34,6 @@ class extends AppController { } } -?>

: diff --git a/lib/Cake/View/Errors/missing_behavior_class.ctp b/lib/Cake/View/Errors/missing_behavior_class.ctp index 2860e5881..10e9f92f3 100644 --- a/lib/Cake/View/Errors/missing_behavior_class.ctp +++ b/lib/Cake/View/Errors/missing_behavior_class.ctp @@ -30,7 +30,6 @@ class extends ModelBehavior { } -?>

: diff --git a/lib/Cake/View/Errors/missing_behavior_file.ctp b/lib/Cake/View/Errors/missing_behavior_file.ctp index 5559103bb..8a02602c7 100644 --- a/lib/Cake/View/Errors/missing_behavior_file.ctp +++ b/lib/Cake/View/Errors/missing_behavior_file.ctp @@ -30,7 +30,6 @@ class extends ModelBehavior { } -?>

: diff --git a/lib/Cake/View/Errors/missing_component_class.ctp b/lib/Cake/View/Errors/missing_component_class.ctp index 9ed5a31a7..42d810b7b 100644 --- a/lib/Cake/View/Errors/missing_component_class.ctp +++ b/lib/Cake/View/Errors/missing_component_class.ctp @@ -30,7 +30,6 @@ class extends Component {
} -?>

: diff --git a/lib/Cake/View/Errors/missing_component_file.ctp b/lib/Cake/View/Errors/missing_component_file.ctp index cbf44c608..b67254a6d 100644 --- a/lib/Cake/View/Errors/missing_component_file.ctp +++ b/lib/Cake/View/Errors/missing_component_file.ctp @@ -30,7 +30,6 @@ class extends Component {
} -?>

: diff --git a/lib/Cake/View/Errors/missing_controller.ctp b/lib/Cake/View/Errors/missing_controller.ctp index 7cd0a6960..e695d5fd8 100644 --- a/lib/Cake/View/Errors/missing_controller.ctp +++ b/lib/Cake/View/Errors/missing_controller.ctp @@ -30,7 +30,6 @@ class extends AppController { } -?>

: diff --git a/lib/Cake/View/Errors/missing_helper_class.ctp b/lib/Cake/View/Errors/missing_helper_class.ctp index 1d368c929..3a996f0c3 100644 --- a/lib/Cake/View/Errors/missing_helper_class.ctp +++ b/lib/Cake/View/Errors/missing_helper_class.ctp @@ -30,7 +30,6 @@ class extends AppHelper { } -?>

: diff --git a/lib/Cake/View/Errors/missing_helper_file.ctp b/lib/Cake/View/Errors/missing_helper_file.ctp index 2f9188756..9b3909a90 100644 --- a/lib/Cake/View/Errors/missing_helper_file.ctp +++ b/lib/Cake/View/Errors/missing_helper_file.ctp @@ -30,7 +30,6 @@ class extends AppHelper { } -?>

: diff --git a/lib/Cake/View/Errors/missing_plugin.ctp b/lib/Cake/View/Errors/missing_plugin.ctp index 608e743e2..1f3bea69a 100644 --- a/lib/Cake/View/Errors/missing_plugin.ctp +++ b/lib/Cake/View/Errors/missing_plugin.ctp @@ -28,7 +28,7 @@

 <?php
 CakePlugin::load('');
-?>
+
 

: diff --git a/lib/Cake/View/Errors/scaffold_error.ctp b/lib/Cake/View/Errors/scaffold_error.ctp index 9418698d9..f934ad798 100644 --- a/lib/Cake/View/Errors/scaffold_error.ctp +++ b/lib/Cake/View/Errors/scaffold_error.ctp @@ -30,7 +30,7 @@ function _scaffoldError() {
} -?> + element('exception_stack_trace'); ?> From c36bc1e6c1b4ecf204f52a19bddc193afe72e85f Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 1 Sep 2011 22:54:28 +0100 Subject: [PATCH 03/12] Adding more fancy CSS3 styling. --- app/webroot/css/cake.generic.css | 175 +++++++++++++++++++++---------- 1 file changed, 117 insertions(+), 58 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index e3c947602..d606a64ca 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -158,7 +158,7 @@ table tr td { border-bottom:1px solid #ddd; } table tr:nth-child(even) { - background: #f5f5f5; + background: #f9f9f9; } td.actions { text-align: center; @@ -168,6 +168,8 @@ table td.actions a { margin: 0px 6px; padding:2px 5px; } + +/* SQL log */ .cake-sql-log { background: #fff; } @@ -321,38 +323,56 @@ input[type=submit] { } form .submit input[type=submit] { background:#62af56; - background: -webkit-gradient(linear, left top, left bottom, from(#a8ea9c), to(#62af56)); - background-image: -moz-linear-gradient(top, #a8ea9c, #62af56); + background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230); + background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); border-color: #2d6324; - color: #000; - text-shadow: #8cee7c 0px 1px 0px; + color: #fff; + text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; } form .submit input[type=submit]:hover { - background:#4ca83d; - background: -webkit-gradient(linear, left top, left bottom, from(#85e573), to(#4ca83d)); - background-image: -moz-linear-gradient(top, #85e573, #4ca83d); + background: #4ca83d; + background-image: -webkit-linear-gradient(top, #62af56, #286E1E); + background-image: -moz-linear-gradient(top, #62af56, #286E1E); +} +/* Form errors */ +form .error { + background: #FFDACC; + border-radius: 5px; + font-weight: normal; +} +form .error-message { + border-radius: none; + border: none; + background: none; + margin: 0; + padding-left: 4px; + padding-right: 0; +} +form .error, +form .error-message { + color: #9E2424; } /** Notices and Errors **/ -div.message { +.message { clear: both; color: #fff; font-size: 140%; font-weight: bold; margin: 0 0 1em 0; - background: #c73e14; padding: 5px; } +.success, +.message, +.cake-debug, .notice, -.error, -div.error-message { +p.error, +.error-message { background: #ffcc00; background-repeat: repeat-x; - background-image: -khtml-gradient(linear, left top, left bottom, from(#ffcc00), to(#E6B800)); background-image: -moz-linear-gradient(top, #ffcc00, #E6B800); background-image: -ms-linear-gradient(top, #ffcc00, #E6B800); - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffcc00), color-stop(100%, #E6B800)); background-image: -webkit-linear-gradient(top, #ffcc00, #E6B800); background-image: -o-linear-gradient(top, #ffcc00, #E6B800); background-image: linear-gradient(top, #ffcc00, #E6B800); @@ -362,8 +382,6 @@ div.error-message { padding: 7px 14px; color: #404040; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - border-width: 1px; - border-style: solid; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; @@ -371,26 +389,36 @@ div.error-message { -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); } +.success, +.message, +.cake-debug, p.error, -div.error-message { +.error-message { clear: both; color: #fff; - font-weight: bold; border: 1px solid rgba(0, 0, 0, 0.5); background-repeat: repeat-x; - background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35)); background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35)); background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(top, #ee5f5b, #c43c35); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); } +.success { + clear: both; + color: #fff; + border: 1px solid rgba(0, 0, 0, 0.5); + background-repeat: repeat-x; + background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); + background-image: -ms-linear-gradient(top, #76BF6B, #3B8230); + background-image: -o-linear-gradient(top, #76BF6B, #3B8230); + background-image: linear-gradient(top, #76BF6B, #3B8230); + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3); +} p.error { - font-family: Courier, monospace; + font-family: Monaco, Consolas, Courier, monospace; font-size: 120%; - line-height: 140%; padding: 0.8em; margin: 1em 0; } @@ -401,14 +429,11 @@ p.error em { .notice { color: #000; display: block; - font-family: Courier, monospace; font-size: 120%; - line-height: 140%; padding: 0.8em; margin: 1em 0; } .success { - background: green; color: #fff; } @@ -432,28 +457,45 @@ div.actions ul li a:hover { text-decoration: underline; } +/* Buttons and button links */ input[type=submit], div.actions ul li a, td.actions a { font-weight:normal; padding: 4px 8px; background:#e6e49f; - background: -webkit-gradient(linear, left top, left bottom, from(#f1f1d4), to(#e6e49f)); - background-image: -moz-linear-gradient(top, #f1f1d4, #e6e49f); + background-image: -webkit-linear-gradient(top, #fefefe, #dedede); + background-image: -moz-linear-gradient(top, #fefefe, #dedede); + background-image: -ms-linear-gradient(top, #fefefe, #dedede); + background-image: -o-linear-gradient(top, #fefefe, #dedede); + background-image: linear-gradient(top, #fefefe, #dedede); color:#333; - border:1px solid #aaac62; - -webkit-border-radius:8px; - -moz-border-radius:8px; - border-radius:8px; + border:1px solid #bbb; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; text-decoration:none; text-shadow: #fff 0px 1px 0px; min-width: 0; + -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2); + box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2); } input[type=submit]:hover, div.actions ul li a:hover, td.actions a:hover { - background: #f0f09a; - background: -webkit-gradient(linear, left top, left bottom, from(#f7f7e1), to(#eeeca9)); + background: #fefefe; + background-image: -webkit-linear-gradient(top, #dfdfdf, #eee); + background-image: -moz-linear-gradient(left top, left bottom, #fafafa, #fefefe); + background-image: -ms-linear-gradient(left top, left bottom, #fafafa, #fefefe); + background-image: -o-linear-gradient(left top, left bottom, #fafafa, #fefefe); + background-image: linear-gradient(left top, left bottom, #fafafa, #fefefe); + text-shadow: #eee 0px 1px 0px; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); + border-color: #aaa; + text-decoration: none; } /** Related **/ @@ -466,38 +508,55 @@ div.related { pre { color: #000; background: #f0f0f0; - padding: 1em; + padding: 15px; + box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); } -pre.cake-debug { - background: #ffcc00; +.cake-debug { font-size: 120%; line-height: 140%; margin-top: 1em; - overflow: auto; position: relative; + white-space: normal; } -div.cake-stack-trace { - background: #fff; +.cake-stack-trace { + background: rgba(255, 255, 255, 0.7); color: #333; - margin: 0px; - padding: 6px; + margin: 10px 0 0 0; + padding: 10px; font-size: 120%; line-height: 140%; overflow: auto; position: relative; + border-radius: 5px; } -div.cake-code-dump pre { +.cake-stack-trace a { + text-shadow: none; + background: rgba(255, 255, 255, 0.7); + padding: 5px; + border-radius: 10px; + margin: 0px 4px 10px 2px; + font-family: sans-serif; + font-size: 14px; + line-height: 14px; + display: inline-block; + text-decoration: none; + box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); +} +.cake-code-dump pre { position: relative; overflow: auto; } -div.cake-stack-trace pre, div.cake-code-dump pre { +.cake-stack-trace pre, +.cake-code-dump pre { color: #000; background-color: #F0F0F0; margin: 0px; padding: 1em; overflow: auto; + text-shadow: none; } -div.cake-code-dump pre, div.cake-code-dump pre code { +.cake-code-dump pre, +.cake-code-dump pre code { clear: both; font-size: 12px; line-height: 15px; @@ -505,25 +564,25 @@ div.cake-code-dump pre, div.cake-code-dump pre code { padding: 4px; overflow: auto; } -div.cake-code-dump span.code-highlight { +.cake-code-dump span.code-highlight { background-color: #ff0; padding: 4px; } -div.code-coverage-results div.code-line { +.code-coverage-results div.code-line { padding-left:5px; display:block; margin-left:10px; } -div.code-coverage-results div.uncovered span.content { +.code-coverage-results div.uncovered span.content { background:#ecc; } -div.code-coverage-results div.covered span.content { +.code-coverage-results div.covered span.content { background:#cec; } -div.code-coverage-results div.ignored span.content { +.code-coverage-results div.ignored span.content { color:#aaa; } -div.code-coverage-results span.line-num { +.code-coverage-results span.line-num { color:#666; display:block; float:left; @@ -531,37 +590,37 @@ div.code-coverage-results span.line-num { text-align:right; margin-right:5px; } -div.code-coverage-results span.line-num strong { +.code-coverage-results span.line-num strong { color:#666; } -div.code-coverage-results div.start { +.code-coverage-results div.start { border:1px solid #aaa; border-width:1px 1px 0px 1px; margin-top:30px; padding-top:5px; } -div.code-coverage-results div.end { +.code-coverage-results div.end { border:1px solid #aaa; border-width:0px 1px 1px 1px; margin-bottom:30px; padding-bottom:5px; } -div.code-coverage-results div.realstart { +.code-coverage-results div.realstart { margin-top:0px; } -div.code-coverage-results p.note { +.code-coverage-results p.note { color:#bbb; padding:5px; margin:5px 0 10px; font-size:10px; } -div.code-coverage-results span.result-bad { +.code-coverage-results span.result-bad { color: #a00; } -div.code-coverage-results span.result-ok { +.code-coverage-results span.result-ok { color: #fa0; } -div.code-coverage-results span.result-good { +.code-coverage-results span.result-good { color: #0a0; } From 35024c02d007e06240dd66e4f419df6bb335a1f0 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 00:44:29 +0100 Subject: [PATCH 04/12] Starting on pagination button refresh. --- app/webroot/css/cake.generic.css | 36 ++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index d606a64ca..f4253f5cc 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -183,21 +183,44 @@ table td.actions a { } /** Paging **/ -div.paging { +.paging { background:#fff; color: #ccc; margin-top: 1em; clear:both; } -div.paging span.disabled { +.paging .current, +.paging .disabled, +.paging a { + text-decoration: none; + padding: 5px 8px; + display: inline-block +} +.paging > span { + display: inline-block; + border: 1px solid #ccc; + border-left: 0; +} +.paging > span:hover { + background: #efefef; +} +.paging .prev { + border-left: 1px solid #ccc; + border-radius: 5px 0 0 5px; +} +.paging .next { + border-radius: 0 5px 5px 0; +} +.paging .disabled { color: #ddd; - display: inline; } -div.paging span.current { +.paging .disabled:hover { + background: transparent; +} +.paging .current { + background: #efefef; color: #c73e14; } -div.paging span a { -} /** Scaffold View **/ dl { @@ -328,6 +351,7 @@ form .submit input[type=submit] { border-color: #2d6324; color: #fff; text-shadow: rgba(0, 0, 0, 0.5) 0px -1px 0px; + padding: 8px 10px; } form .submit input[type=submit]:hover { background: #4ca83d; From 815b78c2f9e2cd60a1a21dd124deb654995c0fed Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 09:23:46 +0100 Subject: [PATCH 05/12] More tweaks to the error output and headings. Removing extra | from debugger output. --- app/webroot/css/cake.generic.css | 25 ++++++++++++++++--------- lib/Cake/Utility/Debugger.php | 6 +++--- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index f4253f5cc..6e69edb28 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -56,7 +56,7 @@ h2 { font-size: 190%; } h3 { - color: #993; + color: #2c6877; font-family:'Gill Sans','lucida grande', helvetica, arial, sans-serif; font-size: 165%; } @@ -434,6 +434,7 @@ p.error, color: #fff; border: 1px solid rgba(0, 0, 0, 0.5); background-repeat: repeat-x; + background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230); background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); background-image: -ms-linear-gradient(top, #76BF6B, #3B8230); background-image: -o-linear-gradient(top, #76BF6B, #3B8230); @@ -542,11 +543,14 @@ pre { position: relative; white-space: normal; } +.cake-debug > a { + text-shadow: none; +} .cake-stack-trace { background: rgba(255, 255, 255, 0.7); color: #333; - margin: 10px 0 0 0; - padding: 10px; + margin: 10px 0 5px 0; + padding: 10px 10px 0 10px; font-size: 120%; line-height: 140%; overflow: auto; @@ -570,15 +574,18 @@ pre { position: relative; overflow: auto; } -.cake-stack-trace pre, -.cake-code-dump pre { +.cake-context { + margin-bottom: 10px; +} +.cake-stack-trace pre { color: #000; background-color: #F0F0F0; - margin: 0px; + margin: 0px 0 10px 0; padding: 1em; overflow: auto; text-shadow: none; } +/* excerpt */ .cake-code-dump pre, .cake-code-dump pre code { clear: both; @@ -588,9 +595,9 @@ pre { padding: 4px; overflow: auto; } -.cake-code-dump span.code-highlight { - background-color: #ff0; - padding: 4px; +.cake-code-dump .code-highlight { + display: block; + background-color: rgba(255, 255, 0, 0.5); } .code-coverage-results div.code-line { padding-left:5px; diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index 815be8b21..d7f0cc5ea 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -146,8 +146,8 @@ class Debugger { $this->_templates['js']['context'] = '

_templates['js']['context'] .= 'style="display: none;">{:context}
'; - $this->_templates['js']['code'] = '
_templates['js']['code'] .= 'style="display: none;">
{:code}
'; + $this->_templates['js']['code'] = '
_templates['js']['code'] .= 'style="display: none;">{:code}
'; $e = '
{:error} ({:code}) : {:description} ';
 		$e .= '[{:path}, line {:line}]
'; @@ -716,7 +716,7 @@ class Debugger { } $info .= String::insert($tpl[$key], compact($key) + $insert, $insertOpts); } - $links = join(' | ', $links); + $links = join(' ', $links); unset($data['context']); if (isset($tpl['callback']) && is_callable($tpl['callback'])) { return call_user_func($tpl['callback'], $data, compact('links', 'info')); From 8c754889791b82c7c7d5bd00718d003fd5b22813 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 11:51:43 +0100 Subject: [PATCH 06/12] More changes to the CSS, and updating the bake templates and scaffolds. --- app/webroot/css/cake.generic.css | 74 ++++++++++--------- .../Console/Templates/default/views/index.ctp | 10 ++- lib/Cake/View/Scaffolds/index.ctp | 8 +- 3 files changed, 53 insertions(+), 39 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index 6e69edb28..016c8d54e 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -258,7 +258,6 @@ fieldset { padding: 16px 20px; } fieldset legend { - background:#fff; color: #e32; font-size: 160%; font-weight: bold; @@ -354,9 +353,7 @@ form .submit input[type=submit] { padding: 8px 10px; } form .submit input[type=submit]:hover { - background: #4ca83d; - background-image: -webkit-linear-gradient(top, #62af56, #286E1E); - background-image: -moz-linear-gradient(top, #62af56, #286E1E); + background: #5BA150; } /* Form errors */ form .error { @@ -375,6 +372,12 @@ form .error-message { form .error, form .error-message { color: #9E2424; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -ms-box-shadow: none; + -o-box-shadow: none; + box-shadow: none; + text-shadow: none; } /** Notices and Errors **/ @@ -463,68 +466,73 @@ p.error em { } /** Actions **/ -div.actions ul { +.actions ul { margin: 0; padding: 0; } -div.actions li { +.actions li { margin:0 0 0.5em 0; list-style-type: none; white-space: nowrap; padding: 0; } -div.actions ul li a { +.actions ul li a { font-weight: normal; display: block; clear: both; } -div.actions ul li a:hover { - text-decoration: underline; -} /* Buttons and button links */ input[type=submit], -div.actions ul li a, -td.actions a { +.actions ul li a, +.actions a { font-weight:normal; padding: 4px 8px; - background:#e6e49f; - background-image: -webkit-linear-gradient(top, #fefefe, #dedede); - background-image: -moz-linear-gradient(top, #fefefe, #dedede); - background-image: -ms-linear-gradient(top, #fefefe, #dedede); - background-image: -o-linear-gradient(top, #fefefe, #dedede); - background-image: linear-gradient(top, #fefefe, #dedede); + background: #dedede; + background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc); + background-image: -o-linear-gradient(top, #fefefe, #dcdcdc); + background-image: linear-gradient(top, #fefefe, #dcdcdc); color:#333; border:1px solid #bbb; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; - text-decoration:none; + text-decoration: none; text-shadow: #fff 0px 1px 0px; min-width: 0; - -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2); - box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); + -webkit-user-select: none; + user-select: none; } -input[type=submit]:hover, -div.actions ul li a:hover, -td.actions a:hover { +.actions ul li a:hover, +.actions a:hover { + background: #ededed; + border-color: #acacac; + text-decoration: none; +} +input[type=submit]:active, +.actions ul li a:active, +.actions a:active { background: #fefefe; background-image: -webkit-linear-gradient(top, #dfdfdf, #eee); - background-image: -moz-linear-gradient(left top, left bottom, #fafafa, #fefefe); - background-image: -ms-linear-gradient(left top, left bottom, #fafafa, #fefefe); - background-image: -o-linear-gradient(left top, left bottom, #fafafa, #fefefe); - background-image: linear-gradient(left top, left bottom, #fafafa, #fefefe); + background-image: -moz-linear-gradient(top, #dfdfdf, #eee); + background-image: -ms-linear-gradient(top, #dfdfdf, #eee); + background-image: -o-linear-gradient(top, #dfdfdf, #eee); + background-image: linear-gradient(top, #dfdfdf, #eee); text-shadow: #eee 0px 1px 0px; - -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); + -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); + box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3); border-color: #aaa; text-decoration: none; } /** Related **/ -div.related { +.related { clear: both; display: block; } diff --git a/lib/Cake/Console/Templates/default/views/index.ctp b/lib/Cake/Console/Templates/default/views/index.ctp index fdaa5ae50..e78c383e9 100644 --- a/lib/Cake/Console/Templates/default/views/index.ctp +++ b/lib/Cake/Console/Templates/default/views/index.ctp @@ -65,9 +65,13 @@

- Paginator->prev('<< ' . __('previous'), array(), null, array('class'=>'disabled'));?>\n";?> - | Paginator->numbers();?>\n"?> | - Paginator->next(__('next') . ' >>', array(), null, array('class' => 'disabled'));?>\n";?> + Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));\n"; + echo "\t\techo \$this->Paginator->numbers(array('separator' => ''));\n"; + echo "\t\techo \$this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));\n"; + echo "\t?>\n"; + ?>
diff --git a/lib/Cake/View/Scaffolds/index.ctp b/lib/Cake/View/Scaffolds/index.ctp index c9c3a084e..d2559c6a4 100644 --- a/lib/Cake/View/Scaffolds/index.ctp +++ b/lib/Cake/View/Scaffolds/index.ctp @@ -67,9 +67,11 @@ endforeach; )); ?>

- Paginator->prev('<< ' . __d('cake', 'previous'), array(), null, array('class' => 'disabled')); ?> - | Paginator->numbers(); ?> - Paginator->next(__d('cake', 'next') .' >>', array(), null, array('class' => 'disabled')); ?> + Paginator->prev('< ' . __d('cake', 'previous'), array(), null, array('class' => 'prev disabled')); + echo $this->Paginator->numbers(array('separator' => '')); + echo $this->Paginator->next(__d('cake', 'next') .' >', array(), null, array('class' => 'next disabled')); + ?>
From f1f4afacbd20a423692d9ecbbbe7be7fa33c7d4d Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 14:18:33 +0100 Subject: [PATCH 07/12] Fixing duplication of classes. cake-debug was used for debug and error messages. --- lib/Cake/Test/Case/Utility/DebuggerTest.php | 9 +++++++-- lib/Cake/Utility/Debugger.php | 10 +++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index 806664b40..7603a1f9b 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -128,7 +128,7 @@ class DebuggerTest extends CakeTestCase { Debugger::output('html'); $wrong .= ''; $result = ob_get_clean(); - $this->assertPattern('/
.+<\/pre>/', $result);
+		$this->assertPattern('/
.+<\/pre>/', $result);
 		$this->assertPattern('/Notice<\/b>/', $result);
 		$this->assertPattern('/variable:\s+wrong/', $result);
 
@@ -137,7 +137,7 @@ class DebuggerTest extends CakeTestCase {
 		$buzz .= '';
 		$result = explode('', ob_get_clean());
 		$this->assertTags($result[0], array(
-			'pre' => array('class' => 'cake-debug'),
+			'pre' => array('class' => 'cake-error'),
 			'a' => array(
 				'href' => "javascript:void(0);",
 				'onclick' => "preg:/document\.getElementById\('cakeErr[a-z0-9]+\-trace'\)\.style\.display = " .
@@ -250,6 +250,11 @@ class DebuggerTest extends CakeTestCase {
 		$this->assertTags($result, $data, true);
 	}
 
+/**
+ * Test adding a format that is handled by a callback.
+ *
+ * @return void
+ */
 	public function testAddFormatCallback() {
 		set_error_handler('Debugger::showError');
 		$this->_restoreError = true;
diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php
index d7f0cc5ea..5ad790f6d 100644
--- a/lib/Cake/Utility/Debugger.php
+++ b/lib/Cake/Utility/Debugger.php
@@ -77,8 +77,8 @@ class Debugger {
 			'links' => array()
 		),
 		'html' => array(
-			'trace' => '
Trace 

{:trace}

', - 'context' => '
Context 

{:context}

' + 'trace' => '
Trace 

{:trace}

', + 'context' => '
Context 

{:context}

' ), 'txt' => array( 'error' => "{:error}: {:code} :: {:description} on line {:line} of {:path}\n{:info}", @@ -114,7 +114,7 @@ class Debugger { define('E_RECOVERABLE_ERROR', 4096); } - $e = '
';
+		$e = '
';
 		$e .= '{:error} ({:code}): {:description} ';
@@ -149,11 +149,11 @@ class Debugger {
 		$this->_templates['js']['code'] = '
_templates['js']['code'] .= 'style="display: none;">{:code}
'; - $e = '
{:error} ({:code}) : {:description} ';
+		$e = '
{:error} ({:code}) : {:description} ';
 		$e .= '[{:path}, line {:line}]
'; $this->_templates['html']['error'] = $e; - $this->_templates['html']['context'] = '
Context ';
+		$this->_templates['html']['context'] = '
Context ';
 		$this->_templates['html']['context'] .= '

{:context}

'; } From 1c40a37439e6035156114ad0a2a656401a7df051 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 14:20:35 +0100 Subject: [PATCH 08/12] Removing dead links from the home.ctp Updating CSS for changes in previous commit. --- app/webroot/css/cake.generic.css | 12 ++++++++---- lib/Cake/View/Pages/home.ctp | 4 ---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index 016c8d54e..473a188b9 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -67,6 +67,9 @@ h4 { ul, li { margin: 0 12px; } +p { + margin: 0 0 1em 0; +} /** Layout **/ #container { @@ -392,6 +395,7 @@ form .error-message { .success, .message, +.cake-error, .cake-debug, .notice, p.error, @@ -418,7 +422,7 @@ p.error, } .success, .message, -.cake-debug, +.cake-error, p.error, .error-message { clear: both; @@ -544,14 +548,14 @@ pre { padding: 15px; box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); } -.cake-debug { +.cake-debug, +.cake-error { font-size: 120%; line-height: 140%; margin-top: 1em; position: relative; - white-space: normal; } -.cake-debug > a { +.cake-error > a { text-shadow: none; } .cake-stack-trace { diff --git a/lib/Cake/View/Pages/home.ctp b/lib/Cake/View/Pages/home.ctp index f59f170b2..1b446481b 100644 --- a/lib/Cake/View/Pages/home.ctp +++ b/lib/Cake/View/Pages/home.ctp @@ -170,8 +170,4 @@ You can also add some CSS styles for your pages at: APP/webroot/css.');
  • -
  • -
  • -
  • -
  • From ca078d9a258ce0ba6513f7515fc39f56ad11dc92 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 16:45:09 +0100 Subject: [PATCH 09/12] Converging on 4px for border-radius. Updating debug() to output a tiny bit more HTML so it can be made sexy. --- app/webroot/css/cake.generic.css | 41 ++++++++++++++++++++++--------- lib/Cake/Test/Case/BasicsTest.php | 8 +++--- lib/Cake/basics.php | 6 +++-- 3 files changed, 38 insertions(+), 17 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index 473a188b9..ccbc264e1 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -209,10 +209,10 @@ table td.actions a { } .paging .prev { border-left: 1px solid #ccc; - border-radius: 5px 0 0 5px; + border-radius: 4px 0 0 4px; } .paging .next { - border-radius: 0 5px 5px 0; + border-radius: 0 4px 4px 0; } .paging .disabled { color: #ddd; @@ -361,7 +361,7 @@ form .submit input[type=submit]:hover { /* Form errors */ form .error { background: #FFDACC; - border-radius: 5px; + border-radius: 4px; font-weight: normal; } form .error-message { @@ -500,9 +500,9 @@ input[type=submit], background-image: linear-gradient(top, #fefefe, #dcdcdc); color:#333; border:1px solid #bbb; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; text-decoration: none; text-shadow: #fff 0px 1px 0px; min-width: 0; @@ -548,12 +548,31 @@ pre { padding: 15px; box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); } +.cake-debug-output { + padding: 0; + position: relative; +} +.cake-debug-output > span { + position: absolute; + top: 5px; + right: 5px; + background: rgba(255, 255, 255, 0.3); + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + padding: 5px 6px; + color: #000; + display: block; + float: left; + box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); +} .cake-debug, .cake-error { - font-size: 120%; - line-height: 140%; - margin-top: 1em; - position: relative; + font-size: 16px; + line-height: 20px; + margin-top: 24px; + clear: both; } .cake-error > a { text-shadow: none; @@ -567,7 +586,7 @@ pre { line-height: 140%; overflow: auto; position: relative; - border-radius: 5px; + border-radius: 4px; } .cake-stack-trace a { text-shadow: none; diff --git a/lib/Cake/Test/Case/BasicsTest.php b/lib/Cake/Test/Case/BasicsTest.php index 42bcd141a..2f095f4c9 100644 --- a/lib/Cake/Test/Case/BasicsTest.php +++ b/lib/Cake/Test/Case/BasicsTest.php @@ -677,15 +677,15 @@ class BasicsTest extends CakeTestCase { $pattern = '/(.+?Test(\/|\\\)Case(\/|\\\)BasicsTest\.php|'; $pattern .= preg_quote(substr(__FILE__, 1), '/') . ')'; $pattern .= '.*line.*' . (__LINE__ - 4) . '.*this-is-a-test.*/s'; - $this->assertPattern($pattern, $result); + $this->assertRegExp($pattern, $result); ob_start(); debug('
    this-is-a-test
    ', true); $result = ob_get_clean(); $pattern = '/(.+?Test(\/|\\\)Case(\/|\\\)BasicsTest\.php|'; $pattern .= preg_quote(substr(__FILE__, 1), '/') . ')'; - $pattern .= '.*line.*' . (__LINE__ - 4) . '.*<div>this-is-a-test<\/div>.*/s'; - $this->assertPattern($pattern, $result); + $pattern .= '.*line.*' . (__LINE__ -4) . '.*<div>this-is-a-test<\/div>.*/s'; + $this->assertRegExp($pattern, $result); ob_start(); debug('
    this-is-a-test
    ', false); @@ -693,7 +693,7 @@ class BasicsTest extends CakeTestCase { $pattern = '/(.+?Test(\/|\\\)Case(\/|\\\)BasicsTest\.php|'; $pattern .= preg_quote(substr(__FILE__, 1), '/') . ')'; $pattern .= '.*line.*' . (__LINE__ - 4) . '.*\this-is-a-test\<\/div\>.*/s'; - $this->assertPattern($pattern, $result); + $this->assertRegExp($pattern, $result); } /** diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index d639cc5c7..ac1e6c07a 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -82,10 +82,12 @@ function debug($var = false, $showHtml = null, $showFrom = true) { $line = $calledFrom[0]['line']; } $html = <<%s (line %s) +
    +%s (line %s)
     %s
     
    +
    HTML; $text = <<'), array('<', '>'), $var); + $var = htmlentities($var); } printf($template, $file, $line, $var); } From e735c57f0b7ff2a8c712d580482dcc6c0e35af80 Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 17:02:21 +0100 Subject: [PATCH 10/12] Fixing issues in Firefox. --- app/webroot/css/cake.generic.css | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index ccbc264e1..f40d5553a 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -209,9 +209,13 @@ table td.actions a { } .paging .prev { border-left: 1px solid #ccc; + -moz-border-radius: 4px 0 0 4px; + -webkit-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .paging .next { + -moz-border-radius: 0 4px 4px 0; + -webkit-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .paging .disabled { @@ -361,10 +365,14 @@ form .submit input[type=submit]:hover { /* Form errors */ form .error { background: #FFDACC; + -moz-order-radius: 4px; + -webkit-border-radius: 4px; border-radius: 4px; font-weight: normal; } form .error-message { + -moz-border-radius: none; + -webkit-border-radius: none; border-radius: none; border: none; background: none; @@ -506,8 +514,8 @@ input[type=submit], text-decoration: none; text-shadow: #fff 0px 1px 0px; min-width: 0; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0px 1px 1px rgba(0, 0, 0, 0.2); -webkit-user-select: none; user-select: none; @@ -546,6 +554,8 @@ pre { color: #000; background: #f0f0f0; padding: 15px; + -moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); } .cake-debug-output { @@ -564,6 +574,8 @@ pre { color: #000; display: block; float: left; + -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); + -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5); text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } @@ -577,6 +589,9 @@ pre { .cake-error > a { text-shadow: none; } +.cake-error { + white-space: normal; +} .cake-stack-trace { background: rgba(255, 255, 255, 0.7); color: #333; @@ -586,12 +601,16 @@ pre { line-height: 140%; overflow: auto; position: relative; + -moz-border-radius: 4px; + -wekbkit-border-radius: 4px; border-radius: 4px; } .cake-stack-trace a { text-shadow: none; background: rgba(255, 255, 255, 0.7); padding: 5px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; border-radius: 10px; margin: 0px 4px 10px 2px; font-family: sans-serif; @@ -599,6 +618,8 @@ pre { line-height: 14px; display: inline-block; text-decoration: none; + -moz-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); box-shadow: inset 0px 1px 0 rgba(0, 0, 0, 0.3); } .cake-code-dump pre { From 0bb19dad16cad8ce47f68b432278b87b43204f6c Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 2 Sep 2011 18:20:12 +0100 Subject: [PATCH 11/12] Tidying up forms. Making forms look consistent in IE9. Minor updates. --- app/webroot/css/cake.generic.css | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/app/webroot/css/cake.generic.css b/app/webroot/css/cake.generic.css index f40d5553a..d7342db30 100644 --- a/app/webroot/css/cake.generic.css +++ b/app/webroot/css/cake.generic.css @@ -260,9 +260,9 @@ form { width: 95%; } fieldset { - border: 1px solid #ccc; + border: none; margin-bottom: 1em; - padding: 16px 20px; + padding: 16px 10px; } fieldset legend { color: #e32; @@ -270,9 +270,8 @@ fieldset legend { font-weight: bold; } fieldset fieldset { - margin-top: 0px; - margin-bottom: 20px; - padding: 16px 10px; + margin-top: 0; + padding: 10px 0 0; } fieldset fieldset legend { font-size: 120%; @@ -340,10 +339,13 @@ div.checkbox label { input[type=radio] { float:left; width:auto; - margin: 0 3px 7px 0; + margin: 6px 0; + padding: 0; + line-height: 26px; } -div.radio label { +.radio label { margin: 0 0 6px 20px; + line-height: 26px; } input[type=submit] { display: inline; @@ -435,6 +437,7 @@ p.error, .error-message { clear: both; color: #fff; + background: #c43c35; border: 1px solid rgba(0, 0, 0, 0.5); background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); @@ -448,6 +451,7 @@ p.error, clear: both; color: #fff; border: 1px solid rgba(0, 0, 0, 0.5); + background: #3B8230; background-repeat: repeat-x; background-image: -webkit-linear-gradient(top, #76BF6B, #3B8230); background-image: -moz-linear-gradient(top, #76BF6B, #3B8230); @@ -500,7 +504,7 @@ input[type=submit], .actions a { font-weight:normal; padding: 4px 8px; - background: #dedede; + background: #dcdcdc; background-image: -webkit-linear-gradient(top, #fefefe, #dcdcdc); background-image: -moz-linear-gradient(top, #fefefe, #dcdcdc); background-image: -ms-linear-gradient(top, #fefefe, #dcdcdc); @@ -529,7 +533,7 @@ input[type=submit], input[type=submit]:active, .actions ul li a:active, .actions a:active { - background: #fefefe; + background: #eee; background-image: -webkit-linear-gradient(top, #dfdfdf, #eee); background-image: -moz-linear-gradient(top, #dfdfdf, #eee); background-image: -ms-linear-gradient(top, #dfdfdf, #eee); @@ -583,7 +587,6 @@ pre { .cake-error { font-size: 16px; line-height: 20px; - margin-top: 24px; clear: both; } .cake-error > a { From 027dba72c92f86777a811594f51162e3e7f33ace Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 3 Sep 2011 12:18:03 +0100 Subject: [PATCH 12/12] Removing the helpPath feature as its not documented, not tested and most likely entirely unused. --- lib/Cake/Utility/Debugger.php | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index 5ad790f6d..64acb4ea1 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -43,13 +43,6 @@ class Debugger { */ public $errors = array(); -/** - * Contains the base URL for error code documentation. - * - * @var string - */ - public $helpPath = null; - /** * The current output format. * @@ -140,7 +133,6 @@ class Debugger { $link .= '\'none\' ? \'\' : \'none\')">Context'; $links['context'] = $link; - $links['help'] = 'Help'; $this->_templates['js']['links'] = $links; $this->_templates['js']['context'] = '
     0) {
    -					$instance[0]->helpPath = Configure::read('Cake.Debugger.HelpPath');
    -				}
     			}
     		}
    -
     		if (!$instance) {
     			$instance[0] = new Debugger();
    -			if (Configure::read('debug') > 0) {
    -				$instance[0]->helpPath = Configure::read('Cake.Debugger.HelpPath');
    -			}
     		}
     		return $instance[0];
     	}
    @@ -219,6 +204,7 @@ class Debugger {
      * @param integer $line Line that triggered the error
      * @param array $context Context
      * @return boolean true if error was handled
    + * @deprecated This function is supersceeded by Debugger::outputError()
      */
     	public static function showError($code, $description, $file = null, $line = null, $context = null) {
     		$_this = Debugger::getInstance();
    @@ -264,15 +250,8 @@ class Debugger {
     			break;
     		}
     
    -		if (!empty($_this->helpPath) && preg_match('/.*\[([0-9]+)\]$/', $description, $codes)) {
    -			if (isset($codes[1])) {
    -				$helpID = $codes[1];
    -				$description = trim(preg_replace('/\[[0-9]+\]$/', '', $description));
    -			}
    -		}
    -
     		$data = compact(
    -			'level', 'error', 'code', 'helpID', 'description', 'file', 'path', 'line', 'context'
    +			'level', 'error', 'code', 'description', 'file', 'path', 'line', 'context'
     		);
     		echo $_this->outputError($data);
     
    @@ -662,12 +641,11 @@ class Debugger {
     			'level' => 0,
     			'error' => 0,
     			'code' => 0,
    -			'helpID' => null,
     			'description' => '',
     			'file' => '',
     			'line' => 0,
     			'context' => array(),
    -			'start' => 2
    +			'start' => 2,
     		);
     		$data += $defaults;
     
    @@ -694,13 +672,13 @@ class Debugger {
     
     		$data['id'] = 'cakeErr' . uniqid();
     		$tpl = array_merge($this->_templates['base'], $this->_templates[$this->_outputFormat]);
    -		$insert = array('context' => join("\n", $context), 'helpPath' => $this->helpPath) + $data;
    +		$insert = array('context' => join("\n", $context)) + $data;
     
    -		$detect = array('help' => 'helpID', 'context' => 'context');
    +		$detect = array('context');
     
     		if (isset($tpl['links'])) {
     			foreach ($tpl['links'] as $key => $val) {
    -				if (isset($detect[$key]) && empty($insert[$detect[$key]])) {
    +				if (in_array($key, $detect) && empty($insert[$key])) {
     					continue;
     				}
     				$links[$key] = String::insert($val, $insert, $insertOpts);