pict-section-recordset 1.0.8 → 1.0.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-recordset",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Pict dynamic record set management views",
5
5
  "main": "source/Pict-Section-RecordSet.js",
6
6
  "directories": {
@@ -263,8 +263,24 @@ class viewRecordSetList extends libPictRecordSetRecordView
263
263
 
264
264
  //FIXME: short-term workaround to not blow up the tempplate rendering with way too many links
265
265
  const linkRangeStart = Math.max(0, tmpRecordListData.PageLinkBookmarks.Current - 10);
266
- const linkRangeEnd = Math.min(tmpRecordListData.PageLinks.length - 1, tmpRecordListData.PageLinkBookmarks.Current + 10);
266
+ const linkRangeEnd = Math.min(tmpRecordListData.PageLinks.length, tmpRecordListData.PageLinkBookmarks.Current + 10);
267
267
  tmpRecordListData.PageLinksLimited = tmpRecordListData.PageLinks.slice(linkRangeStart, linkRangeEnd);
268
+ if (linkRangeStart > 0)
269
+ {
270
+ tmpRecordListData.PageLinksLimited.unshift(
271
+ {
272
+ Page: 1,
273
+ URL:`#/PSRS/${tmpRecordListData.RecordSet}/List/${0}/${tmpRecordListData.PageSize}`
274
+ });
275
+ }
276
+ if (linkRangeEnd < tmpRecordListData.PageLinks.length)
277
+ {
278
+ tmpRecordListData.PageLinksLimited.push(
279
+ {
280
+ Page: tmpRecordListData.PageCount,
281
+ URL:`#/PSRS/${tmpRecordListData.RecordSet}/List/${(tmpRecordListData.PageCount - 1) * tmpRecordListData.PageSize}/${tmpRecordListData.PageSize}`
282
+ });
283
+ }
268
284
 
269
285
  tmpRecordListData.PageLinkBookmarks.Previous = tmpRecordListData.PageLinkBookmarks.Current - 1;
270
286
  tmpRecordListData.PageLinkBookmarks.Next = tmpRecordListData.PageLinkBookmarks.Current + 1;