Skip to content

Commit

Permalink
Merge pull request #22 from DigitalSlideArchive/fix-reimport-s3-browser
Browse files Browse the repository at this point in the history
Fix browser display for S3 assetstore re-imports
  • Loading branch information
willdunklin authored Sep 15, 2023
2 parents 6bd1a68 + a4064c1 commit 1bf04b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions import_tracker/web_client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ wrap(S3ImportView, 'render', function (render) {
this.$('.form-group').last().after(excludeExistingInput({ type: 's3' }));
});

const setBrowserRoot = (view) => {
const setBrowserRoot = (view, type) => {
const browserWidget = view._browserWidgetView;
const destType = view.$('#g-filesystem-import-dest-type').val();
const destId = view.$('#g-filesystem-import-dest-id').val();
const destType = view.$(`#g-${type}-import-dest-type`).val();
const destId = view.$(`#g-${type}-import-dest-id`).val();
const resourceId = destId.trim().split(/\s/)[0];

const models = {
Expand Down Expand Up @@ -81,11 +81,11 @@ const setBrowserRoot = (view) => {

// If a root folder has already been set in the browser, make it the root
wrap(FilesystemImportView, '_openBrowser', function (_openBrowser) {
setBrowserRoot(this);
setBrowserRoot(this, 'filesystem');
_openBrowser.call(this);
});
wrap(S3ImportView, '_openBrowser', function (_openBrowser) {
setBrowserRoot(this);
setBrowserRoot(this, 's3');
_openBrowser.call(this);
});

Expand Down

0 comments on commit 1bf04b8

Please sign in to comment.