summaryrefslogtreecommitdiff
path: root/plugins/toggle_sidebar
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-01-07 15:29:17 +0300
committerAndrew Dolgov <[email protected]>2017-01-07 15:29:17 +0300
commit6293d3717c32ca338c8e9d69b9eb70ed423b6ee5 (patch)
tree3fe5c794c86a215a503a1bb46044bea1970adcfa /plugins/toggle_sidebar
parent4822485a745b783563fa3572992c581f0b2d8631 (diff)
add toggle_sidebar plugin, remove obsolete toggle button
add PluginHost::HOOK_MAIN_TOOLBAR_BUTTON
Diffstat (limited to 'plugins/toggle_sidebar')
-rw-r--r--plugins/toggle_sidebar/application_side_list.pngbin0 -> 510 bytes
-rw-r--r--plugins/toggle_sidebar/init.php34
2 files changed, 34 insertions, 0 deletions
diff --git a/plugins/toggle_sidebar/application_side_list.png b/plugins/toggle_sidebar/application_side_list.png
new file mode 100644
index 000000000..248eaf1ac
--- /dev/null
+++ b/plugins/toggle_sidebar/application_side_list.png
Binary files differ
diff --git a/plugins/toggle_sidebar/init.php b/plugins/toggle_sidebar/init.php
new file mode 100644
index 000000000..b2b0821a5
--- /dev/null
+++ b/plugins/toggle_sidebar/init.php
@@ -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;
+ }
+
+}
+?>