From ad8a65c58acd7db01ba79466afdf253357fbd399 Mon Sep 17 00:00:00 2001 From: SEMAD01 Date: Thu, 12 Oct 2023 13:51:36 +0300 Subject: [PATCH] [improvenments ] change type of some variables --- .../public/js/pimcore/perspective/perspective.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Resources/public/js/pimcore/perspective/perspective.js b/src/Resources/public/js/pimcore/perspective/perspective.js index 3086c1e..05a3406 100644 --- a/src/Resources/public/js/pimcore/perspective/perspective.js +++ b/src/Resources/public/js/pimcore/perspective/perspective.js @@ -674,8 +674,8 @@ pimcore.bundle.perspectiveeditor.PerspectiveEditor = class { if(!config.treeContextMenu){ config.treeContextMenu = {}; } - let elementTreeTypeStoreId = 'perspective_editor_element_tree_type_store'; - let elementTreeTypeStore = new Ext.data.Store({ + const elementTreeTypeStoreId = 'perspective_editor_element_tree_type_store'; + const elementTreeTypeStore = new Ext.data.Store({ fields: ['name', 'value'], id: elementTreeTypeStoreId, data: [ @@ -769,8 +769,8 @@ pimcore.bundle.perspectiveeditor.PerspectiveEditor = class { const addPerspectiveEditorElementTreeIcon = new CustomEvent(pimcore.events.addPerspectiveEditorElementTreeIcon); addPerspectiveEditorElementTreeIcon.data = elementTreeIcons; document.dispatchEvent(addPerspectiveEditorElementTreeIcon); - let elementTreeSettingsFormId = 'perspective_element_tree_settings_form'; - let elementTreeSettingsForm = new Ext.form.Panel({ + const elementTreeSettingsFormId = 'perspective_element_tree_settings_form'; + const elementTreeSettingsForm = new Ext.form.Panel({ disabled: !record.data["writeable"], id: elementTreeSettingsFormId, title: t('plugin_pimcore_perspectiveeditor_tree_element_selection'), @@ -790,8 +790,8 @@ pimcore.bundle.perspectiveeditor.PerspectiveEditor = class { change: function(elem, newValue, oldValue){ config.type = newValue; Ext.each(elementTreeSettingsForm.query('[name^=perspective_editor]'), function(component) { - let componentName = 'perspective_editor_'+newValue; - component.setHidden(component.name == componentName ? false : true); + let componentName = 'perspective_editor_' + newValue; + component.setHidden(component.name !== componentName); }); record.data.text = t(newValue); record.data.iconCls = elementTreeIcons[newValue];