Quicktag and CSS cleanups. Awesome insert code from Mark.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-03-25 05:38:59 +00:00
parent a2d8fcf716
commit b2e9f46408
2 changed files with 165 additions and 156 deletions

View File

@ -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 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 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'
,'<strong>'
,'</strong>'
,'b'
);
edButtons[edButtons.length] = new edButton('ed_strong' edButtons[edButtons.length] =
,'strong' new edButton('ed_em'
,'<strong>' ,'em'
,'</strong>' ,'<em>'
,'b' ,'</em>'
); ,'i'
);
edButtons[edButtons.length] = new edButton('ed_em' edButtons[edButtons.length] =
,'em' new edButton('ed_del'
,'<em>' ,'del'
,'</em>' ,'<del>'
,'i' ,'</del>'
); ,'d'
);
edButtons[edButtons.length] = new edButton('ed_del' edButtons[edButtons.length] =
,'del' new edButton('ed_ins'
,'<del>' ,'ins'
,'</del>' ,'<ins datetime="' + datetime + '">'
,'d' ,'</ins>'
); ,'d'
);
edButtons[edButtons.length] = new edButton('ed_ins' edButtons[edButtons.length] =
,'ins' new edButton('ed_link'
,'<ins>' ,'link'
,'</ins>' ,''
,'d' ,'</a>'
); ,'a'
); // special case
edButtons[edButtons.length] = new edButton('ed_link' edButtons[edButtons.length] =
,'link' new edButton('ed_img'
,'' ,'img'
,'</a>' ,''
,'a' ,''
); // special case ,'m'
,-1
); // special case
edButtons[edButtons.length] = new edButton('ed_img' edButtons[edButtons.length] =
,'img' new edButton('ed_ul'
,'' ,'ul'
,'' ,'<ul>\n'
,'m' ,'</ul>\n\n'
,-1 ,'u'
); // special case );
edButtons[edButtons.length] = new edButton('ed_ul' edButtons[edButtons.length] =
,'ul' new edButton('ed_ol'
,'<ul>\n' ,'ol'
,'</ul>\n\n' ,'<ol>\n'
,'u' ,'</ol>\n\n'
); ,'o'
);
edButtons[edButtons.length] = new edButton('ed_ol' edButtons[edButtons.length] =
,'ol' new edButton('ed_li'
,'<ol>\n' ,'li'
,'</ol>\n\n' ,'\t<li>'
,'o' ,'</li>\n'
); ,'l'
);
edButtons[edButtons.length] = new edButton('ed_li' edButtons[edButtons.length] =
,'li' new edButton('ed_block'
,'\t<li>' ,'b-quote'
,'</li>\n' ,'<blockquote>'
,'l' ,'</blockquote>'
); ,'q'
);
edButtons[edButtons.length] = new edButton('ed_block' edButtons[edButtons.length] =
,'b-quote' new edButton('ed_pre'
,'<blockquote>' ,'code'
,'</blockquote>' ,'<code>'
,'q' ,'</code>'
); );
edButtons[edButtons.length] = new edButton('ed_pre' edButtons[edButtons.length] =
,'pre' new edButton('ed_more'
,'<pre>' ,'more'
,'</pre>' ,'<!--more-->'
); ,''
,'t'
,-1
);
edButtons[edButtons.length] = new edButton('ed_more' edButtons[edButtons.length] =
,'more' new edButton('ed_next'
,'<!--more-->' ,'page'
,'' ,'<!--nextpage-->'
,'t' ,''
,-1 ,'p'
); ,-1
);
edButtons[edButtons.length] = new edButton('ed_next'
,'n-page'
,'<!--nextpage-->'
,''
,'p'
,-1
);
function edLink() { function edLink() {
this.display = ''; this.display = '';

View File

@ -123,14 +123,14 @@ textarea, input, select {
padding: 0; padding: 0;
} }
.editform th {
text-align: right;
}
.code { .code {
font-family: "Courier New", Courier, mono; font-family: "Courier New", Courier, mono;
} }
.ed_button {
padding: 1px;
}
.post-categories { .post-categories {
display: inline; display: inline;
margin: 0; margin: 0;
@ -237,10 +237,6 @@ textarea, input, select {
border: none; border: none;
} }
#ed_button {
padding: 1px;
}
#ed_del { #ed_del {
text-decoration: line-through; text-decoration: line-through;
} }
@ -252,7 +248,11 @@ textarea, input, select {
#ed_strong { #ed_strong {
font-weight: bold; font-weight: bold;
width: 25px; width: 1.9em;
}
#excerpt {
height: 1.5em;
} }
#login { #login {
@ -283,12 +283,55 @@ textarea, input, select {
clear: both; clear: both;
} }
#poststatusdiv, #pingstatusdiv, #commentstatusdiv { #postcustom {
width: 6.5em; border: 1px solid #aaa;
margin: 0.25em;
padding: 0.25em;
width: 30em;
} }
#slugdiv { #postcustom p {
width: 9.4em; 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 { #poststuff {
@ -296,7 +339,9 @@ textarea, input, select {
} }
#poststuff textarea { #poststuff textarea {
width: 98%; width: 97%;
margin-left:1%;
} }
#profile { #profile {
@ -321,10 +366,18 @@ textarea, input, select {
margin: 0 0 4px 0; margin: 0 0 4px 0;
} }
#quicktags { #quicktags, .editform th, #postcustomsubmit {
text-align: right; text-align: right;
} }
#quicktags {
margin-right: 1%;
}
#slugdiv {
width: 9.4em;
}
#titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv { #titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv {
float: left; float: left;
height: 6em; height: 6em;
@ -347,56 +400,3 @@ textarea, input, select {
text-indent: -1000px; text-indent: -1000px;
width: 200px; 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;
}