diff --git a/assets/archivedfilter.publish.js b/assets/archivedfilter.publish.js index 3c3f05b..73b55de 100644 --- a/assets/archivedfilter.publish.js +++ b/assets/archivedfilter.publish.js @@ -14,20 +14,19 @@ // Initial function: instantiates extension after verifying that the archive field exists function initHide() { - table.find('thead th').each(function(index) { + $('table').find('thead th').each(function(index) { + var column = $(this); var title = $.trim(column.text()).toLowerCase(); - // Check name of field to see if it's an archive field. // If your field happens to be named something different than 'Archived' or 'Archive', this is where you add it - if (title == 'archived' || title == 'archive') { + if (title == 'archived' || title == 'archive' || title == 'Archive') { colindex = index+1; - - var btn = $(''); - $('#contents h2').append($(btn)); + var btn = $('
  • '); + $('ul.actions').append($(btn)); hideItems(); - } + } }); } @@ -39,7 +38,7 @@ showItems(); }).html('Show Archived'); - table.find('tr td:nth-child('+colindex+')').each(function() { + $('table').find('tr td:nth-child('+colindex+')').each(function() { var cell = $(this); var text = $.trim(cell.text()); cell.addClass('hidden'); diff --git a/extension.driver.php b/extension.driver.php index 20b441e..95c4391 100644 --- a/extension.driver.php +++ b/extension.driver.php @@ -5,7 +5,7 @@ class Extension_Archivedfilter extends Extension { /** * Extension information */ - public function about() { + /*public function about() { return array( 'name' => 'Archived Filter', 'version' => '1.0', @@ -17,7 +17,7 @@ public function about() { ), 'description' => 'Adds a toggle button to show/hide archived items.' ); - } + }*/ /** * Add callback functions to backend delegates