From 9dc5802dc9fcc694f3f159b52867faad848f1cc0 Mon Sep 17 00:00:00 2001 From: jkindly Date: Tue, 3 Sep 2024 13:44:20 +0200 Subject: [PATCH] OP-290: behat fix --- .../assets/admin/js/cms/cms-content-configuration.js | 6 +++--- .../assets/admin/js/cms/cms-media-autocomplete.js | 6 +++--- src/Resources/assets/admin/js/cms/cms-page-slug.js | 8 ++++---- src/Resources/assets/admin/js/cms/cms-preview.js | 6 +++--- src/Resources/assets/admin/js/cms/cms-upload-csv.js | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Resources/assets/admin/js/cms/cms-content-configuration.js b/src/Resources/assets/admin/js/cms/cms-content-configuration.js index 147e3e20..02457748 100644 --- a/src/Resources/assets/admin/js/cms/cms-content-configuration.js +++ b/src/Resources/assets/admin/js/cms/cms-content-configuration.js @@ -1,5 +1,5 @@ $(document).ready(function() { - $('.bitbag-media-autocomplete, .sylius-autocomplete').each((index, element) => { + $('.cms-media-autocomplete, .sylius-autocomplete').each((index, element) => { $(element).autoComplete(); }); @@ -13,7 +13,7 @@ $(document).ready(function() { } $(document).on('collection-form-add', () => { - $('.bitbag-media-autocomplete, .sylius-autocomplete').each((index, element) => { + $('.cms-media-autocomplete, .sylius-autocomplete').each((index, element) => { if ($._data($(element).get(0), 'events') === undefined) { $(element).autoComplete(); } @@ -60,7 +60,7 @@ $(document).ready(function() { ); $(element).attr('name', newConfigInputName); - $(newConfig).find('.bitbag-media-autocomplete').autoComplete(); + $(newConfig).find('.cms-media-autocomplete').autoComplete(); $(newConfig).find('.sylius-autocomplete').autoComplete(); }); } diff --git a/src/Resources/assets/admin/js/cms/cms-media-autocomplete.js b/src/Resources/assets/admin/js/cms/cms-media-autocomplete.js index 56b723b3..d2750e75 100644 --- a/src/Resources/assets/admin/js/cms/cms-media-autocomplete.js +++ b/src/Resources/assets/admin/js/cms/cms-media-autocomplete.js @@ -28,7 +28,7 @@ export class HandleAutoComplete { init() { if (typeof this.config !== 'object') { - throw new Error('Bitbag CMS Plugin - HandleAutoComplete class config is not a valid object'); + throw new Error('Sylius CMS Plugin - HandleAutoComplete class config is not a valid object'); } this.mediaContainers.forEach((mediaContainer) => { this._handleSavedValue(mediaContainer); @@ -108,7 +108,7 @@ export class HandleAutoComplete { triggerCustomEvent(mediaContainer, 'cms.media.saved.reload.completed', data); } catch (error) { - console.error(`BitBag CMS Plugin - HandleAutoComplete class error : ${error}`); + console.error(`Sylius CMS Plugin - HandleAutoComplete class error : ${error}`); triggerCustomEvent(mediaContainer, 'cms.media.saved.reload.error', error); } finally { mediaContainer.classList.remove('loading'); @@ -134,7 +134,7 @@ export class HandleAutoComplete { triggerCustomEvent(mediaContainer, 'cms.media.display.completed', data); } catch (error) { - console.error(`BitBag CMS Plugin - HandleAutoComplete class error : ${error}`); + console.error(`Sylius CMS Plugin - HandleAutoComplete class error : ${error}`); triggerCustomEvent(mediaContainer, 'cms.media.display.error', error); } finally { mediaContainer.classList.remove('loading'); diff --git a/src/Resources/assets/admin/js/cms/cms-page-slug.js b/src/Resources/assets/admin/js/cms/cms-page-slug.js index dce338b6..e27df10c 100644 --- a/src/Resources/assets/admin/js/cms/cms-page-slug.js +++ b/src/Resources/assets/admin/js/cms/cms-page-slug.js @@ -18,15 +18,15 @@ export class HandleSlugUpdate { init() { if (typeof this.config !== 'object') { - throw new Error('Bitbag CMS Plugin - HandleSlugUpdate class config is not a valid object'); + throw new Error('Sylius CMS Plugin - HandleSlugUpdate class config is not a valid object'); } if (typeof this.lockFieldIndicator !== 'string' || typeof this.bbTarget !== 'string') { - throw new Error('Bitbag CMS Plugin - HandleSlugUpdate class config key values are not valid strings'); + throw new Error('Sylius CMS Plugin - HandleSlugUpdate class config key values are not valid strings'); } if (!this.nameField ) { - throw new Error('Bitbag CMS Plugin - HandleSlugUpdate name field not found'); + throw new Error('Sylius CMS Plugin - HandleSlugUpdate name field not found'); } this._handleFields(); @@ -84,7 +84,7 @@ export class HandleSlugUpdate { const response = await request.json(); return response.slug; } catch (error) { - console.error(`BitBag CMS Plugin - HandleSlugUpdate class error : ${error}`); + console.error(`Sylius CMS Plugin - HandleSlugUpdate class error : ${error}`); } } diff --git a/src/Resources/assets/admin/js/cms/cms-preview.js b/src/Resources/assets/admin/js/cms/cms-preview.js index b2d595fa..d3b5b138 100644 --- a/src/Resources/assets/admin/js/cms/cms-preview.js +++ b/src/Resources/assets/admin/js/cms/cms-preview.js @@ -18,14 +18,14 @@ export class HandlePreview { } init() { if (typeof this.config !== 'object') { - throw new Error('Bitbag CMS Plugin - HandlePreview class config is not a valid object'); + throw new Error('Sylius CMS Plugin - HandlePreview class config is not a valid object'); } if ( typeof this.localeSelector !== 'string' || typeof this.channelSelector !== 'string' || typeof this.modalSelector !== 'string' ) { - throw new Error('Bitbag CMS Plugin - HandlePreview class config key values are not valid strings'); + throw new Error('Sylius CMS Plugin - HandlePreview class config key values are not valid strings'); } this._resourcePreview(); } @@ -88,7 +88,7 @@ export class HandlePreview { this.modal.querySelector('iframe').src = blobUrl; triggerCustomEvent(this.modal, 'cms.create.preview.completed', res); } catch (error) { - console.error(`BitBag CMS Plugin - HandlePreview class error : ${error}`); + console.error(`Sylius CMS Plugin - HandlePreview class error : ${error}`); triggerCustomEvent(this.modal, 'cms.create.preview.error', error); } finally { this.modal.querySelector('.ui.loadable').classList.remove('loading'); diff --git a/src/Resources/assets/admin/js/cms/cms-upload-csv.js b/src/Resources/assets/admin/js/cms/cms-upload-csv.js index 5728bade..00d4664a 100644 --- a/src/Resources/assets/admin/js/cms/cms-upload-csv.js +++ b/src/Resources/assets/admin/js/cms/cms-upload-csv.js @@ -7,7 +7,7 @@ export class HandleCsvUpload { init() { if (typeof this.config !== 'object') { - throw new Error('Bitbag CMS Plugin - HandleCsvUpload class config is not a valid object'); + throw new Error('Sylius CMS Plugin - HandleCsvUpload class config is not a valid object'); } this._handleFields();