Skip to content

Commit

Permalink
new headline mechanism in the toolbar
Browse files Browse the repository at this point in the history
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
  • Loading branch information
splitbrain committed May 28, 2009
1 parent 9b53a46 commit a2be6cd
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 35 deletions.
7 changes: 7 additions & 0 deletions inc/lang/en/lang.php
Expand Up @@ -169,6 +169,13 @@
$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';
Expand Down
105 changes: 70 additions & 35 deletions inc/toolbar.php
Expand Up @@ -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'],
Expand Down
Binary file added lib/images/toolbar/h.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/images/toolbar/hequal.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/images/toolbar/hminus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/images/toolbar/hplus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a2be6cd

Please sign in to comment.