TinyMCE modals: re-enable the Close button in charmap, fix arrows in listboxes, add and position dashicons to the menu (when visible), see #26952

git-svn-id: https://develop.svn.wordpress.org/trunk@27513 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-03-12 08:18:56 +00:00
parent 61bc04deff
commit 8fc52817b9
5 changed files with 63 additions and 46 deletions

View File

@ -31,33 +31,33 @@
background: #fcfcfc;
border-bottom: 1px solid #dfdfdf;
padding: 0;
min-height: 40px;
min-height: 36px;
}
.mce-window .mce-window-head .mce-title {
font-size: 22px;
font-size: 20px;
font-weight: 600;
line-height: 40px;
line-height: 36px;
margin: 0;
padding: 0 40px 0 16px;
padding: 0 36px 0 16px;
}
.mce-window .mce-window-head .mce-close {
color: transparent;
top: 0;
right: 0;
width: 40px;
height: 40px;
line-height: 40px;
width: 36px;
height: 36px;
line-height: 36px;
text-align: center;
}
.mce-window .mce-window-head .mce-close:before {
font: normal 20px/2 'dashicons';
font: normal 20px/36px 'dashicons';
text-align: center;
color: #666;
width: 40px;
height: 40px;
width: 36px;
height: 36px;
display: block;
}
@ -66,8 +66,8 @@
}
.mce-window .mce-window-head .mce-dragh {
width: -webkit-calc( 100% - 40px );
width: calc( 100% - 40px );
width: -webkit-calc( 100% - 36px );
width: calc( 100% - 36px );
}
.mce-textbox {
@ -214,7 +214,7 @@ div.mce-statusbar {
}
.mce-toolbar .mce-colorbutton .mce-preview {
margin-left: -18px;
margin-left: -17px;
padding: 0;
width: 18px;
}
@ -235,23 +235,22 @@ div.mce-statusbar {
border-color: #bbb;
}
.mce-toolbar .mce-btn .mce-caret {
border: none;
margin: 0 0 0 -5px;
width: 16px;
.mce-panel .mce-btn i.mce-caret {
border-top: 6px solid #777;
}
.mce-toolbar .mce-listbox .mce-caret {
margin-top: 0;
padding: 2px 0 0;
right: 0;
top: 0;
width: 16px;
.mce-panel .mce-btn:hover i.mce-caret {
border-top-color: #333;
}
.mce-toolbar .mce-listbox .mce-caret:before {
margin-left: -6px;
.mce-panel .mce-active i.mce-caret {
border-top: 0;
border-bottom: 6px solid #333;
margin-top: 7px;
}
.mce-listbox.mce-active i.mce-caret {
margin-top: -3px;
}
.mce-toolbar .mce-splitbtn:hover .mce-open {
@ -307,6 +306,10 @@ div.mce-menu .mce-menu-item-sep,
padding-left: 3px;
}
.mce-menu-has-icons i.mce-ico:before {
margin-left: -2px;
}
/* Buttons in modals */
.mce-primary button,
.mce-primary button i {
@ -412,13 +415,21 @@ div.mce-menu .mce-menu-item-sep,
}
@media screen and ( max-width: 782px ) {
.mce-toolbar .mce-btn button {
padding: 5px 6px;
}
#wp-fullscreen-buttons .mce-btn,
.mce-toolbar .mce-btn-group .mce-btn {
margin: 0 3px;
}
.mce-toolbar .mce-colorbutton .mce-preview {
margin-left: -20px;
}
.mce-window .mce-btn {
padding: 10px 14px;
line-height: 1;
font-size: 14px;
vertical-align: middle;
height: auto;
margin-bottom: 4px;
padding: 2px 0;
}
}
@ -456,14 +467,15 @@ div.mce-menu .mce-menu-item-sep,
}
/* TinyMCE icons */
.mce-toolbar .mce-ico,
.mce-toolbar .mce-caret {
.mce-toolbar .mce-ico {
color: #777;
line-height: 20px;
width: 20px;
height: 20px;
text-align: center;
text-shadow: none;
margin: 0;
padding: 0;
}
.mce-toolbar .mce-btn:hover .mce-ico,
@ -477,6 +489,10 @@ div.mce-menu .mce-menu-item-sep,
border-left-color: #bdbdbd;
}
.mce-toolbar .mce-btn .mce-open {
line-height: 20px;
}
i.mce-i-bold,
i.mce-i-italic,
i.mce-i-bullist,
@ -509,7 +525,6 @@ i.mce-i-wp_help,
i.mce-i-wp-media-library,
i.mce-i-ltr,
i.mce-i-wp_page,
i.mce-caret,
.mce-close {
font: normal 20px/1 'dashicons';
padding: 0;
@ -517,6 +532,8 @@ i.mce-caret,
speak: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin-left: -2px;
padding-right: 2px;
}
i.mce-i-bold:before {
@ -637,14 +654,6 @@ i.mce-i-wp_page:before {
content: '\f105';
}
i.mce-caret:before {
content: '\f140';
}
.mce-active i.mce-caret:before {
content: '\f142';
}
.mce-close:before {
content: '\f158';
}

View File

@ -342,7 +342,11 @@ tinymce.PluginManager.add('charmap', function(editor) {
minHeight: 80
}
],
buttons: [] // WP, see #27107
buttons: [
{text: "Close", onclick: function() {
win.close();
}}
]
});
}
@ -358,4 +362,4 @@ tinymce.PluginManager.add('charmap', function(editor) {
onclick: showDialog,
context: 'insert'
});
});
});

File diff suppressed because one or more lines are too long

View File

@ -237,6 +237,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
if ( typeof wp !== 'undefined' && wp.media && wp.media.editor ) {
editor.addMenuItem( 'add_media', {
text: 'Add Media',
icon: 'wp-media-library',
context: 'insert',
cmd: 'WP_Medialib'
});
@ -245,6 +246,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
// Insert "Read More..."
editor.addMenuItem( 'wp_more', {
text: 'Insert Read More tag',
icon: 'wp_more',
context: 'insert',
onclick: function() {
editor.execCommand( 'WP_More', 'more' );
@ -254,6 +256,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
// Insert "Next Page"
editor.addMenuItem( 'wp_page', {
text: 'Page break',
icon: 'wp_page',
context: 'insert',
onclick: function() {
editor.execCommand( 'WP_More', 'nextpage' );

View File

@ -96,6 +96,7 @@ tinymce.PluginManager.add( 'wpfullscreen', function( editor ) {
editor.addMenuItem( 'wp_fullscreen', {
text: 'Distraction Free Writing',
icon: 'wp_fullscreen',
shortcut: 'Alt+Shift+W',
context: 'view',
onclick: toggleFullscreen