Editor: use <button> instead of <a> for the Visual/Text buttons, make them focusable. Props afercia, fixes #27553
Built from https://develop.svn.wordpress.org/trunk@30002 git-svn-id: http://core.svn.wordpress.org/trunk@30002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
34f3c6faf2
commit
8681dc786c
|
@ -1432,11 +1432,11 @@ table.links-table {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.wp-switch-editor {
|
button.wp-switch-editor {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
margin: 3px 7px 0 0;
|
margin: 7px 7px 0 0;
|
||||||
padding: 12px 15px;
|
padding: 8px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wp-content-media-buttons a {
|
#wp-content-media-buttons a {
|
||||||
|
|
|
@ -1432,11 +1432,11 @@ table.links-table {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.wp-switch-editor {
|
button.wp-switch-editor {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
margin: 3px 0 0 7px;
|
margin: 7px 0 0 7px;
|
||||||
padding: 12px 15px;
|
padding: 8px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wp-content-media-buttons a {
|
#wp-content-media-buttons a {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -504,7 +504,7 @@ if ( post_type_supports($post_type, 'editor') ) {
|
||||||
<?php wp_editor( $post->post_content, 'content', array(
|
<?php wp_editor( $post->post_content, 'content', array(
|
||||||
'dfw' => true,
|
'dfw' => true,
|
||||||
'drag_drop_upload' => true,
|
'drag_drop_upload' => true,
|
||||||
'tabfocus_elements' => 'insert-media-button,save-post',
|
'tabfocus_elements' => 'content-html,save-post',
|
||||||
'editor_height' => 300,
|
'editor_height' => 300,
|
||||||
'tinymce' => array(
|
'tinymce' => array(
|
||||||
'resize' => false,
|
'resize' => false,
|
||||||
|
|
|
@ -177,8 +177,8 @@ final class _WP_Editors {
|
||||||
$switch_class = 'tmce-active';
|
$switch_class = 'tmce-active';
|
||||||
}
|
}
|
||||||
|
|
||||||
$buttons .= '<a id="' . $editor_id . '-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</a>\n";
|
$buttons .= '<button type="button" id="' . $editor_id . '-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">' . __('Visual') . "</button>\n";
|
||||||
$buttons .= '<a id="' . $editor_id . '-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">' . __('Visual') . "</a>\n";
|
$buttons .= '<button type="button" id="' . $editor_id . '-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</button>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class;
|
$wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class;
|
||||||
|
|
|
@ -827,26 +827,42 @@ i.mce-i-hr:before {
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-switch-editor {
|
.wp-switch-editor {
|
||||||
background: #ebebeb;
|
float: right;
|
||||||
border: 1px solid #dedede;
|
box-sizing: content-box;
|
||||||
color: #777;
|
|
||||||
cursor: pointer;
|
|
||||||
float: left;
|
|
||||||
font: 13px/19px "Open Sans", sans-serif;
|
|
||||||
height: 19px;
|
|
||||||
margin: 5px 5px 0 0;
|
|
||||||
padding: 3px 8px 4px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
|
background: #ebebeb;
|
||||||
|
color: #777;
|
||||||
|
cursor: pointer;
|
||||||
|
font: 13px/19px "Open Sans", sans-serif;
|
||||||
|
height: 20px;
|
||||||
|
margin: 5px 5px 0 0;
|
||||||
|
padding: 3px 8px 4px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-switch-editor:focus {
|
||||||
|
-webkit-box-shadow:
|
||||||
|
0 0 0 1px #5b9dd9,
|
||||||
|
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 1px #5b9dd9,
|
||||||
|
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
outline: none;
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-switch-editor:active,
|
||||||
|
.html-active .switch-html:focus,
|
||||||
|
.tmce-active .switch-tmce:focus {
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-switch-editor:active {
|
.wp-switch-editor:active {
|
||||||
background-color: #f1f1f1;
|
background-color: #f5f5f5;
|
||||||
}
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
.wp-switch-editor:hover {
|
|
||||||
text-decoration: none !important;
|
|
||||||
background: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.js .tmce-active .wp-editor-area {
|
.js .tmce-active .wp-editor-area {
|
||||||
|
@ -861,8 +877,7 @@ i.mce-i-hr:before {
|
||||||
.html-active .switch-html {
|
.html-active .switch-html {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
color: #555;
|
color: #555;
|
||||||
height: 20px;
|
border-bottom-color: #f5f5f5;
|
||||||
border-bottom: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-media-buttons {
|
.wp-media-buttons {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -827,26 +827,42 @@ i.mce-i-hr:before {
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-switch-editor {
|
.wp-switch-editor {
|
||||||
background: #ebebeb;
|
float: left;
|
||||||
border: 1px solid #dedede;
|
box-sizing: content-box;
|
||||||
color: #777;
|
|
||||||
cursor: pointer;
|
|
||||||
float: right;
|
|
||||||
font: 13px/19px "Open Sans", sans-serif;
|
|
||||||
height: 19px;
|
|
||||||
margin: 5px 0 0 5px;
|
|
||||||
padding: 3px 8px 4px;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
|
background: #ebebeb;
|
||||||
|
color: #777;
|
||||||
|
cursor: pointer;
|
||||||
|
font: 13px/19px "Open Sans", sans-serif;
|
||||||
|
height: 20px;
|
||||||
|
margin: 5px 0 0 5px;
|
||||||
|
padding: 3px 8px 4px;
|
||||||
|
border: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-switch-editor:focus {
|
||||||
|
-webkit-box-shadow:
|
||||||
|
0 0 0 1px #5b9dd9,
|
||||||
|
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
box-shadow:
|
||||||
|
0 0 0 1px #5b9dd9,
|
||||||
|
0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
outline: none;
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-switch-editor:active,
|
||||||
|
.html-active .switch-html:focus,
|
||||||
|
.tmce-active .switch-tmce:focus {
|
||||||
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-switch-editor:active {
|
.wp-switch-editor:active {
|
||||||
background-color: #f1f1f1;
|
background-color: #f5f5f5;
|
||||||
}
|
-webkit-box-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
.wp-switch-editor:hover {
|
|
||||||
text-decoration: none !important;
|
|
||||||
background: #fff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.js .tmce-active .wp-editor-area {
|
.js .tmce-active .wp-editor-area {
|
||||||
|
@ -861,8 +877,7 @@ i.mce-i-hr:before {
|
||||||
.html-active .switch-html {
|
.html-active .switch-html {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
color: #555;
|
color: #555;
|
||||||
height: 20px;
|
border-bottom-color: #f5f5f5;
|
||||||
border-bottom: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-media-buttons {
|
.wp-media-buttons {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-alpha-30001';
|
$wp_version = '4.1-alpha-30002';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue