mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Update VE core submodule to master (61dea59)
New changes: 76bbf3b [BREAKING CHANGE] Fix camel-casing of countNonInternalElements Local changes: Use renamed countNonInternalElements function Change-Id: Ib5f86ea5cfeb5e577f61349ed4bbb231ea155638
This commit is contained in:
parent
9ebd388e28
commit
1fcc9fa035
2
lib/ve
2
lib/ve
|
@ -1 +1 @@
|
||||||
Subproject commit 07092183c1d39ed15839a0355aefd64fc8041d51
|
Subproject commit 61dea59eedc4efc6057841dc0ca137303a032c51
|
|
@ -300,7 +300,7 @@ ve.dm.MWImageModel.prototype.insertImageNode = function ( fragment ) {
|
||||||
fragment.insertContent( contentToInsert );
|
fragment.insertContent( contentToInsert );
|
||||||
// Check if there is caption document and insert it
|
// Check if there is caption document and insert it
|
||||||
captionDoc = this.getCaptionDocument();
|
captionDoc = this.getCaptionDocument();
|
||||||
if ( captionDoc.data.getLength() > 4 ) {
|
if ( captionDoc.data.countNonInternalElements() > 2 ) {
|
||||||
// Add contents of new caption
|
// Add contents of new caption
|
||||||
surfaceModel.change(
|
surfaceModel.change(
|
||||||
ve.dm.Transaction.newFromDocumentInsertion(
|
ve.dm.Transaction.newFromDocumentInsertion(
|
||||||
|
|
|
@ -178,7 +178,7 @@ ve.ui.MWReferenceDialog.static.getPasteRules = function () {
|
||||||
ve.ui.MWReferenceDialog.prototype.onDocumentTransact = function () {
|
ve.ui.MWReferenceDialog.prototype.onDocumentTransact = function () {
|
||||||
var data = this.referenceModel.getDocument().data,
|
var data = this.referenceModel.getDocument().data,
|
||||||
// TODO: Check for other types of empty, e.g. only whitespace?
|
// TODO: Check for other types of empty, e.g. only whitespace?
|
||||||
hasContent = data.countNoninternalElements() > 2;
|
hasContent = data.countNonInternalElements() > 2;
|
||||||
|
|
||||||
this.actions.setAbilities( {
|
this.actions.setAbilities( {
|
||||||
'apply': hasContent,
|
'apply': hasContent,
|
||||||
|
|
Loading…
Reference in a new issue