IDEMPIERE-1100 BP field split in two lines.

This commit is contained in:
Heng Sin Low 2013-06-24 15:32:40 +08:00
parent 577057b1ba
commit 90b35e5bc7
4 changed files with 58 additions and 35 deletions

View File

@ -32,7 +32,6 @@ public class EditorBox extends Div {
this);
protected Textbox txt;
protected Button btn;
// private Hlayout hlayout;
public EditorBox() {
initComponents();
@ -54,9 +53,9 @@ public class EditorBox extends Div {
}
private void initComponents() {
// hlayout = new Hlayout();
// hlayout.setHflex("1");
txt = new Textbox();
txt.setSclass("editor-input");
txt.setHflex("0");
appendChild(txt);
btn = new Button();
btn.setTabindex(-1);
@ -103,6 +102,11 @@ public class EditorBox extends Div {
if (btn.getParent() != null)
btn.detach();
}
if (enabled) {
LayoutUtils.removeSclass("editor-input-disd", txt);
} else {
LayoutUtils.addSclass("editor-input-disd", txt);
}
}
/**
@ -147,12 +151,10 @@ public class EditorBox extends Div {
public void setTableEditorMode(boolean flag) {
if (flag) {
txt.setHflex("0");
setHflex("0");
LayoutUtils.addSclass("grid-editor-input", txt);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
txt.setHflex("1");
setHflex("1");
LayoutUtils.removeSclass("grid-editor-input", txt);
LayoutUtils.removeSclass("grid-editor-button", btn);

View File

@ -82,7 +82,8 @@ public class NumberBox extends Div
if (integral)
decimalBox.setScale(0);
decimalBox.setStyle("display: inline-block;text-align:right");
decimalBox.setHflex("1");
decimalBox.setHflex("0");
decimalBox.setSclass("editor-input");
appendChild(decimalBox);
btn = new Button();
@ -385,11 +386,22 @@ public class NumberBox extends Div
decimalBox.setReadonly(!enabled);
btn.setEnabled(enabled);
if (enabled)
{
if (btn.getParent() != decimalBox.getParent())
btn.setParent(decimalBox.getParent());
btn.setPopup(popup);
}
else
{
Popup p = null;
btn.setPopup(p);
if (btn.getParent() != null)
btn.detach();
}
if (enabled) {
LayoutUtils.removeSclass("editor-input-disd", decimalBox);
} else {
LayoutUtils.addSclass("editor-input-disd", decimalBox);
}
}
@ -437,12 +449,10 @@ public class NumberBox extends Div
public void setTableEditorMode(boolean flag) {
if (flag) {
decimalBox.setHflex("0");
setHflex("0");
LayoutUtils.addSclass("grid-editor-input", decimalBox);
LayoutUtils.addSclass("grid-editor-button", btn);
} else {
decimalBox.setHflex("1");
setHflex("1");
LayoutUtils.removeSclass("grid-editor-input", decimalBox);
LayoutUtils.removeSclass("grid-editor-button", btn);

View File

@ -319,6 +319,7 @@ ContextMenuListener, IZoomableEditor
@Override
public void setReadWrite(boolean readWrite) {
getComponent().setEnabled(readWrite);
getComponent().setButtonVisible(readWrite);
}
private void refreshList()

View File

@ -988,18 +988,25 @@ span.z-tree-tee, span.z-tree-last, span.z-tree-firstspacer {
padding: 0px;
margin: 0px;
background-color: transparent;
position: relative;
}
.editor-box .z-textbox {
display: inline-block;
border-right-color: transparent;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
.editor-input {
box-sizing: border-box;
-moz-box-sizing: border-box; /* Firefox */
display: inline-block;
padding-right: 22px;
width: 100%;
height: 21px;
}
.editor-box .z-textbox:focus {
.editor-input:focus {
border: 1px solid #0000ff;
}
.editor-input-disd {
padding-right: 0px !important;
}
.editor-button {
padding: 0px;
@ -1008,11 +1015,11 @@ span.z-tree-tee, span.z-tree-last, span.z-tree-firstspacer {
background-color: transparent;
background-image: none;
width: 19px;
height: 20px;
border: 1px solid #e6e6e6;
border-top-color: #b2b2b2;
border-left-width: 0px;
border-radius: 0 2px 2px 0;
height: 18px;
border: none;
position: absolute;
right: 2px;
top: 1px;
}
.editor-button :hover {
@ -1024,12 +1031,11 @@ span.z-tree-tee, span.z-tree-last, span.z-tree-firstspacer {
text-align: left;
width: 16px;
height: 16px;
padding: 2px 1px;
padding: 1px 1px;
}
.editor-box .grid-editor-input.z-textbox {
width: 90%;
}
.grid-editor-button {
@ -1043,19 +1049,7 @@ span.z-tree-tee, span.z-tree-last, span.z-tree-firstspacer {
white-space:nowrap;
}
.number-box .z-decimalbox {
display: inline-block;
border-right-color: transparent;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
.number-box .grid-editor-input.z-decimalbox {
width: 80%;
}
.number-box .z-decimalbox:focus {
border: 1px solid #0000ff;
}
.datetime-box {
@ -1325,11 +1319,27 @@ tbody.z-grid-empty-body td {
}
i.grid-combobox-editor {
width: 96% !important;
width: 99% !important;
position: relative;
}
.grid-combobox-editor input {
width: 85% !important;
width: 100% !important;
padding-right: 22px;
box-sizing: border-box;
-moz-box-sizing: border-box; /* Firefox */
height: 21px;
}
.grid-combobox-editor .z-combobox-btn {
position: absolute;
right: 0px;
top: 0px;
border-radius: 0px 0px;
}
.grid-combobox-editor.z-combobox-focus .z-combobox-btn {
border-left: 1px solid #0000ff;
}
.embedded-dialog {