diff --git a/404.php b/404.php
index fc4da80..0a31be2 100644
--- a/404.php
+++ b/404.php
@@ -18,12 +18,10 @@ get_header(); ?>
-
+
@@ -41,15 +39,6 @@ get_header(); ?>
- ' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'pressbooks-aldine' ), convert_smilies( ':)' ) ) . '';
- the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=$archive_content" );
-
- the_widget( 'WP_Widget_Tag_Cloud' );
- ?>
-
diff --git a/assets/scripts/catalog-admin.js b/assets/scripts/catalog-admin.js
new file mode 100644
index 0000000..4d2d873
--- /dev/null
+++ b/assets/scripts/catalog-admin.js
@@ -0,0 +1,45 @@
+/* global ajaxurl, PB_Aldine_Admin */
+( function ( $ ) {
+ $( document ).ready( function () {
+ $( '.wrap' ).on( 'click', '.notice-dismiss', function () {
+ $( this ).parent( '#message' ).fadeOut( 500, function () {
+ $( this ).remove();
+ } );
+ } );
+ $( 'input.in-catalog' ).on( 'change', function () {
+ let book_id = $( this ).parent( 'td' ).siblings( 'th' ).children( 'input' ).val();
+ let in_catalog = $( this ).prop( 'checked' );
+ $.ajax( {
+ url: ajaxurl,
+ type: 'POST',
+ data: {
+ action: 'pressbooks_aldine_update_catalog',
+ book_id: book_id,
+ in_catalog: in_catalog,
+ _ajax_nonce: PB_Aldine_Admin.aldineAdminNonce,
+ },
+ success: function (){
+ if ( $( '#message' ).length < 1 ) {
+ $( '