Skip to content

Commit

Permalink
Merge branch 'master' into refactor/admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Godinho committed Sep 16, 2015
1 parent 59e04e0 commit cf176a6
Show file tree
Hide file tree
Showing 80 changed files with 5,196 additions and 4,025 deletions.
2 changes: 1 addition & 1 deletion assets/css/admin-global.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/font.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions assets/css/scss/admin-global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#toplevel_page_gravityview_settings .wp-menu-image:before,
#adminmenu .menu-icon-gravityview div.wp-menu-image:before,
#available-widgets [class*=gv_recent_entries] .widget-title:before,
#available-widgets [class*=gravityview_search] .widget-title:before {
@extend [data-icon]:before;
#available-widgets [class*=gravityview_search] .widget-title:before{
@extend [class^="gv-icon-"]:before;
@extend .gv-icon-astronaut-head:before;
}

Expand Down
4 changes: 2 additions & 2 deletions assets/css/scss/font.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ a.icon {
text-decoration: none;
}

[data-icon]:before {
[data-gv-icon]:before {
font-family: "gravityview" !important;
content: attr(data-icon);
content: attr(data-gv-icon);
font-style: normal !important;
font-weight: normal !important;
font-variant: normal !important;
Expand Down
Binary file added assets/images/screenshots/clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshots/search-bar-label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/screenshots/single-list-column.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/js/admin-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@
field_label: newField.find( '.gv-field-label' ).attr( 'data-original-title' ),
field_type: addButton.attr( 'data-objecttype' ),
input_type: newField.attr( 'data-inputtype' ),
form_id: vcfg.currentFormId,
nonce: gvGlobals.nonce,
};

Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin-views.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gravityview.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: GravityView
* Plugin URI: http://gravityview.co
* Description: Create directories based on a Gravity Forms form, insert them using a shortcode, and modify how they output.
* Version: 1.13.1
* Version: 1.14
* Author: Katz Web Services, Inc.
* Author URI: http://www.katzwebservices.com
* Text Domain: gravityview
Expand Down Expand Up @@ -89,7 +89,7 @@
*/
final class GravityView_Plugin {

const version = '1.13.1';
const version = '1.14';

private static $instance;

Expand Down
50 changes: 43 additions & 7 deletions includes/class-admin-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,58 @@ public function changelog_screen() {
<h2 class="subtitle" style="text-align: center;"><?php esc_html_e('What&rsquo;s New', 'gravityview' ); ?></h2>

<div class="feature-section col two-col">

<div class="col col-1">
<div class="media-container"><img src="<?php echo plugins_url( 'assets/images/screenshots/format-number.png', GRAVITYVIEW_FILE ); ?>" alt="Format number"></div>
<h4 class="higher">Number Field Formatting</h4>
<p>Now you can choose to use thousands separators (or not), and define decimal precision!</p>
<div class="media-container"><img src="<?php echo plugins_url( 'assets/images/screenshots/search-bar-label.png', GRAVITYVIEW_FILE ); ?>" alt="Search bar labels"></div>
<h4 class="higher">Custom Search Labels &amp; Search Mode</h4>
<p>You can now modify the search labels from the Search Bar configuration, and you can now choose whether you want your search to match <em>all</em> of the search field filters, or <em>any</em>.</p>
</div>

<div class="col col-2 last-feature">
<div class="media-container" style="min-height:143px;"><img src="<?php echo plugins_url( 'assets/images/screenshots/toolbar.png', GRAVITYVIEW_FILE ); ?>" alt="Toolbar link to Edit View"></div>
<h4 class="higher">Edit View in the Toolbar</h4>
<p>Editing a View from the front of your site used to take a bunch of clicks. Now a link to edit the embedded View is just a click away in the Toolbar.</p>
<div class="media-container" style="min-height:81px; border: none;"><img src="<?php echo plugins_url( 'assets/images/screenshots/clock.png', GRAVITYVIEW_FILE ); ?>" alt="Clocks"></div>
<h4 class="higher">Sort by Time</h4>
<p>Now you can sort time fields! Why is that so exciting? Because Gravity Forms doesn't natively support sorting by time!</p>

<div class="media-container" style="margin-top: 2em; min-height:80px;"><img src="<?php echo plugins_url( 'assets/images/screenshots/single-list-column.png', GRAVITYVIEW_FILE ); ?>" alt="Insert single list column"></div>
<h4 class="higher">Display a single column from a Multiple-Column List field</h4>
<p>Why is sorting by time being featured? Because Gravity Forms doesn't natively support sorting by time, but you can with GravityView!</p>
</div>
</div>

<hr />

<h3>1.14 on September 16</h3>

<ul>
<li>Added: Search Bar now supports custom label text</li>
<li>Added: Show the value of a single column of a "Multiple Columns" List field</li>
<li>Added: Sorting by time now works. Why is this "Added" and not "Fixed"? Because Gravity Forms doesn't natively support sorting by time!</li>
<li>Added: Display the roles of the entry creator by using <code>{created_by:roles}</code> Merge Tag</li>
<li>Fixed: Field containers were being rendered even when empty</li>
<li>Fixed: Widgets were not being displayed when using page builders and themes that pre-process shortcodes</li>
<li>Fixed: Don't show "Width %" setting when in Single Entry configuration</li>
<li>Fixed: Error in extension class that assumes GravityView is active</li>
<li>Fixed: Add check for <code>{all_fields_display_empty}</code> Gravity Forms merge tag</li>
<li>Fixed: Hide metabox until View Data Source is configured</li>
<li>Fixed: Search Bar "Link" input type wasn't highlighting properly based on the value of the filter</li>
<li>Fixed: Improved speed of getting users for Search Bar and GravityView Search Widgets with "Submitted by" fields, and in the Edit Entry screen (the Change Entry Creator dropdown)</li>
<li>Fixed: Conflict with other icon fonts in the Dashboard</li>
<li>Fixed: Allow HTML in Source URL "Link Text" field setting</li>
<li>Fixed: Gravity Forms User Registration Addon conflicts
<ul>
<li>When editing an entry, an user's roles and display name were reset to the Addon's feed configuration settings</li>
<li>Users receive "Password Updated" emails in WordPress 4.3+, even if the password wasn't changed</li>
</ul>
</li>
<li>Tweak: Support for plugin banner images in the plugin changelog screen</li>
<li>Tweak: Updated default Search Bar configuration to be a single input with "Search Everything"</li>
<li>Tweak: Sort user dropdown by display name instead of username</li>
<li>Tweak: Reduce size of AJAX responses</li>
<li>Tweak: Add "Template" column to the All Views list table - now you can better see what template is being used</li>
<li>Tweak: Remove redundant close icon for field and widget settings</li>
<li>Tweak: When adding notes via GravityView, set the note type to <code>gravityview</code> to allow for better searchability</li>
<li>Added: Automated code testing</li>
</ul>

<h3>1.13.1 on August 26</h3>

<ul>
Expand Down
6 changes: 3 additions & 3 deletions includes/class-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ public static function get_entries( $form_ids = null, $passed_criteria = null, &

/**
* @filter `gravityview_pre_get_entries` Define entries to be used before GFAPI::get_entries() is called
* @since 1.13.2
* @since 1.14
* @param null $return If you want to override GFAPI::get_entries() and define entries yourself, tap in here.
* @param array $criteria The final search criteria used to generate the request to `GFAPI::get_entries()`
* @param array $passed_criteria The original search criteria passed to `GVCommon::get_entries()`
Expand Down Expand Up @@ -1085,9 +1085,9 @@ public static function is_field_numeric( $form = null, $field = '' ) {

/**
* @filter `gravityview/common/numeric_types` What types of fields are numeric?
* @param array $numeric_types Fields that are numeric. Default: `[ number ]`
* @param array $numeric_types Fields that are numeric. Default: `[ number, time ]`
*/
$numeric_types = apply_filters( 'gravityview/common/numeric_types', array( 'number' ) );
$numeric_types = apply_filters( 'gravityview/common/numeric_types', array( 'number', 'time' ) );

if ( ! is_array( $form ) && ! is_array( $field ) ) {
$form = self::get_form( $form );
Expand Down
32 changes: 25 additions & 7 deletions includes/class-frontend-views.php
Original file line number Diff line number Diff line change
Expand Up @@ -1058,13 +1058,11 @@ private static function _override_sorting_id_by_field_type( $sort_field_id, $for
// Sorting by full name, not first, last, etc.
if ( floatval( $sort_field_id ) === floor( $sort_field_id ) ) {
/**
* Override how to sort when sorting full name.
*
* @filter `gravityview/sorting/full-name` Override how to sort when sorting full name.
* @since 1.7.4
*
* @param string $name_part `first` or `last` (default: `first`)
* @param string $sort_field_id Field used for sorting
* @param int $form_id GF Form ID
* @param[in,out] string $name_part Sort by `first` or `last` (default: `first`)
* @param[in] string $sort_field_id Field used for sorting
* @param[in] int $form_id GF Form ID
*/
$name_part = apply_filters( 'gravityview/sorting/full-name', 'first', $sort_field_id, $form_id );

Expand All @@ -1075,6 +1073,20 @@ private static function _override_sorting_id_by_field_type( $sort_field_id, $for
}
}
break;
case 'list':
$sort_field_id = false;
break;
case 'time':

/**
* @filter `gravityview/sorting/time` Override how to sort when sorting time
* @see GravityView_Field_Time
* @since 1.14
* @param[in,out] string $name_part Field used for sorting
* @param[in] int $form_id GF Form ID
*/
$sort_field_id = apply_filters( 'gravityview/sorting/time', $sort_field_id, $form_id );
break;
}

return $sort_field_id;
Expand Down Expand Up @@ -1257,19 +1269,25 @@ public function add_columns_sort_links( $label = '', $field, $form ) {
* Checks if field (column) is sortable
*
* @param string $field Field settings
* @param $form Gravity Forms form object
* @param array $form Gravity Forms form array
*
* @since 1.7
*
* @return bool True: Yes, field is sortable; False: not sortable
*/
public function is_field_sortable( $field_id = '', $form ) {

if( is_numeric( $field_id ) ) {
$field = GFFormsModel::get_field( $form, $field_id );
$field_id = $field->type;
}

$not_sortable = array(
'entry_link',
'edit_link',
'delete_link',
'custom',
'list',
);

/**
Expand Down
Loading

0 comments on commit cf176a6

Please sign in to comment.