diff --git a/assets/css/admin.css b/assets/css/admin.css index 2ac0801e..b5e85a8b 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -199,6 +199,7 @@ font-family: monospace; } +.sportspress .submit, .sp-data-table-container { clear: both; } @@ -486,6 +487,112 @@ table.widefat.sp-sortable-table tbody tr .icon { border-left-color: #464646; } +.sp-modules-wrapper { + margin-right: 300px; + max-width: 750px; +} + +.sp-modules-main { + width: 100%; + float: left; +} + +.sp-modules-sidebar { + float: right; + margin-right: -300px; + width: 280px; +} + +.sp-modules-sidebar table th, +.sp-modules-sidebar table td { + padding: 10px 14px; +} + +.sp-modules-sidebar table th img { + display: block; +} + + +.sp-modules-sidebar table td p { + margin-top: 0; +} + +.sp-modules-sidebar table td .sp-module-actions { + padding: 10px; + clear: both; + border-top: 1px solid #ddd; + background: #f5f5f5; + margin: 0 -14px -10px; + text-align: right; +} + +.sp-modules-sidebar table td .sp-module-actions span { + line-height: 28px; + vertical-align: middle; + text-align: left; + float: left; + margin-left: 4px; + color: #999; +} + +.sp-modules-sidebar table td .sp-documentation-links { + margin: 0.25em 0; +} + +.sp-modules-wrapper img { + max-width: 100%; +} + +.sp-modules-wrapper table { + margin-bottom: 20px; +} + +table.sp-modules-table td { + padding: 10px 14px; + line-height: 25px; + border-bottom: 1px solid #e1e1e1; + position: relative; +} + +table.sp-modules-table tr:last-child td { + border-bottom: none; +} + +table.sp-modules-table td > input[type=checkbox] { + margin-top: -4px; +} + +table.sp-modules-table td > input[type=checkbox][disabled=disabled] { + cursor: default; +} + +table.sp-modules-table td .button { + float: right; + margin: -1px -5px -1px 10px; +} + +table.sp-modules-table [class^="sp-icon-"], +table.sp-modules-table [class*=" sp-icon-"], +table.sp-modules-table .dashicons { + position: relative; + top: 3px; + left: -0.5px; + line-height: 1; +} + +table.sp-modules-table .sp-module-unavailable label { + color: #aaa; + cursor: text; +} + +table.sp-modules-table .sp-module-unavailable label [class^="sp-icon-"], +table.sp-modules-table .sp-module-unavailable label [class*=" sp-icon-"], +table.sp-modules-table .sp-module-unavailable label .dashicons { + -moz-opacity: 0.8; + opacity: 0.8; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; +} + #debug-report { display: none; margin: 10px 0; @@ -555,8 +662,19 @@ table.sp_status_table td mark.yes { } /* Media Queries */ -@media only screen and (max-width: 782px) { +@media only screen and (max-width: 850px) { + .sp-modules-wrapper { + margin-right: 0; + } + .sp-modules-main, + .sp-modules-sidebar { + margin-right: 0; + width: 100%; + } +} + +@media only screen and (max-width: 782px) { .fixed .column-sp_time, .fixed .column-sp_team, .fixed .column-sp_league, @@ -570,8 +688,12 @@ table.sp_status_table td mark.yes { .form-field .sp-location-picker { width: 99%; } + .form-field td .sp-location-picker { width: 100%; } + table.sp-modules-table td .button { + margin: -3px -7px -3px 10px; + } } \ No newline at end of file diff --git a/assets/images/modules/sportspress-pro-sidebar.png b/assets/images/modules/sportspress-pro-sidebar.png new file mode 100644 index 00000000..b6b60e85 Binary files /dev/null and b/assets/images/modules/sportspress-pro-sidebar.png differ diff --git a/assets/images/modules/sportspress-pro.png b/assets/images/modules/sportspress-pro.png new file mode 100644 index 00000000..d613a347 Binary files /dev/null and b/assets/images/modules/sportspress-pro.png differ diff --git a/assets/images/modules/sportspress-tv-sidebar.png b/assets/images/modules/sportspress-tv-sidebar.png new file mode 100644 index 00000000..37b26327 Binary files /dev/null and b/assets/images/modules/sportspress-tv-sidebar.png differ diff --git a/assets/images/modules/sportspress.png b/assets/images/modules/sportspress.png new file mode 100644 index 00000000..827189d9 Binary files /dev/null and b/assets/images/modules/sportspress.png differ diff --git a/includes/admin/class-sp-admin-post-types.php b/includes/admin/class-sp-admin-post-types.php index 48040016..6e15ab32 100644 --- a/includes/admin/class-sp-admin-post-types.php +++ b/includes/admin/class-sp-admin-post-types.php @@ -38,11 +38,14 @@ class SP_Admin_Post_Types { include( 'post-types/class-sp-admin-cpt-metric.php' ); include( 'post-types/class-sp-admin-cpt-statistic.php' ); include( 'post-types/class-sp-admin-cpt-event.php' ); - include( 'post-types/class-sp-admin-cpt-calendar.php' ); + if ( 'yes' == get_option( 'sportspress_load_calendars_module', 'yes' ) ) + include( 'post-types/class-sp-admin-cpt-calendar.php' ); include( 'post-types/class-sp-admin-cpt-team.php' ); - include( 'post-types/class-sp-admin-cpt-table.php' ); + if ( 'yes' == get_option( 'sportspress_load_league_tables_module', 'yes' ) ) + include( 'post-types/class-sp-admin-cpt-table.php' ); include( 'post-types/class-sp-admin-cpt-player.php' ); - include( 'post-types/class-sp-admin-cpt-list.php' ); + if ( 'yes' == get_option( 'sportspress_load_player_lists_module', 'yes' ) ) + include( 'post-types/class-sp-admin-cpt-list.php' ); include( 'post-types/class-sp-admin-cpt-staff.php' ); do_action( 'sportspress_include_post_type_handlers' ); } diff --git a/includes/admin/class-sp-admin-settings.php b/includes/admin/class-sp-admin-settings.php index f3a2c145..562b9ce0 100644 --- a/includes/admin/class-sp-admin-settings.php +++ b/includes/admin/class-sp-admin-settings.php @@ -31,6 +31,7 @@ class SP_Admin_Settings { include_once( 'class-sp-admin-sports.php' ); include_once( 'settings/class-sp-settings-page.php' ); + $settings[] = include( 'settings/class-sp-settings-modules.php' ); $settings[] = include( 'settings/class-sp-settings-general.php' ); $settings[] = include( 'settings/class-sp-settings-events.php' ); $settings[] = include( 'settings/class-sp-settings-teams.php' ); @@ -119,7 +120,7 @@ class SP_Admin_Settings { self::get_settings_pages(); // Get current tab/section - $current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( $_GET['tab'] ); + $current_tab = empty( $_GET['tab'] ) ? 'modules' : sanitize_title( $_GET['tab'] ); $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] ); // Save settings if data has been posted diff --git a/includes/admin/class-sp-admin-welcome.php b/includes/admin/class-sp-admin-welcome.php index 6dd266ce..7cad772e 100644 --- a/includes/admin/class-sp-admin-welcome.php +++ b/includes/admin/class-sp-admin-welcome.php @@ -196,7 +196,7 @@ class SP_Admin_Welcome {
- + Tweet @@ -264,7 +264,7 @@ class SP_Admin_Welcome { endforeach; echo $sport; ?> - +