From b99e685a4c8e6ab4e2d91ff98f4c085c107606b9 Mon Sep 17 00:00:00 2001 From: nicola Date: Tue, 30 Jul 2019 15:58:14 +0100 Subject: [PATCH 1/2] Prevent selects pushing button onto new line --- frontend/src/modules/editor/themeEditor/less/editorTheming.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/modules/editor/themeEditor/less/editorTheming.less b/frontend/src/modules/editor/themeEditor/less/editorTheming.less index cb0594c03f..359df7b8ba 100644 --- a/frontend/src/modules/editor/themeEditor/less/editorTheming.less +++ b/frontend/src/modules/editor/themeEditor/less/editorTheming.less @@ -45,7 +45,7 @@ padding-right: 15px; display: inline-block; select { - min-width: 150px; + width: 180px; } } .edit.btn.secondary { From 2e08219fc842789473a302fc96d0e963b71f26c8 Mon Sep 17 00:00:00 2001 From: nicola Date: Wed, 31 Jul 2019 11:51:08 +0100 Subject: [PATCH 2/2] Only fix select width when preset select is present --- .../src/modules/editor/themeEditor/less/editorTheming.less | 6 ++++++ .../modules/editor/themeEditor/views/editorThemingView.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/frontend/src/modules/editor/themeEditor/less/editorTheming.less b/frontend/src/modules/editor/themeEditor/less/editorTheming.less index 359df7b8ba..90202fb6dd 100644 --- a/frontend/src/modules/editor/themeEditor/less/editorTheming.less +++ b/frontend/src/modules/editor/themeEditor/less/editorTheming.less @@ -44,6 +44,12 @@ } padding-right: 15px; display: inline-block; + select { + min-width: 150px; + } + } + + &.show-preset-select { select { width: 180px; } diff --git a/frontend/src/modules/editor/themeEditor/views/editorThemingView.js b/frontend/src/modules/editor/themeEditor/views/editorThemingView.js index 0fc4183baf..e72e1e753d 100644 --- a/frontend/src/modules/editor/themeEditor/views/editorThemingView.js +++ b/frontend/src/modules/editor/themeEditor/views/editorThemingView.js @@ -62,12 +62,14 @@ define(function(require) { var selectedTheme = this.getSelectedTheme(); if (!this.themeIsEditable(selectedTheme)) { + this.$('.theme-selector').removeClass('show-preset-select'); this.$('.empty-message').show(); this.$('.editable-theme').hide(); $('.editor-theming-sidebar-reset').hide(); return; } + this.$('.theme-selector').addClass('show-preset-select'); this.$('.empty-message').hide(); this.$('.editable-theme').show(); $('.editor-theming-sidebar-reset').show();