Metadata
Title
Cosme Colony Collection
Category
general
UUID
ff21aeb2c9b9409a87029265dd3ea29f
Source URL
https://digital.library.sydney.edu.au/nodes/view/6392
Parent URL
https://digital.library.sydney.edu.au/
Crawl Time
2026-03-10T04:38:53+00:00
Rendered Raw Markdown

Cosme Colony Collection

Source: https://digital.library.sydney.edu.au/nodes/view/6392 Parent: https://digital.library.sydney.edu.au/

Skip to content

6392 var texttype = "METADATA"; var textedit = "0"; var textview = "1"; var overrideShowHitsPopup = "no"; var initText = "1";

$(function() { $("#cloneitembutton").button().on("click", function() { var dialogCloneForm = '

Warning. Cloning this item will not retain its parent-child relationship.

' + '
' + '
'; dialog = $(dialogCloneForm).dialog({ autoOpen: false, height: 120, width: 360, modal: true, buttons: { // Restructured buttons slightly to retain custom colours over the jquery upgrade Cancel: { text: "Cancel", class: "ui-state-default", hover: function() { $(this).toggleClass("hoverClass"); }, click: function() { dialog.dialog("close"); } }, // Restructured buttons slightly to retain custom colours over the jquery upgrade "Confirm Clone": { text: "Confirm Clone", class: "ui-state-default", hover: function() { $(this).toggleClass("hoverClass"); }, click: function() { document.getElementById("cloneitemform").submit(); } } }, close: function() { dialog.dialog('destroy').remove(); } }); dialog.dialog("open"); }); });

Open/Close Toolbox

Format: Collection

Linked To

Image

Text

Copyright

Click to read the full Digital Collections copyright statement.

Other than for the purposes of and subject to the conditions prescribed under the Copyright Act, items may not in any form or by any means (electronic, mechanical, microcopying, photocopying, recording or otherwise) be altered, reproduced, stored in a retrieval system or transmitted without prior written permission from the University of Sydney Library and/or the appropriate author.

Tools

DownloadAdd to My CollectionContact us about thisCitation for this item

Drop down list of top links

.xf-web-container { margin-bottom: 0; font-size: 16px; line-height: 24px; } /*! CSS Used from: https://www.sydney.edu.au/etc.clientlibs/library/clientlibs/library-frontend-svelte-css.css?a=nocache */ div, span, a, ul, li, header, section { margin: 0; padding: 0; border: 0; vertical-align: baseline; } header, section { display: block; } ul { list-style: none; } a { background-color: transparent; font-family: "Apercu", Helvetica, sans-serif; } button { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; } button { overflow: visible; } button { text-transform: none; } button, [type="button"] { -webkit-appearance: button; } ul, li { margin: 0; padding: 0; } .xf-web-container { box-sizing: border-box; } .sr-only { position: absolute; border: 0; padding: 0; margin: -1px; overflow: hidden; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); } .m-link[data-type="anchorLink"] { color: #ce3d20; } .m-link[data-type="anchorLink"]:hover, .m-link[data-type="anchorLink"]:focus { color: #ce3d20; } .m-grid { box-sizing: border-box; display: flex; flex: 0 1 auto; flex-flow: row wrap; padding: 0; margin: 0; margin-right: calc(var(--m-grid-column-gap) / -2); margin-left: calc(var(--m-grid-column-gap) / -2); } .m-grid__cell { box-sizing: border-box; margin: 0; padding: 0 calc(var(--m-grid-column-gap) / 2); --m-grid-cell-max-width: 100%; max-width: var(--m-grid-cell-max-width); } @media screen and (min-width: 576px) { .\31\/3--mobile-up { --m-grid-cell-max-width: 33.33333%; flex-basis: var(--m-grid-cell-max-width); max-width: var(--m-grid-cell-max-width); } } @media screen and (min-width: 768px) { .\32\/3--tablet-up { --m-grid-cell-max-width: 66.66667%; flex-basis: var(--m-grid-cell-max-width); max-width: var(--m-grid-cell-max-width); } } .m-link { --link-font-size: "inherit"; color: #ce3d20; text-decoration: none; font-size: var(--link-font-size); font-weight: 400; } .m-link:focus, .m-link:hover { color: #ce3d20; cursor: pointer; text-decoration: none; } .m-link--block { display: block; } .m-link__content { text-decoration: underline; } .m-link--block { display: flex; flex-flow: row wrap; align-items: center; } .m-link__icon-right { position: relative; transition: right 0.2s; margin-left: 6px; right: 0; } .m-link:focus:not(.m-link--no-movement) .m-link__icon-right, .m-link:hover:not(.m-link--no-movement) .m-link__icon-right { right: -5px; } .m-link--default { display: flex; align-items: center; } .m-link--default span { text-decoration: none; } .m-link--default--block { display: block; } .m-button { display: flex; flex-flow: row nowrap; justify-content: center; align-items: center; padding: 16px 32px; font-weight: 700; line-height: 1; text-align: center; transition: all 400ms; cursor: pointer; } .m-button--button { border: none; } .m-button__content { text-decoration: none; line-height: 1; } .m-button__icon-right { margin-left: 8px; } .m-button[data-style="inline"] { background: none; border: 0; color: #fff; } .m-button[data-style="inline"]:focus, .m-button[data-style="inline"]:hover { background: none; text-decoration: underline; } .m-content-container { box-sizing: border-box; margin-left: auto; margin-right: auto; width: 100%; max-width: 100%; padding-left: 16px; padding-right: 16px; } @media (min-width: 768px) { .m-content-container { padding-left: 16px; padding-right: 16px; } } @media (min-width: 992px) { .m-content-container { padding-left: 16px; padding-right: 16px; } } @media (min-width: 1200px) { .m-content-container { padding-left: 16px; padding-right: 16px; max-width: 1200px; } } .site-header { position: relative; z-index: 1; } .site-header { position: relative; min-height: 80px; z-index: 99999; } .m-lib-header { position: relative; top: 0; width: 100%; background: #141414; padding: 8px 16px; } .m-lib-header__container { align-items: center; } .m-lib-header__logo-content { display: flex; flex: 0 0 100%; align-items: center; color: #fff; } @media (max-width: 575px) { .m-lib-header__logo-content { padding: 8px 0 0 0; justify-content: space-between; } } .m-lib-header__logo-title { font-family: "Apercu", Helvetica, sans-serif; font-size: 32px; line-height: 40px; font-weight: 400; text-decoration: none !important; color: #fff; } .m-lib-header__logo-titlelink { text-decoration: none !important; color: #fff; } .m-lib-header__logo-titlelink:hover { text-decoration: none !important; color: #fff; } @media (min-width: 576px) { .m-lib-header__logo-titlelink { display: inline-block; margin-left: 20px; } } .m-lib-header__navs--tablet { display: none; } @media (min-width: 576px) { .m-lib-header__navs--tablet { display: flex; flex: 1; justify-content: flex-end; } } @media (min-width: 992px) { .m-lib-header__navs--tablet { justify-content: space-between; } } .m-lib-header__navs-item { margin-left: 32px; } .m-lib-header__navs-item:first-child { margin-left: 0; } .m-lib-header__navs-item .m-link { color: #fff; font-weight: 400; } .m-lib-header__navs-item .m-link__content { text-decoration: none; } .m-lib-header__navs-item .m-link:hover { color: #141414; } @media (min-width: 768px) { .m-lib-header__navs-item .m-link:hover { color: #fff; } } .m-lib-header__navs-link { border-bottom: 2px solid #141414; color: #fff; font-family: "Apercu", Helvetica, sans-serif; font-size: 16px; line-height: 24px; font-weight: 400; text-decoration: none; } .m-lib-header__navs-link:hover { border-color: #fff; } .m-lib-header__navs--primary-navs { display: none; } @media (min-width: 992px) { .m-lib-header__navs--primary-navs { display: flex; justify-content: space-between; } } @media (min-width: 768px) { .m-lib-header__navs--global-navs { display: flex; justify-content: space-between; } } .m-lib-header__mobile { background: #fff; display: none; padding: 20px; } @media (max-width: 991px) { .m-lib-header__mobile { display: block; } } .m-lib-header__mobile-pane { position: absolute; transform-origin: left top; transform: scaleY(0); margin-top: 0px; z-index: 99910; width: 100%; } @media (min-width: 768px) { .m-lib-header__mobile-pane { top: 132px; width: 30vw; } } .m-lib-header__mobile .m-lib-header__navs { border-top: 1px solid #d2d2d2; padding-top: 20px; margin-top: 20px; } .m-lib-header__mobile .m-lib-header__navs:first-child { border-top: 0 none; padding-top: 0; margin-top: 0; } .m-lib-header__mobile .m-lib-header__navs-item { padding-top: 20px; margin: 0; } .m-lib-header__mobile .m-lib-header__navs-item:first-child { padding-top: 0; } .m-lib-header__mobile .m-lib-header__navs-item .m-link { color: #ce3d20; } .m-lib-header__mobile .m-lib-header__navs-link { border-bottom: 2px solid #fff; color: #141414; font-size: 16px; font-weight: 600; line-height: 24px; text-decoration: none; transition: all 0.3s; } .m-lib-header__mobile .m-lib-header__navs-link:hover { border-color: #ce3d20; } @media (min-width: 768px) { .m-lib-header__mobile .m-lib-header__navs-global-links { display: none; } } .m-lib-cultural-wellbeing-link { background: #40645c; text-align: center; } .m-lib-cultural-wellbeing-link .m-button { display: inline; } .m-lib-cultural-wellbeing-link .m-button__icon-right { --fill-colour: $colour-brand-white !important; fill: #fff !important; position: relative; left: 0; top: 2px; transition: left 0.2s; } .m-lib-cultural-wellbeing-link .m-button:hover .m-button__icon-right { transition: left 0.2s; left: 6px; } .m-lib-cultural-wellbeing-link .m-button__content { font-weight: 400; }

skiptocontent a {

padding: 5px; position: fixed; top: -40px; left: 0px; color: white; border-right: 1px solid white; border-bottom: 1px solid white; border-bottom-right-radius: 8px; background: #ce3d20; transition: top 0.5s ease-out; z-index: 100; }

skiptocontent a:focus {

left: 0px; top: 0px; outline-color: transparent; transition: top 0.05s ease-in; } /* Recollect custom mobile integration code */ @media (max-width: 790px) { .m-logo { margin-left: 20px; } .m-lib-header { width: auto; } }

Cosme Colony Collection

Details

Collection Description

New Australia and Cosme were socialist colonies founded in Paraguay in 1893 and 1894 by a group of Australians led by William Lane.

The Cosme Colony Collection is a collection of documents, personal papers, photographs and realia relating to the New Australia Colony and Cosme Colony held in Rare Books and Special Collections, University of Sydney Library. The contents of the collection are described in the Index to the Cosme Colony Collection.

The New Australia Newspaper digitised items first appeared in the Sydney Electronic Text and Image Service (SETIS) website.

Collection Summaryis a collection of documents, personal papers, photographs and realia relating to the New Australia Colony and Cosme Colony held in Rare Books and Special Collections.

\ \ \ \

Image

[\

Map of Paraguay](https://digital.library.sydney.edu.au/nodes/view/8273)

[\

Male chigo, female chigo, distended with eggs, the egg of the chigo](https://digital.library.sydney.edu.au/nodes/view/8272)

[\

Embroidered Lace (Nanduti lace?)](https://digital.library.sydney.edu.au/nodes/view/8271)

[\

Crowded street market](https://digital.library.sydney.edu.au/nodes/view/8270)

[\

Local trading in the mountains](https://digital.library.sydney.edu.au/nodes/view/8269)

[\

Drawing of an adult holding long gun standing over human bodies on the ground](https://digital.library.sydney.edu.au/nodes/view/8268)

[\

Three smoking adults with jars on their heads and a child](https://digital.library.sydney.edu.au/nodes/view/8267)

[\

Lavanderas - Bahía de Asunción: washing in the Bay of Asunción (Paraguay)](https://digital.library.sydney.edu.au/nodes/view/8266)

[\

Bolichera ambulante: relaxing smoking female adult and a child sitting in a plantation](https://digital.library.sydney.edu.au/nodes/view/8265)

[\

A Paraguayo farm](https://digital.library.sydney.edu.au/nodes/view/8263)

[\

Ruined stone building](https://digital.library.sydney.edu.au/nodes/view/8262)

[\

Salto Guairá, caide grande. Waterfalls](https://digital.library.sydney.edu.au/nodes/view/8261)

[\

Market and Pantheon of Lopez at Asunción](https://digital.library.sydney.edu.au/nodes/view/8260)

[\

Cathedral and Plaza de la Constitucion, Asunción](https://digital.library.sydney.edu.au/nodes/view/8259)

[\

Busy city street and square](https://digital.library.sydney.edu.au/nodes/view/8258)

[\

Señor Don Emilio Aceval, President of Paraguay](https://digital.library.sydney.edu.au/nodes/view/8257)

[\

Person in formal military attire](https://digital.library.sydney.edu.au/nodes/view/8256)

[\

Map of South America, Paraguay highlighted](https://digital.library.sydney.edu.au/nodes/view/8255)

[\

Cosme Principles](https://digital.library.sydney.edu.au/nodes/view/8254)

[\

Bridge over the Pirapo River](https://digital.library.sydney.edu.au/nodes/view/8253)

[\

Allan McLeod and family, after Margaret McLeod's death](https://digital.library.sydney.edu.au/nodes/view/8252)

[\

Alice Lane, Ettie Lane and two unidentified figures in the orchard](https://digital.library.sydney.edu.au/nodes/view/8251)

[\

Children in front of Cosme store and printery](https://digital.library.sydney.edu.au/nodes/view/8250)

Text

[\

New Australia. Number 19, July 28, 1894](https://digital.library.sydney.edu.au/nodes/view/8422)

[\

New Australia. Number 18, May 15, 1894](https://digital.library.sydney.edu.au/nodes/view/8421)

[\

New Australia. Number 17, April 21, 1894](https://digital.library.sydney.edu.au/nodes/view/8420)

[\

New Australia. Number 16, March 24, 1894](https://digital.library.sydney.edu.au/nodes/view/8419)

[\

New Australia. Number 15, February 27, 1894](https://digital.library.sydney.edu.au/nodes/view/8418)

[\

New Australia. Number 14, January 27, 1894](https://digital.library.sydney.edu.au/nodes/view/8417)

[\

New Australia. Number 13a, December 18, 1893](https://digital.library.sydney.edu.au/nodes/view/8416)

[\

New Australia. Number 13, November 18, 1893](https://digital.library.sydney.edu.au/nodes/view/8415)

[\

New Australia. Number 12, September 16, 1893](https://digital.library.sydney.edu.au/nodes/view/8414)

[\

New Australia. Number 10, August 1, 1893](https://digital.library.sydney.edu.au/nodes/view/8413)

[\

New Australia. Number 9, July 1, 1893](https://digital.library.sydney.edu.au/nodes/view/8412)

[\

New Australia. Number 8, May 27, 1893](https://digital.library.sydney.edu.au/nodes/view/8411)

[\

New Australia. Number 7, April 29, 1893](https://digital.library.sydney.edu.au/nodes/view/8410)

[\

New Australia. Number 6, April 8, 1893](https://digital.library.sydney.edu.au/nodes/view/8409)

[\

New Australia. Number 5, March 25, 1893](https://digital.library.sydney.edu.au/nodes/view/8408)

[\

New Australia. Number 4, February 18, 1893](https://digital.library.sydney.edu.au/nodes/view/8407)

[\

New Australia. Number 3, December 17, 1892](https://digital.library.sydney.edu.au/nodes/view/8406)

[\

New Australia. Number 2, December 17, 1892](https://digital.library.sydney.edu.au/nodes/view/8405)

[\

New Australia. Number 1, November 19, 1892](https://digital.library.sydney.edu.au/nodes/view/8404)

[\

Newspaper clipping "Expert ignored for 40 years"](https://digital.library.sydney.edu.au/nodes/view/8237)

[\

Letters to John Lane from the Home Secretary's Office, Brisbane in 1914, and newspaper clipping](https://digital.library.sydney.edu.au/nodes/view/8226)

[\

Wangeriburra](https://digital.library.sydney.edu.au/nodes/view/8225)

[\

John Lane's notebook when he compiled the vocabulary of the Wangerriburra or Albert Tribe of Aboriginal people in 1915](https://digital.library.sydney.edu.au/nodes/view/8224)

Cosme Colony Collection. University of Sydney Library, accessed 10/03/2026, https://digital.library.sydney.edu.au/nodes/view/6392

threedeeCont,

narImgCont {

background: #ffffff url("/img/ajax-loader.gif") no-repeat center center; }

autoplayer {

height: auto; width: auto; background: #ffffff url("/img/ajax-loader.gif") no-repeat center center !important; } .narImgCont_close { margin: 20px; position: fixed; } span.marker { background-color: #ffff00; } @media only screen and (max-width: 790px) {

viewport.pdf {

display: block; height: auto !important; } .pdf iframe { display: block; height: 100vh !important; } } span.xsmall { font-size: 12px; } .xhide { display: none; }

gridtools {

display: none; margin: 8px; white-space: nowrap; }

eddy,

eddyGrid {

display: inline-block; } .button { border-radius: 5px; } a.disableClick { color: #888888; background-color: #cccccc; border-color: #cccccc; cursor: default; pointer-events: none; } .form_validation_message { color: red; opacity: 0; } .error_form { border: 1px solid red; outline: none; } .submit input:disabled { background: #b9b9b9; border: #b9b9b9; } /* BB COSA-1412*/

jumpto ul {

z-index: 99; } /* BB R1X-3135*/ div#buttonsFullMonty { float: left; display: none; } div#buttonsFullMonty input { vertical-align: -webkit-baseline-middle; } div#ocrbar.fullmonty { position: absolute !important; width: calc(100% - 110px); z-index: 98 !important; } div#viewport.fullmonty { position: relative; z-index: 98 !important; }

ocrbar {

display: block; } div#ocrbar.tinymonty { display: none !important; } .vscancolor { color: orange !important; font-size: 28px; } @media only screen and (max-width: 790px) { html body #ocrbar { display: none !important; } }

/* BB R1X-3135 - toggle asset/text full screen*/ $("#toggleFullText").change(function() { transcriptionBlock.toggleFullText($(this)); }); $("#toggleFullAsset").change(function() { transcriptionBlock.toggleFullAsset($(this)); }); var gridTable = ''; $('img.kaboom').css({ cursor: 'pointer' }).on('click', function() { var img = $(this); //var url = location.origin; var url = ''; var close = $(''); var bigImg = $('').css({ 'max-width': '100%', 'max-height': '100%', 'height': 'auto', 'width': 'auto', 'display': 'inline' }); bigImg.attr({ //src: img.attr('src'), src: "/assets/display/" + img.attr('id') + "-max", alt: img.attr('alt'), title: img.attr('title') }); var over = $('

').text(' ').css({ 'height': '100%', 'width': '100%', 'background': 'rgba(0,0,0,.82)', 'position': 'fixed', 'top': 0, 'left': 0, 'padding': '20px', 'opacity': 0.0, 'cursor': 'pointer', 'z-index': '9999', 'text-align': 'center' }).append(bigImg, close).bind('click', function() { $(this).fadeOut(300, function() { $(this).remove(); $('div#viewport').css('z-index', 'initial'); }); }).insertAfter(this).animate({ 'opacity': 1 }, 300); $('div#viewport').css('z-index', '4'); }); /** * Pops up the Page Hits highlighting window. * @author WR */ function popupPageHits() { $("#searchresultsdiv").dialog({ width: 300, height: 400, resizable: true, title: "Search Result Page Hits", position: { my: "right top", at: "right top", of: "#viewport" } }); lazyImages(); } // Exact phrase match search has highlights. if (overrideShowHitsPopup === 'yes') { // Automatically show the popup on page load. popupPageHits(); } /* * Refactoring Note: * The function 'initPop(idx)' (responsible for displaying OCR/Transcription results on Page load as default behaviour) * is moved to 'recollect3.js' as 'showOcrTranscriptionOnPageLoad(idx, texttype, textedit, textview)' to improve modularity * and separation of concerns.This change helps in maintaining and testing the OCR functionality independently. */ if (texttype !== 'METADATA') { console.log("T-type: " + texttype); idx = transcriptionBlock.getPageHash(); console.log("T-idx: " + idx); //Show default view (ORC/Transcript) on page load transcriptionBlock.showOcrTranscriptionOnPageLoad(idx, texttype, textedit, textview) var popLoaded = 1; } //@ST COSA-1324 : 2020-01-13. Function for image tag form validation. function getFormValidation(obj, value, userLevel) { // Old pattern that was creating issues with comma, see below // var patternOld = /['<','>','&']/; // Changed to new regex that accepts comma and still denies other characters https://recollectnz.atlassian.net/browse/R1X-6281 var pattern = /[<>&]/; if (userLevel != "Administrator") { if (pattern.test(value)) { obj.previousElementSibling.style.opacity = 1; $('.newrec').addClass('error_form'); $('.submit')[1].children[0].setAttribute("disabled", "disabled"); } else { obj.previousElementSibling.style.opacity = 0; $('.newrec').removeClass('error_form'); $('.submit')[1].children[0].removeAttribute("disabled"); } // if ENDS } // if ENDS } // function ENDS

$(document).ready(function() { // @ST timeline script var embed; if (document.getElementById('timeline-embed') !== null) { embed = document.getElementById('timeline-embed'); //embed.style.height = getComputedStyle(document.body).height; window.timeline = new TL.Timeline('timeline-embed', Array, { hash_bookmark: false }); window.addEventListener('resize', function() { var embed = document.getElementById('timeline-embed'); //embed.style.height = getComputedStyle(document.body).height; timeline.updateDisplay(); }); } });

(function() { //if it doesn't have "#back-forward" block set null var $el = document.getElementById("back-forward") || null; //if page doesn't have this element break function if (!$el) return; //small helpers const getNewObj = (k, v) => { return {

} }; const parseReq = (str) => str.replace("?", "&").split("&").map(e => e.split("=")).filter(e => e[0] != "").map(e => getNewObj(e[0], e[1])); const getValue = (obj) => Object.values(obj); //encode array of the elements var encoding = function(str) { var result; try { result = btoa(unescape(encodeURIComponent(str))); } catch (e) { console.error("Error on ENCODING FUNCTION." + e); } return result; } //decode string var decoding = function(str) { var result; try { result = decodeURIComponent(escape(atob(decodeURIComponent(str)))); } catch (e) { console.error("Error on DECODING FUNCTION." + e); } return result; } //parse string var jsonParse = function(param) { var result; try { result = JSON.parse(param); } catch (e) { console.error("Error on JSON PARSE FUNCTION." + e); } return result; } //XSS protection var encodingHtmlEntities = function(str) { return String(str).replace(//g, '>').replace(/"/g, '"'); //.replace(/&/g, '&') } //get localStorageKey from URL const localStorageKey = parseReq(window.location.search).filter(e => Object.keys(e) == "lsk"); const otherKeys = parseReq(window.location.search).filter(e => Object.keys(e) != "lsk"); let searchParam = ""; otherKeys.forEach(e => { searchParam += "&" + Object.keys(e) + "=" + Object.values(e); }); //if don't have a key in URL break function if ((localStorageKey && localStorageKey.length === 0)) return; //get key from string const KEY = localStorageKey[0].lsk; //this key doesn't have a data break function if (!window.localStorage.getItem(KEY) && !window.sessionStorage.getItem(KEY)) return; var cleanLocalStorage = function() { for (let key in window.sessionStorage) { if ((key != KEY) && (key != "_" + KEY)) { window.sessionStorage.removeItem(key); } } } if (Object.keys(window.sessionStorage).length > 1) { cleanLocalStorage(); } //return current ID var getCurrentId = function() { let path = window.location.pathname.split('/'); return path[path.length - 1]; } //get position of element in an array var getPositionInArray = function(sessionStorage) { for (let i = 0; i < sessionStorage.length; i++) { if (Object.keys(sessionStorage[i])[0] == getCurrentId()) { return i; } } return 0; } //get range var ss_getRange = function(sessionStorage) { const array = jsonParse(decoding(sessionStorage)); let position = Number(getPositionInArray(array)); return range = { prev: array[position - 1] ? array[position - 1] : {}, current: array[position] ? array[position] : {}, next: array[position + 1] ? array[position + 1] : {}, position } } //generate object of position, index, page and length var getPosition = function() { let arr = jsonParse(decoding(currentStorage.searchSet)); let position = { page: currentStorage.page, index: getPositionInArray(arr), length: arr.length }; return position; } var getByPosition = function(array, idx) { return jsonParse(decoding(array))[idx]; } if (!window.sessionStorage.getItem(KEY)) { window.sessionStorage.setItem("_" + KEY, window.localStorage.getItem(KEY)); window.localStorage.removeItem(KEY); } //get initial information from LocalStorage const searchResult = jsonParse(decoding(window.sessionStorage.getItem("_" + KEY))); const itemsSet = searchResult.itemsSet; const searchReq = decoding(searchResult.request); const pageCount = jsonParse(searchResult.pageCount); const countElem = jsonParse(searchResult.countElem); //set local variable let perPage = jsonParse(searchResult.perPage); let requestWasSent = false; //SESSION SECTION let sessionKey = KEY; //get sessionStorage by key, if it's not exist set null let sessionStorage = window.sessionStorage.getItem(sessionKey) || null; let sessionItemSet = ""; if (sessionStorage) { sessionItemSet = JSON.parse(sessionStorage).searchSet; } else { sessionItemSet = itemsSet; } //create local state let currentStorage = { page: jsonParse(searchResult.currentPage), prevSearchSet: "", searchSet: sessionItemSet, nextSearchSet: "", current: ss_getRange(itemsSet).current, prev: ss_getRange(itemsSet).prev, next: ss_getRange(itemsSet).next, position: ss_getRange(itemsSet).position } var setSessionStorage = function() { window.sessionStorage.setItem(sessionKey, JSON.stringify(currentStorage)) } //if sessionStorage empty set it with initialState of currentStorage //if sessionStorage has this key update it with new value if (!sessionStorage) { let range = ss_getRange(itemsSet); setSessionStorage(); pageNumber = searchResult.currentPage; } else { let currentArray = jsonParse(sessionStorage).searchSet; let currentPage = jsonParse(sessionStorage).page; let currentRange = ss_getRange(currentArray); currentStorage.page = jsonParse(sessionStorage).page; // currentStorage.current = ss_getRange(itemsSet).current; // currentStorage.prev = ss_getRange(itemsSet).prev; // currentStorage.next = ss_getRange(itemsSet).next; // currentStorage.position = ss_getRange(itemsSet).position; currentStorage.current = ss_getRange(jsonParse(sessionStorage).searchSet).current; currentStorage.prev = ss_getRange(jsonParse(sessionStorage).searchSet).prev; currentStorage.next = ss_getRange(jsonParse(sessionStorage).searchSet).next; currentStorage.position = ss_getRange(jsonParse(sessionStorage).searchSet).position; currentStorage.prevSearchSet = jsonParse(sessionStorage).prevSearchSet; currentStorage.nextSearchSet = jsonParse(sessionStorage).nextSearchSet; if (currentStorage.position === 0 && currentStorage.prevSearchSet != "") { let prevSet = currentStorage.prevSearchSet; currentStorage.prev = getByPosition(prevSet, jsonParse(decoding(prevSet)).length - 1); } if (currentStorage.position === jsonParse(decoding(currentArray)).length - 1 && currentStorage.nextSearchSet != "") { let nextSet = currentStorage.nextSearchSet; currentStorage.next = getByPosition(nextSet, 0); } setSessionStorage(); } let nextPage = currentStorage.page; //update set of nodes array var updateLocalStorage = function(data, searchReq, pageNum) { let newitemsSet = data.nodes.map(e => e.Node).map(e => { let x = {

}; return x; }); let newSet = encoding(JSON.stringify(newitemsSet)); let range = ss_getRange(currentStorage.searchSet); if (currentStorage.position == 0) { currentStorage.prev = getByPosition(newSet, newitemsSet.length - 1); currentStorage.prevSearchSet = newSet; } if (currentStorage.position == (jsonParse(decoding(currentStorage.searchSet)).length - 1) && jsonParse(decoding(currentStorage.searchSet)).length > 1) { currentStorage.next = getByPosition(newSet, 0); currentStorage.nextSearchSet = newSet; } setSessionStorage(); createButtonsBlock(); } var sendRequest = function(direction) { let pageNum = 1; if (direction.page == 1) { pageNum = direction.index == 0 ? 1 : (Number(direction.page) + 1); } else if (direction.page > 1 && direction.page < pageCount) { pageNum = direction.index == 0 ? (Number(direction.page) - 1) : (Number(direction.page) + 1); } else { pageNum = direction.index == 0 ? (Number(direction.page) - 1) : pageCount; } const regex = /(page=\d*)/ius; let otherReq = searchReq != "" ? (regex.test(searchReq)) ? searchReq.replace(regex, page=${pageNum}) : ${searchReq}&page=${pageNum} : ?page=${pageNum}; let newRequest = (searchReq != "" && regex.test(searchReq)) ? searchReq.replace(regex, page=${pageNum}) : otherReq; $.get('/nodes/search_result/1' + newRequest, data => updateLocalStorage(data, newRequest, pageNum)); } var getNewArrayOfIds = async function(position) { if (position.index != 0 && position.index != position.length - 1) { return; } if (((Number(position.index) == position.length - 1) && (Number(position.page) < pageCount)) || ((Number(position.index) == 0) && (Number(position.page) > 1 && Number(position.page) <= pageCount))) { if (!requestWasSent) { await sendRequest(position); requestWasSent = true; } } } var getURL = function(pathname = false) { if (pathname) { return window.location.origin + window.location.pathname; } return window.location.origin; } var getParam = function() { return window.location.search } // Added directionForAria - to allow a screen reader to announce 'next item:item title.' // Unsure if it's safe to change the exisiing data-dir for this - it may be referenced somewhere else. var createBtn = function(id, title, direct, directionForAria) { return <span> <a href="${getURL()}/nodes/view/${id}?lsk=${KEY}${searchParam}" aria-label='${directionForAria} Item:${title}' title="${encodingHtmlEntities(title)}" data-dir='${direct}'><i class='fa fa-chevron-${direct}'></i></a> </span>; } var createButtonsBlock = function() { let rangePrev = Object.keys(currentStorage.prev).length > 0 ? currentStorage.prev : 0; let rangeNext = Object.keys(currentStorage.next).length > 0 ? currentStorage.next : 0; let prev = rangePrev != 0 ? rangePrev : "none"; let next = rangeNext != 0 ? rangeNext : "none"; let prevBtn = ""; let nextBtn = ""; if (prev != "none") { prevBtn = createBtn(Object.keys(prev), Object.values(prev), "left", "Previous"); prevId = Object.keys(prev); } if (next != "none") { nextBtn = createBtn(Object.keys(next), Object.values(next), "right", "Next"); nextId = Object.keys(next); } let pos = getPosition(); getNewArrayOfIds(pos); let arrCount = perPage > 0 ? perPage : 24; let searchPos = Number(pos.page) == 1 ? (pos.index + 1) : (((Number(pos.page) - 1) * arrCount) + (pos.index + 1)); $el.innerHTML = `

`; $('[data-dir="left"]').one('click', () => { if (pos.index == 0) { nextPage = currentStorage.page - 1; } }); $('[data-dir="right"]').one('click', () => { if (pos.index == pos.length - 1) { nextPage = currentStorage.page + 1; } }); } createButtonsBlock(); window.addEventListener('beforeunload', (event) => { // DF 2023-02-15 R1X-8549 Should not call event.preventDefault() if we don't want // to propmt the "Are you sure you want to leave the page"-dialog. if (window.sessionStorage.getItem(sessionKey)) { if (currentStorage.nextSearchSet != "" || currentStorage.prevSearchSet != "") { if (currentStorage.page != 1 || currentStorage.page != pageCount) { if (nextPage > currentStorage.page) { currentStorage.prevSearchSet = currentStorage.searchSet; currentStorage.searchSet = currentStorage.nextSearchSet; currentStorage.nextSearchSet = ""; currentStorage.next = {}; } if (currentStorage.page > nextPage) { currentStorage.nextSearchSet = currentStorage.searchSet; currentStorage.searchSet = currentStorage.prevSearchSet; currentStorage.prevSearchSet = ""; currentStorage.prev = {}; } currentStorage.page = nextPage; } } setSessionStorage(); } }, { once: true }); //TO HIDE PARAMS. IT REMOVES PARAMS FROM URL // history.pushState("", null, getURL(true)); })()

back-forward {

display: flex; width: 100%; max-width: 100%; justify-content: space-between; box-sizing: border-box; /* margin: 5px 0 5px 5px; */ border-radius: 4px; } .nav-btn { padding: 5px; background-color: #f0f0f0; } .left-btn { border-radius: 2px 0 0 2px; background-color: #fff; border: 1px solid #e5e5ee; } .right-btn { border-radius: 0 2px 2px 0; background-color: #fff; border: 1px solid #e5e5ee; } .result-btn { /* font-size: 1.1em; font-weight: 700; */ width: 100%; border-top: 1px solid #e5e5ee; border-bottom: 1px solid #e5e5ee; text-align: center; }

dialog-clone-form {

display: none; }