Quicktag improvements, structure, spacing, styling, and accessibility.

git-svn-id: http://svn.automattic.com/wordpress/trunk@316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-08-15 16:23:04 +00:00
parent 13bc8d10dc
commit c5713f039f
3 changed files with 124 additions and 124 deletions

View File

@ -162,7 +162,7 @@ if ($action != 'editcomment') {
}
?>
</td>
<td align="right">
<td id="quicktags">
<?php
if ($use_quicktags) {
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="Help with quicktags">Quicktags</a>: ';
@ -192,7 +192,7 @@ edCanvas = document.getElementById('content');
if (get_settings('use_geo_positions')) {
?>
<label for="post_latf">Latitude:</label><input size="8" type="text" value="<?php echo $edited_lat; ?>" name="post_latf">&nbsp;
<label for="post_lonf">Longitude:</label><input size="8" type="text" value="<?php echo $edited_lon; ?>" name="post_lonf">&nbsp; <A href="http://www.geourl.org/resources.html" target="_blank" >click for Geo Info</A>
<label for="post_lonf">Longitude:</label><input size="8" type="text" value="<?php echo $edited_lon; ?>" name="post_lonf">&nbsp; <a href="http://www.geourl.org/resources.html" rel="external" >click for Geo Info</a>
<br>
<?
}

View File

@ -12,14 +12,13 @@ a:hover {
}
body {
background-color: #fff;
background: #fff;
margin: 0px;
}
body, td {
color: #000;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 10pt;
font: 10pt Georgia, "Times New Roman", Times, serif;
}
form {
@ -30,8 +29,8 @@ form {
h2 {
border-bottom: 2px solid #666;
color: #333;
margin: 2px 5px;
font: normal 22px/22px normal;
margin: 2px 5px;
}
label {
@ -47,7 +46,7 @@ p {
}
textarea, input, select {
background-color: #f0f0f0;
background: #f0f0f0;
border-color: #ccc;
border-style: solid;
border-width: 1px;
@ -57,21 +56,23 @@ textarea, input, select {
}
.alternate {
background-color: #eee;
background: #eee;
}
.checkbox {
background-color: #fff;
background: #fff;
border-width: 0px;
margin: 0px;
padding: 0px;
}
.helptext {
}
.quicktags, .search {
background-color: #ccc;
background: #ccc;
color: #000;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;
font: 12px Georgia, "Times New Roman", Times, serif;
}
.wrap {
@ -81,24 +82,7 @@ textarea, input, select {
width: 85%;
}
.helptext {
}
#titlediv, #categorydiv, #poststatusdiv, #commentstatusdiv, #pingstatusdiv, #postpassworddiv {
float: left;
margin-right: 5px;
}
#metainfo {
clear: both;
}
#adminmenu {
list-style: none outside;
margin: 5px 0 0 0;
margin-left: 40px;
padding: 0;
}
#adminmenu #last {
#adminmenu #last, #adminmenu2 #last2 {
border-right: none;
}
@ -109,8 +93,8 @@ textarea, input, select {
text-decoration: none;
}
#adminmenu a:hover, #current {
background-color: #e9e9e9;
#adminmenu a:hover, #current, #adminmenu2 a:hover, #current2 {
background: #e9e9e9;
border: 1px solid #808080;
color: #333;
}
@ -123,40 +107,49 @@ textarea, input, select {
text-align: center;
}
#adminmenu2 {
#adminmenu, #adminmenu2 {
list-style: none outside;
margin: 5px 0 0 0;
margin-left: 40px;
margin-left: 40px;
padding: 0;
}
#adminmenu2 a {
border: 1px solid #fff;
color: #333;
padding: 3px 8px 3px 7px;
text-decoration: none;
}
#adminmenu2 li {
border-right: 1px solid #ccc;
display: block;
float: left;
padding: 4px;
padding: 4px;
text-align: center;
}
#adminmenu2 a {
border: 1px solid #fff;
color: #333;
padding: 3px 8px 3px 7px;
text-decoration: none;
#ed_button {
padding: 1px;
}
#adminmenu2 a:hover, #current2 {
background-color: #e9e9e9;
border: 1px solid #808080;
color: #333;
#ed_del {
text-decoration: line-through;
}
#adminmenu2 #last2 {
border-right: none;
#ed_em {
font-style: italic;
width: 25px;
}
#ed_strong {
font-weight: bold;
width: 25px;
}
#ed_toolbar {
display: inline;
}
#login {
background: url(http://wordpress.org/images/wp-small.png) #fff no-repeat top center;
@ -174,7 +167,7 @@ textarea, input, select {
}
#login textarea, #login input, #login select {
background-color: #f0f0f0;
background: #f0f0f0;
border-color: #ccc;
border-style: solid;
border-width: 1px;
@ -182,6 +175,10 @@ textarea, input, select {
padding: 2px;
}
#metainfo {
clear: both;
}
#profile {
margin: 10px;
}
@ -204,9 +201,17 @@ textarea, input, select {
margin: 0 0 4px 0;
}
#quicktags {
text-align: right;
}
#titlediv, #categorydiv, #poststatusdiv, #commentstatusdiv, #pingstatusdiv, #postpassworddiv {
float: left;
margin-right: 5px;
}
#wphead {
background-image: url(../b2-img/wp-small.png);
background-repeat: no-repeat;
background: url(../b2-img/wp-small.png) no-repeat;
border-bottom: 4px solid #333;
height: 42px;
margin: 5px;

View File

@ -8,6 +8,7 @@ function edButton() {
this.tagStart = ''; // open tag
this.tagEnd = ''; // close tag
this.open = 0; // set to -1 if tag does not need to be closed
this.access = ''; // access key
}
var edOpenTags = new Array();
@ -51,111 +52,105 @@ function edCloseAllTags() {
}
}
/*
** 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 ed0 = new edButton();
ed0.id = 'ed_bold';
ed0.id = 'ed_strong';
ed0.display = 'B';
ed0.tagStart = '<strong>';
ed0.tagEnd = '</strong>';
ed0.access = 'b';
var ed1 = new edButton();
ed1.id = 'ed_italic';
ed1.display = 'I';
ed1.id = 'ed_em';
ed1.display = 'i';
ed1.tagStart = '<em>';
ed1.tagEnd = '</em>';
ed1.access = 'i';
var ed2 = new edButton();
ed2.id = 'ed_under';
ed2.display = 'U';
ed2.tagStart = '<u>';
ed2.tagEnd = '</u>';
ed2.id = 'ed_del';
ed2.display = 'del';
ed2.tagStart = '<del>';
ed2.tagEnd = '</del>';
ed2.access = 'd';
var ed3 = new edButton();
ed3.id = 'ed_strike';
ed3.display = 'S';
ed3.tagStart = '<s>';
ed3.tagEnd = '</s>';
ed3.id = 'ed_ins';
ed3.display = 'ins';
ed3.tagStart = '<ins>';
ed3.tagEnd = '</ins>';
ed3.access = 'n';
var ed4 = new edButton();
ed4.id = 'ed_quot';
ed4.display = '&#34;';
ed4.tagStart = '&#34;';
ed4.tagEnd = '&#34;';
ed4.open = -1;
ed4.id = 'ed_link';
ed4.display = 'link';
ed4.tagStart = ''; // special case
ed4.tagEnd = '</a>';
ed4.access = 'a';
var ed5 = new edButton();
ed5.id = 'ed_amp';
ed5.display = '&#38;';
ed5.tagStart = '&#38;';
ed5.id = 'ed_img';
ed5.display = 'img';
ed5.tagStart = ''; // special case
ed5.tagEnd = '';
ed5.open = -1;
ed5.access = 'm';
var ed6 = new edButton();
ed6.id = 'ed_nbsp';
ed6.display = 'nbsp';
ed6.tagStart = '&#160;';
ed6.tagEnd = '';
ed6.open = -1;
ed6.id = 'ed_ul';
ed6.display = 'ul';
ed6.tagStart = '<ul>\n';
ed6.tagEnd = '</ul>';
ed6.access = 'u';
var ed7 = new edButton();
ed7.id = 'ed_nobr';
ed7.display = 'nobr';
ed7.tagStart = '<nobr>';
ed7.tagEnd = '</nobr>';
ed7.id = 'ed_ol';
ed7.display = 'ol';
ed7.tagStart = '<ol>\n';
ed7.tagEnd = '</ol>';
ed7.access = 'o';
var ed8 = new edButton();
ed8.id = 'ed_link';
ed8.display = 'link';
ed8.tagStart = ''; // special case
ed8.tagEnd = '</a>';
ed8.id = 'ed_li';
ed8.display = 'li';
ed8.tagStart = '\t<li>';
ed8.tagEnd = '</li>\n';
ed8.access = 'l';
var ed9 = new edButton();
ed9.id = 'ed_img';
ed9.display = 'img';
ed9.tagStart = ''; // special case
ed9.tagEnd = '';
ed9.open = -1;
ed9.id = 'ed_block';
ed9.display = 'b-quote';
ed9.tagStart = '<blockquote>';
ed9.tagEnd = '</blockquote>';
ed9.access = 'q';
var ed10 = new edButton();
ed10.id = 'ed_ul';
ed10.display = 'UL';
ed10.tagStart = '<ul>';
ed10.tagEnd = '</ul>';
ed10.id = 'ed_pre';
ed10.display = 'pre';
ed10.tagStart = '<pre>';
ed10.tagEnd = '</pre>';
ed10.access = '';
var ed11 = new edButton();
ed11.id = 'ed_ol';
ed11.display = 'OL';
ed11.tagStart = '<ol>';
ed11.tagEnd = '</ol>';
var ed12 = new edButton();
ed12.id = 'ed_li';
ed12.display = 'LI';
ed12.tagStart = '<li>';
ed12.tagEnd = '</li>';
var ed13 = new edButton();
ed13.id = 'ed_block';
ed13.display = 'b-quote';
ed13.tagStart = '<blockquote>';
ed13.tagEnd = '</blockquote>';
var ed14 = new edButton();
ed14.id = 'ed_pre';
ed14.display = 'pre';
ed14.tagStart = '<pre>';
ed14.tagEnd = '</pre>';
var edButtonCount = 15;
var edButtonCount = 11;
function edShowButton(button, i) {
if (button.id == 'ed_img') {
document.write('<input type="button" id="' + button.id + '" class="ed_button" onclick="edInsertImage(edCanvas);" value="' + button.display + '" />');
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertImage(edCanvas);" value="' + button.display + '" />');
}
else if (button.id == 'ed_link') {
document.write('<input type="button" id="' + button.id + '" class="ed_button" onclick="edInsertLink(edCanvas, ' + i + ');" value="' + button.display + '" />');
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertLink(edCanvas, ' + i + ');" value="' + button.display + '" />');
}
else {
document.write('<input type="button" id="' + button.id + '" class="ed_button" onclick="edInsertTag(edCanvas, ' + i + ');" value="' + button.display + '" />');
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" class="ed_button" onclick="edInsertTag(edCanvas, ' + i + ');" value="' + button.display + '" />');
}
}
@ -167,7 +162,7 @@ function edLink() {
var edLink0 = new edLink;
edLink0.display = 'WordPress';
edLink0.URL = 'http://www.wordpress.org/';
edLink0.URL = 'http://wordpress.org/';
var edLink1 = new edLink;
edLink1.display = 'alexking.org';
@ -225,8 +220,8 @@ function edToolbar() {
for (i = 0; i < edButtonCount; i++) {
edShowButton(eval('ed' + i), i);
}
document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" value="Close Tags" />');
document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" value="Dict" />');
document.write('<input type="button" id="ed_spell" class="ed_button" onclick="edSpell(edCanvas);" title="Dictionary lookup" value="Dict." />');
document.write('<input type="button" id="ed_close" class="ed_button" onclick="edCloseAllTags();" title="Close all open tags" value="Close Tags" />');
// edShowLinks(); // disabled by default
document.write('</div>');
}
@ -325,7 +320,7 @@ function edInsertContent(myField, myValue) {
function edInsertLink(myField, i) {
if (!edCheckOpenTags(i)) {
eval('ed' + i + '.tagStart = \'<a href="\' + prompt(\'Enter the URL\', \'http://\') + \'" target="_blank">\'');
eval('ed' + i + '.tagStart = \'<a href="\' + prompt(\'Enter the URL\', \'http://\') + \'">\'');
}
edInsertTag(myField, i);
}