Commit Graph

73 Commits

Author SHA1 Message Date
nathan
bfdb53b1cf Change over some more dialogs 2022-03-30 13:24:52 -06:00
nathan
13d1289910 Dialog / button fixes
- Get dialog contents visible in Firefox

Something in how Firefox parsed or inserted the style and children caused an error:
Node.insertBefore: Child to insert before is not a child of this node
which caused the dialog contents to be missing from the shadow DOM.  This fixes the missing contents by putting the style in using a different way.
2022-03-28 11:29:21 -06:00
nathan
f714729c26 Dialog / button fixes
- Fix vfsSelect did not close (seen in collabora save as)
- Turn off destroy_on_close, vfsSelect was destroying opening session (seen in mail compose 404)
- Add doSubmit property to Et2Button, dialog no longer gives error on every button click
2022-03-25 09:55:02 -06:00
nathan
21da0b067a Get vfsSelect dialog working again 2022-03-24 13:01:41 -06:00
nathan
5e2b690b2a Et2Dialog Increase min-width 2022-03-24 11:41:29 -06:00
nathan
67dba61ef6 Et2Dialog changes
- dialog can now adopt buttons from the template.  Preferrably set slot="buttons", but it'll find them anywhere if you don't
- Reduce size & padding for non-template content
2022-03-24 11:21:32 -06:00
nathan
53a7405a61 Et2Dialog: Adjust header style
added a line below header, title slightly larger, adjusted padding
2022-03-23 14:50:00 -06:00
nathan
cdbdf53d46 Et2Dialog: Make sure value has a content before loading template, otherwise we get an error from etemplate2 2022-03-23 13:02:12 -06:00
nathan
2c92ddfe92 Et2Dialog: Fix template's DOMContainer ID still had .xet in it 2022-03-23 10:53:00 -06:00
nathan
56ed4e1267 Et2Dialog: Fix incorrect properties declaration 2022-03-22 17:19:53 -06:00
nathan
322fa3c8f4 Get nm_action dialogs working 2022-03-22 15:49:42 -06:00
nathan
ff274c2bc8 Et2Dialog changes
- Add some margin, border & box-shadow
- Smaller header & close button
2022-03-21 14:51:43 -06:00
nathan
b600059b68 Et2Dialog changes
- improve documentation
2022-03-21 09:52:09 -06:00
nathan
e9a381da69 Et2Dialog changes
- Set template's DOM ID so CSS can style it

This is the best way to set [minimum] dimensions, though you can set width & height on the Et2Dialog.
2022-03-21 08:46:03 -06:00
nathan
9e989596c2 Et2Dialog changes
- Fix Et2Dialog.show_prompt() incorrectly returned too much, should be just the prompt value
2022-03-18 14:40:54 -06:00
nathan
fefc822d9c Et2Dialog changes
- Fire a close event on close
- When closing, clear the template (if present)
2022-03-18 14:05:57 -06:00
nathan
255add7d98 Api: Switch from et2_dialog to Et2Dialog
Might be some I missed or can't change just yet
2022-03-17 16:18:39 -06:00
nathan
0479671ac4 Et2Dialog changes
- implement Et2Dialog.long_task()
- change to use Et2Dialog._buttons.label instead of Et2Dialog._buttons.text for better consistency
2022-03-17 15:21:15 -06:00
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