unclean SPARC
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<style>
|
||||
.project-node-process-confirm {
|
||||
min-width: 40vw;
|
||||
min-height: 40vh;
|
||||
}
|
||||
.project-node-process-confirm textarea { height:320px; }
|
||||
</style>
|
||||
<div class="project-node-process-confirm">
|
||||
<textarea eictextarea name="justification" placeholder="Comments about this action" class="required"></textarea>
|
||||
</div>
|
||||
@@ -0,0 +1,47 @@
|
||||
class ICMPNodeActionConfirmDialog extends EICDialogContent {
|
||||
actions = [
|
||||
{
|
||||
label: 'cancel',
|
||||
onclick: this.cancel.bind(this),
|
||||
severity: 'secondary',
|
||||
role: 'cancel'
|
||||
},
|
||||
{
|
||||
label: 'proceed',
|
||||
onclick: this.process.bind(this),
|
||||
severity: 'primary',
|
||||
role: 'process'
|
||||
}
|
||||
]
|
||||
|
||||
async DOMContentLoaded(options) {
|
||||
this.node = options.models.node;
|
||||
this.action = options.action
|
||||
this.number = options.number
|
||||
this.type = options.type
|
||||
this.nodeId = options.nodeId
|
||||
this.report = options.report
|
||||
console.log(options)
|
||||
console.log(this)
|
||||
}
|
||||
|
||||
DOMContentFocused() {
|
||||
ui.eicfy(this.el);
|
||||
this.form = new Form(this.el);
|
||||
}
|
||||
|
||||
process() {
|
||||
let payload = {
|
||||
status: this.action,
|
||||
form: this.report
|
||||
};
|
||||
|
||||
payload = {...payload, ...this.form.value}
|
||||
|
||||
this.node.process(this.action, this.number, this.type, this.nodeId, payload)
|
||||
.then( this.commit );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('ICMPNodeActionConfirmDialog', ICMPNodeActionConfirmDialog);
|
||||
Reference in New Issue
Block a user