Commit Graph

1985 Commits

Author SHA1 Message Date
nathan
278f75546a Fix submit proceeded even if legacy widget failed validation 2022-04-27 11:56:03 -06:00
ralf
c62b305b4a return a Promise from egw.accountData and deprecated, but still support, the use of a callback
egw.accounts can be called with a second parameter async=true to query accounts async and return a Promise
2022-04-27 17:33:07 +02:00
nathan
1c42668a97 Change sidebox calendar from jQuery to webcomponent / flatpickr 2022-04-26 15:27:49 -06:00
nathan
0017b78b53 Et2Date: Add support for inline dates & passing a format to parseDate 2022-04-26 15:24:58 -06:00
Hadi Nategh
fcf195cf47 Fix toolbar menulist doesn't get closed after clicking away from it 2022-04-26 14:53:01 +02:00
Hadi Nategh
a835d5bc6e WIP replacing jQuery-ui: fix et2_toolbar styling with new details tag 2022-04-26 11:18:43 +02:00
nathan
7d86272b28 CSS / Layout cleanup
- Fix select with tags=true causes hidden WebComponents to display

Chosen wants to do sizing calculations which wasn't working properly on w.c.
2022-04-25 10:46:51 -06:00
Hadi Nategh
ca794817eb WIP replacing jQuery-ui:
- Replace accordion with html details
2022-04-25 17:24:29 +02:00
nathan
65c683b9a2 Change styling on validation messages 2022-04-25 08:47:12 -06:00
nathan
aafbc58cdd Validation message styles
- Changed to absolute position to avoid reflow
- "Better" style
2022-04-22 16:07:57 -06:00
nathan
4f17302bb1 CSS / Layout cleanup - better autosize
- More consistent sizing/position for invoker
2022-04-22 15:22:31 -06:00
nathan
ec8b32c01d CSS / Layout cleanup - better autosize
- let things inside box shrink, actual widget can decide minimums
- Slotted inputs take up full width by default
- More consistent sizing/position for invoker
2022-04-22 15:21:46 -06:00
nathan
f8f04071be CSS / Layout cleanup
- Remove margin from input,button,select
- Fix some spacing issues
- Switch selects from display:inline-block to display:block so they take up all parent's space
- Let background (required) color show through select tag
- Some layout tweaks on mail account template
2022-04-22 13:07:22 -06:00
nathan
6feb9f468a Handle missing nextmatch controller when setting up auto-refresh by trying again later.
(Missing controller caused by new template loading)
2022-04-22 10:52:16 -06:00
nathan
f18dd19536 Et2Split: Make bar darker on hover 2022-04-22 10:46:41 -06:00
nathan
166db3f4d2 Et2Description: Fix extra space while preserving line breaks 2022-04-21 10:41:30 -06:00
nathan
19ae591bdf Et2Split: Add a background color to the splitter bar 2022-04-21 09:09:59 -06:00
nathan
416136dc24 Et2Description: Fix missing styles from extending classes (Et2Url) while also keeping decrypt on hover working 2022-04-20 16:23:53 -06:00
nathan
234684061d Et2Split: Bugfixes
- better handling of nested dynheight
- handling orientation property
- avoid resizing when not visible
2022-04-20 14:15:49 -06:00
nathan
94f843cd50 Et2Widget: Add modifications in when transforming attributes 2022-04-20 14:09:45 -06:00
nathan
ce14c1c9f6 Et2Split: Convert splitter to webcomponent 2022-04-19 09:36:44 -06:00
nathan
44c8b2f372 Et2Widget: More complete handling of child object styles property when it is missing 2022-04-19 09:31:10 -06:00
nathan
18f6d1ee0b Et2Image: Fix "TypeError: this._imageTemplate is not a function"
I'm not sure how that happened.  Autocorrect?
2022-04-14 08:50:34 -06:00
nathan
748e2ee70e Et2Image: Use slotted image so most CSS still works 2022-04-13 10:37:55 -06:00
nathan
0d6d18e3fa Et2Image: Show as clickable if image has href OR onclick 2022-04-13 08:34:24 -06:00
nathan
0f362f9717 Put Et2Description content into light DOM to fix decrypt on hover 2022-04-12 16:28:36 -06:00
nathan
319bd51f80 Et2Image bugfixes
- No src or default_src gives nothing, not missing image
- Fix etemplate.php parser so buttons that get converted to images still submit
2022-04-12 10:00:43 -06:00
nathan
e3be42721e Fix Et2Image did not double-transform src for as legacy image did
eg:
if $content[0][type] = "group"
${row}[type] => "0[type]" (single transform)
0[type] => "group" (double transform)

Also, fix type from addressbook list to not need double-transform
2022-04-11 15:03:24 -06:00
nathan
6ed888a80e Fix missing Et2Image label 2022-04-11 13:38:24 -06:00
nathan
49d40c18e8 Set nextmatch as parent so newly cloned webcomponents in nm row have it before we start setting properties.
Fixes egw.image() not having correct app.
2022-04-11 11:21:39 -06:00
nathan
77a11cb5fe Fix image src not getting set 2022-04-08 14:03:29 -06:00
nathan
2ba299f876 Change buttons that used to be just an image to be just an image
- Remove Et2ButtonImage, it's not needed.  Buttons without labels look the same
- Add Et2Image to take its place
- Change etemplate modifier to use Et2Image for buttononly
- Some styling for mail account placeholder button
2022-04-08 13:03:20 -06:00
nathan
70c5cedec7 Better styles for disabled buttons 2022-04-07 16:45:24 -06:00
nathan
3f86e98257 Deal with et2-button-image showing label 2022-04-07 16:24:45 -06:00
nathan
911a2970b0 Et2Dialog: Turn on modal now that style issue is fixed 2022-04-06 15:13:51 -06:00
nathan
d1b5c796dd Expand super.styles 2022-04-06 15:12:39 -06:00
nathan
22ae7fbf89 Use Et2Button.noSubmit instead of Et2Button.doSubmit 2022-04-06 15:08:18 -06:00
nathan
54ea13bfa8 Et2Widget: Fix the missing style property
... by not overriding it
2022-04-06 15:06:25 -06:00
nathan
3c28d4b9a9 Et2Button: change doSubmit (default false) to noSubmit (default true) because of nextmatch complications with boolean properties 2022-04-06 14:48:57 -06:00
nathan
e68e125a0a Add accesskey property 2022-04-05 10:09:49 -06:00
nathan
57e231aced New Et2ButtonImage that shows only image
Also doesn't stretch like the others do.
2022-04-05 09:15:08 -06:00
Hadi Nategh
8b147bc285 Fix removeSessionItem not working 2022-04-05 10:24:06 +02:00
nathan
a763b84be4 Et2Button properties hideOnReadonly, noValidation
Added hideOnReadonly, default false.  Disabled/readonly buttons are now visible but disabled, unless you set hideOnReadonly="false" to get previous behaviour.

Added noValidation, default false.  It's just passed to etemplate2.submit() as before
2022-04-04 16:24:01 -06:00
nathan
17834f1be8 Fix nextmatch changing value back before it could be submitted 2022-04-01 14:52:40 -06:00
nathan
a83f9a1ec9 Get tests passing again
- Dates have their input as slotted, not internal
- Selects have .select_options, not .get_select_options()
- Remove this.egw().lang() use from Et2InvokerMixin._invokerTemplate()
2022-04-01 12:52:47 -06:00
ralf
9e8b291201 calling etemplate2.submit(,,no_validation=true) caused no submit (as invalid is no promise, but null) 2022-04-01 21:28:25 +03:00
ralf
b2a85e68b8 fix vfs-path widget to correctly deal with smallPART paths (hierarchical structure inside entry directory) 2022-04-01 21:00:45 +03:00
nathan
0c8824c496 Fix addressbook contact type filter was sometimes 'D' after being initialized to 'n'
When nextmatch moved the template in the DOM, we were re-adding already existing options which re-set the value.
2022-04-01 11:12:19 -06:00
nathan
9cd746f0b4 Fix missing nm filters 2022-03-31 08:46:36 -06:00
nathan
6120d820aa Change to Et2Dialog
- History diff
- Fix some bugs in placeholder widget
- Change load listener target, the dialog content node might have been moved out before the event gets triggered
2022-03-30 15:11:15 -06:00
nathan
bfdb53b1cf Change over some more dialogs 2022-03-30 13:24:52 -06:00
nathan
763ed85668 Fix splitter widget did not restore size from preference
Two problems:
1.  Preference was stored as percent which splitter did not like to load directly
2.  Etemplate was triggering the final finish-up, which triggered resize(), which stored the default as preference before the splitter got to its _init_splitter(),
2022-03-30 09:09:33 -06:00
nathan
632ab571db Fix nextmatch webcomponent children stalled etemplate load, preventing et2_init() from being called. 2022-03-30 08:30:25 -06:00
ralf
e7dc51ad14 Revert "Fix splitter widget did not restore size from preference"
This reverts commit e8635be8c1.
2022-03-30 10:21:22 +03:00
nathan
c12d4cebfb Et2DateDuration: Enforce the order of display to be greatest to least
For example hours:days is not allowed anymore, auto-corrected to days:hours
2022-03-29 11:00:59 -06:00
nathan
e8635be8c1 Fix splitter widget did not restore size from preference
Two problems:
1.  Preference was stored as percent which splitter did not like to load directly
2.  Etemplate was triggering the final finish-up, which triggered resize(), which stored the default as preference before the splitter got to its _init_splitter(),
2022-03-29 09:17:04 -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
ralf
55da72a661 replace jQuery.Deferred with regular Promise
trying to fix not working restore of splitter size in mail, thought it did NOT help in that regard :(
2022-03-25 10:02:14 +02:00
nathan
467e2ca8e2 Fix some bugs in nextmatch dialog action
Wrong action was used, leading to an error.  Plus, it kept a copy of the nextmatch in memory across the reload.
2022-03-24 14:48: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
38a3af6981 Set modelValue if the inputWidget has a _callParser() method.
This makes sure the internal modelValue is set when we call set_value(), and preserves value if the widget is re-connected (like Et2Dialog does)
2022-03-24 09:46:27 -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
be6b49ca21 Remove debugger 2022-03-23 14:48:45 -06:00
nathan
db27086fe5 Change another reference to et2_dialog in nextmatch 2022-03-23 13:43:23 -06:00
nathan
79fab93351 Fix missing button labels from legacy dialog 2022-03-23 13:42:12 -06:00
nathan
9693cfe538 Switch nextmatch print & select all to using Et2Dialog 2022-03-23 13:28:15 -06:00
nathan
db7c68bdc7 legacy dialog - Fix missing buttons 2022-03-23 13:22:14 -06:00
nathan
6d538f29f0 Fix legacy dialog gave error without parent 2022-03-23 13:02:12 -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
Hadi Nategh
d13d039349 Fix Taglist new free entry replacing other selected options 2022-03-23 18:16:19 +01:00
nathan
f5c1e21ee8 Switch placeholder widget to using Et2Dialog 2022-03-23 11:01:36 -06:00
nathan
39baec10ab Add some documentation to legacy dialog 2022-03-23 11:00:41 -06:00
nathan
2c92ddfe92 Et2Dialog: Fix template's DOMContainer ID still had .xet in it 2022-03-23 10:53:00 -06:00
nathan
85e247d4d6 Legacy dialog
- Fix load event was not bubbling through to the listener
- Fix value was missing
2022-03-23 09:50:11 -06:00
ralf
2f616281e0 fix click eg. in mail on attachment as long as we have no blueimp/expose 2022-03-23 15:26:16 +02:00
nathan
3c4f85155d Get legacy et2_dialog working with createWidget() 2022-03-22 17:21:59 -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
8a033b6b9a Fix sometimes missing namespace causing some child widgets to have their value in the wrong place 2022-03-22 15:46:39 -06:00
Hadi Nategh
f4e877bcdf Adapt vfs dialogs with new Et2Dialog widget 2022-03-22 12:50:42 +01: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
ff471946b5 Make et2_widget_dialog a stub that extends Et2Dialog so 3rd party apps might still work 2022-03-21 09:50:58 -06:00
Hadi Nategh
10453c41e3 Give maximum available height to BOX's parent node 2022-03-21 16:21:55 +01: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
Hadi Nategh
d7400503ac Use data value instead of index for close/edit handling as indexes might get change 2022-03-21 14:13:45 +01: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
ralf
a45d26511b fix not set invoker for expand_multiple_rows attribute 2022-03-18 22:26:15 +02: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
Hadi Nategh
53ecdba510 WIP Et2Taglist: trying to get allowFreeEntries feature working 2022-03-18 19:13:30 +01:00
ralf
5650e8c616 ignore click action for an empty value 2022-03-18 09:53:09 +02:00
nathan
96039e0729 egw_open doesn't like the import... 2022-03-17 16:54:43 -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
ralf
ee36e83cbb fix Et2Date.set_value('') did not clear 2022-03-16 23:21:15 +02:00