Media Grid: Remove fields from showing in the grid itself.
All details are still available within the modal, and less-distinguishable non-image files still show the filename along with the file type icon. Reverts [29079], [29078], [29077], and [28995]. see #24716. Built from https://develop.svn.wordpress.org/trunk@29280 git-svn-id: http://core.svn.wordpress.org/trunk@29062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da0b98a8f0
commit
448275cce4
|
@ -1333,7 +1333,6 @@ form.upgrade .hint {
|
|||
display: none;
|
||||
margin: 0 0px -1px 20px;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-top: none;
|
||||
|
@ -1356,7 +1355,6 @@ form.upgrade .hint {
|
|||
#screen-meta-links .screen-meta-toggle {
|
||||
position: relative;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#screen-meta-links a {
|
||||
|
|
|
@ -1333,7 +1333,6 @@ form.upgrade .hint {
|
|||
display: none;
|
||||
margin: 0 20px -1px 0px;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
border-top: none;
|
||||
|
@ -1356,7 +1355,6 @@ form.upgrade .hint {
|
|||
#screen-meta-links .screen-meta-toggle {
|
||||
position: relative;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#screen-meta-links a {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1019,12 +1019,7 @@ final class WP_Screen {
|
|||
?>
|
||||
<div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
|
||||
<form id="adv-settings" action="" method="post">
|
||||
<?php if (
|
||||
isset( $wp_meta_boxes[ $this->id ] )
|
||||
|| $this->get_option( 'per_page' )
|
||||
|| $this->get_option( 'misc_screen_options' )
|
||||
|| ( $columns && empty( $columns['_title'] ) )
|
||||
) : ?>
|
||||
<?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
|
||||
<h5><?php _e( 'Show on screen' ); ?></h5>
|
||||
<?php
|
||||
endif;
|
||||
|
@ -1076,28 +1071,6 @@ final class WP_Screen {
|
|||
?>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php elseif ( $this->get_option( 'misc_screen_options' ) ):
|
||||
$misc_options = $this->get_option( 'misc_screen_options' );
|
||||
?>
|
||||
<div class="metabox-prefs misc-screen-options" data-id="<?php echo esc_attr( $misc_options['id'] ) ?>">
|
||||
<?php
|
||||
|
||||
$option = get_user_option( $misc_options['option'] );
|
||||
$hidden = array();
|
||||
if ( ! empty( $option ) ) {
|
||||
$hidden = $option;
|
||||
}
|
||||
foreach ( $this->_options as $column => $args ) {
|
||||
if ( 'misc_screen_options' === $column ) {
|
||||
continue;
|
||||
}
|
||||
$id = "$column-hide";
|
||||
echo '<label for="' . $id . '">';
|
||||
echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( ! in_array( $column, $hidden ), true, false ) . ' />';
|
||||
echo $args['label'] . "</label>\n";
|
||||
} ?>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
$this->render_screen_layout();
|
||||
|
|
|
@ -27,31 +27,12 @@ columns = {
|
|||
},
|
||||
|
||||
saveManageColumnsState : function() {
|
||||
var hidden, page, opts = $( '.misc-screen-options' );
|
||||
if ( opts.length ) {
|
||||
hidden = [];
|
||||
opts.find( '.hide-column-tog' ).each( function() {
|
||||
var $el, field = this.value;
|
||||
$el = $( '.data-' + field );
|
||||
if ( ! this.checked ) {
|
||||
hidden.push( field );
|
||||
$el.removeClass( 'data-visible' ).addClass( 'data-hidden' );
|
||||
} else {
|
||||
$el.removeClass( 'data-hidden' ).addClass( 'data-visible' );
|
||||
}
|
||||
} );
|
||||
page = pagenow + opts.data( 'id' );
|
||||
hidden = hidden.join( ',' );
|
||||
} else {
|
||||
page = pagenow;
|
||||
hidden = this.hidden();
|
||||
}
|
||||
|
||||
var hidden = this.hidden();
|
||||
$.post(ajaxurl, {
|
||||
action: 'hidden-columns',
|
||||
hidden: hidden,
|
||||
screenoptionnonce: $('#screenoptionnonce').val(),
|
||||
page: page
|
||||
page: pagenow
|
||||
});
|
||||
},
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -28,12 +28,6 @@ if ( 'grid' === $mode ) {
|
|||
'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ),
|
||||
) );
|
||||
|
||||
add_screen_option( 'misc_screen_options', array( 'option' => 'manageuploadgridcolumnshidden', 'id' => 'grid' ) );
|
||||
add_screen_option( 'title', array( 'label' => __( 'Name' ) ) );
|
||||
add_screen_option( 'uploadedTo', array( 'label' => __( 'Uploaded To' ) ) );
|
||||
add_screen_option( 'dateFormatted', array( 'label' => __( 'Date' ) ) );
|
||||
add_screen_option( 'mime', array( 'label' => __( 'Mime-type' ) ) );
|
||||
|
||||
get_current_screen()->add_help_tab( array(
|
||||
'id' => 'overview',
|
||||
'title' => __( 'Overview' ),
|
||||
|
|
|
@ -961,29 +961,6 @@
|
|||
border-radius: 0;
|
||||
}
|
||||
|
||||
.attachment .data-fields {
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
|
||||
.attachment .data-field {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
line-height: 19px;
|
||||
height: 19px;
|
||||
text-align: right;
|
||||
width: 90%;
|
||||
margin: 0 5%;
|
||||
}
|
||||
|
||||
.attachment .data-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attachment .data-visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachments Browser
|
||||
*/
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -961,29 +961,6 @@
|
|||
border-radius: 0;
|
||||
}
|
||||
|
||||
.attachment .data-fields {
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
|
||||
.attachment .data-field {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
line-height: 19px;
|
||||
height: 19px;
|
||||
text-align: left;
|
||||
width: 90%;
|
||||
margin: 0 5%;
|
||||
}
|
||||
|
||||
.attachment .data-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attachment .data-visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachments Browser
|
||||
*/
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -443,37 +443,7 @@ function wp_print_media_templates() {
|
|||
placeholder="<?php esc_attr_e('Describe this media file…'); ?>"
|
||||
<# } #> {{ maybeReadOnly }} />
|
||||
<# }
|
||||
}
|
||||
|
||||
if ( _.contains( data.controller.options.mode, 'grid' ) ) { #>
|
||||
<div class="data-fields">
|
||||
<?php
|
||||
$option = get_user_option( 'manageuploadgridcolumnshidden' );
|
||||
$hidden = array();
|
||||
if ( ! empty( $option ) ) {
|
||||
$hidden = $option;
|
||||
}
|
||||
$fields = array( 'title', 'uploadedTo', 'dateFormatted', 'mime' );
|
||||
foreach ( $fields as $field ):
|
||||
$class_name = in_array( $field, $hidden ) ? 'data-field data-hidden' : 'data-field data-visible';
|
||||
?>
|
||||
<div class="<?php echo $class_name ?> data-<?php echo $field ?>"><#
|
||||
if ( 'uploadedTo' === '<?php echo $field ?>' ) {
|
||||
if ( data[ '<?php echo $field ?>' ] ) {
|
||||
#><?php _e( 'Uploaded To: ' ) ?><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a><#
|
||||
} else {
|
||||
#><?php _e( 'Unattached' ) ?><#
|
||||
}
|
||||
} else if ( 'title' === '<?php echo $field ?>' && ! data[ '<?php echo $field ?>' ] ) {
|
||||
#><?php _e( '(No title)' ) ?><#
|
||||
} else if ( data[ '<?php echo $field ?>' ] ) {
|
||||
#>{{ data[ '<?php echo $field ?>' ] }}<#
|
||||
}
|
||||
#></div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
} #>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tmpl-attachment-details">
|
||||
|
|
Loading…
Reference in New Issue