Make WordPress Core

Ticket #27546: 27546-02.patch

File 27546-02.patch, 4.2 KB (added by gcorne, 11 years ago)
  • src/wp-includes/js/tinymce/plugins/wpview/plugin.js

    diff --git src/wp-includes/js/tinymce/plugins/wpview/plugin.js src/wp-includes/js/tinymce/plugins/wpview/plugin.js
    index 75f7047..337b3d2 100644
    tinymce.PluginManager.add( 'wpview', function( editor ) { 
    265265                });
    266266
    267267                editor.dom.bind( editor.getBody(), 'mousedown mouseup click', function( event ) {
    268                         var view = getParentView( event.target );
     268                        var view = getParentView( event.target ),
     269                                deselectEventType;
    269270
    270271                        // Contain clicks inside the view wrapper
    271272                        if ( view ) {
    272273                                event.stopPropagation();
    273274
     275                                // Hack to try and keep the block resize handles from appearing. They will show on mousedown and then be removed on mouseup.
     276                                if ( tinymce.Env.ie <= 10 ) {
     277                                        deselect();
     278                                }
     279
     280                                select( view );
     281
    274282                                if ( event.type === 'click' && ! event.metaKey && ! event.ctrlKey ) {
    275283                                        if ( editor.dom.hasClass( event.target, 'edit' ) ) {
    276284                                                wp.mce.views.edit( view );
    tinymce.PluginManager.add( 'wpview', function( editor ) { 
    278286                                                editor.dom.remove( view );
    279287                                        }
    280288                                }
    281                                 select( view );
    282289                                // Returning false stops the ugly bars from appearing in IE11 and stops the view being selected as a range in FF.
    283290                                // Unfortunately, it also inhibits the dragging of views to a new location.
    284291                                return false;
    285292                        } else {
    286                                 if ( event.type === 'mousedown' ) {
     293
     294                                // Fix issue with deselecting a view in IE8. Without this hack, clicking content above the view wouldn't actually deselect it
     295                                // and the caret wouldn't be placed at the mouse location
     296                                if( tinymce.Env.ie <= 8 ) {
     297                                        deselectEventType = 'mouseup';
     298                                } else {
     299                                        deselectEventType = 'mousedown';
     300                                }
     301
     302                                if ( event.type === deselectEventType ) {
    287303                                        deselect();
    288304                                }
    289305                        }
  • src/wp-includes/js/tinymce/skins/wordpress/wp-content.css

    diff --git src/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png src/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png
    new file mode 100755
    index 0000000..eea51cb
    Binary files /dev/null and src/wp-includes/js/tinymce/skins/wordpress/images/dashicon-edit.png differ
    diff --git src/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png src/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png
    new file mode 100755
    index 0000000..90c8ef7
    Binary files /dev/null and src/wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png differ
    diff --git src/wp-includes/js/tinymce/skins/wordpress/wp-content.css src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
    index fe84a39..ee54c33 100644
    audio { 
    204204        width: 100%;
    205205}
    206206
     207.ie8 .wpview-wrap .wpview-clipboard,
     208.ie7 .wpview-wrap .wpview-clipboard {
     209        filter: alpha(opacity=0);
     210}
     211
    207212/**
    208213 * Media previews
    209214 */
    audio { 
    214219}
    215220
    216221.wpview-wrap.selected {
    217         background-color: #f2f8ff; /* fallback to old blue */
     222        background-color: #e5e5e5;
    218223        background-color: rgba(0,0,0,0.1);
    219224        border-color: #777;
    220225        border-color: rgba(0,0,0,0.3);
    221226}
    222227
     228.ie8 .wpview-wrap.selected,
     229.ie7 .wpview-wrap.selected {
     230        background-color: #e5e5e5;
     231        border-color: #777;
     232}
     233
    223234.wpview-overlay {
    224235        position: absolute;
    225236        top: 0;
    audio { 
    263274        font-size: 30px;
    264275}
    265276
     277.ie8 .wpview-wrap .toolbar div,
     278.ie7 .wpview-wrap .toolbar div,
     279.ie8 #wp-image-toolbar div,
     280.ie7 #wp-image-toolbar div {
     281        display: inline;
     282        padding: 0;
     283}
     284
     285.ie8 .dashicons-edit,
     286.ie7 .dashicons-edit {
     287        background-image: url(images/dashicon-edit.png);
     288}
     289
     290.ie8 .dashicons-no-alt,
     291.ie7 .dashicons-no-alt {
     292        background-image: url(images/dashicon-no-alt.png);
     293}
     294
     295
    266296.wpview-wrap .toolbar div:hover,
    267297#wp-image-toolbar div:hover {
    268298        box-shadow: 0 1px 3px rgba(0,0,0,0.8);
    audio { 
    352382        box-sizing: border-box;
    353383}
    354384
     385.ie7 .gallery .gallery-item,
     386.ie8 .gallery .gallery-item {
     387        padding: 6px 0;
     388}
     389
    355390.gallery .gallery-caption,
    356391.gallery .gallery-icon {
    357392        margin: 0;
    audio { 
    374409        width: 33.333%;
    375410}
    376411
     412.ie8 .gallery-columns-3 .gallery-item,
     413.ie7 .gallery-columns-3 .gallery-item {
     414        width: 33%;
     415}
     416
    377417.gallery-columns-4 .gallery-item {
    378418        width: 25%;
    379419}