Skip to content

Commit

Permalink
Merge pull request #321 from katzwebservices/dev/1-5-4
Browse files Browse the repository at this point in the history
Dev/1 5 4
  • Loading branch information
zackkatz committed Jan 30, 2015
2 parents 0a1cb0c + 8cd93fd commit 28a5450
Show file tree
Hide file tree
Showing 127 changed files with 2,390 additions and 1,652 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ node_modules/*
.sass-cache
*.codekit
.tx
.idea
.idea
languages/gravityview-pt.mo
languages/gravityview-pt.po
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ host = https://www.transifex.com
file_filter = languages/gravityview-<lang>.po
source_lang = en
type = PO
lang_map = pt: pt_PT, it: it_IT, bn: bn_BD, sv: sv_SE, nl: nl_NL
lang_map = it: it_IT, bn: bn_BD, sv: sv_SE, nl: nl_NL
12 changes: 6 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module.exports = function(grunt) {
dist: {
files: [{
expand: true,
cwd: 'includes/css/scss',
cwd: 'assets/css/scss',
src: ['*.scss','!admin-merge-tags.scss','!admin-tooltips.scss','!font.scss'],
dest: 'includes/css',
dest: 'assets/css',
ext: '.css'
}]
},
Expand All @@ -34,9 +34,9 @@ module.exports = function(grunt) {
main: {
files: [{
expand: true,
cwd: 'includes/js',
cwd: 'assets/js',
src: ['**/*.js','!**/*.min.js'],
dest: 'includes/js',
dest: 'assets/js',
ext: '.min.js'
}]
},
Expand All @@ -53,7 +53,7 @@ module.exports = function(grunt) {

watch: {
main: {
files: ['includes/js/*.js','!includes/js/*.min.js','readme.txt'],
files: ['assets/js/*.js','!assets/js/*.min.js','readme.txt'],
tasks: ['uglify:main','wp_readme_to_markdown']
},
extension_js: {
Expand All @@ -65,7 +65,7 @@ module.exports = function(grunt) {
tasks: ['sass:templates']
},
scss: {
files: ['includes/css/scss/*.scss'],
files: ['assets/css/scss/*.scss'],
tasks: ['sass:dist']
},
},
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions assets/css/admin-global.css

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

.gravityview_page_settings #wpcontent #redux-header {
padding: 0;
background: url(../../images/stars.jpg) left top repeat;
background: url(../images/stars.jpg) left top repeat;
}

.gravityview_page_settings #redux-header .display_header {
min-height: 110px;
background: url(../../images/astronaut-200x263.png) -30px top no-repeat;
background: url(../images/astronaut-200x263.png) -30px top no-repeat;
margin: 0;
padding: 10px 0 0 160px;
}
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@
}
}

// On all Admin pages
.post-type-gravityview {

.changelog ul {
list-style-type: square;

ul {
list-style: circle;
margin: .5em 0 .5em 1.3em;
}
}

}

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

/* image - to be removed */
.gv_button_icon {
background: url( '../../images/gravity-view-btn.png') no-repeat top left;
background: url( '../images/gravity-view-btn.png') no-repeat top left;
display: inline-block;
height: 20px;
margin: 0 2px 0 0;
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions includes/css/scss/font.scss → assets/css/scss/font.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

@font-face {
font-family: "gravityview";
src:url("fonts/gravityview.eot");
src:url("fonts/gravityview.eot?#iefix") format("embedded-opentype"),
url("fonts/gravityview.woff") format("woff"),
url("fonts/gravityview.ttf") format("truetype"),
url("fonts/gravityview.svg#gravityview") format("svg");
src:url("../fonts/gravityview.eot");
src:url("../fonts/gravityview.eot?#iefix") format("embedded-opentype"),
url("../fonts/gravityview.woff") format("woff"),
url("../fonts/gravityview.ttf") format("truetype"),
url("../fonts/gravityview.svg#gravityview") format("svg");
font-weight: normal;
font-style: normal;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions assets/fonts/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php // Silence is golden
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions assets/images/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php // Silence is golden
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added assets/images/screenshots/delete-entry.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added assets/images/screenshots/hide-until-search.png
1 change: 1 addition & 0 deletions assets/images/screenshots/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php // Silence is golden
File renamed without changes
File renamed without changes
Binary file added assets/images/screenshots/show-clear-button.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions assets/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php // Silence is golden
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
174 changes: 174 additions & 0 deletions assets/js/fe-views.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/**
* Custom js script loaded on Views frontend
*
* @package GravityView
* @license GPL2+
* @author Katz Web Services, Inc.
* @link http://gravityview.co
* @copyright Copyright 2014, Katz Web Services, Inc.
*
* @since 1.0.0
*/


jQuery(document).ready( function( $ ) {

var gvFront = {

init: function() {

this.cookies();
this.datepicker();

$('.gv-widget-search').on('keypress change', this.form_changed);

$('.gv-search-clear').on('click', this.clear_search );

},

/**
* Triggered when the search form changes
* - Adds 'data-form-changed' attribute to <form> wrapper
* - Fades in the Clear button and changes the text to "Reset"
*
* @param e jQuery Event
*/
form_changed: function( e ) {

// Only trigger change on characters, not Shift or Command/Alt
if( e.type === 'keypress' && ( e.which === 0 || e.ctrlKey || e.metaKey || e.altKey ) ) {
return;
}

$(this).attr('data-form-changed', 1 );

$('.gv-search-clear', $(this) ).text( gvGlobals.reset ).fadeIn(100);
},

/**
* - If the form has been changed, the Clear button becomes Reset and reverts the state to form on load
* - If the form has not been changed:
* - If there is no existing search result, hide the button
* - If there is a search result, refresh page without $_GET parameters
*
* @param e jQuery Event
* @returns {boolean}
*/
clear_search: function( e ) {

var $form = $( this ).parents('form');
var changed = ( $form.attr('data-form-changed').length > 0 );

// Handle an existing search
if( $form.hasClass('gv-is-search') ) {

// If there are no changes, submit the form
if( !changed ) {
return true;
}

}

// If the form has been changed, just reset the data
if( changed ) {
e.preventDefault();

$form.trigger( 'reset' );

$form
.attr('data-form-changed', null) // Clear the changed status
.find('.gv-search-clear')
.text( gvGlobals.clear ); // Update the text of the button

// If there's now no form field text, hide the reset button
if( false === $form.hasClass('gv-is-search') ) {
$('.gv-search-clear', $form ).hide(100);
}

return false;
}

return true;
},

/**
* Generate the datepicker for GV date fields
*/
datepicker: function() {

// If datepicker is loaded
if( jQuery.fn.datepicker ) {

$('.gv-datepicker').each(
function (){
var element = jQuery(this);
var image = "";
var showOn = "focus";

if(element.hasClass("datepicker_with_icon")){
showOn = "both";
image = jQuery('#gforms_calendar_icon_' + this.id).val();
}

gvGlobals.datepicker.showOn = showOn;
gvGlobals.datepicker.buttonImage = image;
gvGlobals.datepicker.buttonImageOnly = true;

// Process custom date formats
if( !gvGlobals.datepicker.dateFormat ) {

var format = "mm/dd/yy";

if(element.hasClass("mdy"))
format = "mm/dd/yy";
else if(element.hasClass("dmy"))
format = "dd/mm/yy";
else if(element.hasClass("dmy_dash"))
format = "dd-mm-yy";
else if(element.hasClass("dmy_dot"))
format = "dd.mm.yy";
else if(element.hasClass("ymd_slash"))
format = "yy/mm/dd";
else if(element.hasClass("ymd_dash"))
format = "yy-mm-dd";
else if(element.hasClass("ymd_dot"))
format = "yy.mm.dd";

gvGlobals.datepicker.dateFormat = format;
}

element.datepicker( gvGlobals.datepicker );
}
);

}
},

cookies: function() {
if( $("#gravityview_back_link").length > 0 ) {
gvFront.backGetCookie();
} else if( $(".gravityview-view-id").length > 0 ) {
$(".gravityview-view-id").each( gvFront.backSetCookie );
}
},

// Set the back link cookie
backSetCookie: function() {
var viewId = $(this).val();
$.cookie('gravityview_back_link_'+ viewId, window.location.href, { path: gvGlobals.cookiepath } );
},

// Get the back link cookie and replace the back link href
backGetCookie: function() {
var viewId = $("#gravityview_back_link").attr('data-viewid');
if( $.cookie('gravityview_back_link_'+ viewId ) != null ) {
$("#gravityview_back_link").attr('href', $.cookie('gravityview_back_link_'+ viewId) );
}
},


};

gvFront.init();

});
1 change: 1 addition & 0 deletions assets/js/fe-views.min.js

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

1 change: 1 addition & 0 deletions assets/js/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php // Silence is golden
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions gravityview.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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.5.3
* Version: 1.5.4
* Author: Katz Web Services, Inc.
* Author URI: http://www.katzwebservices.com
* Text Domain: gravityview
Expand Down Expand Up @@ -69,7 +69,7 @@
*/
final class GravityView_Plugin {

const version = '1.5.3';
const version = '1.5.4';

public static $theInstance;

Expand Down
Binary file removed images/screenshots/delete-entry.png
Diff not rendered.
6 changes: 5 additions & 1 deletion includes/admin/metaboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,11 @@ function render_view_settings_metabox( $post ) {

GravityView_Render_Settings::render_setting_row( 'show_only_approved', $current_settings );

/**
* @since 1.5.4
*/
GravityView_Render_Settings::render_setting_row( 'hide_until_searched', $current_settings );

GravityView_Render_Settings::render_setting_row( 'hide_empty', $current_settings );

GravityView_Render_Settings::render_setting_row( 'user_edit', $current_settings );
Expand Down Expand Up @@ -519,7 +524,6 @@ function add_other_metaboxes() {
* @return array Modified
*/
function hide_wordpress_seo_metabox( $options = array() ) {
global $pagenow;

$options['hideeditbox-gravityview'] = true;

Expand Down
4 changes: 2 additions & 2 deletions includes/class-admin-add-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ function add_scripts_and_styles() {
wp_enqueue_style( 'jquery-ui-datepicker', $protocol.'ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/themes/smoothness/jquery-ui.css', array(), GravityView_Plugin::version );

//enqueue styles
wp_register_style( 'gravityview_postedit_styles', plugins_url('includes/css/admin-post-edit.css', GRAVITYVIEW_FILE), array(), GravityView_Plugin::version );
wp_register_style( 'gravityview_postedit_styles', plugins_url('assets/css/admin-post-edit.css', GRAVITYVIEW_FILE), array(), GravityView_Plugin::version );
wp_enqueue_style( 'gravityview_postedit_styles' );

$script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';

// custom js
wp_register_script( 'gravityview_postedit_scripts', plugins_url('includes/js/admin-post-edit'.$script_debug.'.js', GRAVITYVIEW_FILE), array( 'jquery', 'jquery-ui-datepicker' ), GravityView_Plugin::version );
wp_register_script( 'gravityview_postedit_scripts', plugins_url('assets/js/admin-post-edit'.$script_debug.'.js', GRAVITYVIEW_FILE), array( 'jquery', 'jquery-ui-datepicker' ), GravityView_Plugin::version );
wp_enqueue_script( 'gravityview_postedit_scripts' );
wp_localize_script('gravityview_postedit_scripts', 'gvGlobals', array(
'nonce' => wp_create_nonce( 'gravityview_ajaxaddshortcode'),
Expand Down
4 changes: 2 additions & 2 deletions includes/class-admin-approve-entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,12 @@ function add_scripts_and_styles( $hook ) {

$approvedcolumn = self::get_approved_column( $form_id );

wp_register_style( 'gravityview_entries_list', plugins_url('includes/css/admin-entries-list.css', GRAVITYVIEW_FILE), array(), GravityView_Plugin::version );
wp_register_style( 'gravityview_entries_list', plugins_url('assets/css/admin-entries-list.css', GRAVITYVIEW_FILE), array(), GravityView_Plugin::version );
wp_enqueue_style( 'gravityview_entries_list' );

$script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';

wp_register_script( 'gravityview_gf_entries_scripts', plugins_url('includes/js/admin-entries-list'.$script_debug.'.js', GRAVITYVIEW_FILE), array( 'jquery' ), GravityView_Plugin::version );
wp_register_script( 'gravityview_gf_entries_scripts', plugins_url('assets/js/admin-entries-list'.$script_debug.'.js', GRAVITYVIEW_FILE), array( 'jquery' ), GravityView_Plugin::version );
wp_enqueue_script( 'gravityview_gf_entries_scripts' );

wp_localize_script( 'gravityview_gf_entries_scripts', 'gvGlobals', array(
Expand Down
Loading

0 comments on commit 28a5450

Please sign in to comment.