Skip to content

Commit

Permalink
View SourceView GotoMsg: gray-out movement combobox if number of move…
Browse files Browse the repository at this point in the history
…ments le 1
  • Loading branch information
bwbohl committed Jul 11, 2024
1 parent 554fd88 commit 88506b7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/view/window/source/SourceView.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,18 @@ Ext.define('EdiromOnline.view.window.source.GotoMsg', {

me.title = getLangString('view.window.source.SourceView_GotoMsg_Title');

// check if contains more than one item and save to variable as boolean
var isDisabled = ((me.movements.data.length <= 1) ? true : false);

me.combo = Ext.create('Ext.form.ComboBox', {
fieldLabel: getLangString('view.window.source.SourceView_GotoMsg_MovmentNumber'),
store: me.movements,
queryMode: 'local',
displayField: 'name',
valueField: 'id'
valueField: 'id',
cls: 'gotoMovement',
disabled: isDisabled,
disabledCls: 'x-disabled'
});

me.field = Ext.create('Ext.form.field.Text', {
Expand Down
7 changes: 7 additions & 0 deletions packages/eoTheme/sass/var/form/field/Base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.x-form-item {

&.x-disabled {
opacity: 0.5;
}

}

0 comments on commit 88506b7

Please sign in to comment.