Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/371165 )

Change subject: [WIP] Update VE stuff for new Parsoid content
......................................................................

[WIP] Update VE stuff for new Parsoid content

Depends-On: Ibdf8a6e0390bf79e9aeb67a0beaa9ad0c9705e90
Change-Id: Idfe81a051ceb936d794603a2515c9feff2509311
---
M modules/ve/pageTarget/ve.init.mw.ProofreadPagePageTarget.js
1 file changed, 25 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/65/371165/1

diff --git a/modules/ve/pageTarget/ve.init.mw.ProofreadPagePageTarget.js 
b/modules/ve/pageTarget/ve.init.mw.ProofreadPagePageTarget.js
index 1152087..dec2612 100644
--- a/modules/ve/pageTarget/ve.init.mw.ProofreadPagePageTarget.js
+++ b/modules/ve/pageTarget/ve.init.mw.ProofreadPagePageTarget.js
@@ -71,8 +71,8 @@
  * @inheritdoc
  */
 ve.init.mw.ProofreadPagePageTarget.prototype.documentReady = function () {
-       this.constructor.static.cleanHtml( this.doc );
-       this.constructor.static.splitSections( this.doc );
+       // this.constructor.static.cleanHtml( this.doc );
+       // this.constructor.static.splitSections( this.doc );
 
        // Parent method
        ve.init.mw.ProofreadPagePageTarget.super.prototype.documentReady.apply( 
this, arguments );
@@ -131,36 +131,36 @@
 /**
  * @inheritdoc
  */
-ve.init.mw.ProofreadPagePageTarget.prototype.getHtml = function ( newDoc, 
oldDoc ) {
-       var sectionNode,
-               articleNode = newDoc.body.children[ 0 ];
-
-       // Unwrap section and article tags, and check it hasn't already been 
unwrapped.
-       if ( articleNode && articleNode.tagName.toLowerCase() === 'article' ) {
-               while ( ( sectionNode = articleNode.firstChild ) ) {
-                       while ( sectionNode.firstChild ) {
-                               newDoc.body.insertBefore( 
sectionNode.firstChild, articleNode );
-                       }
-                       articleNode.removeChild( sectionNode );
-               }
-
-               newDoc.body.removeChild( articleNode );
-       }
-
-       // Parent method
-       return ve.init.mw.ProofreadPagePageTarget.super.prototype.getHtml.call( 
this, newDoc, oldDoc );
-};
+// ve.init.mw.ProofreadPagePageTarget.prototype.getHtml = function ( newDoc, 
oldDoc ) {
+//     var sectionNode,
+//             articleNode = newDoc.body.children[ 0 ];
+//
+//     // Unwrap section and article tags, and check it hasn't already been 
unwrapped.
+//     if ( articleNode && articleNode.tagName.toLowerCase() === 'article' ) {
+//             while ( ( sectionNode = articleNode.firstChild ) ) {
+//                     while ( sectionNode.firstChild ) {
+//                             newDoc.body.insertBefore( 
sectionNode.firstChild, articleNode );
+//                     }
+//                     articleNode.removeChild( sectionNode );
+//             }
+//
+//             newDoc.body.removeChild( articleNode );
+//     }
+//
+//     // Parent method
+//     return ve.init.mw.ProofreadPagePageTarget.super.prototype.getHtml.call( 
this, newDoc, oldDoc );
+// };
 
 /**
  * @inheritdoc
  */
-ve.init.mw.ProofreadPagePageTarget.prototype.submit = function ( wikitext, 
fields ) {
-       var content;
+ve.init.mw.ProofreadPagePageTarget.prototype.submit = function ( content, 
fields ) {
        if ( this.submitting ) {
                return false;
        }
 
-       content = this.parseWikitext( wikitext );
+       content = JSON.parse( content );
+
        ve.extendObject( fields, {
                model: 'proofread-page',
                wpHeaderTextbox: content.header,
@@ -169,7 +169,7 @@
                wpQuality: content.level.level
        } );
 
-       return ve.init.mw.ProofreadPagePageTarget.super.prototype.submit.call( 
this, wikitext, fields );
+       return ve.init.mw.ProofreadPagePageTarget.super.prototype.submit.call( 
this, '', fields );
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfe81a051ceb936d794603a2515c9feff2509311
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Arlolra <abrea...@wikimedia.org>

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

Reply via email to