Skip to content

Commit

Permalink
Improve casing consistency of 'URL'
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic committed Jul 29, 2024
1 parent 19f0844 commit 89be14e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions src/wagtail_bynder/static/bynder/js/video-chooser-modal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const videoChooserModalOnloadHandlers = new window.BynderChooserModalOnloadHandlerFactory({
assetType: "video",
chosenMultipleUrl: `${window.videoChosenBaseURL}chosen-multiple/`,
chosenSingleUrl: `${window.videoChosenBaseURL}chosen/`,
chosenMultipleUrl: `${window.videoChosenBaseUrl}chosen-multiple/`,
chosenSingleUrl: `${window.videoChosenBaseUrl}chosen/`,
}).getOnLoadHandlers();

class VideoChooserModal {
Expand All @@ -10,13 +10,13 @@ class VideoChooserModal {
// identifier for the ModalWorkflow response that indicates an item was chosen
chosenResponseName = 'chosen';

constructor(baseUrl) {
this.baseUrl = baseUrl;
constructor(BaseUrl) {
this.BaseUrl = BaseUrl;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
getURL(opts) {
return this.baseUrl;
return this.BaseUrl;
}

// eslint-disable-next-line
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const documentChooserModalOnloadHandlers = new window.BynderChooserModalOnloadHandlerFactory({
assetType: "document",
chosenMultipleUrl: `${window.documentChosenBaseURL}chosen-multiple/`,
chosenSingleUrl: `${window.documentChosenBaseURL}chosen/`,
chosenMultipleUrl: `${window.documentChosenBaseUrl}chosen-multiple/`,
chosenSingleUrl: `${window.documentChosenBaseUrl}chosen/`,
}).getOnLoadHandlers();

class DocumentChooserModal {
Expand All @@ -10,13 +10,13 @@ class DocumentChooserModal {
// identifier for the ModalWorkflow response that indicates an item was chosen
chosenResponseName = 'chosen';

constructor(baseUrl) {
this.baseUrl = baseUrl;
constructor(BaseUrl) {
this.BaseUrl = BaseUrl;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
getURL(opts) {
return this.baseUrl;
return this.BaseUrl;
}

// eslint-disable-next-line
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const imageChooserModalOnloadHandlers = new window.BynderChooserModalOnloadHandlerFactory({
assetType: "image",
chosenMultipleUrl: `${window.imageChosenBaseURL}chosen-multiple/`,
chosenSingleUrl: `${window.imageChosenBaseURL}chosen/`,
chosenMultipleUrl: `${window.imageChosenBaseUrl}chosen-multiple/`,
chosenSingleUrl: `${window.imageChosenBaseUrl}chosen/`,
}).getOnLoadHandlers();

class ImageChooserModal {
Expand All @@ -10,13 +10,13 @@ class ImageChooserModal {
// identifier for the ModalWorkflow response that indicates an item was chosen
chosenResponseName = 'chosen';

constructor(baseUrl) {
this.baseUrl = baseUrl;
constructor(BaseUrl) {
this.BaseUrl = BaseUrl;
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
getURL(opts) {
return this.baseUrl;
return this.BaseUrl;
}

// eslint-disable-next-line
Expand Down
6 changes: 3 additions & 3 deletions src/wagtail_bynder/templates/wagtailadmin/admin_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<script>
window.bynderAPIToken = '{% bynder_compactview_api_token %}';
window.bynderDomain = '{% bynder_domain %}';
window.imageChosenBaseURL = "{% get_image_chosen_base_url %}";
window.documentChosenBaseURL = "{% get_document_chosen_base_url %}";
window.videoChosenBaseURL = "{% get_video_chosen_base_url %}";
window.imageChosenBaseUrl = "{% get_image_chosen_base_url %}";
window.documentChosenBaseUrl = "{% get_document_chosen_base_url %}";
window.videoChosenBaseUrl = "{% get_video_chosen_base_url %}";
</script>
<script src="{% static 'wagtailadmin/js/chooser-modal-handler-factory.js' %}"></script>

Expand Down

0 comments on commit 89be14e

Please sign in to comment.