Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tiny Tiny RSS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Server
Tiny Tiny RSS
Commits
6293d371
Commit
6293d371
authored
Jan 07, 2017
by
Andrew Dolgov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add toggle_sidebar plugin, remove obsolete toggle button
add PluginHost::HOOK_MAIN_TOOLBAR_BUTTON
parent
4822485a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
12 deletions
+42
-12
classes/pluginhost.php
classes/pluginhost.php
+1
-0
index.php
index.php
+6
-5
js/tt-rss.js
js/tt-rss.js
+1
-7
plugins/toggle_sidebar/application_side_list.png
plugins/toggle_sidebar/application_side_list.png
+0
-0
plugins/toggle_sidebar/init.php
plugins/toggle_sidebar/init.php
+34
-0
No files found.
classes/pluginhost.php
View file @
6293d371
...
...
@@ -50,6 +50,7 @@ class PluginHost {
const
HOOK_RENDER_ENCLOSURE
=
29
;
const
HOOK_ARTICLE_FILTER_ACTION
=
30
;
const
HOOK_ARTICLE_EXPORT_FEED
=
31
;
const
HOOK_MAIN_TOOLBAR_BUTTON
=
32
;
const
KIND_ALL
=
1
;
const
KIND_SYSTEM
=
2
;
...
...
index.php
View file @
6293d371
...
...
@@ -171,17 +171,18 @@
<div
id=
"toolbar"
dojoType=
"dijit.layout.ContentPane"
region=
"top"
>
<div
id=
"main-toolbar"
dojoType=
"dijit.Toolbar"
>
<?php
foreach
(
PluginHost
::
getInstance
()
->
get_hooks
(
PluginHost
::
HOOK_MAIN_TOOLBAR_BUTTON
)
as
$p
)
{
echo
$p
->
hook_main_toolbar_button
();
}
?>
<form
id=
"headlines-toolbar"
action=
""
onsubmit=
'return false'
>
</form>
<form
id=
"main_toolbar_form"
action=
""
onsubmit=
'return false'
>
<button
dojoType=
"dijit.form.Button"
id=
"collapse_feeds_btn"
onclick=
"collapse_feedlist()"
title=
"
<?php
echo
__
(
'Collapse feedlist'
)
?>
"
style=
"display : none"
>
<<
</button>
<select
name=
"view_mode"
title=
"
<?php
echo
__
(
'Show articles'
)
?>
"
onchange=
"viewModeChanged()"
dojoType=
"dijit.form.Select"
>
...
...
js/tt-rss.js
View file @
6293d371
...
...
@@ -822,13 +822,7 @@ function parse_runtime_info(data) {
function
collapse_feedlist
()
{
try
{
if
(
!
Element
.
visible
(
'
feeds-holder
'
))
{
Element
.
show
(
'
feeds-holder
'
);
$
(
"
collapse_feeds_btn
"
).
innerHTML
=
"
<<
"
;
}
else
{
Element
.
hide
(
'
feeds-holder
'
);
$
(
"
collapse_feeds_btn
"
).
innerHTML
=
"
>>
"
;
}
Element
.
toggle
(
"
feeds-holder
"
);
dijit
.
byId
(
"
main
"
).
resize
();
...
...
plugins/toggle_sidebar/application_side_list.png
0 → 100644
View file @
6293d371
510 Bytes
plugins/toggle_sidebar/init.php
0 → 100644
View file @
6293d371
<?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
;
}
}
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment