| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
ve.ui.CommentContextItem = function VeUiCommentContextItem( context, model, config ) { |
| 18 |
|
| 19 |
ve.ui.CommentContextItem.super.call( this, context, model, config ); |
| 20 |
|
| 21 |
|
| 22 |
this.$element.addClass( 've-ui-commentContextItem' ); |
| 23 |
}; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
OO.inheritClass( ve.ui.CommentContextItem, ve.ui.LinearContextItem ); |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
ve.ui.CommentContextItem.static.name = 'comment'; |
| 32 |
|
| 33 |
ve.ui.CommentContextItem.static.icon = 'speechBubbleNotice'; |
| 34 |
|
| 35 |
ve.ui.CommentContextItem.static.label = OO.ui.deferMsg( 'visualeditor-commentinspector-title' ); |
| 36 |
|
| 37 |
ve.ui.CommentContextItem.static.modelClasses = [ ve.dm.CommentNode ]; |
| 38 |
|
| 39 |
ve.ui.CommentContextItem.static.embeddable = false; |
| 40 |
|
| 41 |
ve.ui.CommentContextItem.static.commandName = 'comment'; |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
ve.ui.CommentContextItem.prototype.getDescription = function () { |
| 49 |
return this.model.getAttribute( 'text' ).trim(); |
| 50 |
}; |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
ve.ui.contextItemFactory.register( ve.ui.CommentContextItem ); |