IDEMPIERE-457 Tab Editor (to ease positioning of fields) / implemente better grid behavior for droppable empty spaces
This commit is contained in:
parent
965e56e28a
commit
a5a198f358
|
@ -215,9 +215,10 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
|
||||||
{
|
{
|
||||||
currentFieldGroup = fieldGroup;
|
currentFieldGroup = fieldGroup;
|
||||||
|
|
||||||
if (numCols - actualxpos + 1 > 0) {
|
while(numCols - actualxpos + 1 > 0) {
|
||||||
row.appendCellChild(createSpacer(), numCols - actualxpos + 1);
|
row.appendCellChild(createSpacer(), 1);
|
||||||
setLastCellProps(row.getLastCell(), actualxpos, field.getSeqNo());
|
setLastCellProps(row.getLastCell(), actualxpos, field.getSeqNo());
|
||||||
|
actualxpos++;
|
||||||
}
|
}
|
||||||
row.setGroup(currentGroup);
|
row.setGroup(currentGroup);
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
|
@ -259,9 +260,10 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
|
||||||
//normal field
|
//normal field
|
||||||
if (gridField.getXPosition() <= actualxpos) {
|
if (gridField.getXPosition() <= actualxpos) {
|
||||||
// Fill right part of the row with spacers until number of columns
|
// Fill right part of the row with spacers until number of columns
|
||||||
if (numCols - actualxpos + 1 > 0) {
|
while(numCols - actualxpos + 1 > 0) {
|
||||||
row.appendCellChild(createSpacer(), numCols - actualxpos + 1);
|
row.appendCellChild(createSpacer(), 1);
|
||||||
setLastCellProps(row.getLastCell(), actualxpos, field.getSeqNo());
|
setLastCellProps(row.getLastCell(), actualxpos, field.getSeqNo());
|
||||||
|
actualxpos++;
|
||||||
}
|
}
|
||||||
row.setGroup(currentGroup);
|
row.setGroup(currentGroup);
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
|
@ -329,10 +331,12 @@ public class WTabEditor extends TabEditor implements IFormController, EventListe
|
||||||
lastseq = field.getSeqNo();
|
lastseq = field.getSeqNo();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numCols - actualxpos + 1 > 0){
|
while(numCols - actualxpos + 1 > 0) {
|
||||||
row.appendCellChild(createSpacer(), numCols - actualxpos + 1);
|
row.appendCellChild(createSpacer(), 1);
|
||||||
// make last empty space droppable
|
lastseq = lastseq + 10;
|
||||||
setLastCellProps(row.getLastCell(), actualxpos, lastseq + 10);
|
// make every empty space droppable at the end
|
||||||
|
setLastCellProps(row.getLastCell(), actualxpos, lastseq);
|
||||||
|
actualxpos++;
|
||||||
}
|
}
|
||||||
row.setGroup(currentGroup);
|
row.setGroup(currentGroup);
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
|
|
Loading…
Reference in New Issue