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

View File

@ -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;
}