Skip to content
Permalink
Browse files

Move record actions outside of filters

  • Loading branch information...
Luke Carbis
Luke Carbis committed Jun 27, 2016
1 parent 591ce49 commit 71e6ac1ff66e4415909c7ae29b243733a1fd209d
Showing with 29 additions and 8 deletions.
  1. +15 −4 classes/class-list-table.php
  2. +12 −2 ui/css/admin.css
  3. +2 −2 ui/js/exclude.js
@@ -57,9 +57,6 @@ function extra_tablenav( $which ) {
if ( 'top' === $which ) {
echo $this->filters_form(); // xss ok
}
if ( 'bottom' === $which ) {
echo $this->record_actions_form(); // xss ok
}
}
function no_items() {
@@ -840,7 +837,18 @@ function record_actions_form() {
}
echo '</select></div>';
wp_nonce_field( 'stream_record_actions_nonce', 'stream_record_actions_nonce' );
printf( '<input type="hidden" name="page" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'page' ) ) );
printf( '<input type="hidden" name="date_predefined" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'date_predefined' ) ) );
printf( '<input type="hidden" name="date_from" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'date_from' ) ) );
printf( '<input type="hidden" name="date_to" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'date_to' ) ) );
printf( '<input type="hidden" name="user_id" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'user_id' ) ) );
printf( '<input type="hidden" name="connector" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'connector' ) ) );
printf( '<input type="hidden" name="context" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'context' ) ) );
printf( '<input type="hidden" name="action" value="%s">', esc_attr( wp_stream_filter_input( INPUT_GET, 'action' ) ) );
printf( '<input type="submit" name="" id="record-actions-submit" class="button" value="%s">', esc_attr__( 'Apply', 'stream' ) );
echo '<div class="clear"></div>';
return ob_get_clean();
}
@@ -850,9 +858,12 @@ function display() {
echo '<form method="get" action="' . esc_url( $url ) . '" id="record-filter-form">';
echo $this->filter_search(); // xss ok
parent::display();
echo '</form>';
echo '<form method="get" action="' . esc_url( $url ) . '" id="record-actions-form">';
echo $this->record_actions_form(); // xss ok
echo '</form>';
}
function display_tablenav( $which ) {
@@ -4,8 +4,13 @@
padding-top: 6px;
}

.toplevel_page_wp_stream .tablenav.bottom .button {
margin-right: 6px;
.toplevel_page_wp_stream #record-actions-form {
margin-top: -32px;
}

.toplevel_page_wp_stream #record-actions-form .button {
margin-left: 6px;
float: left;
}

.toplevel_page_wp_stream .tablenav .actions {
@@ -482,6 +487,11 @@
}

@media screen and ( max-width: 782px ) {
.toplevel_page_wp_stream #record-actions-form {
margin-top: 0;
margin-bottom: 35px;
}

.wp_stream_settings .stream-exclude-list td,
.wp_stream_network_settings .stream-exclude-list td,
.wp_stream_default_settings .stream-exclude-list td {
@@ -129,7 +129,7 @@ jQuery( function( $ ) {
}
},
templateResult: function( object ) {
var $result = $( '<div>' ).text( object.text );
var $result = $( '<div>' ).text( object.text );

if ( 'undefined' !== typeof object.icon && object.icon ) {
$result.prepend( $( '<img src="' + object.icon + '" class="wp-stream-select2-icon">' ) );
@@ -148,7 +148,7 @@ jQuery( function( $ ) {
return $result;
},
templateSelection: function( object ) {
var $result = $( '<div>' ).text( object.text );
var $result = $( '<div>' ).text( object.text );

if ( $.isNumeric( object.id ) && object.text.indexOf( 'icon-users' ) < 0 ) {
$result.append( $( '<i class="icon16 icon-users"></i>' ) );

0 comments on commit 71e6ac1

Please sign in to comment.
You can’t perform that action at this time.