Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploads now go to selected album #16

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## 4.5.0 - 2024.9.24
### Added
* Assets are uploaded to the currently selected album

## 4.4.0 - 2024.8.09
### Added
* Added query param to requests to filter to show only `Approved` images
Expand Down
6 changes: 5 additions & 1 deletion buildchain/src/js/canto-embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let _formatDistrict = '';
const MAX_CONTENT_REQUEST_ITEMS = 100;
const MAX_ALBUM_REQUEST_ITEMS = 1000;
const FILTER_BY_APPROVED = "&approval=Approved";
let selectedAlbum = null;

/* -----------------canto API start-------------------------------------------------------------*/

Expand Down Expand Up @@ -503,6 +504,9 @@ function addEventListener() {
})
//treeview event
.on("click", "#treeviewSection ul li", function (e) {
// Track active album for upload purposes
selectedAlbum = e.currentTarget.dataset.id;

e.cancelBubble = true;
e.stopPropagation();
e.preventDefault();
Expand Down Expand Up @@ -960,7 +964,7 @@ function uploadFileToCanto(e) {
formData.append("x-amz-meta-tag", "");
formData.append("x-amz-meta-scheme", "");
formData.append("x-amz-meta-id", "");
formData.append("x-amz-meta-album_id", "");
formData.append("x-amz-meta-album_id", selectedAlbum);
formData.append("file", e.currentTarget.files[0]);
let statusBar = parent.document.querySelector(".modal-status-bar");

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lsst-epo/canto-dam-assets",
"description": "This Craft CMS plugin adds a Field Type with GraphQL support for the Canto Digital Asset Management (DAM) web system",
"type": "craft-plugin",
"version": "4.4.0",
"version": "4.5.0",
"license": "MIT",
"require": {
"php": ">=8.0.2",
Expand Down
2 changes: 2 additions & 0 deletions src/web/assets/dist/assets/app-BtXyNjpy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/web/assets/dist/assets/app-BtXyNjpy.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Binary file added src/web/assets/dist/assets/app-Dq0P9rbE.css.gz
Binary file not shown.
2 changes: 0 additions & 2 deletions src/web/assets/dist/assets/app-v6fBqFDY.js

This file was deleted.

1 change: 0 additions & 1 deletion src/web/assets/dist/assets/app-v6fBqFDY.js.map

This file was deleted.

Binary file removed src/web/assets/dist/assets/app-yfeoD6w3.css.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions src/web/assets/dist/assets/canto-embed-DbXhLEGs.js

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions src/web/assets/dist/assets/canto-embed-DbXhLEGs.js.map

Large diffs are not rendered by default.

Binary file not shown.
11 changes: 0 additions & 11 deletions src/web/assets/dist/assets/canto-embed-uVQc_jmE.js

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion src/web/assets/dist/assets/canto-embed-uVQc_jmE.js.map

This file was deleted.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
1 change: 1 addition & 0 deletions src/web/assets/dist/assets/canto-field-CIyWJa6D.js.map

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion src/web/assets/dist/assets/canto-field-ehMCriUy.js.map

This file was deleted.

Binary file not shown.
59 changes: 31 additions & 28 deletions src/web/assets/dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,65 @@
{
"src/fonts/icomoon.eot": {
"file": "assets/icomoon-IPbEP_qL.eot",
"file": "assets/icomoon-g9sQ_-ov.eot",
"src": "src/fonts/icomoon.eot"
},
"src/fonts/icomoon.svg": {
"file": "assets/icomoon-oeb9auqQ.svg",
"file": "assets/icomoon-Ch5v1q6p.svg",
"src": "src/fonts/icomoon.svg"
},
"src/fonts/icomoon.ttf": {
"file": "assets/icomoon-A_DLqJhJ.ttf",
"file": "assets/icomoon-D8MuomEl.ttf",
"src": "src/fonts/icomoon.ttf"
},
"src/fonts/icomoon.woff": {
"file": "assets/icomoon-k7ZyzFEo.woff",
"file": "assets/icomoon-CTtnLMUS.woff",
"src": "src/fonts/icomoon.woff"
},
"src/fonts/icomoon_flight_01.eot": {
"file": "assets/icomoon_flight_01-4QT36WYy.eot",
"file": "assets/icomoon_flight_01-DhBPfpZj.eot",
"src": "src/fonts/icomoon_flight_01.eot"
},
"src/fonts/icomoon_flight_01.svg": {
"file": "assets/icomoon_flight_01-BKNFFTxm.svg",
"file": "assets/icomoon_flight_01-Eo0UVPGZ.svg",
"src": "src/fonts/icomoon_flight_01.svg"
},
"src/fonts/icomoon_flight_01.ttf": {
"file": "assets/icomoon_flight_01-rarigfHY.ttf",
"file": "assets/icomoon_flight_01-CtquKB8d.ttf",
"src": "src/fonts/icomoon_flight_01.ttf"
},
"src/fonts/icomoon_flight_01.woff": {
"file": "assets/icomoon_flight_01-c0u_u8bp.woff",
"file": "assets/icomoon_flight_01-BzS7-7xu.woff",
"src": "src/fonts/icomoon_flight_01.woff"
},
"src/js/app.ts": {
"assets": [
"assets/icomoon_flight_01-4QT36WYy.eot",
"assets/icomoon_flight_01-rarigfHY.ttf",
"assets/icomoon_flight_01-c0u_u8bp.woff",
"assets/icomoon_flight_01-BKNFFTxm.svg",
"assets/icomoon-IPbEP_qL.eot",
"assets/icomoon-A_DLqJhJ.ttf",
"assets/icomoon-k7ZyzFEo.woff",
"assets/icomoon-oeb9auqQ.svg"
],
"file": "assets/app-BtXyNjpy.js",
"name": "app",
"src": "src/js/app.ts",
"isEntry": true,
"css": [
"assets/app-yfeoD6w3.css"
"assets/app-Dq0P9rbE.css"
],
"file": "assets/app-v6fBqFDY.js",
"isEntry": true,
"src": "src/js/app.ts"
"assets": [
"assets/icomoon_flight_01-DhBPfpZj.eot",
"assets/icomoon_flight_01-CtquKB8d.ttf",
"assets/icomoon_flight_01-BzS7-7xu.woff",
"assets/icomoon_flight_01-Eo0UVPGZ.svg",
"assets/icomoon-g9sQ_-ov.eot",
"assets/icomoon-D8MuomEl.ttf",
"assets/icomoon-CTtnLMUS.woff",
"assets/icomoon-Ch5v1q6p.svg"
]
},
"src/js/canto-embed.js": {
"file": "assets/canto-embed-uVQc_jmE.js",
"isEntry": true,
"src": "src/js/canto-embed.js"
"file": "assets/canto-embed-DbXhLEGs.js",
"name": "canto-embed",
"src": "src/js/canto-embed.js",
"isEntry": true
},
"src/js/canto-field.js": {
"file": "assets/canto-field-ehMCriUy.js",
"isEntry": true,
"src": "src/js/canto-field.js"
"file": "assets/canto-field-CIyWJa6D.js",
"name": "canto-field",
"src": "src/js/canto-field.js",
"isEntry": true
}
}
Binary file modified src/web/assets/dist/manifest.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/web/assets/dist/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -4822,7 +4822,7 @@
</script>
<script>
/*<!--*/
const data = {"version":2,"tree":{"name":"root","children":[{"name":"assets/canto-field-ehMCriUy.js","children":[{"name":"src/js/canto-field.js","uid":"25c87a29-1"}]},{"name":"assets/canto-embed-uVQc_jmE.js","children":[{"name":"src/js/canto-embed.js","uid":"25c87a29-3"}]},{"name":"assets/app-v6fBqFDY.js","uid":"25c87a29-5"}],"isRoot":true},"nodeParts":{"25c87a29-1":{"renderedLength":4584,"gzipLength":0,"brotliLength":0,"metaUid":"25c87a29-0"},"25c87a29-3":{"renderedLength":20421,"gzipLength":0,"brotliLength":0,"metaUid":"25c87a29-2"},"25c87a29-5":{"id":"assets/app-v6fBqFDY.js","gzipLength":0,"brotliLength":0,"renderedLength":42,"metaUid":"25c87a29-4"}},"nodeMetas":{"25c87a29-0":{"id":"/src/js/canto-field.js","moduleParts":{"assets/canto-field-ehMCriUy.js":"25c87a29-1"},"imported":[],"importedBy":[],"isEntry":true},"25c87a29-2":{"id":"/src/js/canto-embed.js","moduleParts":{"assets/canto-embed-uVQc_jmE.js":"25c87a29-3"},"imported":[],"importedBy":[],"isEntry":true},"25c87a29-4":{"id":"/src/js/app.ts","moduleParts":{"assets/app-v6fBqFDY.js":"25c87a29-5"},"imported":[{"uid":"25c87a29-6"}],"importedBy":[],"isEntry":true},"25c87a29-6":{"id":"/src/css/app.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"25c87a29-4"}]}},"env":{"rollup":"4.9.5"},"options":{"gzip":false,"brotli":false,"sourcemap":true}};
const data = {"version":2,"tree":{"name":"root","children":[{"name":"assets/app-BtXyNjpy.js","uid":"71caf56e-1"},{"name":"assets/canto-embed-DbXhLEGs.js","children":[{"name":"src/js/canto-embed.js","uid":"71caf56e-3"}]},{"name":"assets/canto-field-CIyWJa6D.js","children":[{"name":"src/js/canto-field.js","uid":"71caf56e-5"}]}],"isRoot":true},"nodeParts":{"71caf56e-1":{"id":"assets/app-BtXyNjpy.js","gzipLength":0,"brotliLength":0,"renderedLength":42,"metaUid":"71caf56e-0"},"71caf56e-3":{"renderedLength":20460,"gzipLength":0,"brotliLength":0,"metaUid":"71caf56e-2"},"71caf56e-5":{"renderedLength":4584,"gzipLength":0,"brotliLength":0,"metaUid":"71caf56e-4"}},"nodeMetas":{"71caf56e-0":{"id":"/src/js/app.ts","moduleParts":{"assets/app-BtXyNjpy.js":"71caf56e-1"},"imported":[{"uid":"71caf56e-6"}],"importedBy":[],"isEntry":true},"71caf56e-2":{"id":"/src/js/canto-embed.js","moduleParts":{"assets/canto-embed-DbXhLEGs.js":"71caf56e-3"},"imported":[],"importedBy":[],"isEntry":true},"71caf56e-4":{"id":"/src/js/canto-field.js","moduleParts":{"assets/canto-field-CIyWJa6D.js":"71caf56e-5"},"imported":[],"importedBy":[],"isEntry":true},"71caf56e-6":{"id":"/src/css/app.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"71caf56e-0"}]}},"env":{"rollup":"4.22.2"},"options":{"gzip":false,"brotli":false,"sourcemap":true}};

const run = () => {
const width = window.innerWidth;
Expand Down