Add team name editor action titles and click team name to activate editor

This commit is contained in:
Brian Miyaji
2014-02-19 13:56:38 +11:00
parent 096a118806
commit daedc38f8e
4 changed files with 8 additions and 8 deletions

View File

@@ -70,8 +70,8 @@ jQuery(document).ready(function($){
$(".sp-clone:last").find("select").change(); $(".sp-clone:last").find("select").change();
// Name editor // Name editor
$(".sp-data-table .sp-edit-name").click(function() { $(".sp-data-table .sp-default-name").click(function() {
$(this).closest(".sp-default-name").hide().siblings(".sp-custom-name").show().find(".sp-custom-name-input").focus(); $(this).hide().siblings(".sp-custom-name").show().find(".sp-custom-name-input").focus();
}); });
// Name editor save // Name editor save

View File

@@ -785,12 +785,12 @@ if ( !function_exists( 'sportspress_edit_league_table' ) ) {
<td> <td>
<span class="sp-default-name"> <span class="sp-default-name">
<span class="sp-default-name-input"><?php echo $default_name; ?></span> <span class="sp-default-name-input"><?php echo $default_name; ?></span>
<a class="dashicons dashicons-edit sp-edit-name"></a> <a class="dashicons dashicons-edit sp-edit-name" title="<?php _e( 'Edit', 'sportspress' ); ?>"></a>
</span> </span>
<span class="hidden sp-custom-name"> <span class="hidden sp-custom-name">
<input type="text" name="sp_teams[<?php echo $team_id; ?>][name]" class="name sp-custom-name-input" value="<?php echo sportspress_array_value( $team_stats, 'name', '' ); ?>" placeholder="<?php echo get_the_title( $team_id ); ?>"> <input type="text" name="sp_teams[<?php echo $team_id; ?>][name]" class="name sp-custom-name-input" value="<?php echo sportspress_array_value( $team_stats, 'name', '' ); ?>" placeholder="<?php echo get_the_title( $team_id ); ?>">
<a class="dashicons dashicons-no-alt sp-cancel"></a> <a class="dashicons dashicons-no-alt sp-cancel" title="<?php _e( 'Cancel', 'sportspress' ); ?>"></a>
<a class="dashicons dashicons-yes sp-save"></a> <a class="dashicons dashicons-yes sp-save" title="<?php _e( 'Save', 'sportspress' ); ?>"></a>
</span> </span>
</td> </td>
<?php foreach( $columns as $column => $label ): <?php foreach( $columns as $column => $label ):

View File

@@ -4,7 +4,7 @@ Tags: sports, sports journalism, teams, team management, fixtures, results, stan
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support@themeboy.com&item_name=Donation+for+SportsPress Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support@themeboy.com&item_name=Donation+for+SportsPress
Requires at least: 3.8 Requires at least: 3.8
Tested up to: 3.8.1 Tested up to: 3.8.1
Stable tag: 0.3.3 Stable tag: 0.3.4
License: GPLv3 License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html

View File

@@ -6,7 +6,7 @@
Plugin Name: SportsPress Plugin Name: SportsPress
Plugin URI: http://themeboy.com/sportspress Plugin URI: http://themeboy.com/sportspress
Description: Manage your club and its players, staff, events, league tables, and player lists. Description: Manage your club and its players, staff, events, league tables, and player lists.
Version: 0.3.3 Version: 0.3.4
Author: ThemeBoy Author: ThemeBoy
Author URI: http://themeboy.com/ Author URI: http://themeboy.com/
License: GPLv3 License: GPLv3
@@ -18,7 +18,7 @@ if ( !function_exists( 'add_action' ) ):
exit; exit;
endif; endif;
define( 'SPORTSPRESS_VERSION', '0.3.3' ); define( 'SPORTSPRESS_VERSION', '0.3.4' );
define( 'SPORTSPRESS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); define( 'SPORTSPRESS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'SPORTSPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); define( 'SPORTSPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
define( 'SPORTSPRESS_PLUGIN_FILE', __FILE__ ); define( 'SPORTSPRESS_PLUGIN_FILE', __FILE__ );