Skip to content

Commit

Permalink
Merge pull request #3968 from pods-framework/feature/#3967
Browse files Browse the repository at this point in the history
CSS tweaks, fixes, and additions for 2.7
  • Loading branch information
pglewis authored Mar 3, 2017
2 parents e260cc5 + 971cc30 commit 40ec4af
Show file tree
Hide file tree
Showing 7 changed files with 235 additions and 185 deletions.
2 changes: 1 addition & 1 deletion classes/PodsAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function admin_head () {
wp_enqueue_script( 'post' );
elseif ( 0 === strpos( $page, 'pods-settings-' ) ) {
wp_enqueue_script( 'post' );
wp_enqueue_style( 'pods-admin' );
//wp_enqueue_style( 'pods-admin' );
}
else
wp_enqueue_style( 'pods-admin' );
Expand Down
40 changes: 20 additions & 20 deletions classes/PodsUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -3092,7 +3092,7 @@ public function filters () {
public function filters_popup () {
$filters = $this->filters;
?>
<div id="pods-ui-posts-filter-popup" class="hidden">
<div id="pods-ui-posts-filter-popup" class="pods-hidden">
<form action="" method="get" class="pods-ui-posts-filter-popup">
<h2><?php _e( 'Advanced Filters', 'pods' ); ?></h2>

Expand Down Expand Up @@ -3157,14 +3157,14 @@ public function filters_popup () {
if ( !empty( $end ) && !in_array( $end, array( '0000-00-00', '0000-00-00 00:00:00', '00:00:00' ) ) )
$end = PodsForm::field_method( $filter_field[ 'type' ], 'convert_date', $end, 'n/j/Y' );
?>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( ( empty( $start ) && empty( $end ) ) ? '' : ' hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( ( empty( $start ) && empty( $end ) ) ? ' hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( ( empty( $start ) && empty( $end ) ) ? '' : ' pods-hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( ( empty( $start ) && empty( $end ) ) ? ' pods-hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>

<label for="pods-form-ui-filter-<?php echo esc_attr( $filter ); ?>_start">
<?php echo esc_html( $filter_field[ 'label' ] ); ?>
</label>

<span class="pods-ui-posts-filter<?php echo esc_attr( ( empty( $start ) && empty( $end ) ) ? ' hidden' : '' ); ?>">
<span class="pods-ui-posts-filter<?php echo esc_attr( ( empty( $start ) && empty( $end ) ) ? ' pods-hidden' : '' ); ?>">
<?php echo PodsForm::field( 'filter_' . $filter . '_start', $start, $filter_field[ 'type' ], $filter_field ); ?>

<label for="pods-form-ui-filter-<?php echo esc_attr( $filter ); ?>_end">to</label>
Expand All @@ -3189,14 +3189,14 @@ public function filters_popup () {

$options = array_merge( $filter_field, $filter_field[ 'options' ] );
?>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( empty( $value ) ? '' : ' hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( empty( $value ) ? ' hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( empty( $value ) ? '' : ' pods-hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( empty( $value ) ? ' pods-hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>

<label for="pods-form-ui-filter-<?php echo esc_attr( $filter ); ?>">
<?php echo esc_html( $filter_field[ 'label' ] ); ?>
</label>

<span class="pods-ui-posts-filter<?php echo esc_attr( strlen( $value ) < 1 ? ' hidden' : '' ); ?>">
<span class="pods-ui-posts-filter<?php echo esc_attr( strlen( $value ) < 1 ? ' pods-hidden' : '' ); ?>">
<?php echo PodsForm::field( 'filter_' . $filter, $value, 'pick', $options ); ?>
</span>
<?php
Expand Down Expand Up @@ -3224,14 +3224,14 @@ public function filters_popup () {

$options = array_merge( $filter_field, $filter_field[ 'options' ] );
?>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( empty( $value ) ? '' : ' hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( empty( $value ) ? ' hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( empty( $value ) ? '' : ' pods-hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( empty( $value ) ? ' pods-hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>

<label for="pods-form-ui-filter-<?php echo esc_attr( $filter ); ?>">
<?php echo esc_html( $filter_field[ 'label' ] ); ?>
</label>

<span class="pods-ui-posts-filter<?php echo esc_attr( strlen( $value ) < 1 ? ' hidden' : '' ); ?>">
<span class="pods-ui-posts-filter<?php echo esc_attr( strlen( $value ) < 1 ? ' pods-hidden' : '' ); ?>">
<?php echo PodsForm::field( 'filter_' . $filter, $value, 'pick', $options ); ?>
</span>
<?php
Expand All @@ -3249,14 +3249,14 @@ public function filters_popup () {
if ( empty( $options[ 'input_helper' ] ) && isset( $filter_field[ 'options' ] ) && isset( $filter_field[ 'options' ][ 'input_helper' ] ) )
$options[ 'input_helper' ] = $filter_field[ 'options' ][ 'input_helper' ];
?>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( empty( $value ) ? '' : ' hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( empty( $value ) ? ' hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>
<span class="pods-ui-posts-filter-toggle toggle-on<?php echo esc_attr( empty( $value ) ? '' : ' pods-hidden' ); ?>">+</span>
<span class="pods-ui-posts-filter-toggle toggle-off<?php echo esc_attr( empty( $value ) ? ' pods-hidden' : '' ); ?>"><?php _e( 'Clear', 'pods' ); ?></span>

<label for="pods-form-ui-filter-<?php echo esc_attr( $filter ); ?>">
<?php echo esc_html( $filter_field[ 'label' ] ); ?>
</label>

<span class="pods-ui-posts-filter<?php echo esc_attr( empty( $value ) ? ' hidden' : '' ); ?>">
<span class="pods-ui-posts-filter<?php echo esc_attr( empty( $value ) ? ' pods-hidden' : '' ); ?>">
<?php echo PodsForm::field( 'filter_' . $filter, $value, 'text', $options ); ?>
</span>
<?php
Expand All @@ -3283,29 +3283,29 @@ public function filters_popup () {
<script type="text/javascript">
jQuery( function () {
jQuery( document ).on( 'click', '.pods-ui-posts-filter-toggle.toggle-on', function ( e ) {
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).removeClass( 'hidden' );
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).removeClass( 'pods-hidden' );

jQuery( this ).hide();
jQuery( this ).parent().find( '.toggle-off' ).show();
} );

jQuery( document ).on( 'click', '.pods-ui-posts-filter-toggle.toggle-off', function ( e ) {
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).addClass( 'hidden' );
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).addClass( 'pods-hidden' );
jQuery( this ).parent().find( 'select, input' ).val( '' );

jQuery( this ).hide();
jQuery( this ).parent().find( '.toggle-on' ).show();
} );

jQuery( document ).on( 'click', '.pods-ui-posts-filter-toggled label', function ( e ) {
if ( jQuery( this ).parent().find( '.pods-ui-posts-filter' ).hasClass( 'hidden' ) ) {
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).removeClass( 'hidden' );
if ( jQuery( this ).parent().find( '.pods-ui-posts-filter' ).hasClass( 'pods-hidden' ) ) {
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).removeClass( 'pods-hidden' );

jQuery( this ).parent().find( '.toggle-on' ).hide();
jQuery( this ).parent().find( '.toggle-off' ).show();
}
else {
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).addClass( 'hidden' );
jQuery( this ).parent().find( '.pods-ui-posts-filter' ).addClass( 'pods-hidden' );
jQuery( this ).parent().find( 'select, input' ).val( '' );

jQuery( this ).parent().find( '.toggle-on' ).show();
Expand Down Expand Up @@ -3888,7 +3888,7 @@ public function screen_meta () {
$this->do_hook( 'screen_meta_pre' );
if ( 0 < strlen( $screen_html ) ) {
?>
<div id="screen-options-wrap" class="hidden">
<div id="screen-options-wrap" class="pods-hidden">
<form id="adv-settings" action="" method="post">
<?php
echo $screen_html;
Expand Down Expand Up @@ -3943,7 +3943,7 @@ public function screen_meta () {
}
if ( 0 < strlen( $help_html ) ) {
?>
<div id="contextual-help-wrap" class="hidden">
<div id="contextual-help-wrap" class="pods-hidden">
<div class="metabox-prefs">
<?php echo $help_html; ?>
</div>
Expand Down
42 changes: 37 additions & 5 deletions ui/css/pods-admin.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.pods-hidden {
display: none;
}

.pods-admin .pods-leaf-watermark-right {
position: fixed;
width: 236px;
Expand Down Expand Up @@ -179,7 +183,8 @@ tbody.pods-manage-list tr.pods-manage-row th.pods-manage-sort {

tbody.pods-manage-list tr.pods-manage-row th.pods-manage-sort img {
vertical-align: top;
margin-top: 1px;
margin-top: 7px;
margin-left: -5px;
}

tbody.pods-manage-list tr.pods-manage-row td > span.pods-manage-row-more {
Expand All @@ -206,7 +211,6 @@ tbody.pods-manage-list tr div.pods-manage-row-wrapper .pods-manage-row-delete {
tbody.pods-manage-list tr div.pods-manage-row-wrapper .pods-manage-row-save {
float: right;
text-align: right;
width: 40%;
}

tbody.pods-manage-list tr.pods-field-new div.pods-manage-row-wrapper .pods-manage-row-delete a.submitdelete,
Expand Down Expand Up @@ -333,13 +337,19 @@ div.pods-manage-field .pods-field-option-group .pods-field-option-group-label {
max-width: 25em;
}

.pods-manage-field .pods-pick-values {
/* Match width to input fields */
width: 93%;
}

.pods-manage-field .pods-field-option .pods-form-ui-field-type-wysiwyg textarea {
max-width: 100%;
}

.pods-manage-field .pods-field-option div select {
float: none;
width: 100%;
margin: 0;
}

.pods-manage-field .pods-field-option .pods-form-ui-field-type-file {
Expand All @@ -351,13 +361,13 @@ div.pods-manage-field .pods-field-option-group .pods-field-option-group-label {
border-bottom: none;
}

.pods-manage-field .pods-field-option .pods-form-ui-field-type-file ul.pods-dfv-list li.pods-dfv-list-name {
/*.pods-manage-field .pods-field-option .pods-form-ui-field-type-file ul.pods-flex-list li.pods-flex-name {
left: 46px;
right: 30px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}*/

.pods-manage-field .pods-field-option .pods-form-ui-field-type-file table.form-table,
.pods-manage-field .pods-field-option-group p.pods-field-option-group-label {
Expand Down Expand Up @@ -439,7 +449,7 @@ div.pods-manage-field .pods-field-option-group .pods-field-option-group-label {
}

/*
* Pods Flexible rows (hacky)
* Pods Flexible
*/
tbody.pods-manage-list tr.flexible-row {
display: none;
Expand Down Expand Up @@ -500,4 +510,26 @@ div.row-actions.row-actions-toggle {
margin-top: 0;
margin-bottom: 0;
}

div.pods-manage-field .pods-field-option label,
div.pods-manage-field .pods-field-option-group .pods-field-option-group-label {
float: none;
display: block;
width: 100%;
max-width: none;
padding-bottom: 4px;
}

.pods-manage-field .pods-field-option input[type="text"],
.pods-manage-field .pods-field-option select,
.pods-manage-field .pods-field-option textarea,
.pods-manage-field .pods-field-option .pods-field.pods-boolean,
.pods-manage-field .pods-pick-values,
.pods-manage-field .pods-field-option .pods-form-ui-field-type-file,
.pods-manage-field .pods-slider-field {
display: block;
margin: 0;
width: 100%;
max-width: none;
}
}
Loading

0 comments on commit 40ec4af

Please sign in to comment.