Debian Codegraph @

extensions/VisualEditor/lib/ve/src/init/sa/ve.init.sa.MobileTarget.js

raw symbols SCIP
1 /*!
2 * VisualEditor Standalone Initialization Mobile Target class.
3 *
4 * @copyright See AUTHORS.txt
5 */
6
7 /**
8 * Initialization standalone mobile target.
9 *
10 * @class
11 * @extends ve.init.sa.Target
12 *
13 * @constructor
14 * @param {Object} [config] Configuration options
15 * @param {Object} [config.toolbarConfig] Configuration options for the toolbar
16 */
17 ve.init.sa.MobileTarget = function VeInitSaMobileTarget( config ) {
18 // Parent constructor
19 ve.init.sa.MobileTarget.super.call( this, config );
20
21 this.$element.addClass( 've-init-mobileTarget' );
22 };
23
24 /* Inheritance */
25
26 OO.inheritClass( ve.init.sa.MobileTarget, ve.init.sa.Target );
27
28 /* Static Properties */
29
30 ve.init.sa.MobileTarget.static.toolbarGroups = [
31 {
32 // Message visualeditor-toolbar-history exists in case we want
33 // to make this a list group in future, to expose 'redo'.
34 name: 'history',
35 include: [ 'undo' ]
36 },
37 {
38 name: 'style',
39 header: OO.ui.deferMsg( 'visualeditor-toolbar-text-style' ),
40 title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
41 label: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
42 invisibleLabel: true,
43 type: 'list',
44 icon: 'textStyle',
45 include: [ { group: 'textStyle' }, 'language', 'clear' ],
46 forceExpand: [ 'bold', 'italic', 'clear' ],
47 promote: [ 'bold', 'italic' ],
48 demote: [ 'strikethrough', 'code', 'underline', 'language', 'clear' ]
49 },
50 {
51 name: 'link',
52 include: [ 'link' ]
53 },
54 {
55 name: 'structure',
56 header: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ),
57 title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ),
58 label: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ),
59 invisibleLabel: true,
60 type: 'list',
61 icon: 'listBullet',
62 include: [ { group: 'structure' } ],
63 demote: [ 'outdent', 'indent' ]
64 },
65 {
66 name: 'insert',
67 header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
68 title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
69 label: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
70 invisibleLabel: true,
71 type: 'list',
72 icon: 'add',
73 include: '*'
74 }
75 ];