diff --git a/css/yarns_microsub_server_admin.css b/css/yarns_microsub_server_admin.css index c934526..91df1e9 100644 --- a/css/yarns_microsub_server_admin.css +++ b/css/yarns_microsub_server_admin.css @@ -52,7 +52,7 @@ /* Channel list table - css for sortable table*/ -#yarns-channels td.order:hover { +#yarns-channels #the-list tr:hover { cursor:move; } diff --git a/includes/class-yarns-microsub-channel-list-table.php b/includes/class-yarns-microsub-channel-list-table.php index 1123a79..8fcf93d 100644 --- a/includes/class-yarns-microsub-channel-list-table.php +++ b/includes/class-yarns-microsub-channel-list-table.php @@ -9,8 +9,7 @@ public function get_columns() { return array( 'channel_name' => __( 'Channel Name', 'yarns_microsub' ), 'n_feeds' => __( 'Number of feeds', 'yarns_microsub' ), - 'order' => __( 'Order', 'yarns_microsub' ), - // Removed for now, add back once I figure out the best method . + ); } @@ -24,7 +23,7 @@ public function get_sortable_columns() { public function prepare_items() { $columns = $this->get_columns(); $hidden = array(); - //$this->process_action(); + $this->_column_headers = array( $columns, $hidden, $this->get_sortable_columns() ); $this->items = array(); @@ -49,13 +48,6 @@ public function prepare_items() { $value['channel_name'] = ''; } - if ( isset( $channel['order'] ) ) { - $value['order'] = $channel['order']; - } else { - $value['order'] = null; - } - $value['order'] = '
️️️️
'; - // Get the number of feeds in this channel. if ( isset( $channel['items'] ) && is_array( $channel['items'] ) ) { $value['n_feeds'] = count( $channel['items'] ); @@ -93,9 +85,7 @@ public function column_n_feeds( $item ) { return $item['n_feeds']; } - public function column_order( $item ) { - return $item['order']; - } + } \ No newline at end of file diff --git a/js/yarns_microsub_server.js b/js/yarns_microsub_server.js index 2d8b70e..5acd315 100644 --- a/js/yarns_microsub_server.js +++ b/js/yarns_microsub_server.js @@ -1,17 +1,22 @@ ( function ( $ ) { /** - * Remove links from items that will use javascript instead. + * Functions to run on document.ready */ $( document ).ready( function () { + /** + * Remove links from items that will use javascript instead. + */ $( '.yarns-feed-unfollow' ).removeAttr( 'href' ) $( '.yarns-feed-preview' ).removeAttr( 'href' ) - // Make channel rows in channel list table sortable. + /** + * Make channel rows in channel list table sortable. + */ $( '#yarns-channels #the-list' ).sortable( { - handle: '.order', + /*handle: 'tr',*/ update: function ( event, ui ) { clear_notices() // Clear any errors that are showing from a previous function. @@ -42,7 +47,7 @@ } ) - $( '.sortable' ).sortable( { handle: '.handle' } ) + /*$( '.sortable' ).sortable( { handle: '.handle' } )*/ } ) diff --git a/templates/yarns-microsub-general-settings.php b/templates/yarns-microsub-general-settings.php index 881d793..6addb7a 100644 --- a/templates/yarns-microsub-general-settings.php +++ b/templates/yarns-microsub-general-settings.php @@ -7,9 +7,12 @@

Channels

- +

Add a new channel