You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
3.2 KiB
118 lines
3.2 KiB
function listEntryRowControls() {
|
|
const controls = [
|
|
select,
|
|
de_activate,
|
|
edit,
|
|
]
|
|
}
|
|
|
|
function listEntryRowControlsContextMenu() {
|
|
const menuOptions = {
|
|
copy: {
|
|
copy_below,
|
|
copy_bottom
|
|
},
|
|
move: {
|
|
top,
|
|
bottom
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
* Stellt den Datensatz eines Prozesses dar
|
|
*
|
|
* @param {String[]} entry
|
|
* @param {number} index
|
|
* @returns {Component}
|
|
*/
|
|
function listEntryRow(entry, index) {
|
|
return builder.row()
|
|
.modifyChildren(new Modifier().padding(2))
|
|
.modifier(
|
|
new Modifier()
|
|
.fillMaxWidth()
|
|
.padding(4)
|
|
.background(Colors.white)
|
|
.clip(Shapes.RoundedCorner.all(4))
|
|
)
|
|
.alignment(Alignment.CENTER)
|
|
.childContext([
|
|
builder.span()
|
|
.addStyleClass("entrydata-container")
|
|
.setAttribute(
|
|
"data-entrydata",
|
|
JSON.stringify(entry)
|
|
)
|
|
.modifier(
|
|
new Modifier()
|
|
.fillMaxWidth(0.09)
|
|
.margin().right(4)
|
|
)
|
|
.arrangement(Arrangement.SPACE_BETWEEN)
|
|
.alignment(Alignment.CENTER)
|
|
.childContext([
|
|
builder.inputTags.checkbox({ "name": "entry_select" })
|
|
,
|
|
fieldForValueCopy(index, -1, [], true, "number","entry-index")
|
|
.alignment(Alignment.CENTER)
|
|
.modifier(
|
|
new Modifier()
|
|
.fillMaxWidth(0.7)
|
|
.margin().left(2)
|
|
)
|
|
|
|
])
|
|
,
|
|
...entry
|
|
.filter(e => e.trim() !== "")
|
|
.map(fieldForValueCopy)
|
|
]);
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param {ComponentColor} colorTheme
|
|
* @param {Modifier} modifier
|
|
* @returns {Component}
|
|
*/
|
|
function processingList(colorTheme, modifier = new Modifier()) {
|
|
return builder.column()
|
|
.modifier(componentModifiers.majorArea)
|
|
.modifier(
|
|
new Modifier()
|
|
.background(colorTheme.secondary)
|
|
.border(new Border(1))
|
|
.padding(8)
|
|
)
|
|
.modifier(modifier)
|
|
.chainChild()
|
|
.column()
|
|
.modifier(
|
|
new Modifier()
|
|
.background(Colors.white)
|
|
.clip(Shapes.RoundedCorner.all(6))
|
|
)
|
|
}
|
|
|
|
|
|
function listArea(modifier = new Modifier()) {
|
|
return builder.row()
|
|
.addStyleClass("area")
|
|
.addStyleClass("area-lists")
|
|
.modifier(modifier)
|
|
.modifier(new Modifier().fillMaxWidth())
|
|
.arrangement(Arrangement.SPACE_EVENLY)
|
|
.childContext([
|
|
processingList(colorModifiers.upcoming)
|
|
.addStyleClass("plist")
|
|
.addStyleClass("plist-upcoming")
|
|
,
|
|
processingList(colorModifiers.done)
|
|
.addStyleClass("plist")
|
|
.addStyleClass("plist-done")
|
|
])
|
|
.distibuteSpacingEvenly(true, 0.05)
|
|
}
|
|
|