diff --git a/assets/css/admin.css b/assets/css/admin.css index 93e410c9..304018f2 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -226,6 +226,18 @@ table.widefat select.sp-outcome { width: 100%; } +table.widefat.sp-sortable-table tbody tr { + cursor: move; +} + +table.widefat.sp-sortable-table tr { + background-color: #fff; +} + +table.widefat.sp-sortable-table tr:nth-child(2n-1) { + background-color: #f9f9f9; +} + .sp-admin-config-table th, .sp-admin-config-table td { padding: 8px 10px; diff --git a/assets/js/admin/sportspress-admin.js b/assets/js/admin/sportspress-admin.js index 79b37c3c..7296ac14 100644 --- a/assets/js/admin/sportspress-admin.js +++ b/assets/js/admin/sportspress-admin.js @@ -24,6 +24,7 @@ jQuery(document).ready(function($){ // Activate auto key placeholder $("#poststuff #title").keyup(); + // Table switcher $(".sp-table-panel").siblings(".sp-table-bar").find("a").click(function() { $(this).closest("li").find("a").addClass("current").closest("li").siblings().find("a").removeClass("current").closest(".sp-table-bar").siblings($(this).attr("href")).show().siblings(".sp-table-panel").hide(); @@ -233,6 +234,11 @@ jQuery(document).ready(function($){ // Trigger check check $(".sp-data-table").trigger("checkCheck"); + // Sortable tables + $(".sp-sortable-table tbody").sortable({ + axis: "y" + }); + // Video embed $(".sp-add-video").click(function() { $(this).closest("fieldset").hide().siblings(".sp-video-field").show(); diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php index d1eb6146..bdb855ca 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php @@ -55,7 +55,7 @@ class SP_Meta_Box_Event_Performance { public static function table( $labels = array(), $columns = array(), $data = array(), $team_id, $has_checkboxes = false ) { ?>
| # | @@ -77,12 +77,11 @@ class SP_Meta_Box_Event_Performance {||
|---|---|---|
| $label ): @@ -98,10 +97,11 @@ class SP_Meta_Box_Event_Performance { | ||
| $label ): @@ -113,7 +113,7 @@ class SP_Meta_Box_Event_Performance { |