Model should capture page id

We're going to need this for logging page views.

Change-Id: I1fc46a9fab54f512edaf5feb5abbaa4f025dcb4a
This commit is contained in:
jdlrobson 2018-02-15 11:40:08 -08:00 committed by Pmiazga
parent f8533dbac8
commit 21f2d4ab0f
6 changed files with 11 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View file

@ -136,6 +136,7 @@ function convertPageToModel( page ) {
page.pagelanguagehtmlcode,
page.pagelanguagedir,
page.extract,
page.thumbnail
page.thumbnail,
page.pageid
);
}

View file

@ -172,6 +172,7 @@ function convertPageToModel( page, thumbSize, extractParser ) {
page.thumbnail ?
generateThumbnailData(
page.thumbnail, page.originalimage, thumbSize
) : undefined
) : undefined,
page.pageid
);
}

View file

@ -36,6 +36,7 @@ export var TYPE_PAGE = 'page'; // eslint-disable-line one-var
* @param {String} languageDirection Either "ltr" or "rtl"
* @param {?Array} extract
* @param {?Object} thumbnail
* @param {?Number} pageId
* @return {PreviewModel}
*/
export function createModel(
@ -44,7 +45,8 @@ export function createModel(
languageCode,
languageDirection,
extract,
thumbnail
thumbnail,
pageId
) {
var processedExtract = processExtract( extract );
@ -55,7 +57,8 @@ export function createModel(
languageDirection: languageDirection,
extract: processedExtract,
type: processedExtract === undefined ? TYPE_GENERIC : TYPE_PAGE,
thumbnail: thumbnail
thumbnail: thumbnail,
pageId: pageId
};
}

View file

@ -45,7 +45,8 @@ var DEFAULT_CONSTANTS = {
height: 300,
source: 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Rick_Astley_-_Pepsifest_2009.jpg/200px-Rick_Astley_-_Pepsifest_2009.jpg',
width: 200
}
},
447541
);
QUnit.module( 'ext.popups/gateway/mediawiki', {