1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:35:55 +00:00

add toggle_sidebar plugin, remove obsolete toggle button

add PluginHost::HOOK_MAIN_TOOLBAR_BUTTON
This commit is contained in:
Andrew Dolgov
2017-01-07 15:29:17 +03:00
parent 4822485a74
commit 6293d3717c
5 changed files with 42 additions and 12 deletions

View File

@@ -0,0 +1,34 @@
<?php
class Toggle_Sidebar extends Plugin {
private $host;
function about() {
return array(1.0,
"Adds a main toolbar button to toggle sidebar",
"fox");
}
function init($host) {
$this->host = $host;
$host->add_hook($host::HOOK_MAIN_TOOLBAR_BUTTON, $this);
}
function hook_main_toolbar_button() {
?>
<button dojoType="dijit.form.Button" onclick="collapse_feedlist()">
<img src="plugins/toggle_sidebar/application_side_list.png"
title="<?php echo __('Collapse feedlist') ?>">
</button>
<?php
}
function api_version() {
return 2;
}
}
?>