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

IBX-1689: Change all ez- classes/IDs and eZ variables in frontend part #8

Merged
merged 2 commits into from
Dec 21, 2021
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
20 changes: 10 additions & 10 deletions src/bundle/Resources/encore/ez.config.manager.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
const path = require('path');

module.exports = (eZConfig, eZConfigManager) => {
eZConfigManager.add({
eZConfig,
entryName: 'ezplatform-admin-ui-content-type-edit-js',
module.exports = (ibexaConfig, ibexaConfigManager) => {
ibexaConfigManager.add({
ibexaConfig,
entryName: 'ibexa-admin-ui-content-type-edit-js',
newItems: [path.resolve(__dirname, '../public/js/scripts/admin.contenttype.matrix.js')],
});

eZConfigManager.add({
eZConfig,
entryName: 'ezplatform-admin-ui-content-edit-parts-js',
ibexaConfigManager.add({
ibexaConfig,
entryName: 'ibexa-admin-ui-content-edit-parts-js',
newItems: [path.resolve(__dirname, '../public/js/scripts/fieldType/ezmatrix.js')],
});

eZConfigManager.add({
eZConfig,
entryName: 'ezplatform-admin-ui-content-edit-parts-css',
ibexaConfigManager.add({
ibexaConfig,
entryName: 'ibexa-admin-ui-content-edit-parts-css',
newItems: [path.resolve(__dirname, '../public/scss/matrix.scss')],
});
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(function(global, doc) {
const SELECTOR_SETTINGS_COLUMNS = '.ez-matrix-settings__columns';
const SELECTOR_COLUMN = '.ez-matrix-settings__column';
const SELECTOR_SETTINGS_COLUMNS = '.ibexa-matrix-settings__columns';
const SELECTOR_COLUMN = '.ibexa-matrix-settings__column';
const SELECTOR_COLUMNS_CONTAINER = '.ibexa-table__body';
const SELECTOR_COLUMN_CHECKBOX = '.ez-matrix-settings__column-checkbox';
const SELECTOR_COLUMN_CHECKBOX = '.ibexa-matrix-settings__column-checkbox';
const SELECTOR_ADD_COLUMN = '.ibexa-btn--add-column';
const SELECTOR_REMOVE_COLUMN = '.ibexa-btn--remove-column';
const SELECTOR_TEMPLATE = '.ez-matrix-settings__column-template';
const SELECTOR_TEMPLATE = '.ibexa-matrix-settings__column-template';
const NUMBER_PLACEHOLDER = /__number__/g;
const getNextIndex = (parentNode) => {
return parentNode.dataset.nextIndex++;
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Resources/public/js/scripts/fieldType/ezmatrix.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function(global, doc, eZ) {
(function(global, doc, ibexa) {
const SELECTOR_REMOVE_MATRIX_BULK = '.ibexa-btn--bulk-remove-matrix';
const SELECTOR_REMOVE_MATRIX_ENTRY = '.ibexa-btn--remove-matrix-entry';
const SELECTOR_ADD_MATRIX_ENTRY = '.ibexa-btn--add-matrix-entry';
Expand All @@ -13,7 +13,7 @@
return;
}

class EzMatrixValidator extends eZ.BaseFieldValidator {
class EzMatrixValidator extends ibexa.BaseFieldValidator {
/**
* Adds an item.
*
Expand Down Expand Up @@ -161,5 +161,5 @@

validator.init();

global.eZ.fieldTypeValidators = global.eZ.fieldTypeValidators ? [...global.eZ.fieldTypeValidators, validator] : [validator];
})(window, window.document, window.eZ);
global.ibexa.fieldTypeValidators = global.ibexa.fieldTypeValidators ? [...global.ibexa.fieldTypeValidators, validator] : [validator];
})(window, window.document, window.ibexa);
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
{% set fieldtype_name = 'ezmatrix.name'|trans({}, 'fieldtypes')|desc('Matrix') %}

{% block ezmatrix_field_definition_edit %}
<div class="ez-matrix-settings__minimum-rows">
<div class="ibexa-matrix-settings__minimum-rows">
{{- form_label(form.minimum_rows, null, { 'label_attr': { 'class': 'ibexa-label' } }) -}}
{{- form_errors(form.minimum_rows) -}}
{{- form_widget(form.minimum_rows) -}}
</div>

<div class="ez-matrix-settings__columns">
<script type="text/template" class="ez-matrix-settings__column-template">
<div class="ibexa-matrix-settings__columns">
<script type="text/template" class="ibexa-matrix-settings__column-template">
{% set col_checkbox %}
<input type="checkbox" class="ibexa-input ibexa-input--checkbox ez-matrix-settings__column-checkbox" />
<input type="checkbox" class="ibexa-input ibexa-input--checkbox ibexa-matrix-settings__column-checkbox" />
{% endset %}

{% include '@ibexadesign/ui/component/table/table_body_row.html.twig' with {
Expand All @@ -21,15 +21,15 @@
{ content: form_widget(form.columns.vars.prototype.name), raw: true },
{ content: form_widget(form.columns.vars.prototype.identifier), raw: true },
],
class: 'ez-matrix-settings__column',
class: 'ibexa-matrix-settings__column',
} %}
</script>
{{ form_label(form.columns, null, { 'label_attr': { 'class': 'ibexa-label' } }) }}
{{ form_errors(form.columns) }}
{% set body_rows = [] %}
{% for column in form.columns %}
{% set col_checkbox %}
<input type="checkbox" class="ibexa-input ibexa-input--checkbox ez-matrix-settings__column-checkbox">
<input type="checkbox" class="ibexa-input ibexa-input--checkbox ibexa-matrix-settings__column-checkbox">
{% endset %}

{% set body_rows = body_rows|merge([{
Expand All @@ -38,7 +38,7 @@
{ content: form_widget(column.name), raw: true },
{ content: form_widget(column.identifier), raw: true },
],
class: 'ez-matrix-settings__column',
class: 'ibexa-matrix-settings__column',
}]) %}
{% endfor %}

Expand Down