jenkins-bot has submitted this change and it was merged.

Change subject: Use canonical ve.dm.TransactionBuilder.static.newFrom* methods
......................................................................


Use canonical ve.dm.TransactionBuilder.static.newFrom* methods

Change-Id: I9ce6860e19e833b576f7b9fb239b96de394b667c
---
M modules/ve-cite/tests/ve.dm.Transaction.test.js
M modules/ve-cite/ve.dm.MWReferenceModel.js
M modules/ve-cite/ve.ui.MWReferencesListDialog.js
3 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-cite/tests/ve.dm.Transaction.test.js 
b/modules/ve-cite/tests/ve.dm.Transaction.test.js
index 13d443e..018c664 100644
--- a/modules/ve-cite/tests/ve.dm.Transaction.test.js
+++ b/modules/ve-cite/tests/ve.dm.Transaction.test.js
@@ -43,7 +43,7 @@
                                offset: 0,
                                range: new ve.Range( 0, 7 ),
                                modify: function ( newDoc ) {
-                                       newDoc.commit( 
ve.dm.Transaction.newFromMetadataInsertion(
+                                       newDoc.commit( 
ve.dm.TransactionBuilder.static.newFromMetadataInsertion(
                                                newDoc, 4, 0, [ comment ]
                                        ) );
                                },
@@ -96,7 +96,7 @@
                                offset: 24,
                                range: new ve.Range( 24, 31 ),
                                modify: function ( newDoc ) {
-                                       newDoc.commit( 
ve.dm.Transaction.newFromMetadataRemoval(
+                                       newDoc.commit( 
ve.dm.TransactionBuilder.static.newFromMetadataRemoval(
                                                newDoc, 6, new ve.Range( 0, 1 )
                                        ) );
                                },
@@ -171,14 +171,14 @@
                } else if ( cases[ i ].range ) {
                        doc2 = doc.cloneFromRange( cases[ i ].range );
                        cases[ i ].modify( doc2 );
-                       tx = ve.dm.Transaction.newFromRemoval( doc, cases[ i 
].range, true );
+                       tx = ve.dm.TransactionBuilder.static.newFromRemoval( 
doc, cases[ i ].range, true );
                        doc.commit( tx );
                        removalOps = tx.getOperations();
                }
 
                assert.deepEqualWithDomElements( removalOps, cases[ i 
].removalOps, cases[ i ].msg + ': removal' );
 
-               tx = ve.dm.Transaction.newFromDocumentInsertion( doc, cases[ i 
].offset, doc2 );
+               tx = ve.dm.TransactionBuilder.static.newFromDocumentInsertion( 
doc, cases[ i ].offset, doc2 );
                assert.deepEqualWithDomElements( tx.getOperations(), cases[ i 
].expectedOps, cases[ i ].msg + ': transaction' );
 
                actualStoreItems = [];
diff --git a/modules/ve-cite/ve.dm.MWReferenceModel.js 
b/modules/ve-cite/ve.dm.MWReferenceModel.js
index 6fbc5c8..cc01081 100644
--- a/modules/ve-cite/ve.dm.MWReferenceModel.js
+++ b/modules/ve-cite/ve.dm.MWReferenceModel.js
@@ -98,7 +98,7 @@
 
        // Inject reference document into internal reference item
        surfaceModel.change(
-               ve.dm.Transaction.newFromDocumentInsertion(
+               ve.dm.TransactionBuilder.static.newFromDocumentInsertion(
                        doc,
                        internalList.getItemNode( item.index ).getRange().start,
                        this.getDocument()
@@ -135,7 +135,7 @@
                // Update the group name of all references nodes with the same 
group and key
                txs = [];
                for ( i = 0, len = refNodes.length; i < len; i++ ) {
-                       txs.push( ve.dm.Transaction.newFromAttributeChanges(
+                       txs.push( 
ve.dm.TransactionBuilder.static.newFromAttributeChanges(
                                doc,
                                refNodes[ i ].getOuterRange().start,
                                { refGroup: this.group, listGroup: listGroup }
@@ -146,9 +146,9 @@
        }
        // Update internal node content
        itemNodeRange = internalList.getItemNode( this.listIndex ).getRange();
-       surfaceModel.change( ve.dm.Transaction.newFromRemoval( doc, 
itemNodeRange, true ) );
+       surfaceModel.change( ve.dm.TransactionBuilder.static.newFromRemoval( 
doc, itemNodeRange, true ) );
        surfaceModel.change(
-               ve.dm.Transaction.newFromDocumentInsertion( doc, 
itemNodeRange.start, this.getDocument() )
+               ve.dm.TransactionBuilder.static.newFromDocumentInsertion( doc, 
itemNodeRange.start, this.getDocument() )
        );
 };
 
diff --git a/modules/ve-cite/ve.ui.MWReferencesListDialog.js 
b/modules/ve-cite/ve.ui.MWReferencesListDialog.js
index 97e4b2b..8c2d6e3 100644
--- a/modules/ve-cite/ve.ui.MWReferencesListDialog.js
+++ b/modules/ve-cite/ve.ui.MWReferencesListDialog.js
@@ -111,7 +111,7 @@
                                                refGroup: refGroup
                                        };
                                        surfaceModel.change(
-                                               
ve.dm.Transaction.newFromAttributeChanges(
+                                               
ve.dm.TransactionBuilder.static.newFromAttributeChanges(
                                                        doc, 
this.selectedNode.getOuterRange().start, attrChanges
                                                )
                                        );

-- 
To view, visit https://gerrit.wikimedia.org/r/324536
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ce6860e19e833b576f7b9fb239b96de394b667c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to