| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
ve.init.mw.MobileCollabTarget = function VeInitMwMobileCollabTarget( title, rebaserUrl, config ) { |
| 21 |
|
| 22 |
ve.init.mw.MobileCollabTarget.super.call( this, title, rebaserUrl, config ); |
| 23 |
|
| 24 |
|
| 25 |
this.$element.addClass( 've-init-mw-mobileArticleTarget ve-init-mw-mobileCollabTarget ve-init-mobileTarget' ); |
| 26 |
|
| 27 |
$( document.body ).removeClass( 'ns-special' ); |
| 28 |
}; |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
OO.inheritClass( ve.init.mw.MobileCollabTarget, ve.init.mw.CollabTarget ); |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
ve.init.mw.MobileCollabTarget.static.toolbarGroups = [ |
| 37 |
|
| 38 |
{ |
| 39 |
name: 'back', |
| 40 |
include: [ 'back' ] |
| 41 |
}, |
| 42 |
|
| 43 |
{ |
| 44 |
name: 'history', |
| 45 |
include: [ 'undo' ] |
| 46 |
}, |
| 47 |
|
| 48 |
{ |
| 49 |
name: 'style', |
| 50 |
classes: [ 've-test-toolbar-style' ], |
| 51 |
type: 'list', |
| 52 |
icon: 'textStyle', |
| 53 |
title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ), |
| 54 |
label: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ), |
| 55 |
invisibleLabel: true, |
| 56 |
include: [ { group: 'textStyle' }, 'language', 'clear' ], |
| 57 |
forceExpand: [ 'bold', 'italic', 'clear' ], |
| 58 |
promote: [ 'bold', 'italic' ], |
| 59 |
demote: [ 'strikethrough', 'code', 'underline', 'language', 'clear' ] |
| 60 |
}, |
| 61 |
|
| 62 |
{ |
| 63 |
name: 'link', |
| 64 |
include: [ 'link' ] |
| 65 |
}, |
| 66 |
|
| 67 |
{ |
| 68 |
name: 'reference' |
| 69 |
}, |
| 70 |
{ |
| 71 |
name: 'insert', |
| 72 |
header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), |
| 73 |
title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), |
| 74 |
label: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), |
| 75 |
invisibleLabel: true, |
| 76 |
type: 'list', |
| 77 |
icon: 'add', |
| 78 |
promote: [ 'commentAnnotation' ], |
| 79 |
include: '*', |
| 80 |
exclude: [ 'comment', 'indent', 'outdent', { group: 'format' } ] |
| 81 |
}, |
| 82 |
{ |
| 83 |
name: 'authorList', |
| 84 |
include: [ 'authorList' ] |
| 85 |
}, |
| 86 |
{ |
| 87 |
name: 'export', |
| 88 |
include: [ 'export' ] |
| 89 |
} |
| 90 |
]; |
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
ve.init.mw.MobileCollabTarget.prototype.getSurfaceClasses = function () { |
| 98 |
const classes = ve.init.mw.MobileCollabTarget.super.prototype.getSurfaceClasses.call( this ); |
| 99 |
return classes.concat( [ 'content' ] ); |
| 100 |
}; |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
ve.init.mw.targetFactory.register( ve.init.mw.MobileCollabTarget ); |