From b2e9f46408d6659f0ea4e1f83e3c395cef0e9b77 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 25 Mar 2004 05:38:59 +0000 Subject: [PATCH] Quicktag and CSS cleanups. Awesome insert code from Mark. git-svn-id: http://svn.automattic.com/wordpress/trunk@1006 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/quicktags.js | 185 ++++++++++++++++++++++-------------------- wp-admin/wp-admin.css | 136 +++++++++++++++---------------- 2 files changed, 165 insertions(+), 156 deletions(-) diff --git a/wp-admin/quicktags.js b/wp-admin/quicktags.js index e34bdb9177..3ba17d8574 100644 --- a/wp-admin/quicktags.js +++ b/wp-admin/quicktags.js @@ -15,108 +15,117 @@ function edButton(id, display, tagStart, tagEnd, access, open) { this.open = open; // set to -1 if tag does not need to be closed } -/* -** TODO: Make it so ins and del have proper datetime attributes, formatted as so: ** -1999-02-22T16:03:30-08:00 - -** Here's my start ** var now = new Date(); -var datetime = now.getFullYear() + '-' + +var datetime = now.getFullYear() + '-' + now.getMonth() + '-' + now.getDate() + 'T' + + now.getHours() + ':' + now.getMinutes() + ':' + + now.getSeconds() + '-' + (now.getTimezoneOffset()/60) + + ':' + '00'; -*/ +edButtons[edButtons.length] = +new edButton('ed_strong' +,'strong' +,'' +,'' +,'b' +); -edButtons[edButtons.length] = new edButton('ed_strong' - ,'strong' - ,'' - ,'' - ,'b' - ); +edButtons[edButtons.length] = +new edButton('ed_em' +,'em' +,'' +,'' +,'i' +); -edButtons[edButtons.length] = new edButton('ed_em' - ,'em' - ,'' - ,'' - ,'i' - ); +edButtons[edButtons.length] = +new edButton('ed_del' +,'del' +,'' +,'' +,'d' +); -edButtons[edButtons.length] = new edButton('ed_del' - ,'del' - ,'' - ,'' - ,'d' - ); +edButtons[edButtons.length] = +new edButton('ed_ins' +,'ins' +,'' +,'' +,'d' +); -edButtons[edButtons.length] = new edButton('ed_ins' - ,'ins' - ,'' - ,'' - ,'d' - ); +edButtons[edButtons.length] = +new edButton('ed_link' +,'link' +,'' +,'' +,'a' +); // special case -edButtons[edButtons.length] = new edButton('ed_link' - ,'link' - ,'' - ,'' - ,'a' - ); // special case +edButtons[edButtons.length] = +new edButton('ed_img' +,'img' +,'' +,'' +,'m' +,-1 +); // special case -edButtons[edButtons.length] = new edButton('ed_img' - ,'img' - ,'' - ,'' - ,'m' - ,-1 - ); // special case +edButtons[edButtons.length] = +new edButton('ed_ul' +,'ul' +,'\n\n' +,'u' +); -edButtons[edButtons.length] = new edButton('ed_ul' - ,'ul' - ,'\n\n' - ,'u' - ); +edButtons[edButtons.length] = +new edButton('ed_ol' +,'ol' +,'
    \n' +,'
\n\n' +,'o' +); -edButtons[edButtons.length] = new edButton('ed_ol' - ,'ol' - ,'
    \n' - ,'
\n\n' - ,'o' - ); +edButtons[edButtons.length] = +new edButton('ed_li' +,'li' +,'\t
  • ' +,'
  • \n' +,'l' +); -edButtons[edButtons.length] = new edButton('ed_li' - ,'li' - ,'\t
  • ' - ,'
  • \n' - ,'l' - ); +edButtons[edButtons.length] = +new edButton('ed_block' +,'b-quote' +,'
    ' +,'
    ' +,'q' +); -edButtons[edButtons.length] = new edButton('ed_block' - ,'b-quote' - ,'
    ' - ,'
    ' - ,'q' - ); +edButtons[edButtons.length] = +new edButton('ed_pre' +,'code' +,'' +,'' +); -edButtons[edButtons.length] = new edButton('ed_pre' - ,'pre' - ,'
    '
    -                                          ,'
    ' - ); +edButtons[edButtons.length] = +new edButton('ed_more' +,'more' +,'' +,'' +,'t' +,-1 +); -edButtons[edButtons.length] = new edButton('ed_more' - ,'more' - ,'' - ,'' - ,'t' - ,-1 - ); - -edButtons[edButtons.length] = new edButton('ed_next' - ,'n-page' - ,'' - ,'' - ,'p' - ,-1 - ); +edButtons[edButtons.length] = +new edButton('ed_next' +,'page' +,'' +,'' +,'p' +,-1 +); function edLink() { this.display = ''; diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 8c3e700c77..88e104e19a 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -123,14 +123,14 @@ textarea, input, select { padding: 0; } -.editform th { - text-align: right; -} - .code { font-family: "Courier New", Courier, mono; } +.ed_button { + padding: 1px; +} + .post-categories { display: inline; margin: 0; @@ -237,10 +237,6 @@ textarea, input, select { border: none; } -#ed_button { - padding: 1px; -} - #ed_del { text-decoration: line-through; } @@ -252,7 +248,11 @@ textarea, input, select { #ed_strong { font-weight: bold; - width: 25px; + width: 1.9em; +} + +#excerpt { + height: 1.5em; } #login { @@ -283,12 +283,55 @@ textarea, input, select { clear: both; } -#poststatusdiv, #pingstatusdiv, #commentstatusdiv { - width: 6.5em; +#postcustom { + border: 1px solid #aaa; + margin: 0.25em; + padding: 0.25em; + width: 30em; } -#slugdiv { - width: 9.4em; +#postcustom p { + margin: 0; +} + +#postcustom table { + background-color: #eee; + border: 1px solid #ccc; + color: #000; + margin-bottom: 1em; + padding: 0px; + width: 100%; +} + +#postcustom td,th { + background-color: #fff; + color: #000; + margin: 1px; + padding: 0.2em; +} + +#postcustomkeys { + float: left; + width: 49%; +} + +#postcustomkeys input, #postcustom select, #postcustom textarea { + width: 95%; +} +fieldset legend a { + border-bottom: none; +} +#postcustomvals { + float: right; + width: 49%; +} + +#save { + width: 13em; +} + +#poststatusdiv { + width: 6.5em; } #poststuff { @@ -296,7 +339,9 @@ textarea, input, select { } #poststuff textarea { - width: 98%; + width: 97%; + margin-left:1%; + } #profile { @@ -321,10 +366,18 @@ textarea, input, select { margin: 0 0 4px 0; } -#quicktags { +#quicktags, .editform th, #postcustomsubmit { text-align: right; } +#quicktags { + margin-right: 1%; +} + +#slugdiv { + width: 9.4em; +} + #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv { float: left; height: 6em; @@ -347,56 +400,3 @@ textarea, input, select { text-indent: -1000px; width: 200px; } - -#postcustom { - xwidth: 30em; - border: 1px solid #aaa; - padding: 0.25em; - margin: 0.25em; -} - -#postcustom p { - margin: 0; -} - -#postcustom textarea { - width: 95%; -} - -#postcustom select { - width: 95%; -} - -#postcustomkeys { - width: 49%; - float: left; -} - -#postcustomkeys input { - width: 95%; -} - -#postcustomvals { - width: 49%; - float: right; -} - -#postcustomsubmit { - text-align: right; -} - -#postcustom table { - width: 100%; - margin-bottom: 1em; - background-color: #eee; - color: black; - padding: 0px; - border: 1px solid #ccc; -} - -#postcustom td,th { - background-color: white; - color: black; - padding: 0.2em; - margin: 1px; -}