Commit Graph

55 Commits

Author SHA1 Message Date
nathan
4fd50db1c3 Et2Dialog - only try to add an image to button if one is specified
Avoids error in button set image()
2022-03-17 13:06:29 -06:00
nathan
56571c6fc7 Et2Dialog changes
- Fix some event listeners
- Add getCompleted() promise that resolves when the dialog closes.
- Et2Dialog.alert() returns the promise directly, other static methods return the Et2Dialog to avoid breaking existing code

You can now wait for a dialog with:
Et2Dialog.show_prompt(null,"Name?").getComplete().then(([button_id,value]) => console.log(value));
or using async:
[button_id, value] = await Et2Dialog.show_prompt(null,"Name?").getComplete();
if(button_id === Et2Dialog.BUTTON_OK) {...}
2022-03-17 13:03:47 -06:00
nathan
5fdc594d00 Get templates working in Et2Dialog 2022-03-16 13:53:50 -06:00
nathan
c120f13466 Get separate egw object & some styling sorted out 2022-03-15 14:10:53 -06:00
nathan
2c1f9b2579 WIP on dialog
You can try it with
et2_dialog.show_dialog(null, "This is the message", "Title")
2022-03-14 17:07:25 -06:00