Skip to content

Commit

Permalink
One-click filtering of active/inactive plugins
Browse files Browse the repository at this point in the history
git-svn-id: http://yourls.googlecode.com/svn/trunk@476 12232710-3e20-11de-b438-597f59cd7555
  • Loading branch information
ozh committed Aug 4, 2010
1 parent 961430e commit dbf4249
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
$count_active = yourls_has_active_plugins();
?>

<p>You currently have <strong><?php echo $count.' '.yourls_plural( 'plugin', $count ); ?></strong> installed, and <strong><?php echo $count_active; ?></strong> activated.</p>
<p id="plugin_summary">You currently have <strong><?php echo $count.' '.yourls_plural( 'plugin', $count ); ?></strong> installed, and <strong><?php echo $count_active; ?></strong> activated</p>

<table id="main_table" class="tblSorter" cellpadding="0" cellspacing="1">
<thead>
Expand Down Expand Up @@ -136,6 +136,14 @@
<script type="text/javascript">
yourls_defaultsort = 0;
yourls_defaultorder = 0;
<?php if ($count_active) { ?>
$('#plugin_summary').append('<span id="toggle_plugins">filter</span>');
$('#toggle_plugins').css({'background':'transparent url("../images/filter.gif") top left no-repeat','display':'inline-block','text-indent':'-9999px','width':'16px','height':'16px','margin-left':'3px','cursor':'pointer'})
.attr('title', 'Toggle active/inactive plugins')
.click(function(){
$('#main_table tr.inactive').toggle();
});
<?php } ?>
</script>

<p>If something goes wrong after you activate a plugin and you cannot use YOURLS or access this page, simply rename or delete its directory, or rename the plugin file to something different than <code>plugin.php</code>.</p>
Expand Down
Binary file added images/filter.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dbf4249

Please sign in to comment.