Loading plugins/ead_basket/ead_basket.xqm +6 −3 Original line number Diff line number Diff line Loading @@ -115,11 +115,14 @@ declare function max.plugin.ead_basket:itemPorteDocuments($projectId, $item){ "nodeId" : $nodeId})/*[1] }; declare %rest:path("/{$projectId}/ead/fetch_basket_data.html") %output:method("html") %rest:POST("{$itemsList}") function max.plugin.ead_basket:basketData($projectId, $itemsList){ %rest:query-param("itemsList", "{$itemsListb64}") %rest:GET function max.plugin.ead_basket:basketData($projectId, $itemsListb64 as xs:base64Binary){ let $itemsList := json:parse(convert:binary-to-string(xs:base64Binary($itemsListb64))) for $items in $itemsList/json/_ group by $docName := fn:substring-before($items, "|") let $dbPath := max.config:getProjectDBPath($projectId) Loading ui/js/ead.js +3 −8 Original line number Diff line number Diff line Loading @@ -70,13 +70,8 @@ class EADDocumentsBasket { } async hydrateItems() { let response = await fetch(baseURI + "/ead/fetch_basket_data.html", { method: "post", headers: { 'Accept': 'application/xml', 'Content-Type': 'application/json' }, body: JSON.stringify(this.items()) let response = await fetch(baseURI + "/ead/fetch_basket_data.html?itemsList=" + btoa(JSON.stringify(this.items())), { method: "GET", }); return await response.text() } Loading Loading
plugins/ead_basket/ead_basket.xqm +6 −3 Original line number Diff line number Diff line Loading @@ -115,11 +115,14 @@ declare function max.plugin.ead_basket:itemPorteDocuments($projectId, $item){ "nodeId" : $nodeId})/*[1] }; declare %rest:path("/{$projectId}/ead/fetch_basket_data.html") %output:method("html") %rest:POST("{$itemsList}") function max.plugin.ead_basket:basketData($projectId, $itemsList){ %rest:query-param("itemsList", "{$itemsListb64}") %rest:GET function max.plugin.ead_basket:basketData($projectId, $itemsListb64 as xs:base64Binary){ let $itemsList := json:parse(convert:binary-to-string(xs:base64Binary($itemsListb64))) for $items in $itemsList/json/_ group by $docName := fn:substring-before($items, "|") let $dbPath := max.config:getProjectDBPath($projectId) Loading
ui/js/ead.js +3 −8 Original line number Diff line number Diff line Loading @@ -70,13 +70,8 @@ class EADDocumentsBasket { } async hydrateItems() { let response = await fetch(baseURI + "/ead/fetch_basket_data.html", { method: "post", headers: { 'Accept': 'application/xml', 'Content-Type': 'application/json' }, body: JSON.stringify(this.items()) let response = await fetch(baseURI + "/ead/fetch_basket_data.html?itemsList=" + btoa(JSON.stringify(this.items())), { method: "GET", }); return await response.text() } Loading