IDEMPIERE-4559 Customize and Process detail toolbar buttons are not clickable after creating a new record in the header (#390)
This commit is contained in:
parent
254c871665
commit
58e83d9faa
|
@ -743,6 +743,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
||||||
deleteRecord = adtab.getGridTab().isDeleteRecord();
|
deleteRecord = adtab.getGridTab().isDeleteRecord();
|
||||||
}
|
}
|
||||||
boolean enableDelete = !changed && deleteRecord && !adtab.getGridTab().isSortTab();
|
boolean enableDelete = !changed && deleteRecord && !adtab.getGridTab().isSortTab();
|
||||||
|
boolean enableCustomize = !adtab.getGridTab().isSortTab();
|
||||||
|
|
||||||
ADWindow adwindow = ADWindow.findADWindow(this);
|
ADWindow adwindow = ADWindow.findADWindow(this);
|
||||||
if (adwindow == null)
|
if (adwindow == null)
|
||||||
|
@ -761,6 +762,8 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
||||||
btn.setDisabled(false);
|
btn.setDisabled(false);
|
||||||
} else if (BTN_SAVE_ID.equals(btn.getId())) {
|
} else if (BTN_SAVE_ID.equals(btn.getId())) {
|
||||||
btn.setDisabled(!adtab.needSave(true, false));
|
btn.setDisabled(!adtab.needSave(true, false));
|
||||||
|
} else if (BTN_CUSTOMIZE_ID.equals(btn.getId())) {
|
||||||
|
btn.setDisabled(!enableCustomize);
|
||||||
}
|
}
|
||||||
else if (BTN_QUICK_FORM_ID.equals(btn.getId())) {
|
else if (BTN_QUICK_FORM_ID.equals(btn.getId())) {
|
||||||
btn.setDisabled(!(adtab.isEnableQuickFormButton() && !adtab.getGridTab().isReadOnly()));
|
btn.setDisabled(!(adtab.isEnableQuickFormButton() && !adtab.getGridTab().isReadOnly()));
|
||||||
|
@ -786,11 +789,10 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
||||||
IADTabpanel adtab = getADTabpanel(index);
|
IADTabpanel adtab = getADTabpanel(index);
|
||||||
if (adtab == null) return;
|
if (adtab == null) return;
|
||||||
|
|
||||||
String processImage = ThemeManager.getThemeResource(PROCESS_IMAGE);
|
|
||||||
for(Component c : toolbar.getChildren()) {
|
for(Component c : toolbar.getChildren()) {
|
||||||
if (c instanceof ToolBarButton) {
|
if (c instanceof ToolBarButton) {
|
||||||
ToolBarButton btn = (ToolBarButton) c;
|
ToolBarButton btn = (ToolBarButton) c;
|
||||||
if (processImage.equals(btn.getImage())) {
|
if (BTN_PROCESS_ID.equals(btn.getId())) {
|
||||||
if (adtab.getGridTab().isSortTab()) {
|
if (adtab.getGridTab().isSortTab()) {
|
||||||
btn.setDisabled(true);
|
btn.setDisabled(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue