Filter activate/desactivate plugins

This commit is contained in:
Frédéric K 2016-03-13 12:51:34 +01:00
parent 29006c76eb
commit 4ee4ce3d52
2 changed files with 30 additions and 2 deletions

9
bl-kernel/admin/themes/default/css/default.css Normal file → Executable file
View File

@ -541,3 +541,12 @@ div.plugin-links > span.separator {
margin-bottom: 0px !important; margin-bottom: 0px !important;
display: inline-block; display: inline-block;
} }
/* ----------- PLUGINS FILTER ----------- */
tr.plugin-installed.hide, tr.plugin-notInstalled.hide{
width:0%;
opacity:0;
display:none;
transition:all 0.1s;
}

View File

@ -3,6 +3,12 @@
HTML::title(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece')); HTML::title(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece'));
echo ' echo '
<div class="uk-button-group">
<a class="uk-button" href="#all">ALL</a>
<a class="uk-button" href="#plugin-installed">'.$L->g('Activate').'</a>
<a class="uk-button" href="#plugin-notInstalled">'.$L->g('Deactivate').'</a>
</div>
<table class="uk-table"> <table class="uk-table">
<thead> <thead>
<tr> <tr>
@ -48,5 +54,18 @@ foreach($plugins['all'] as $Plugin)
echo ' echo '
</tbody> </tbody>
</table> </table>
';
<script>
$(".uk-button-group a").click(function (e) {
e.preventDefault();
var a = $(this).attr("href");
a = a.substr(1);
$("tbody tr").each(function () {
if (!$(this).hasClass(a) && a != "all")
$(this).addClass("hide");
else
$(this).removeClass("hide");
});
});
</script>';