Media at small screens:

- Show the image details/settings as an overlay.
- Better styling for the frame drop-down.
- Remove the multi-select by default on the Insert frame.
See #27423
Built from https://develop.svn.wordpress.org/trunk@29452


git-svn-id: http://core.svn.wordpress.org/trunk@29230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-08-09 05:09:16 +00:00
parent 5cab03ab29
commit d11bb9bc50
7 changed files with 74 additions and 60 deletions

View File

@ -2151,27 +2151,35 @@
}
.media-menu {
display: none;
width: auto;
max-width: 80%;
overflow: auto;
z-index: 2000;
top: 50px;
right: -300px;
left: auto;
bottom: auto;
padding: 5px 0;
border: 1px solid #ccc;
}
.media-menu.visible {
z-index: 2000;
display: block;
position: fixed;
top: 30px;
right: 30px;
left: 30px;
bottom: 30px;
width: 250px;
max-width: 100%;
overflow: auto;
right: 0;
}
.media-menu > a {
padding: 10px 20px;
padding: 12px 16px;
font-size: 16px;
}
.media-menu > a.active {
display: none;
}
.media-menu .separator {
margin: 5px 10px;
}
.media-frame-title {
right: 0;
color: #21759b;
@ -2296,10 +2304,6 @@
display: none;
}
.media-menu .separator {
margin: 12px 10px;
}
.media-modal .attachments-browser .media-toolbar-primary,
.media-modal .attachments-browser .media-toolbar-secondary {
width: 50%;
@ -2339,8 +2343,7 @@
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
/* Full-bleed modal */
.media-modal,
.image-details .media-modal,
.media-menu.visible {
.image-details .media-modal {
position: fixed;
top: 0;
right: 0;
@ -2353,7 +2356,15 @@
}
.media-sidebar {
display: none;
z-index: 1900;
max-width: 70%;
bottom: 120%;
box-sizing: border-box;
padding-bottom: 0;
}
.media-sidebar.visible {
bottom: 0;
}
.attachments-browser .attachments,
@ -2362,8 +2373,6 @@
left: 0;
}
.image-details .media-frame-title {
display: block;
top: 0;

File diff suppressed because one or more lines are too long

View File

@ -2151,27 +2151,35 @@
}
.media-menu {
display: none;
width: auto;
max-width: 80%;
overflow: auto;
z-index: 2000;
top: 50px;
left: -300px;
right: auto;
bottom: auto;
padding: 5px 0;
border: 1px solid #ccc;
}
.media-menu.visible {
z-index: 2000;
display: block;
position: fixed;
top: 30px;
left: 30px;
right: 30px;
bottom: 30px;
width: 250px;
max-width: 100%;
overflow: auto;
left: 0;
}
.media-menu > a {
padding: 10px 20px;
padding: 12px 16px;
font-size: 16px;
}
.media-menu > a.active {
display: none;
}
.media-menu .separator {
margin: 5px 10px;
}
.media-frame-title {
left: 0;
color: #21759b;
@ -2296,10 +2304,6 @@
display: none;
}
.media-menu .separator {
margin: 12px 10px;
}
.media-modal .attachments-browser .media-toolbar-primary,
.media-modal .attachments-browser .media-toolbar-secondary {
width: 50%;
@ -2339,8 +2343,7 @@
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
/* Full-bleed modal */
.media-modal,
.image-details .media-modal,
.media-menu.visible {
.image-details .media-modal {
position: fixed;
top: 0;
left: 0;
@ -2353,7 +2356,15 @@
}
.media-sidebar {
display: none;
z-index: 1900;
max-width: 70%;
bottom: 120%;
box-sizing: border-box;
padding-bottom: 0;
}
.media-sidebar.visible {
bottom: 0;
}
.attachments-browser .attachments,
@ -2362,8 +2373,6 @@
right: 0;
}
.image-details .media-frame-title {
display: block;
top: 0;

File diff suppressed because one or more lines are too long

View File

@ -4648,7 +4648,6 @@
tagName: 'li',
className: 'attachment',
template: media.template('attachment'),
_isTouch: false,
attributes: {
tabIndex: 0,
@ -4657,7 +4656,6 @@
events: {
'click .js--select-attachment': 'toggleSelectionHandler',
'touchend .attachment-preview': 'setTouch',
'change [data-setting]': 'updateSetting',
'change [data-setting] input': 'updateSetting',
'change [data-setting] select': 'updateSetting',
@ -4783,10 +4781,6 @@
}
},
setTouch: function() {
this._isTouch = true;
},
/**
* @param {Object} event
*/
@ -4825,11 +4819,6 @@
method = 'toggle';
}
if ( this._isTouch ) {
this._isTouch = false;
method = 'add';
}
this.toggleSelection({
method: method
});
@ -4948,9 +4937,10 @@
}
// Fixes bug that loses focus when selecting a featured image
if ( !method ) {
if ( ! method ) {
method = 'add';
}
if ( method !== 'add' ) {
method = 'reset';
}
@ -5980,6 +5970,11 @@
userSettings: this.model.get('displayUserSettings')
}) );
}
// Show the sidebar on mobile
if ( this.model.id === 'insert' ) {
sidebar.$el.addClass( 'visible' );
}
},
disposeSingle: function() {
@ -5987,6 +5982,8 @@
sidebar.unset('details');
sidebar.unset('compat');
sidebar.unset('display');
// Hide the sidebar on mobile
sidebar.$el.removeClass( 'visible' );
}
});
@ -6914,7 +6911,6 @@
value = Math.round( this.model.get( 'aspectRatio' ) * num );
this.model.set( 'customWidth', value, { silent: true } );
this.$( '[data-setting="customWidth"]' ).val( value );
}
},

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.0-beta3-20140808';
$wp_version = '4.0-beta3-20140809';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.