Commit graph

20 commits

Author SHA1 Message Date
Michael Große
6df4603459
Explicitly refer to the global sessionStorage
Using this as a local variable might break in some browsers.
2017-04-20 16:30:50 +02:00
Michael Große
fdf5eaea74
Remember sidebar toggle-state
While browsing a wiki, it would be nice if it would remember whether the
content is wide or not.

SPR-883
2017-04-20 16:23:26 +02:00
Michael Große
b8a4cc913e
Fix not correctly forgetting section-open state
The sidebar is intended to close all sections when the content is wide
and set their default back to closed.

SPR-883
2017-04-20 15:50:53 +02:00
Michael Große
2bd7f884e5
Remember sidebar section state when browsing the wiki
So we do not have to open the same section of the sidebar every time, we click
 a link to a new page.
It forgets the toggle-state if the content is manually or automatically
widened, for example by clicking on an edit-button.

SPR-883
2017-04-12 17:20:36 +02:00
Michael Große
cb7cc643bf
Make sidebar toggle elements configurable
Current options are h1, h1 and h2, h1-h5, top-level list items

SPR-754
2017-04-12 13:35:33 +02:00
Andreas Gohr
0503402fda fixed wrong scope for function definition 2017-03-08 10:34:23 +01:00
Jana Deutschländer
d19c9b956a SPR-840: debug IE10 (vendor extensions for flex) 2017-03-02 17:11:45 +01:00
Jana Deutschländer
b10c27f3f2 SPR-840: debug sidebar script IE10, styling for mobile menu
debug background-color: qc
2017-03-02 16:45:22 +01:00
Jana Deutschländer
75a1a114df Merge remote-tracking branch 'origin/mobilesidebar' 2017-03-02 12:11:51 +01:00
Andreas Gohr
1b74bdc158 fixed clicking links in sidebar 2017-02-23 09:52:02 +01:00
Andreas Gohr
4055de39fa mobile handling of the sidebar SPR-840 2017-02-22 14:58:43 +01:00
Andreas Gohr
06938c6d7c use a instead of h6 in navigation
this makes focusing and selecting in assistive technologies easier
2017-02-22 12:12:04 +01:00
Andreas Gohr
bed1717f37 make sidebar headers toggable via keyboard 2017-02-22 11:48:17 +01:00
Andreas Gohr
a36c5fa052 reveal sidebar when clicking the search icon 2017-02-21 15:09:01 +01:00
Andreas Gohr
fa1028ad60 finally align the menu items correctly
I had to wrap the labels in their own span and use flex box to make them
behave correctly. Simplifications welcome.
2017-02-16 16:58:36 +01:00
Andreas Gohr
6c61749bf2 complete refactor of the sidebar behaviour javascript RES-754
Now all toggling of the sidebar and the related menus is done through
the same click handler. HTML has been unified. All sidebar related
content is now in a single include file instead of several. Icons for
the site tools user tools and trace have been added.

The CSS for the whole sidebar still has to be refactored.
2017-02-16 14:40:25 +01:00
Andreas Gohr
285c4f96a7 style the fake icon
When no icon is provided, we use the first two letters as icon. A fancy
border makes it look more like an icon.
2017-02-15 14:58:36 +01:00
Andreas Gohr
f293a16b9c use jQuery slector to define the elements
This makes it possible to use multiple. For now I just use all headlines
2017-02-14 11:59:08 +01:00
Andreas Gohr
9fd3d99b8f directly embed SVGs for better styling
Now the SVGs are loaded via AJAX and are directly embedded into the
HTML. This allows for styling them via CSS and we can apply proper hover
styles.

The svg dispatcher was extended with an embed option (boolean parameter
'e') which will return an absolute minimum svg with absolutely no
styles.
2017-02-13 16:19:43 +01:00
Andreas Gohr
9d8dba1489 New sidebar JavaScript logic
This implements the JS logic as discussed in our meeting. A sidebar can
now contain virtually any wiki syntax. (currently hardcoded) H2 elements
will toggle all their following content which is wrapped in a wrapper
div.

This is currently implemented on top of the old JavaScript which should
be removed.

The toggle element should be made configurable.

We probably want to reuse some of the toggle logic for the user tools.
2017-02-13 15:17:18 +01:00