Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/220441
Change subject: Reuse the element identifiers given by RESTBase ...................................................................... Reuse the element identifiers given by RESTBase TODO: Make this change transparent to client. The drafts saved based on old source content should work and align with new source. Bug: T102584 Change-Id: Iedbf36ea872bee8149e842751fd7bb05b4b870b1 --- M lineardoc/Doc.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/41/220441/1 diff --git a/lineardoc/Doc.js b/lineardoc/Doc.js index 0647e1b..22196c8 100644 --- a/lineardoc/Doc.js +++ b/lineardoc/Doc.js @@ -83,7 +83,12 @@ item = this.items[ i ]; if ( this.items[ i ].type === 'open' ) { tag = Utils.cloneOpenTag( item.item ); - tag.attributes.id = getNextId( 'block' ); + if ( tag.attributes.id ) { + // Kept for restoring the old articles. + tag.attributes['data-seqid'] = getNextId( 'block' ); + } else{ + tag.attributes.id = getNextId( 'block' ); + } newDoc.addItem( item.type, tag ); } else if ( this.items[ i ].type !== 'textblock' ) { newDoc.addItem( item.type, item.item ); -- To view, visit https://gerrit.wikimedia.org/r/220441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iedbf36ea872bee8149e842751fd7bb05b4b870b1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits