Make WordPress Core

Changeset 27579


Ignore:
Timestamp:
03/18/2014 02:29:45 AM (11 years ago)
Author:
azaozz
Message:

TinyMCE: move the caption and gallery toolbars to the right, fix selected gallery border/outline, see #27320

Location:
trunk/src/wp-includes/js/tinymce
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js

    r27578 r27579  
    336336
    337337    function addToolbar( node ) {
    338         var position, toolbarHtml, toolbar,
     338        var rectangle, toolbarHtml, toolbar, toolbarSize,
    339339            dom = editor.dom;
    340340
     
    347347
    348348        dom.setAttrib( node, 'data-wp-imgselect', 1 );
    349         position = dom.getPos( node, editor.getBody() );
     349        rectangle = dom.getRect( node );
    350350
    351351        toolbarHtml = '<div class="dashicons dashicons-edit edit" data-mce-bogus="1"></div> ' +
     
    359359
    360360        editor.getBody().appendChild( toolbar );
     361        toolbarSize = dom.getSize( toolbar );
    361362
    362363        dom.setStyles( toolbar, {
    363             top: position.y,
    364             left: position.x
     364            top: rectangle.y,
     365            left: rectangle.x + rectangle.w - toolbarSize.w
    365366        });
    366367    }
  • trunk/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css

    r27578 r27579  
    230230    margin-bottom: 16px;
    231231    cursor: pointer;
     232    border: 1px solid transparent;
    232233}
    233234
     
    240241 .wpview-type-gallery.selected {
    241242    background-color: #f2f8ff;
    242     outline: 1px solid #777;
     243    border-color: #777;
    243244}
    244245
     
    246247    position: absolute;
    247248    top: 0;
    248     left: 0;
     249    right: 0;
    249250    background-color: #333;
    250251    color: white;
     
    274275
    275276.gallery {
    276     margin: auto;
    277     padding: 0.5em 0;
     277    margin: auto -6px;
     278    padding: 6px 0;
    278279    line-height: 1;
    279     margin-left: -0.5em;
    280     margin-right: -0.5em;
    281280    overflow-x: hidden;
    282281}
     
    286285    margin: 0;
    287286    text-align: center;
    288     padding: 0.5em;
     287    padding: 6px;
    289288    -webkit-box-sizing: border-box;
    290289    -moz-box-sizing: border-box;
     
    339338
    340339.gallery img {
    341     border: 1px solid #cfcfcf;
    342340    max-width: 100%;
    343341    height: auto;
Note: See TracChangeset for help on using the changeset viewer.