| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
ve.ui.MergeCellsCommand = function VeUiMergeCellsCommand() { |
| 16 |
|
| 17 |
ve.ui.MergeCellsCommand.super.call( |
| 18 |
this, 'mergeCells', 'table', 'mergeCells', |
| 19 |
{ supportedSelections: [ 'table' ] } |
| 20 |
); |
| 21 |
}; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
OO.inheritClass( ve.ui.MergeCellsCommand, ve.ui.Command ); |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
ve.ui.MergeCellsCommand.prototype.isExecutable = function ( fragment ) { |
| 33 |
|
| 34 |
return ve.ui.MergeCellsCommand.super.prototype.isExecutable.apply( this, arguments ) && |
| 35 |
fragment.getSelection().isMergeable( fragment.getDocument() ); |
| 36 |
}; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
ve.ui.commandRegistry.register( new ve.ui.MergeCellsCommand() ); |