From 88b7505f3b4b385068951862cd059959dbe5029f Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 10 Apr 2014 00:51:32 +1000 Subject: [PATCH] Split admin css assets for customise and widgets --- assets/css/admin.css | 27 ------------------------ assets/css/customize.css | 20 ++++++++++++++++++ assets/css/widgets.css | 25 ++++++++++++++++++++++ includes/admin/class-sp-admin-assets.php | 10 +++++++++ readme.txt | 27 ++++++++++++------------ sportspress.php | 6 +++--- 6 files changed, 72 insertions(+), 43 deletions(-) create mode 100644 assets/css/customize.css create mode 100644 assets/css/widgets.css diff --git a/assets/css/admin.css b/assets/css/admin.css index 3beff1fe..8928b7d3 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -242,32 +242,6 @@ table.widefat select.sp-outcome { height: 320px; } -.sp-prefs .button { - margin: 0 3px 4px 0; - padding: 0 7px 1px 5px; -} - -.sp-prefs .button input[type=checkbox] { - background: transparent; - border: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -.sp-prefs .button input[type=checkbox]:not(:checked):before { - float: left; - display: inline-block; - vertical-align: middle; - width: 16px; - font: 400 21px/1 dashicons; - speak: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: '\f335'; - margin: -3px 0 0 -4px; - color: #a00; -} - /* Chosen */ .chosen-container-single .chosen-single { -webkit-border-radius: 3px; @@ -328,7 +302,6 @@ table.widefat select.sp-outcome { } /* TipTip */ - .tips { cursor: help; } diff --git a/assets/css/customize.css b/assets/css/customize.css new file mode 100644 index 00000000..96c6560f --- /dev/null +++ b/assets/css/customize.css @@ -0,0 +1,20 @@ +#available-widgets [class*=sp_] .widget-title:before { + font-family: 'sportspress'; +} +#available-widgets [class*=sp_countdown] .widget-title:before { + content: "\f469"; +} +#available-widgets [class*=sp_event_calendar] .widget-title:before, +#available-widgets [class*=sp_event_list] .widget-title:before { + content: "\f145"; +} +#available-widgets [class*=sp_league_table] .widget-title:before { + content: "\f334"; +} +#available-widgets [class*=sp_player_list] .widget-title:before, +#available-widgets [class*=sp_player_gallery] .widget-title:before { + content: "\f307"; +} +#available-widgets [class*=sp_countdown] .widget-title:before { + content: "\f469"; +} \ No newline at end of file diff --git a/assets/css/widgets.css b/assets/css/widgets.css new file mode 100644 index 00000000..8a1ff4bc --- /dev/null +++ b/assets/css/widgets.css @@ -0,0 +1,25 @@ +.sp-prefs .button { + margin: 0 3px 4px 0; + padding: 0 7px 1px 5px; +} + +.sp-prefs .button input[type=checkbox] { + background: transparent; + border: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +.sp-prefs .button input[type=checkbox]:not(:checked):before { + float: left; + display: inline-block; + vertical-align: middle; + width: 16px; + font: 400 21px/1 dashicons; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + content: '\f335'; + margin: -3px 0 0 -4px; + color: #a00; +} \ No newline at end of file diff --git a/includes/admin/class-sp-admin-assets.php b/includes/admin/class-sp-admin-assets.php index b63139d2..e9c5602c 100644 --- a/includes/admin/class-sp-admin-assets.php +++ b/includes/admin/class-sp-admin-assets.php @@ -48,6 +48,16 @@ class SP_Admin_Assets { wp_enqueue_style( 'sportspress-admin-dashboard-styles', SP()->plugin_url() . '/assets/css/dashboard.css', array(), SP_VERSION ); } + + if ( in_array( $screen->id, array( 'widgets' ) ) ) { + wp_enqueue_style( 'sportspress-admin-widgets-styles', SP()->plugin_url() . '/assets/css/widgets.css', array(), SP_VERSION ); + } + + if ( in_array( $screen->id, array( 'customize' ) ) ) { + wp_enqueue_style( 'sportspress-admin-menu-styles', SP()->plugin_url() . '/assets/css/menu.css', array(), SP_VERSION ); + wp_enqueue_style( 'sportspress-admin-customize-styles', SP()->plugin_url() . '/assets/css/customize.css', array(), SP_VERSION ); + } + do_action( 'sportspress_admin_css' ); } diff --git a/readme.txt b/readme.txt index 6b542022..14352bd5 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: ThemeBoy Tags: sports, press, sports journalism, teams, team management, fixtures, results, standings, league tables, leagues, reporting, themeboy, wordpress sports, configurable 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 -Tested up to: 3.8.1 -Stable tag: 0.7.4 +Tested up to: 3.8.2 +Stable tag: 0.7.5 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -34,17 +34,18 @@ Add schedules, results, league tables, player profiles and statistics to your te League table columns, player statistics, and match results can be customized to fit any sport. Presets are available for some of the most popular sports including soccer, rugby, American football, Australian Rules football, baseball, basketball, cricket, and hockey. = Available Languages = -* English (en_US) -* Arabic (ar) -* Czech - Čeština (cs_CZ) -* German - Deutsch (de_DE) -* Spanish - Español (es_ES) -* French - Français (fr_FR) -* Italian - Italiano (it_IT) -* Japanese - 日本語 (ja) -* Polish - Polski (pl_PL) -* Slovak – Slovenčina (sk_SK) -* Swedish - Svenska (sv_SE) +* English – English ( en_US ) +* Arabic – العربية ( ar ) +* Czech – Čeština ( cs_CZ ) +* German – Deutsch ( de_DE ) +* Spanish – Español ( es_ES ) +* French – Français ( fr_FR ) +* Italian – Italiano ( it_IT ) +* Japanese – 日本語 ( ja ) +* Polish – Polski ( pl_PL ) +* Portuguese (Brazil) – Português do Brasil ( pt_BR ) +* Slovak – Slovenčina ( sk_SK ) +* Swedish – Svenska ( sv_SE ) = Get involved = diff --git a/sportspress.php b/sportspress.php index 3bedc472..74f40a9c 100644 --- a/sportspress.php +++ b/sportspress.php @@ -3,7 +3,7 @@ * Plugin Name: SportsPress * Plugin URI: http://wordpress.org/plugins/sportspress * Description: Manage your club and its players, staff, events, league tables, and player lists. - * Version: 0.7.4 + * Version: 0.7.5 * Author: ThemeBoy * Author URI: http://themeboy.com * Requires at least: 3.8 @@ -26,14 +26,14 @@ if ( ! class_exists( 'SportsPress' ) ) : * Main SportsPress Class * * @class SportsPress - * @version 0.7.4 + * @version 0.7.5 */ final class SportsPress { /** * @var string */ - public $version = '0.7.4'; + public $version = '0.7.5'; /** * @var SporsPress The single instance of the class