Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/101430


Change subject: Fix the standalone toolbar to not demote heading1
......................................................................

Fix the standalone toolbar to not demote heading1

The duplication of the toolbar definition is ugly but we don't
have a better system to say "give me the same except demote this
one thing" right now.

Change-Id: Id74ed1a18aee4a947992bdd626702f578bbace14
---
M modules/ve-mw/init/ve.init.mw.Target.js
M modules/ve/init/ve.init.Target.js
2 files changed, 37 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/30/101430/1

diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 239e84c..73aa0ed 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -189,6 +189,42 @@
 
 OO.inheritClass( ve.init.mw.Target, ve.init.Target );
 
+/* Static Properties */
+
+ve.init.mw.Target.static.toolbarGroups = [
+       // History
+       { 'include': [ 'undo', 'redo' ] },
+       // Format
+       {
+               'type': 'menu',
+               'include': [ { 'group': 'format' } ],
+               'promote': [ 'paragraph' ],
+               'demote': [ 'preformatted', 'heading1' ]
+       },
+       // Style
+       {
+               'type': 'list',
+               'icon': 'text-style',
+               'include': [ { 'group': 'textStyle' }, 'clear' ],
+               'promote': [ 'bold', 'italic' ],
+               'demote': [ 'strikethrough', 'code',  'underline', 'clear' ]
+       },
+       // Link
+       { 'include': [ 'link' ] },
+       // Structure
+       {
+               'type': 'bar',
+               'include': [ 'number', 'bullet', 'outdent', 'indent' ]
+       },
+       // Insert
+       {
+               'include': '*',
+               'label': 'visualeditor-toolbar-insert',
+               'demote': [ 'specialcharacter' ]
+       }
+
+];
+
 /* Static Methods */
 
 /**
diff --git a/modules/ve/init/ve.init.Target.js 
b/modules/ve/init/ve.init.Target.js
index 497476d..35f3692 100644
--- a/modules/ve/init/ve.init.Target.js
+++ b/modules/ve/init/ve.init.Target.js
@@ -37,7 +37,7 @@
                'type': 'menu',
                'include': [ { 'group': 'format' } ],
                'promote': [ 'paragraph' ],
-               'demote': [ 'preformatted', 'heading1' ]
+               'demote': [ 'preformatted' ]
        },
        // Style
        {

-- 
To view, visit https://gerrit.wikimedia.org/r/101430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id74ed1a18aee4a947992bdd626702f578bbace14
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <roan.katt...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to