From 9e786acf6f20035922728688e69e3c2cd96b7911 Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Thu, 31 Aug 2023 16:46:31 +0200 Subject: [PATCH] Do not display single item position drop down REDMINE-20384 --- .../groups/CommonContentElementAttributes.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/entry_types/scrolled/package/src/editor/views/configurationEditors/groups/CommonContentElementAttributes.js b/entry_types/scrolled/package/src/editor/views/configurationEditors/groups/CommonContentElementAttributes.js index f8fae7001..92cca44f3 100644 --- a/entry_types/scrolled/package/src/editor/views/configurationEditors/groups/CommonContentElementAttributes.js +++ b/entry_types/scrolled/package/src/editor/views/configurationEditors/groups/CommonContentElementAttributes.js @@ -11,10 +11,12 @@ import { ConfigurationEditorTabView.groups.define('ContentElementPosition', function() { const contentElement = this.model.parent; - this.input('position', SelectInputView, { - attributeTranslationKeyPrefixes: ['pageflow_scrolled.editor.common_content_element_attributes'], - values: contentElement.getAvailablePositions() - }); + if (contentElement.getAvailablePositions().length > 1) { + this.input('position', SelectInputView, { + attributeTranslationKeyPrefixes: ['pageflow_scrolled.editor.common_content_element_attributes'], + values: contentElement.getAvailablePositions() + }); + } this.input('width', SliderInputView, { attributeTranslationKeyPrefixes: ['pageflow_scrolled.editor.common_content_element_attributes'], displayText: value => [