From 7c4907713cf09749253ed9a2d431785ab925ccc4 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 8 Aug 2005 01:13:22 +0000 Subject: [PATCH] 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: https://develop.svn.wordpress.org/trunk@2762 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/admin-header.php | 19 +++++-- wp-admin/categories.php | 2 +- wp-admin/dbx-key.js | 4 +- wp-admin/edit-form-advanced.php | 4 +- wp-admin/edit-form-comment.php | 5 +- wp-admin/edit-form.php | 5 +- wp-admin/edit-page-form.php | 5 +- wp-admin/fat.js | 90 +++++++++++++++++++++++++++++++++ wp-admin/link-add.php | 2 +- wp-admin/options-head.php | 2 +- wp-admin/options-permalink.php | 2 +- wp-admin/page-new.php | 2 +- wp-admin/plugin-editor.php | 2 +- wp-admin/plugins.php | 4 +- wp-admin/post.php | 2 +- wp-admin/profile.php | 2 +- wp-admin/templates.php | 2 +- wp-admin/theme-editor.php | 2 +- wp-admin/themes.php | 4 +- wp-admin/user-edit.php | 2 +- wp-admin/users.php | 6 +-- wp-admin/wp-admin.css | 1 + 22 files changed, 135 insertions(+), 34 deletions(-) create mode 100644 wp-admin/fat.js diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index a48f8870c3..eb5fd240a9 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -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'); + }); @@ -33,6 +33,18 @@ tinyMCE.init({ - + diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 872adb615a..1794e12cfc 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -111,7 +111,7 @@ $messages[3] = __('Category updated.'); ?> -

+

diff --git a/wp-admin/dbx-key.js b/wp-admin/dbx-key.js index a68ff666a3..8d542ef32c 100644 --- a/wp-admin/dbx-key.js +++ b/wp-admin/dbx-key.js @@ -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 ); -}; +}); diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 44f9bb10ca..1c6dc288b4 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -4,7 +4,7 @@ $messages[2] = __('Custom field updated'); $messages[3] = __('Custom field deleted.'); ?> -

+

@@ -52,7 +52,7 @@ function focusit() { // focus on first input field document.post.title.focus(); } -window.onload = focusit; +addLoadEvent(focusit);
diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 1542b50529..bda0a7a75d 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -11,11 +11,10 @@ $form_extra = "' />\n' />
diff --git a/wp-admin/edit-form.php b/wp-admin/edit-form.php index 548a60afb4..dd4bc75836 100644 --- a/wp-admin/edit-form.php +++ b/wp-admin/edit-form.php @@ -11,11 +11,10 @@ diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 177fae9a09..42c0f81740 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -32,11 +32,10 @@ if (isset($mode) && 'bookmarklet' == $mode) {
diff --git a/wp-admin/fat.js b/wp-admin/fat.js new file mode 100644 index 0000000000..0073f8588c --- /dev/null +++ b/wp-admin/fat.js @@ -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(); +}); \ No newline at end of file diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index 56f2d1e0ca..3709983368 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -65,7 +65,7 @@ require('admin-header.php'); ?> -

+

Add a link:') ?>

diff --git a/wp-admin/options-head.php b/wp-admin/options-head.php index 7fc54d6e71..579da0a3af 100644 --- a/wp-admin/options-head.php +++ b/wp-admin/options-head.php @@ -20,5 +20,5 @@ for ($i=0; $i -

+

\ No newline at end of file diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 0ad0775b00..229a61d5b0 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -89,7 +89,7 @@ save_mod_rewrite_rules(); ?> -

-

+ -

+

-

activated.') ?>

+

activated.') ?>

-

deactivated.') ?>

+

deactivated.') ?>

diff --git a/wp-admin/post.php b/wp-admin/post.php index 6f454e0256..f44be1ef75 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -315,7 +315,7 @@ default: require_once ('./admin-header.php'); ?> -

View site »'), get_bloginfo('home')); ?>

+

View site »'), get_bloginfo('home')); ?>

-
+

diff --git a/wp-admin/templates.php b/wp-admin/templates.php index da4bbacede..32b0d6c8e1 100644 --- a/wp-admin/templates.php +++ b/wp-admin/templates.php @@ -76,7 +76,7 @@ default: ?> -

+

-

+

diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 05446275e7..89fbd7192e 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -24,9 +24,9 @@ $parent_file = 'themes.php'; require_once('admin-header.php'); ?> -

+

-

+

-
+

diff --git a/wp-admin/users.php b/wp-admin/users.php index 7e91124dba..1a98a1cfe6 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -190,17 +190,17 @@ default: switch($_GET['update']) { case 'del': ?> -

+

-

+

-

+