Commit Graph

74 Commits

Author SHA1 Message Date
nathan
0f66624047 Get some more automatic tests working again, remove JS files 2023-09-21 08:18:09 -06:00
nathan
e2d3c5f1e8 Get some automatic tests working again 2023-09-20 14:24:01 -06:00
Nathan Gray
e323cd1d79
Feature/shoelace 2.4 upgrade (#135)
Update shoelace to 2.9.0
2023-09-13 11:55:33 -06:00
ralf
a50fa29419 null and undefined are objects too
fixes TypeError: Cannot read properties of null (reading 'length')
2023-04-26 09:22:30 +02:00
nathan
5b9cf0ae0b Et2InputWidget: Give clones of object values so receiver cannot use the reference
Fixes failing change detection in EgwApp.update_state, since the value was the same object
2023-04-25 09:09:18 -06:00
nathan
5358bb5f6f Don't validate inputs that are disabled, in addition to readonly 2023-04-17 14:47:06 -06:00
nathan
3423e680b8 Validation changes:
- Fix multiplying messages on focus/blur
- Server-side (Manual) messages do not block submit.  Server set it, we'll let server check it.
2023-04-13 15:06:31 -06:00
nathan
e4592e822e Api: If widget has autocomplete="on", set the name attribute for autocomplete 2023-04-12 15:14:35 -06:00
hadi
44d4b70aaf Add autocomplete attribute to input widgets 2023-04-03 12:29:50 +02:00
ralf
23fea7cfb1 nicer than window.setTimeout() 2023-03-23 21:50:35 +01:00
ralf
5818d4bfc0 * NewsAdmin: fix creating of new categories
deferring setting the label, if parentNode is not yet there
2023-03-23 21:42:34 +01:00
nathan
e7f10c711c Fix numeric validator on a Et2Number would not pass 2023-03-08 13:28:04 -07:00
nathan
b703e2bfe5 Fix required validator went missing if a regex validator was added 2023-03-08 11:00:27 -07:00
nathan
5760c5049f Et2InputWidget: Split label around widget if it has %s in it 2023-03-07 10:51:33 -07:00
nathan
86b883951a Add isReady flag to etemplate. onchange functions set as attributes in .xet files will not be called until the etemplate is finished loading. 2023-02-27 15:31:07 -07:00
nathan
19c02fc91c Et2InputWidget: Do not try to validate readonly widgets, user can't change the value to fix it 2023-01-16 08:55:31 -07:00
nathan
461e83df28 Remove all validation messages on focus, not just manual / server-side messages.
Server side ones are still re-added on blur, client-side messages are re-run.
2023-01-12 09:17:29 -07:00
nathan
a699117b1b Fix hiding server-side messages for selectboxes
Messages were not properly hidden & displayed, and setting handleFocus & handleBlur accidentally overwrote them in Shoelace widgets
2023-01-11 11:11:02 -07:00
nathan
1163f9e31d Hide server-side validation messages while widget has focus. If the value did not change, put messages back 2023-01-09 16:02:59 -07:00
nathan
9ce0520e5c Allow actually disabled inputs 2022-12-16 10:40:58 -07:00
nathan
272b63d32e Explicitly define autofocus as reflected so it works in Firefox too 2022-12-15 13:18:16 -07:00
nathan
4454f350b2 Fix some more validation bugs
- Fix error if widget did not have a feedback slot or a '#help-text' element
- Fix copy/paste error scrolling to wrong widget
2022-09-22 11:43:29 -06:00
nathan
e6ce33b153 Fix invalid fields were not blocking submit 2022-09-21 09:56:15 -06:00
nathan
d9cc794836 Don't bother to validate empty fields if they're not required
Fixes Et2SelectEmail complaining that empty strings are not valid email addresses
2022-09-21 09:05:51 -06:00
nathan
3616fe9df0 Add "hasValue" class for input widgets that have a value, and use that class to hide required styling when the widget has a value 2022-09-15 12:28:49 -06:00
nathan
cfbb74b83e Fix some Et2DateDuration bugs
- Duration did not validate correctly
- Validation errors were not actually shown
- Empty duration ('') did not work consistently
2022-09-13 13:00:25 -06:00
nathan
d25a0b215e Some work on a visual test, not yet working 2022-08-25 10:19:45 -06:00
nathan
33dcbc218f Revert "Calendar: Fix some kanban listen problems"
This reverts commit 59e64cd908.
2022-08-25 10:16:05 -06:00
nathan
59e64cd908 Calendar: Fix some kanban listen problems
- Status filter isn't really applicable
- Priority was missing its options
2022-08-25 10:13:32 -06:00
ralf
56464a3ce2 add a property isSlComponent so constructor can explicitly set it, for components without a handleChange method 2022-08-03 11:39:06 +02:00
nathan
93167940f8 Fix validation errors were not visible, improve required css
It looks weird if you use et2_required class instead of setting required attribute.
2022-07-27 11:33:14 -06:00
ralf
0ad3cf9832 fix not working onchange with Shoelace components: need to bind sl-change instead of change
adding change handler to invoker mixing to enable/disable invoker when value changes
2022-07-27 12:33:37 +02:00
nathan
17012f6f25 Fix some readonly / readOnly bugs that snuck in when textbox was converted from Lion to Shoelace 2022-07-26 13:56:17 -06:00
nathan
66164ad2eb Fix disabled widgets returning a value
Fixes calendar event created via quick add, duration is wrong
2022-07-25 13:32:06 -06:00
nathan
ab9cde60eb Don't error when validating any remaining Lion widgets 2022-07-25 09:06:32 -06:00
nathan
2b848622fb Add missing validator variables 2022-07-21 13:45:24 -06:00
nathan
379ceeb3e5 Switch Et2Template to extend SlInput instead of LionInput
Also includes changes to how validation messages are handled to use our own stuff
2022-07-21 12:39:00 -06:00
nathan
3d386edbac Fix readonlys were claiming to be dirty 2022-07-15 09:22:49 -06:00
nathan
76a19e86fb Fix selectboxes didn't show server-side validation messages 2022-06-30 08:40:17 -06:00
nathan
7c7b81201f Implement missing validation error for Et2Select 2022-06-29 11:49:24 -06:00
nathan
9ca78de12f Et2Select: Fix empty label was not being shown for invalid values 2022-06-23 15:56:28 -06:00
nathan
34b0dc3e35 Remove debug 2022-06-21 11:07:30 -06:00
nathan
45bdc86203 Et2Button: Fix hideOnReadonly still showed up when readonly 2022-06-16 13:59:31 -06:00
nathan
ca563cf8fb Use the same style for webcomponent validation messages as legacy messages, update both to latest webcomponent style. 2022-05-05 15:40:28 -06: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
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
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
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
ralf
3b896e0919 deprecated and replace attributes: needed-->required, blur-->placeholder in preprocessor
remove client-side code for them and enable translation of placeholder
2022-03-05 15:22:45 +02:00