Skip to content
This repository
Browse code

FIX: restore and update style for DevelopmentAdmin.

  • Loading branch information...
commit 0910a651d5a81f676c8939ac512ce514a8c827e3 1 parent 0e168c2
Will Rossiter authored June 29, 2012
33  css/debug.css
... ...
@@ -0,0 +1,33 @@
  1
+body { background-color: #eee; margin: 0; overflow-x: hidden; padding: 0; font-family: Helvetica,Arial,sans-serif; }
  2
+
  3
+.info { margin: 0 0 6px 0; padding: 18px; background-color: #003050; position: relative; line-height: 24px; color: #fff; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #002137), color-stop(10%, #003050), color-stop(90%, #003050), color-stop(100%, #002137)); background-image: -webkit-linear-gradient(#002137, #003050 10%, #003050 90%, #002137); background-image: -moz-linear-gradient(#002137, #003050 10%, #003050 90%, #002137); background-image: -o-linear-gradient(#002137, #003050 10%, #003050 90%, #002137); background-image: -ms-linear-gradient(#002137, #003050 10%, #003050 90%, #002137); background-image: linear-gradient(#002137, #003050 10%, #003050 90%, #002137); }
  4
+.info h1 { margin: 0 0 6px 0; padding: 0 32px 0 0; color: #fff; font-size: 24px; text-shadow: 0 1px #002137; line-height: 30px; background: url(../admin/images/logo_small.png) no-repeat right 3px; }
  5
+.info h3 { color: #7da4be; font-size: 16px; line-height: 18px; font-weight: normal; }
  6
+.info p { margin: 0; font-size: 14px; color: #fff; }
  7
+.info a { color: #fff; font-weight: bold; text-decoration: none; }
  8
+.info a:hover, .info a:active { color: #fff; text-decoration: underline; }
  9
+
  10
+.header { margin: 0; border-bottom: 6px solid #ccdef3; height: 23px; background-color: #666673; padding: 4px 0 2px 6px; }
  11
+
  12
+.trace, .build, .options { padding: 6px 12px; }
  13
+.trace li, .build li, .options li { font-size: 14px; margin: 6px 0; }
  14
+
  15
+a { color: #666; }
  16
+a:hover { color: #222; }
  17
+a:active { color: #111; }
  18
+
  19
+p { margin-bottom: 6px; }
  20
+
  21
+pre { margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #eee; border: 1px solid rgba(0, 0, 0, 0.08); color: #333; padding: 11px; overflow: auto; -webkit-border-radius: 4px; -moz-border-radius: 4px; -ms-border-radius: 4px; -o-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); }
  22
+pre span { color: #999; }
  23
+pre .error { color: #f00; }
  24
+
  25
+h2 { margin: 0 0 12px 0; }
  26
+
  27
+h3 { margin: 0 0 6px 0; color: #333; font-size: 18px; line-height: 24px; }
  28
+
  29
+ul { margin: 0 0 18px 0; padding: 0 0 0 18px; }
  30
+
  31
+.pass { margin-top: 18px; padding: 2px 20px 2px 40px; color: #006600; background: #E2F9E3; border: 1px solid #8DD38D; border-radius: 4px; }
  32
+
  33
+.fail { margin-top: 18px; padding: 2px 20px 2px 40px; color: #C80700; background: #FFE9E9; border: 1px solid #C80700; border-radius: 4px; }
23  dev/DebugView.php
@@ -90,21 +90,16 @@ public function writeHeader() {
90 90
 			ENT_COMPAT, 
91 91
 			'UTF-8'
92 92
 		);
  93
+
  94
+		$debugCSS = Controller::join_links(
  95
+			Director::absoluteBaseURL(),
  96
+			FRAMEWORK_DIR,
  97
+			'css/debug.css'
  98
+		);
  99
+
93 100
 		echo '<!DOCTYPE html><html><head><title>' . $url . '</title>';
94  
-		echo '<style type="text/css">';
95  
-		echo 'body { background-color:#eee; margin:0; padding:0; font-family:Helvetica,Arial,sans-serif; }';
96  
-		echo '.info { margin:15px 0 0 0; padding:6px 12px; }';
97  
-		echo '.info h1 { margin:0; padding:0; color:#333; letter-spacing:-2px; }';
98  
-		echo '.header { margin:0; border-bottom:6px solid #ccdef3; height:23px; background-color:#666673; padding:4px 0 2px 6px; background-image:url('.Director::absoluteBaseURL().'cms/images/mainmenu/top-bg.gif); }';
99  
-		echo '.trace { padding:6px 12px; }';
100  
-		echo '.trace li { font-size:14px; margin:6px 0; }';
101  
-		echo 'pre { margin-left:18px; }';
102  
-		echo 'pre span { color:#999;}';
103  
-		echo 'pre .error { color:#f00; }';
104  
-		echo '.pass { margin-top:18px; padding:2px 20px 2px 40px; color:#006600; background:#E2F9E3 url('.Director::absoluteBaseURL() .'cms/images/alert-good.gif) no-repeat scroll 7px 50%; border:1px solid #8DD38D; border-radius:4px; }';
105  
-		echo '.fail { margin-top:18px; padding:2px 20px 2px 40px; color:#C80700; background:#FFE9E9 url('.Director::absoluteBaseURL() .'cms/images/alert-bad.gif) no-repeat scroll 7px 50%; border:1px solid #C80700; border-radius:4px; }';	
106  
-		echo '.failure span { color:#C80700; font-weight:bold; }';
107  
-		echo '</style></head>';
  101
+		echo '<link rel="stylesheet" type="text/css" href="'. $debugCSS .'" />';
  102
+		echo '</head>';
108 103
 		echo '<body>';
109 104
 	}
110 105
 	
9  dev/DevelopmentAdmin.php
@@ -97,8 +97,10 @@ function index() {
97 97
 			$base = Director::baseURL();
98 98
 
99 99
 			echo '<div class="options"><ul>';
  100
+			$evenOdd = "odd";
100 101
 			foreach($actions as $action => $description) {
101  
-				echo "<li><a href=\"{$base}dev/$action\"><b>/dev/$action:</b> $description</a></li>\n";
  102
+				echo "<li class=\"$evenOdd\"><a href=\"{$base}dev/$action\"><b>/dev/$action:</b> $description</a></li>\n";
  103
+				$evenOdd = ($evenOdd == "odd") ? "even" : "odd";
102 104
 			}
103 105
 
104 106
 			$renderer->writeFooter();
@@ -134,9 +136,8 @@ function build($request) {
134 136
 			$renderer = DebugView::create();
135 137
 			$renderer->writeHeader();
136 138
 			$renderer->writeInfo("Environment Builder", Director::absoluteBaseURL());
137  
-			echo "<div style=\"margin: 0 2em\">";
138  
-			echo "<div class=\"status pending\"><h2 class='buildProgress'>Database is building.... Check below for any errors</h2><h2 class='buildCompleted'>Database has been built successfully</h2></div>";
139  
-
  139
+			echo "<div class=\"build\">";
  140
+			
140 141
 			$da = DatabaseAdmin::create();
141 142
 			return $da->handleRequest($request, $this->model);
142 143
 
7  dev/TaskRunner.php
@@ -39,14 +39,15 @@ function index() {
39 39
 			$renderer->writeInfo("SilverStripe Development Tools: Tasks", Director::absoluteBaseURL());
40 40
 			$base = Director::absoluteBaseURL();
41 41
 			
  42
+			echo "<div class=\"options\">";
42 43
 			echo "<ul>";
43 44
 			foreach($tasks as $task) {
44  
-				echo "<li>";
  45
+				echo "<li><p>";
45 46
 				echo "<a href=\"{$base}dev/tasks/" . $task['class'] . "\">" . $task['title'] . "</a><br />";
46 47
 				echo "<span class=\"description\">" . $task['description'] . "</span>";
47  
-				echo "</li>\n";
  48
+				echo "</p></li>\n";
48 49
 			}
49  
-			echo "</ul>";
  50
+			echo "</ul></div>";
50 51
 
51 52
 			$renderer->writeFooter();
52 53
 		// CLI mode
140  scss/debug.scss
... ...
@@ -0,0 +1,140 @@
  1
+@import "compass/css3";
  2
+
  3
+body { 
  4
+ 	background-color: #eee; 
  5
+ 	margin:0; 
  6
+ 	overflow-x: hidden;
  7
+ 	padding:0; 
  8
+ 	font-family: Helvetica,Arial,sans-serif; 
  9
+}
  10
+
  11
+.info { 
  12
+	margin:0 0 6px 0; 
  13
+	padding: 18px; 
  14
+	background-color: #003050;
  15
+	position: relative;
  16
+	line-height: 24px;
  17
+	color: #fff;
  18
+
  19
+	@include background-image(
  20
+		linear-gradient(darken(#003050, 5%), #003050 10%, #003050 90%, darken(#003050, 5%))
  21
+	);
  22
+
  23
+
  24
+	h1 { 
  25
+		margin: 0 0 6px 0; 
  26
+		padding: 0 32px 0 0; 
  27
+		color: #fff;
  28
+		font-size: 24px;
  29
+		text-shadow: 0 1px darken(#003050, 5%);
  30
+		line-height: 30px;
  31
+
  32
+		background: url(../admin/images/logo_small.png) no-repeat right 3px;
  33
+	}
  34
+
  35
+	h3 {
  36
+		color: #7da4be;
  37
+		font-size: 16px;
  38
+		line-height: 18px;
  39
+		font-weight: normal;
  40
+	}
  41
+	p {
  42
+		margin: 0;
  43
+		font-size: 14px;
  44
+		color: #fff;
  45
+	}
  46
+
  47
+	a {
  48
+		color: #fff;
  49
+		font-weight: bold;
  50
+		text-decoration: none;
  51
+
  52
+		&:hover,
  53
+		&:active {
  54
+			color: #fff;
  55
+			text-decoration: underline;
  56
+		}
  57
+	}
  58
+}
  59
+
  60
+
  61
+
  62
+.header { 
  63
+	margin: 0; 
  64
+	border-bottom: 6px solid #ccdef3; 
  65
+	height: 23px; 
  66
+	background-color: #666673; 
  67
+	padding: 4px 0 2px 6px; 
  68
+}
  69
+
  70
+.trace,
  71
+.build,
  72
+.options { 
  73
+	padding:6px 12px;
  74
+
  75
+	li { 
  76
+		font-size:14px; margin:6px 0; 
  77
+	}
  78
+}
  79
+
  80
+a {
  81
+	color: #666;
  82
+
  83
+	&:hover {
  84
+		color: #222;
  85
+	}
  86
+
  87
+	&:active {
  88
+		color: #111;
  89
+	}
  90
+}
  91
+
  92
+p {
  93
+	margin-bottom: 6px;
  94
+}
  95
+
  96
+pre {
  97
+	margin-bottom: 20px;
  98
+	background-color: #f5f5f5;
  99
+	border: 1px solid #eee;
  100
+	border: 1px solid rgba(0,0,0,.08);
  101
+	color: #333;
  102
+	padding: 11px;
  103
+	overflow: auto;
  104
+
  105
+	@include border-radius(4px);
  106
+	@include box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
  107
+ 
  108
+ 	span { 
  109
+		color:#999;
  110
+	}
  111
+	.error { 
  112
+		color:#f00; 
  113
+	}
  114
+}
  115
+
  116
+h2 {
  117
+	margin: 0 0 12px 0;
  118
+}
  119
+
  120
+h3 {
  121
+	margin: 0 0 6px 0;
  122
+	color: #333;
  123
+	font-size: 18px;
  124
+	line-height: 24px;
  125
+}
  126
+
  127
+ul {
  128
+	margin: 0 0 18px 0;
  129
+	padding: 0 0 0 18px;
  130
+}
  131
+
  132
+.pass { 
  133
+	margin-top:18px; padding:2px 20px 2px 40px; color:#006600; background:#E2F9E3; border: 1px solid #8DD38D; 
  134
+	border-radius:4px; 
  135
+}
  136
+
  137
+.fail { 
  138
+	margin-top:18px; padding:2px 20px 2px 40px; color:#C80700; background:#FFE9E9;
  139
+	border:1px solid #C80700; border-radius:4px;
  140
+}

0 notes on commit 0910a65

Please sign in to comment.
Something went wrong with that request. Please try again.