mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Draw more attention to the messages, which now blend in a little with the header. TODO: Put all messages in an array, abstract out HTML
git-svn-id: http://svn.automattic.com/wordpress/trunk@2762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
06e8e848a4
commit
65546ba7a5
@ -25,7 +25,7 @@ tinyMCE.init({
|
||||
entity_encoding : "raw",
|
||||
extended_valid_elements : "a[id|href|title|onclick],img[class|src|alt|title|width|height|align]",
|
||||
plugins : "emotions"
|
||||
do_action('mce_options');
|
||||
<?php do_action('mce_options'); ?>
|
||||
});
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
@ -33,6 +33,18 @@ tinyMCE.init({
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
function addLoadEvent(func) {
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
oldonload();
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<?php if ( isset($xfn) ) : ?>
|
||||
|
||||
function GetElementsWithClassName(elementName, className) {
|
||||
@ -80,13 +92,14 @@ function blurry() {
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = blurry;
|
||||
addLoadEvent(blurry);
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="fat.js"></script>
|
||||
<?php if ( isset( $editing ) ) : ?>
|
||||
<script type="text/javascript" src="dbx.js"></script>
|
||||
<script type="text/javascript" src="dbx-key.js"></script>
|
||||
|
@ -111,7 +111,7 @@ $messages[3] = __('Category updated.');
|
||||
?>
|
||||
|
||||
<?php if (isset($_GET['message'])) : ?>
|
||||
<div class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="wrap">
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
//initialisation function
|
||||
window.onload = function()
|
||||
addLoadEvent( function()
|
||||
{
|
||||
//initialise the docking boxes manager
|
||||
var manager = new dbxManager('postmeta'); //session ID [/-_a-zA-Z0-9/]
|
||||
@ -41,4 +41,4 @@ window.onload = function()
|
||||
', or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard
|
||||
'%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts
|
||||
);
|
||||
};
|
||||
});
|
||||
|
@ -4,7 +4,7 @@ $messages[2] = __('Custom field updated');
|
||||
$messages[3] = __('Custom field deleted.');
|
||||
?>
|
||||
<?php if (isset($_GET['message'])) : ?>
|
||||
<div class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form name="post" action="post.php" method="post" id="post">
|
||||
@ -52,7 +52,7 @@ function focusit() {
|
||||
// focus on first input field
|
||||
document.post.title.focus();
|
||||
}
|
||||
window.onload = focusit;
|
||||
addLoadEvent(focusit);
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
<div id="poststuff">
|
||||
|
@ -11,11 +11,10 @@ $form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment-
|
||||
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
|
||||
|
||||
<script type="text/javascript">
|
||||
function focusit() {
|
||||
// focus on first input field
|
||||
function focusit() { // focus on first input field
|
||||
document.post.name.focus();
|
||||
}
|
||||
window.onload = focusit;
|
||||
addLoadEvent(focusit);
|
||||
</script>
|
||||
<fieldset id="namediv">
|
||||
<legend><?php _e('Name:') ?></legend>
|
||||
|
@ -11,11 +11,10 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function focusit() {
|
||||
// focus on first input field
|
||||
function focusit() { // focus on first input field
|
||||
document.getElementById('title').focus();
|
||||
}
|
||||
window.onload = focusit;
|
||||
addLoadEvent(focusit);
|
||||
//-->
|
||||
</script>
|
||||
|
||||
|
@ -32,11 +32,10 @@ if (isset($mode) && 'bookmarklet' == $mode) {
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function focusit() {
|
||||
// focus on first input field
|
||||
function focusit() { // focus on first input field
|
||||
document.post.title.focus();
|
||||
}
|
||||
window.onload = focusit;
|
||||
addLoadEvent(focusit);
|
||||
//-->
|
||||
</script>
|
||||
<div id="poststuff">
|
||||
|
90
wp-admin/fat.js
Normal file
90
wp-admin/fat.js
Normal file
@ -0,0 +1,90 @@
|
||||
// @name The Fade Anything Technique
|
||||
// @namespace http://www.axentric.com/aside/fat/
|
||||
// @version 1.0-RC1
|
||||
// @author Adam Michela
|
||||
|
||||
var Fat = {
|
||||
make_hex : function (r,g,b)
|
||||
{
|
||||
r = r.toString(16); if (r.length == 1) r = '0' + r;
|
||||
g = g.toString(16); if (g.length == 1) g = '0' + g;
|
||||
b = b.toString(16); if (b.length == 1) b = '0' + b;
|
||||
return "#" + r + g + b;
|
||||
},
|
||||
fade_all : function ()
|
||||
{
|
||||
var a = document.getElementsByTagName("*");
|
||||
for (var i = 0; i < a.length; i++)
|
||||
{
|
||||
var o = a[i];
|
||||
var r = /fade-?(\w{3,6})?/.exec(o.className);
|
||||
if (r)
|
||||
{
|
||||
if (!r[1]) r[1] = "";
|
||||
if (o.id) Fat.fade_element(o.id,null,null,"#"+r[1]);
|
||||
}
|
||||
}
|
||||
},
|
||||
fade_element : function (id, fps, duration, from, to)
|
||||
{
|
||||
if (!fps) fps = 30;
|
||||
if (!duration) duration = 3000;
|
||||
if (!from || from=="#") from = "#FFFF33";
|
||||
if (!to) to = this.get_bgcolor(id);
|
||||
|
||||
var frames = Math.round(fps * (duration / 1000));
|
||||
var interval = duration / frames;
|
||||
var delay = interval;
|
||||
var frame = 0;
|
||||
|
||||
if (from.length < 7) from += from.substr(1,3);
|
||||
if (to.length < 7) to += to.substr(1,3);
|
||||
|
||||
var rf = parseInt(from.substr(1,2),16);
|
||||
var gf = parseInt(from.substr(3,2),16);
|
||||
var bf = parseInt(from.substr(5,2),16);
|
||||
var rt = parseInt(to.substr(1,2),16);
|
||||
var gt = parseInt(to.substr(3,2),16);
|
||||
var bt = parseInt(to.substr(5,2),16);
|
||||
|
||||
var r,g,b,h;
|
||||
while (frame < frames)
|
||||
{
|
||||
r = Math.floor(rf * ((frames-frame)/frames) + rt * (frame/frames));
|
||||
g = Math.floor(gf * ((frames-frame)/frames) + gt * (frame/frames));
|
||||
b = Math.floor(bf * ((frames-frame)/frames) + bt * (frame/frames));
|
||||
h = this.make_hex(r,g,b);
|
||||
|
||||
setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')", delay);
|
||||
|
||||
frame++;
|
||||
delay = interval * frame;
|
||||
}
|
||||
setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')", delay);
|
||||
},
|
||||
set_bgcolor : function (id, c)
|
||||
{
|
||||
var o = document.getElementById(id);
|
||||
o.style.backgroundColor = c;
|
||||
},
|
||||
get_bgcolor : function (id)
|
||||
{
|
||||
var o = document.getElementById(id);
|
||||
while(o)
|
||||
{
|
||||
var c;
|
||||
if (window.getComputedStyle) c = window.getComputedStyle(o,null).getPropertyValue("background-color");
|
||||
if (o.currentStyle) c = o.currentStyle.backgroundColor;
|
||||
if ((c != "" && c != "transparent") || o.tagName == "BODY") { break; }
|
||||
o = o.parentNode;
|
||||
}
|
||||
if (c == undefined || c == "" || c == "transparent") c = "#FFFFFF";
|
||||
var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
|
||||
if (rgb) c = this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
addLoadEvent(function () {
|
||||
Fat.fade_all();
|
||||
});
|
@ -65,7 +65,7 @@ require('admin-header.php');
|
||||
?>
|
||||
|
||||
<?php if ($_GET['added']) : ?>
|
||||
<div class="updated"><p><?php _e('Link added.'); ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
<h2><?php _e('<strong>Add</strong> a link:') ?></h2>
|
||||
|
@ -20,5 +20,5 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
|
||||
<br clear="all" />
|
||||
|
||||
<?php if (isset($_GET['updated'])) : ?>
|
||||
<div class="updated"><p><strong><?php _e('Options saved.') ?></strong></p></div>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.') ?></strong></p></div>
|
||||
<?php endif; ?>
|
@ -89,7 +89,7 @@ save_mod_rewrite_rules();
|
||||
?>
|
||||
|
||||
<?php if (isset($_POST['submit'])) : ?>
|
||||
<div class="updated"><p><?php
|
||||
<div id="message" class="updated fade"><p><?php
|
||||
if ($writable)
|
||||
_e('Permalink structure updated.');
|
||||
else
|
||||
|
@ -7,7 +7,7 @@ require_once('admin-header.php');
|
||||
?>
|
||||
|
||||
<?php if ( isset($_GET['saved']) ) : ?>
|
||||
<div class="updated"><p><strong><?php _e('Page saved.') ?> <a href="edit-pages.php"><?php _e('Manage pages'); ?> »</a></strong></p></div>
|
||||
<div id="message" class="updated fade"><p><strong><?php _e('Page saved.') ?> <a href="edit-pages.php"><?php _e('Manage pages'); ?> »</a></strong></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
@ -70,7 +70,7 @@ default:
|
||||
|
||||
?>
|
||||
<?php if (isset($_GET['a'])) : ?>
|
||||
<div class="updated"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
<?php
|
||||
|
@ -50,11 +50,11 @@ foreach ($check_plugins as $check_plugin) {
|
||||
?>
|
||||
|
||||
<?php if (isset($_GET['activate'])) : ?>
|
||||
<div class="updated"><p><?php _e('Plugin <strong>activated</strong>.') ?></p>
|
||||
<div id="message" class="updated fade"><p><?php _e('Plugin <strong>activated</strong>.') ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($_GET['deactivate'])) : ?>
|
||||
<div class="updated"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p>
|
||||
<div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -315,7 +315,7 @@ default:
|
||||
require_once ('./admin-header.php');
|
||||
?>
|
||||
<?php if ( isset($_GET['posted']) ) : ?>
|
||||
<div class="updated"><p><?php printf(__('Post saved. <a href="%s">View site »</a>'), get_bloginfo('home')); ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php printf(__('Post saved. <a href="%s">View site »</a>'), get_bloginfo('home')); ?></p></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ( current_user_can('edit_posts') ) {
|
||||
|
@ -140,7 +140,7 @@ default:
|
||||
$bookmarklet_height= 440;
|
||||
|
||||
if (isset($updated)) { ?>
|
||||
<div class="updated">
|
||||
<div id="message" class="updated fade">
|
||||
<p><strong><?php _e('Profile updated.') ?></strong></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
@ -76,7 +76,7 @@ default:
|
||||
|
||||
?>
|
||||
<?php if (isset($_GET['a'])) : ?>
|
||||
<div class="updated"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
<?php
|
||||
|
@ -82,7 +82,7 @@ default:
|
||||
|
||||
?>
|
||||
<?php if (isset($_GET['a'])) : ?>
|
||||
<div class="updated"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div>
|
||||
<?php endif; ?>
|
||||
<div class="wrap">
|
||||
<form name="theme" action="theme-editor.php" method="post">
|
||||
|
@ -24,9 +24,9 @@ $parent_file = 'themes.php';
|
||||
require_once('admin-header.php');
|
||||
?>
|
||||
<?php if ( ! validate_current_theme() ) : ?>
|
||||
<div class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
|
||||
<div id="message1" class="updated fade"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
|
||||
<?php elseif ( isset($activated) ) : ?>
|
||||
<div class="updated"><p><?php _e('New theme activated'); ?></p></div>
|
||||
<div id="message2" class="updated fade"><p><?php _e('New theme activated'); ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
@ -110,7 +110,7 @@ if (!current_user_can('edit_users')) $errors['head'] = __('You do not have permi
|
||||
?>
|
||||
|
||||
<?php if ( isset($_GET['updated']) ) : ?>
|
||||
<div class="updated">
|
||||
<div id="message" class="updated fade">
|
||||
<p><strong><?php _e('User updated.') ?></strong></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -190,17 +190,17 @@ default:
|
||||
switch($_GET['update']) {
|
||||
case 'del':
|
||||
?>
|
||||
<div class="updated"><p><?php _e('User deleted.'); ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php _e('User deleted.'); ?></p></div>
|
||||
<?php
|
||||
break;
|
||||
case 'add':
|
||||
?>
|
||||
<div class="updated"><p><?php _e('New user created.'); ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php _e('New user created.'); ?></p></div>
|
||||
<?php
|
||||
break;
|
||||
case 'promote':
|
||||
?>
|
||||
<div class="updated"><p><?php _e('Changed roles.'); ?></p></div>
|
||||
<div id="message" class="updated fade"><p><?php _e('Changed roles.'); ?></p></div>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
|
@ -371,6 +371,7 @@ table .vers, table .name {
|
||||
border: 1px solid #666;
|
||||
margin-right: 1em;
|
||||
margin-bottom: 1.5em;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
#deletepost:hover {
|
||||
|
Loading…
Reference in New Issue
Block a user