Commit Graph

79 Commits

Author SHA1 Message Date
nathan
0186714112 Et2DateDuration improvements:
- If display.unit is not set, show the first unit option instead of blank selectbox
- Move number spinner to edge of box so numbers have more space
2022-07-27 13:36:04 -06: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
5b76c8b16d Fix et2-date-duration would no longer return a value 2022-07-26 13:31:20 -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
3cb8b1ecce Get select hover border back 2022-07-22 10:44:37 -06:00
nathan
a0467b2e55 Fix JS error about can't find input box from init() 2022-07-22 08:42:35 -06:00
ralf
b8ffa91efe use et2-textbox instead of an input for et2-date* to inherit SL styling 2022-07-22 15:45:47 +02:00
nathan
68849a2b79 Use et2-select & et2-textbox in Et2DateDuration for consistent styling 2022-07-21 13:32:06 -06:00
ralf
b9d96ea3e9 change all attribute-names of new et2-* widgets to camelCase
only exception is select_options, never used in templates
2022-07-21 17:57:50 +02:00
nathan
724c42aa6b Block works better for automatic sizing 2022-07-19 16:55:46 -06:00
nathan
9ffc7decf2 Shrink minimum size for date widget to fit-content, add label if set 2022-06-24 14:08:06 -06:00
nathan
ec608e905a Fix some JS tests
- Description tests were not updated after description moved from shadowDOM to lightDOM
- Missing egw caused errors
2022-06-07 16:39:04 -06:00
ralf
3eaed09185 fix not working et2-date-since and rename et2-date-time_today to et2-date-time-today
create a new method egw.getTimezoneOffset() return current offset according to user preferences on server-side, like (new Date).getTimezoneOffset()
2022-05-05 11:38:48 +02:00
nathan
10af4f7514 Historylog + webcomponents
- historylog widget now uses webcomponents for timestamp & user, and whenever possible for values
- History::get_rows() formats customfield date/date-time values as needed
- implement setDetachedAttributes(), if nextmatch & historylog are calling them on webcomponents, might as well use that to set what they pass
2022-05-03 11:01:42 -06:00
nathan
cff1671f6f Et2Date: Handle formatting full month d-M-Y
Maybe we just pass all formatting off to flatpickr?
2022-05-02 17:10:07 -06:00
nathan
b0a57a05fd Calendar refactors:
- Remove some more jQueryUI.datepicker usages
2022-05-02 15:23:03 -06:00
nathan
f54c7f40bb Improve holidays() return documentation 2022-04-29 14:37:52 -06:00
nathan
b44f4ea30d Move holidays to its own file, show holidays in all date selection calendars 2022-04-29 14:37:52 -06:00
ralf
baf07a4a2c only load localization, if we have one 2022-04-29 17:40:43 +02:00
nathan
e5f238584e Et2Date: Avoid error localizing English 2022-04-29 09:14:51 -06:00
nathan
63b2755dbf Et2Date: Add localization 2022-04-28 15:46:39 -06:00
nathan
0017b78b53 Et2Date: Add support for inline dates & passing a format to parseDate 2022-04-26 15:24:58 -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
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
ralf
ee36e83cbb fix Et2Date.set_value('') did not clear 2022-03-16 23:21:15 +02:00
nathan
944c0ad68e Add disabled to detached attributes 2022-03-09 10:17:59 -07:00
nathan
d0926226cd Fix set_min() & set_max() for Date 2022-03-07 14:33:09 -07:00
nathan
734401c6cd Get Date widget to use slots for better styling, also fixes re-initializing when not needed 2022-03-07 13:33:13 -07:00
nathan
1671e69603 Fix required dates gave missing error even if they had a value 2022-03-07 09:14:15 -07:00
nathan
aa2dc5c8f0 Maybe stop the disconnected month selectboxes? 2022-03-04 15:42:27 -07:00
nathan
0e4d32ea20 Get some neglected tests working again 2022-03-04 15:37:22 -07:00
nathan
1893a2c7fe Fix duration in infolog list 2022-03-03 14:14:26 -07:00
ralf
89613dd368 fix et2-date-duration showing NaN:NaN in timesheet
boolean attributes should not have a default of true, because DOM does NOT reflect false and we need to reflect for use in NM
--> changed default for select_unit for r/o duration to false and set it in timesheet.index to true
--> changing it for r/w too would require a lot of xet files to be updated (we don't need reflection there)
2022-03-02 11:02:24 +02:00
nathan
3c9b9540e4 Fix copy/paste error - Et2DateDuration does not have an options property to access 2022-03-01 16:50:05 -07:00
ralf
ac408f4eef Change handler setting modelValue for validation
setting it in getValue() alone does not remove validation message direct after entering a date
2022-03-01 16:09:27 +02:00
nathan
5406704c74 Add set_min() & set_max() 2022-02-28 14:06:37 -07:00
nathan
30ddeb79b0 Add missing change listener 2022-02-28 13:45:47 -07:00
nathan
e166211a66 Fix required dates always failed as empty 2022-02-25 11:29:36 -07:00
ralf
832725ce52 fix display_format="hⓂ️s" for r/o only gave one best matching unit (eg. 5m) not all units (eg. 0:05:30) 2022-02-25 10:16:28 +02:00
ralf
83cfb34c3c fix not working date_format!="m" (the default) in NM by reflecting it into DOM
also adding it to all properties used by the r/o widget

This needs to be done by a lot more r/o widgets, if they assign their default values in the constructor!
2022-02-25 09:45:35 +02:00
nathan
d9e95dae87 Get needed attribute working
Will cancel submit, shows validation message
2022-02-24 15:53:40 -07:00
ralf
c83b281aa9 added et2-date-timeonly_ro widget 2022-02-24 19:44:30 +02:00
nathan
41a18b6274 CSS fixes:
- Missing border in Et2DateDuration without unit selector
- Box alignment was not applied to widget inputs (Et2DateDuration) when the widget inputs did not fill all available space
2022-02-23 11:15:55 -07:00
nathan
ec13b1a472 Fix missing label in date widgets 2022-02-23 10:43:39 -07:00
nathan
354d15ba57 Support scroll wheel on date year, month, hour, minute 2022-02-22 11:23:54 -07:00
nathan
1e23a3c45e Fix date duration was 2px too wide
A border on et2-date-duration (:host) is sized differently from a border on its children
2022-02-22 10:37:13 -07:00
ralf
c2166c5750 fix select-boxes submit their old value, if they are onchange="1"
@Nathan: Not sure if this is the right fix, but I can't see where we use Lit's FormatMixing, which defines serializedValue (and therefore select-box always returns the old modalValue)
2022-02-21 20:58:56 +02:00
nathan
9079f97d7e Fix selectbox values were not set.
Paying more attention to the WebComponent life cycle here, rather than what our widgets do - connectedCallback(), requestUpdate(), updated() are more important than loadFromXML(), etc. which are only used when loading from the .xet the first time.
2022-02-18 12:02:27 -07:00
nathan
b8455e0b8d Fix Et2DateTimeOnly displayed 00:00 when value was "" 2022-02-17 10:30:35 -07:00
nathan
be4633c9fa Implement et2-date-duration 2022-02-16 16:45:40 -07:00