@mjhls/mjh-framework 1.0.783-media-series-unlock → 1.0.783
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,7 +92,7 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
92
92
|
to: start + itemsPerPage,
|
|
93
93
|
url: pathname
|
|
94
94
|
};
|
|
95
|
-
seriesQuery = '*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id,\n name,\n identifier,\n \'series\': *[_type == \'documentGroup\' && references(^._id) &&
|
|
95
|
+
seriesQuery = '*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id,\n name,\n identifier,\n \'series\': *[_type == \'documentGroup\' && references(^._id) && isSeries != false && isShow != false] | order(published desc) [$from...$to]{\n _id,\n name,\n identifier,\n published,\n \'articles\': \n *[!(_id in path("drafts.**")) \n && _type == "article"\n && defined(title)\n && is_visible\n && defined(url)\n && references(^._id)\n && passwordLock != true\n && defined(published)\n && dateTime(published) <= dateTime(now())\n ] | order(published asc) {\n ...,\n title,\n summary,\n thumbnail,\n url,\n published,\n authorMapping[0]->,\n taxonomyMapping[]->,\n contentCategory->,\n \'pageNumber\': ' + currentPage + '\n }\n\n }\n}';
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
console.log('series query:', seriesQuery);
|
|
@@ -17,16 +17,6 @@ var getSeriesDetail = function getSeriesDetail(article, currentSeries) {
|
|
|
17
17
|
return body;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
if (!galleryBody) {
|
|
22
|
-
return {
|
|
23
|
-
seriesUrl: '',
|
|
24
|
-
currentSeries: false,
|
|
25
|
-
prevUrl: false,
|
|
26
|
-
nextUrl: false
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
20
|
if (currentSeries >= 1 && currentSeries < galleryBody.videos.length) {
|
|
31
21
|
nextUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) + 1);
|
|
32
22
|
}
|
|
@@ -85,7 +85,7 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
85
85
|
to: start + itemsPerPage,
|
|
86
86
|
url: pathname
|
|
87
87
|
};
|
|
88
|
-
seriesQuery = '*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id,\n name,\n identifier,\n \'series\': *[_type == \'documentGroup\' && references(^._id) &&
|
|
88
|
+
seriesQuery = '*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id,\n name,\n identifier,\n \'series\': *[_type == \'documentGroup\' && references(^._id) && isSeries != false && isShow != false] | order(published desc) [$from...$to]{\n _id,\n name,\n identifier,\n published,\n \'articles\': \n *[!(_id in path("drafts.**")) \n && _type == "article"\n && defined(title)\n && is_visible\n && defined(url)\n && references(^._id)\n && passwordLock != true\n && defined(published)\n && dateTime(published) <= dateTime(now())\n ] | order(published asc) {\n ...,\n title,\n summary,\n thumbnail,\n url,\n published,\n authorMapping[0]->,\n taxonomyMapping[]->,\n contentCategory->,\n \'pageNumber\': ' + currentPage + '\n }\n\n }\n}';
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
console.log('series query:', seriesQuery);
|
|
@@ -15,16 +15,6 @@ var getSeriesDetail = function getSeriesDetail(article, currentSeries) {
|
|
|
15
15
|
return body;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
19
|
-
if (!galleryBody) {
|
|
20
|
-
return {
|
|
21
|
-
seriesUrl: '',
|
|
22
|
-
currentSeries: false,
|
|
23
|
-
prevUrl: false,
|
|
24
|
-
nextUrl: false
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
18
|
if (currentSeries >= 1 && currentSeries < galleryBody.videos.length) {
|
|
29
19
|
nextUrl = '/view/' + article.url.current + '?seriesVid=' + (parseInt(currentSeries) + 1);
|
|
30
20
|
}
|