IDEMPIERE-5934 : Read only Chosen Multiple Selection List fields can be updated using Assistant (#2115)

* IDEMPIERE-5934 : Read only Chosen Multiple Selection List fields can be updated using Assistant

* IDEMPIERE-5934 : Read only Chosen Multiple Selection List fields can be updated using Assistant #2
This commit is contained in:
Zuhri Utama 2023-11-24 21:06:10 +07:00 committed by GitHub
parent bd41a5d8e8
commit ce48a8835e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 9 deletions

View File

@ -286,15 +286,17 @@ public class WChosenboxListEditor extends WEditor implements ContextMenuListener
addChangeLogMenu(popupMenu); addChangeLogMenu(popupMenu);
popupMenu.removeNewUpdateMenu(); popupMenu.removeNewUpdateMenu();
Menuitem editor = new Menuitem(); if(gridField.getDisplayType() == DisplayType.ChosenMultipleSelectionList && gridField.isEditable(true)) {
editor.setAttribute("EVENT", WEditorPopupMenu.ASSISTANT_EVENT); Menuitem editor = new Menuitem();
editor.setLabel(Msg.getMsg(Env.getCtx(), "Assistant")); editor.setAttribute("EVENT", WEditorPopupMenu.ASSISTANT_EVENT);
if (ThemeManager.isUseFontIconForImage()) editor.setLabel(Msg.getMsg(Env.getCtx(), "Assistant"));
editor.setIconSclass("z-icon-Wizard"); if (ThemeManager.isUseFontIconForImage())
else editor.setIconSclass("z-icon-Wizard");
editor.setImage(ThemeManager.getThemeResource("images/Wizard16.png")); else
editor.addEventListener(Events.ON_CLICK, popupMenu); editor.setImage(ThemeManager.getThemeResource("images/Wizard16.png"));
popupMenu.appendChild(editor); editor.addEventListener(Events.ON_CLICK, popupMenu);
popupMenu.appendChild(editor);
}
} }
} }