From 2ad5f03b1cd8874569746aa12bac57d201c96ab2 Mon Sep 17 00:00:00 2001
From: matt
Date: Fri, 4 Jan 2008 11:47:06 +0000
Subject: [PATCH] There's a lockup in the tri-menu area. Traffic ahead.
Eliminating generic file editor.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-admin/menu-header.php | 70 ++++++++++++++++-
wp-admin/menu.php | 23 +++---
wp-admin/templates.php | 160 ---------------------------------------
wp-admin/wp-admin.css | 53 ++++++++++++-
4 files changed, 129 insertions(+), 177 deletions(-)
delete mode 100644 wp-admin/templates.php
diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php
index bbdfe1a70..d8b7e6af3 100644
--- a/wp-admin/menu-header.php
+++ b/wp-admin/menu-header.php
@@ -1,11 +1,45 @@
-
');
-
- $newcontent = stripslashes($_POST['newcontent']);
- if (is_writeable($real_file)) {
- $f = @ fopen($real_file, 'w+');
- if ( $f ) {
- fwrite($f, $newcontent);
- fclose($f);
- wp_redirect("templates.php?file=$file&a=te");
- } else {
- wp_redirect("templates.php?file=$file&a=err");
- }
- } else {
- wp_redirect("templates.php?file=$file&a=err");
- }
-
- exit();
-
-break;
-
-default:
-
- require_once('./admin-header.php');
-
- if ( ! current_user_can('edit_files') )
- wp_die(''.__('You do not have sufficient permissions to edit templates for this blog.').'
');
-
- if (strpos($file, 'wp-config.php') !== false)
- wp_die(''.__('The config file cannot be edited or viewed through the web interface. Sorry!').'
');
-
- update_recently_edited($file);
-
- if (!is_file($real_file))
- $error = true;
-
- if (!$error) {
- $f = @ fopen($real_file, 'r');
- if ( $f ) {
- if ( filesize($real_file ) > 0 ) {
- $content = fread($f, filesize($real_file));
- $content = htmlspecialchars($content);
- } else {
- $content = '';
- }
- } else {
- $error = true;
- }
- }
-
- ?>
-
-
-
-
-
-
-
-
-' . sprintf(__('Editing
%s'), wp_specialchars($file) ) . '';
-} else {
- echo '
' . sprintf(__('Browsing %s'), wp_specialchars($file) ) . '
';
-}
-?>
-
-
-
-
' . __('Oops, no such file exists! Double check the name and try again, merci.') . '
';
- }
- ?>
-
-
-
-
-
-
writable by the server, e.g. CHMOD 666.') ?>
-
-
-
-
-
diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css
index 875c498dc..e5ce80b10 100644
--- a/wp-admin/wp-admin.css
+++ b/wp-admin/wp-admin.css
@@ -899,6 +899,31 @@ a.view-comment-post-link {
margin: 0;
}
+/* menu stuff */
+
+#dashmenu {
+ margin: 0;
+ list-style: none;
+ position: absolute;
+ top: 7px;
+ left: 0;
+ padding-left: 12px;
+}
+
+#dashmenu a {
+ color: #999;
+ padding: 6px;
+ line-height: 220%;
+ margin-right: 8px;
+}
+
+#dashmenu a:hover, #dashmenu a.current, #dashmenu a.current:hover {
+ background: #e4f2fd;
+ -moz-border-radius-topleft: 3px;
+ -moz-border-radius-topright: 3px;
+ color: #555;
+}
+
#adminmenu {
margin: 0;
list-style: none;
@@ -910,7 +935,7 @@ a.view-comment-post-link {
#adminmenu a {
font-size: 16px;
color: #2583ad;
- padding: 6px 6px;
+ padding: 6px;
line-height: 200%;
border: 1px solid #e4f2fd;
border-bottom: 1px solid #c6d9e9;
@@ -931,12 +956,34 @@ a.view-comment-post-link {
font-weight: normal;
}
-#adminmenu li, #submenu li {
+#sidemenu {
+ margin: 0;
+ color: #999;
+ list-style: none;
+ position: absolute;
+ right: 25%;
+ top: 55px;
+ padding-left: 10px;
+}
+
+#sidemenu a {
+ color: #2583ad;
+ padding: 3px;
+ line-height: 200%;
+}
+
+#sidemenu a:hover, #sidemenu a.current, #sidemenu a.current:hover {
+ color: #d54e21;
+}
+
+#dashmenu li, #adminmenu li, #submenu li, #sidemenu li {
display: inline;
line-height: 200%;
list-style: none;
text-align: center;
white-space: nowrap;
+ margin: 0;
+ padding: 0;
}
#adminmenu #awaiting-mod {
@@ -971,6 +1018,8 @@ a.view-comment-post-link {
height: 15px;
}
+/* end menu stuff */
+
/* Admin Footer */
#footer {