New question system
This commit is contained in:
parent
1738fc4252
commit
d1f8080c24
45 changed files with 1391 additions and 689 deletions
25
UI/SaveButton.ts
Normal file
25
UI/SaveButton.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import {UIEventSource} from "./UIEventSource";
|
||||
import {UIElement} from "./UIElement";
|
||||
|
||||
export class SaveButton extends UIElement {
|
||||
private _value: UIEventSource<any>;
|
||||
|
||||
constructor(value: UIEventSource<any>) {
|
||||
super(value);
|
||||
if(value === undefined){
|
||||
throw "No event source for savebutton, something is wrong"
|
||||
}
|
||||
this._value = value;
|
||||
}
|
||||
|
||||
protected InnerRender(): string {
|
||||
if (this._value.data === undefined ||
|
||||
this._value.data === null
|
||||
|| this._value.data === ""
|
||||
) {
|
||||
return "<span class='save-non-active'>Opslaan</span>"
|
||||
}
|
||||
return "<span class='save'>Opslaan</span>";
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue