Make WordPress Core

Changeset 27777


Ignore:
Timestamp:
03/27/2014 07:01:38 AM (10 years ago)
Author:
helen
Message:

MCE view controls:

  • Move controls back over to the left, as they were before. Wide images and muscle memory have been causing frustration.
  • Improve the experience and unify the UI of media view controls. Audio and video views now require an initial click to select before further interaction.
  • CSS clean up and organization.

fixes #27320, #27542.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

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

    r27764 r27777  
    370370        dom.setStyles( toolbar, {
    371371            top: rectangle.y,
    372             left: rectangle.x + rectangle.w - toolbarSize.w
     372            left: rectangle.x
    373373        });
    374374    }
  • trunk/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css

    r27668 r27777  
    213213}
    214214
    215 .wpview-type-audio {
    216     padding: 24px 0 0;
    217 }
    218 
    219 .wpview-type-video {
    220     padding: 0;
    221 }
    222 
    223 .wont-play {
    224     padding: 4px 0;
    225 }
    226 
    227 .wont-play p {
    228     font-size: 13px;
    229     line-height: 1.3;
    230     display: block;
    231     width: 70%;
    232     margin: 0 15%;
    233     text-align: center;
    234 }
    235 
    236 .wpview-type-gallery:after {
    237     content: '';
    238     display: table;
    239     clear: both;
    240 }
    241 
    242 .wpview-wrap .toolbar {
     215.wpview-wrap.selected {
     216    background-color: #f2f8ff; /* fallback to old blue */
     217    background-color: rgba(0,0,0,0.1);
     218    border-color: #777;
     219    border-color: rgba(0,0,0,0.3);
     220}
     221
     222.wpview-overlay {
    243223    position: absolute;
    244224    top: 0;
    245225    right: 0;
     226    bottom: 0;
     227    left: 0;
     228}
     229
     230.wpview-wrap.selected .wpview-overlay {
     231    display: none;
     232}
     233
     234.wpview-wrap .toolbar {
     235    position: absolute;
     236    top: 0;
     237    left: 0;
    246238    display: none;
    247239    z-index: 100;
     240}
     241
     242.wpview-wrap.selected .toolbar {
     243    display: block;
    248244}
    249245
     
    255251#wp-image-toolbar div {
    256252    margin-top: 7px;
    257     margin-right: 7px;
     253    margin-left: 7px;
    258254    padding: 2px;
    259255    width: 30px;
     
    274270}
    275271
    276 /* temporary overrides; still pending styling */
    277 .wpview-type-audio .toolbar div,
    278 .wont-play .toolbar div {
    279     margin: 0;
    280     padding: 3px;
    281     width: 20px;
    282     height: 20px;
    283     box-shadow: none;
    284     font-size: 20px;
    285 }
    286 
    287 .wpview-wrap.selected .toolbar,
    288 .wpview-type-audio .toolbar,
    289 .wpview-type-video .toolbar {
     272/* Audio player is short; therefore let's put the toolbar above */
     273.wpview-type-audio .toolbar {
     274    top: -41px;
     275}
     276
     277.wpview-type-audio .toolbar div:first-child {
     278    margin-left: 0;
     279}
     280
     281.wont-play {
     282    padding: 4px 0;
     283}
     284
     285.wont-play p {
     286    font-size: 13px;
     287    line-height: 1.3;
    290288    display: block;
    291 }
    292 
    293 .wpview-type-gallery.selected,
    294 .wpview-type-audio,
    295 .wpview-type-video {
    296     background-color: #f2f8ff; /* fallback to old blue */
    297     background-color: rgba(0,0,0,0.1);
    298     border-color: #777;
    299     border-color: rgba(0,0,0,0.3);
     289    width: 70%;
     290    margin: 0 15%;
     291    text-align: center;
    300292}
    301293
     
    309301    white-space: nowrap;
    310302    text-overflow: ellipsis;
     303}
     304
     305.wpview-type-gallery:after {
     306    content: '';
     307    display: table;
     308    clear: both;
    311309}
    312310
  • trunk/src/wp-includes/media-template.php

    r27751 r27777  
    998998        <# } #>
    999999        <?php wp_underscore_audio_template() ?>
     1000        <div class="wpview-overlay"></div>
    10001001    </script>
    10011002
     
    10091010        <# } #>
    10101011        <?php wp_underscore_video_template() ?>
     1012        <div class="wpview-overlay"></div>
    10111013    </script>
    10121014
     
    10281030            <div class="wp-playlist-prev"></div>
    10291031        </div>
     1032        <div class="wpview-overlay"></div>
    10301033    </script>
    10311034
Note: See TracChangeset for help on using the changeset viewer.