unclean SPARC

This commit is contained in:
STEINNI
2025-08-27 07:03:09 +00:00
commit f308460931
430 changed files with 54426 additions and 0 deletions
@@ -0,0 +1,51 @@
class TemplatesDecisionDialog extends EICDialogContent {
actions = [
{
label: 'Cancel',
onclick: this.cancel.bind(this),
severity: 'secondary',
role: 'cancel'
},
{
label: 'Validate',
onclick: this.validate.bind(this),
severity: 'primary',
role: 'validate',
disabled: true
}
]
constructor() {
super()
Object.assign(this, app.helpers.validators)
}
DOMContentLoaded(options) {
this.form = new Form(this.find('.decision-dialog'));
this.decisionTextarea = this.find('.tpl-decision');
this.decisionTextarea.addEventListener('keyup', this.checkDecisionTextarea.bind(this))
}
checkDecisionTextarea(event) {
event.preventDefault()
event.stopPropagation()
if (this.decisionTextarea.value.trim().length > 0) {
this.actions.find(o => o.role == 'validate').button.disabled = false
}
}
validate() {
let data = { comment: this.decisionTextarea.value }
this.commit(data)
}
onFailed() {
this.abort()
}
}
app.registerClass('TemplatesDecisionDialog', TemplatesDecisionDialog);