diff options
author | Andreas Gohr <andi@splitbrain.org> | 2009-05-28 17:53:27 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2009-05-28 17:53:27 +0200 |
commit | a2be6cd9922bb5322be1b6e4829b7d707aa7a6b6 (patch) | |
tree | c106bea7a9efe15be1e41e0ff0c81868e31ee34f | |
parent | 9b53a46b10ccc4f557513b3cc16803304e19403f (diff) | |
download | rpg-a2be6cd9922bb5322be1b6e4829b7d707aa7a6b6.tar.gz rpg-a2be6cd9922bb5322be1b6e4829b7d707aa7a6b6.tar.bz2 |
new headline mechanism in the toolbar
Ignore-this: f87882b727bcf6ea067945eea0f158b1
The toolbar now features three new buttons to insert a headline. Instead of
asking the user for the headline level it asks if she wants a higher, lower
or equally leveled section (relative to the current one).
This means the user no longer has to count in which section she currently is
and encourages users to use the proper order of headline levels.
To make room in the toolbar, the old buttons have been moved in a picker.
darcs-hash:20090528155327-7ad00-e384cd7e45cb192657e29c875f46e3676d47f367.gz
-rw-r--r-- | inc/lang/en/lang.php | 7 | ||||
-rw-r--r-- | inc/toolbar.php | 105 | ||||
-rw-r--r-- | lib/images/toolbar/h.png | bin | 0 -> 370 bytes | |||
-rw-r--r-- | lib/images/toolbar/hequal.png | bin | 0 -> 378 bytes | |||
-rw-r--r-- | lib/images/toolbar/hminus.png | bin | 0 -> 359 bytes | |||
-rw-r--r-- | lib/images/toolbar/hplus.png | bin | 0 -> 409 bytes |
6 files changed, 77 insertions, 35 deletions
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index d62579fb1..e80e7d420 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -169,6 +169,13 @@ $lang['qb_h2'] = 'Level 2 Headline'; $lang['qb_h3'] = 'Level 3 Headline'; $lang['qb_h4'] = 'Level 4 Headline'; $lang['qb_h5'] = 'Level 5 Headline'; + +$lang['qb_h'] = 'Headline'; +$lang['qb_hs'] = 'Select Headline'; +$lang['qb_hplus'] = 'Higher Headline'; +$lang['qb_hminus'] = 'Lower Headline'; +$lang['qb_hequal'] = 'Same Level Headline'; + $lang['qb_link'] = 'Internal Link'; $lang['qb_extlink'] = 'External Link'; $lang['qb_hr'] = 'Horizontal Rule'; diff --git a/inc/toolbar.php b/inc/toolbar.php index 3188c9ac9..18bb806f6 100644 --- a/inc/toolbar.php +++ b/inc/toolbar.php @@ -69,46 +69,81 @@ function toolbar_JSdefines($varname){ 'open' => '<del>', 'close' => '</del>', ), + + array( - 'type' => 'format', - 'title' => $lang['qb_h1'], - 'icon' => 'h1.png', - 'key' => '1', - 'open' => '====== ', - 'close' => ' ======\n', - ), - array( - 'type' => 'format', - 'title' => $lang['qb_h2'], - 'icon' => 'h2.png', - 'key' => '2', - 'open' => '===== ', - 'close' => ' =====\n', - ), + 'type' => 'autohead', + 'title' => $lang['qb_hplus'], + 'icon' => 'hplus.png', + 'key' => '', + 'text' => $lang['qb_h'], + 'mod' => -1 + ), array( - 'type' => 'format', - 'title' => $lang['qb_h3'], - 'icon' => 'h3.png', - 'key' => '3', - 'open' => '==== ', - 'close' => ' ====\n', - ), + 'type' => 'autohead', + 'title' => $lang['qb_hequal'], + 'icon' => 'hequal.png', + 'key' => '', + 'text' => $lang['qb_h'], + 'mod' => 0 + ), array( - 'type' => 'format', - 'title' => $lang['qb_h4'], - 'icon' => 'h4.png', - 'key' => '4', - 'open' => '=== ', - 'close' => ' ===\n', - ), + 'type' => 'autohead', + 'title' => $lang['qb_hminus'], + 'icon' => 'hminus.png', + 'key' => '', + 'text' => $lang['qb_h'], + 'mod' => 1 + ), + array( - 'type' => 'format', - 'title' => $lang['qb_h5'], - 'icon' => 'h5.png', - 'key' => '5', - 'open' => '== ', - 'close' => ' ==\n', + 'type' => 'picker', + 'title' => $lang['qb_hs'], + 'icon' => 'h.png', + 'list' => array( + array( + 'type' => 'format', + 'title' => $lang['qb_h1'], + 'icon' => 'h1.png', + 'key' => '1', + 'open' => '====== ', + 'close' => ' ======\n', + ), + array( + 'type' => 'format', + 'title' => $lang['qb_h2'], + 'icon' => 'h2.png', + 'key' => '2', + 'open' => '===== ', + 'close' => ' =====\n', + ), + array( + 'type' => 'format', + 'title' => $lang['qb_h3'], + 'icon' => 'h3.png', + 'key' => '3', + 'open' => '==== ', + 'close' => ' ====\n', + ), + array( + 'type' => 'format', + 'title' => $lang['qb_h4'], + 'icon' => 'h4.png', + 'key' => '4', + 'open' => '=== ', + 'close' => ' ===\n', + ), + array( + 'type' => 'format', + 'title' => $lang['qb_h5'], + 'icon' => 'h5.png', + 'key' => '5', + 'open' => '== ', + 'close' => ' ==\n', + ), + ) ), + array( 'type' => 'format', 'title' => $lang['qb_link'], diff --git a/lib/images/toolbar/h.png b/lib/images/toolbar/h.png Binary files differnew file mode 100644 index 000000000..353d58eef --- /dev/null +++ b/lib/images/toolbar/h.png diff --git a/lib/images/toolbar/hequal.png b/lib/images/toolbar/hequal.png Binary files differnew file mode 100644 index 000000000..094fd6a8c --- /dev/null +++ b/lib/images/toolbar/hequal.png diff --git a/lib/images/toolbar/hminus.png b/lib/images/toolbar/hminus.png Binary files differnew file mode 100644 index 000000000..69d7ea21a --- /dev/null +++ b/lib/images/toolbar/hminus.png diff --git a/lib/images/toolbar/hplus.png b/lib/images/toolbar/hplus.png Binary files differnew file mode 100644 index 000000000..88eda1059 --- /dev/null +++ b/lib/images/toolbar/hplus.png |