Commit Graph

506 Commits

Author SHA1 Message Date
nathan
3cf4cbab9a Fix missing value in some static option selects
Shoelace select initially rejects the value due to missing option, and needs to be re-set once our options have arrived
2023-11-16 10:09:20 -07:00
nathan
9c8ec0d872 Et2SelectEmail: Fix incorrect total result, wrongly shown "No results" 2023-11-15 15:25:53 -07:00
nathan
5a02959468 Et2Select: Let select option list get as big as it needs 2023-11-15 09:38:54 -07:00
nathan
454ab3fb98 Fix spacing & sizing
- Move option group titles to the left more
- Fix calendarowner dropdown would not size properly in sidebox
2023-11-02 17:29:50 -06:00
nathan
c2623dcb55 Fix some issues when search results have option groups
- Options sometimes disappeared when selected
- Count was off if one of the results was already selected
2023-11-02 16:58:38 -06:00
nathan
5d705c3b79 Calendar: Group calendar owner / participant search results by resource type 2023-11-01 13:26:23 -06:00
nathan
d1e7040011 Fix email tag always shows "not-allowed" cursor for read-only 2023-10-31 09:02:03 -06:00
nathan
b3899e86dd Et2Select: Stop sidemenu scrolling when scrolling through options 2023-10-30 09:10:21 -06:00
nathan
4ab788acc1 Et2SelectEmail: Fix pasting in merge placeholders didn't do anything 2023-10-26 10:09:44 -06:00
nathan
4a48fc74c7 Et2Select: Fix placeholder could not be shown 2023-10-25 10:11:44 -06:00
nathan
85cef367e2 Move Et2SelectAccount initial options to its own method, fix options were sometimes missing 2023-10-19 15:03:16 -06:00
nathan
5601b99c97 Et2Select: Add tabindex to options to avoid focus stealing in sidemenu, other event handling cleanup 2023-10-12 11:25:23 -06:00
nathan
235ff7a2cf Et2SelectAccount improvements
- Fix always including all accounts
- Limit included accounts to 100 to avoid breaking
- Let repeat() cache
- Improved "more results" count
- Reduce repeats & iteration needed
2023-10-06 11:37:46 -06:00
nathan
3088d168f4 More select tests
- finds options from DOM / template
- finds static options
- combinations with other option sources
2023-10-04 10:45:41 -06:00
nathan
efe0eff776 Calendar: Fix sidebox owner could not select options 2023-10-02 16:06:25 -06:00
nathan
72112023e8 Et2Select: Fix link search lost selected item, showing ?? instead 2023-10-02 13:11:48 -06:00
nathan
795160301b Et2Select: Unit test update
- Added check to see if it actually shows the options
- Fix "Selected multiple remote results in value" failed
2023-10-02 08:39:22 -06:00
nathan
6c06a5311f Et2Select: Fix select options were only visible as search results 2023-10-02 08:04:19 -06:00
nathan
4f575894a2 Et2Select: Fix selecting a second search result could remove first one 2023-09-29 13:43:12 -06:00
nathan
124b6b1f96 Fix link-to would close & clear immediately after selecting a result 2023-09-28 11:00:30 -06:00
nathan
bbf676597f Et2Select: Fix selected search results sometimes disappeared 2023-09-27 11:15:13 -06:00
nathan
70be19cdfb Et2Select: Fix change event did not fire when free entry was added 2023-09-25 10:16:32 -06:00
nathan
735b52b38b Remove block_change_event
It doesn't seem to be needed now, and is actually stopping the first user change from firing (change alarm time in calendar edit)
2023-09-25 09:37:48 -06:00
nathan
5601897dbb Put additonal options to static select before the static options 2023-09-25 08:50:36 -06:00
hadi
8b5819094d Fix broken fullEmail feature 2023-09-25 14:35:18 +02:00
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
5349c7a966 Fix selects with no emptyLabel but an option with value="" did not return a value 2023-09-20 08:20:22 -06:00
nathan
cdd13e5109 Fix doubled options with freeEntries 2023-09-19 16:04:19 -06:00
nathan
a4b0a2a1f0 Get country flags showing again 2023-09-19 15:20:36 -06:00
nathan
36f42f77db Fix quick add did not always work the second time 2023-09-19 13:53:15 -06:00
nathan
cb484c8f6c Fix some selectbox non-values causing issues 2023-09-19 13:01:49 -06:00
nathan
368c9fae63 Fix link to did not link 2023-09-19 08:46:41 -06:00
hadi
e72671bc20 Fix styling of readonly selectbox 2023-09-19 14:03:26 +02:00
nathan
f75567a863 Select improvements
- Add _styleTemplate for easier extension
- re-organize file
- Fix weird tag style
- some cleanup
2023-09-18 16:09:43 -06:00
nathan
19552059b3 Fix no results sometimes showed even if there were results 2023-09-15 08:09:55 -06:00
nathan
1d1b3f5947 Avoid JS error on blur 2023-09-14 14:33:16 -06:00
nathan
472ee73dda Improve styling & behaviour of Et2SelectEmail 2023-09-14 14:30:20 -06:00
nathan
fade177f10 Fix first select option was not set 2023-09-14 11:48:30 -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
nathan
0b036f49b8 Et2Select: Fix some static option selects did not show their values when readonly 2023-08-28 13:50:09 -06:00
hadi
b33f0fa8cf Fix js error happens when there's no label set on select options 2023-08-28 12:17:42 +02:00
nathan
c8d4682672 Fix class case 2023-08-18 08:47:37 -06:00
nathan
b2e1cef233 SearchMixin: If the value is changed while the search / options are open, recalculate positioning
Fixes bug where it looks like the value hasn't changed, until the dropdown closes.
2023-08-03 14:05:10 -06:00
nathan
6b183db6e0 SearchMixin: Limit number of JSON search results 2023-07-31 10:11:04 -06:00
nathan
8335281787 Fix email tags marked as invalid 2023-07-27 13:19:43 -06:00
nathan
46795ec108 SearchMixin: Fix select option not having class causes JS error
Fixes addressbook edit popup does not resize
2023-07-27 10:04:58 -06:00
ralf
0f692fbb74 fix lavatar shows same letters for every contact not having a photo
caused by wrongly falling back to the contact with contact_id equal to account_id of current user
also fix TypeError if remote search does not return an array
2023-07-27 12:45:40 +02:00
ralf
322fefa62c Revert "Et2SelectEmail: Pass email to lavatar to get contact picture in email select option"
This reverts commit 5de789f7f7.
2023-07-27 11:08:23 +02:00
nathan
5de789f7f7 Et2SelectEmail: Pass email to lavatar to get contact picture in email select option 2023-07-26 13:39:00 -06:00
nathan
575c8fa976 SearchMixin: Move missing value check after update so select_options gets a chance to populate first
This should speed up the initialization a little, avoiding some unneeded checks
2023-07-26 08:32:00 -06:00
nathan
e0d284d3ae Calendar: Fix group calendar could be missing events under some circumstances
Static account options added to CalendarOwner were blocking the group data needed, fixed by using sent options over account options
2023-07-25 11:15:51 -06:00
ralf
a89b69528e aggregate Etemplate\Widget\Url::ajax_contact() requests and search for all of them in a single AJAX request and SQL query 2023-07-25 18:18:29 +02:00
nathan
2a5d0062dd Api: SearchMixin improvements to work with Et2LinkSearch more efficiently
Moving handling of missing options to overridable method so Et2LinkSearch can use its more efficient method
2023-07-25 09:38:11 -06:00
nathan
edcc260b7b WIP on caching static option file and searching it client-side
Get it working in nextmatch
2023-07-24 15:13:28 -06:00
nathan
f04b25089a WIP on caching static option file and searching it client-side
Avoid type error in CalendarOwner
2023-07-24 08:51:27 -06:00
nathan
f0be2fcdca WIP on caching static option file and searching it client-side
Still needs file caching & passing correct URL
2023-07-21 16:40:29 -06:00
nathan
325fdcb02c Api: User selection = none fixes
- Fix display was 'false' instead of blank
- Fix widget type check was not preserving original value
2023-06-26 10:49:25 -06:00
hadi
3ecb093d35 Implement onlyEmail option for UrlEmailReadonly 2023-06-22 14:37:15 +02:00
hadi
0d60d3baf4 Make sure to show only email when using current value as email (avoids getting duplicate name in fullEmail mode) 2023-06-22 12:34:56 +02:00
ralf
8b22a258c6 fixing the fix, item is a regular (not DOM-)object and not undefined 2023-05-19 09:26:21 +02:00
ralf
71278c8041 fix TypeError: item.querySelector is not a function 2023-05-19 09:20:47 +02:00
nathan
be25869a1d Et2Select: If the value contains something that does not pass validation, show it as an invalid tag so it can be removed. 2023-05-18 10:48:33 -06:00
nathan
ab3a75a7b3 Focus test WIP 2023-05-18 08:08:18 -06:00
nathan
6ecb2d8cf9 Et2Select: Fix missing options filter to handle option groups too 2023-05-16 11:02:20 -06:00
nathan
d5d217c589 Some "invalid option" fixes:
- Don't notify user, just log it to the console
- Fix calendar owner filtered out not loaded options
2023-05-11 10:56:42 -06:00
nathan
91b94a5126 Et2Select: Use same z-index for search box as dropdown 2023-05-10 13:43:46 -06:00
nathan
01ab3ab85a Et2Select: Fix selection of first option when no value provided, broken by 134cd9d249 2023-05-10 09:19:43 -06:00
nathan
820bd35689 Fix filtered out invalid values were still left in value 2023-05-09 14:28:02 -06:00
nathan
3e1b1e56dc Fix focussed select does not close when it loses focus
Mail reply moves focus from To: to body, and To dropdown stayed open
2023-05-09 14:04:02 -06:00
nathan
134cd9d249 Fix invalid option check did not work for multiple 2023-05-09 08:57:55 -06:00
nathan
4ce6bb3f3d Et2Select: Remove values that use options that aren't there to avoid the validation error 2023-05-05 11:08:47 -06:00
nathan
05e262d5ee Some tests for Et2EmailTag 2023-05-01 15:27:17 -06:00
nathan
2fc44da034 Api: Fix clicking Select dropdown button while open did not close dropdown 2023-05-01 08:55:25 -06:00
nathan
8e9071acc8 Calendar: More sidebox owner fixes
- another instance of remote class causing problems
- remove duplicates to avoid warning message
2023-04-28 11:27:26 -06:00
nathan
86dac02826 Calendar: Fix second selected owner in sidemenu went missing 2023-04-27 14:02:41 -06:00
nathan
7d86d69b49 Add statustext to list of detached attributes 2023-04-25 13:53:16 -06:00
hadi
998039b464 Do not translate category names 2023-04-25 12:02:35 +02:00
nathan
5c1c31e2a5 Fix typo in 5a824ef 2023-04-19 10:25:49 -06:00
nathan
9e8bc6e1ee Let change event bubble so it can be caught by parents 2023-04-19 10:03:54 -06:00
nathan
5a824ef25b Et2Select: Fix doubled tags, long tags missing ellipsis 2023-04-18 10:36:34 -06:00
nathan
6db4bdbac0 Preferences: Add a preference option for if select multiple dropdowns stay open, excluding email selection
Also, German translations from Birgit
2023-04-18 08:52:06 -06:00
nathan
358cc70d66 Preferences: Add a preference for if select multiple dropdowns stay open or closes immediately after selection 2023-04-17 09:28:27 -06:00
ralf
b3ea3c89cf implement onlyEmail attribute for et2-select-mail to only display email address, even if we have a full rfc822 address and use it for aliases and forwards in admin mail 2023-04-11 18:19:17 +02:00
ralf
649645ab0f * Mail: allow placeholders in compose instead of email-addresses to be able to create mail templates 2023-04-11 15:01:40 +02:00
nathan
aa89bf82af Et2Select: Re-color dropdown icon in darkmode 2023-04-05 11:30:36 -06:00
nathan
55116c7b49 Et2Select: Fix select closes immediately after opening
If you click to open then click again to close, select wouldn't stay open after that.
2023-04-04 10:12:48 -06:00
nathan
98ae5aac1c Et2Select: It was impossible to have "," in an option value, as it would get split by set_value()
see a9d2a3972c
2023-04-03 14:55:04 -06:00
nathan
1702269b65 Api: Fix readonly category select did not load application categories
Categories were loaded before attributes & application was not used
2023-04-03 10:21:46 -06:00
nathan
a9d2a3972c Et2Select: It was impossible to have "," as an option value, as it would get split by fix_bad_value() 2023-04-03 08:52:31 -06:00
hadi
c4809386e1 Set a max height for select tags 2023-03-31 14:07:30 +02:00
nathan
deefd1e0ea Et2SelectDayOfWeek: Fix missing all days, weekday, weekend options 2023-03-30 08:33:07 -06:00
nathan
b67abdafd1 Fix up recur days 2023-03-28 13:48:26 -06:00
nathan
e0e074a4b1 Et2SelectEmail: Fix keyboard navigation in search results 2023-03-27 08:51:20 -06:00
nathan
af66c63714 Keep select tag icons their original color 2023-03-24 11:45:55 -06:00
nathan
8de9ffc240 Et2Select: Fix keyboard navigation in search results & sidebox category closes 2023-03-23 17:21:32 -06:00
nathan
5614870a29 Et2Select: Always close the dropdown after an option is selected, even if multiple=true. Now for keypresses too.
see 62402f39ae
2023-03-23 16:02:09 -06:00
nathan
62402f39ae Et2Select: Always close the dropdown after an option is selected, even if multiple=true 2023-03-23 15:23:32 -06:00
ralf
43dfaa6bc2 fixes for transpiling: import instantiated StaticOptions object, not the type
has also the benefit of using a single instance
2023-03-13 19:38:36 +01:00
Hadi Nategh
2dc78de2c1 Support deprecated get values method for ET2Select_ro 2023-02-27 09:56:39 +01:00
nathan
41cbb68de0 Et2Select: Fix extra scrollbar with rows=1, multiple, hover lots (> 8 or so) of rows 2023-02-22 16:23:56 -07:00
nathan
f7d44c63cb Enable disabled select options 2023-02-22 09:51:57 -07:00
nathan
33ca8a47a9 Et2Select: Tweak size calculations for rows setting to work better for all font size preferences 2023-02-16 11:59:34 -07:00
nathan
524a9b3c7b Change how readonly multiple selects with rows=1 show more tags are hidden
Showing total number of values is way easier than showing the number that aren't displayed
2023-02-15 13:23:05 -07:00
nathan
03a237fd7e Et2Select: Turn off browser autocomplete in search 2023-02-13 14:57:55 -07:00
nathan
d02a40ee82 Et2Select: Remove any doubled values when setting value 2023-02-13 14:00:52 -07:00
nathan
c4f3ec9840 Et2Select: Fix free entries can get doubled if more free entries added 2023-02-10 14:13:13 -07:00
nathan
96558b9da8 Fix missing translation in Select group & dropdown options 2023-02-09 14:47:43 -07:00
nathan
00a857b2d7 Projectmanager: Fix gantt column selection opens with wrong position
Now using a proper dialog, similar to nextmatch column selection
2023-02-08 11:48:56 -07:00
nathan
efa550f251 Et2Select: Add onTagClick property for actions on tag clicks
Fixes unable to detect clicking on individual tags inside readonly et2-select-email
2023-02-08 09:11:33 -07:00
ralf
ed09a0b079 add missing readonly et2-select-lang to fix language column in news-admin index 2023-02-08 08:24:59 +01:00
nathan
193dbfc339 Et2Select: Fix some search weirdness
- Search didn't start until 1 character more than expected
- Search didn't happen on enter because the et2-searchbox inside stopped the key event from bubbling
2023-02-07 16:24:06 -07:00
nathan
9cde6a7171 Fix some styling on select-email
- Make +N tag right aligned & look like text, not tag
- Fix popup to open below but covering field
- give popup border & dropshadow
2023-02-07 12:04:05 -07:00
nathan
2a3a8a7371 Et2Select: Fix tags can't be removed 2023-02-07 10:04:56 -07:00
Hadi Nategh
cb6f2ee808 Add missing column on email tag tooltip 2023-02-07 10:01:46 +01:00
nathan
1b7f9d3ebc Et2SelectEmail: Give dragged tags some z-index, so they go over the other controls 2023-02-06 15:07:30 -07:00
nathan
cd980c78df Limit mail to & cc addresses to 1 row, show all on hover.
Use:
multiple="true" rows="1" maxTagsVisible="1"
to trigger show all on hover
2023-02-06 14:48:55 -07:00
ralf
bd8198d230 missing et2-select-lang widget 2023-02-06 15:52:58 +01:00
Hadi Nategh
dda3b1f5d1 Remove excessive BR tag from email tag 2023-02-06 11:33:50 +01:00
nathan
1d8d4f9c72 Fix some readonly issues where widgets were not looking readonly
- Editable tags were still editable if the select was readonly
- LinkTo could still select an app (readonly not passed on)
- Hide the dropdown for multi-select when readonly
2023-02-03 14:09:07 -07:00
Hadi Nategh
138999f233 Add again full value as tooltip for email tags 2023-02-02 12:12:08 +01:00
nathan
ab56ad1171 Et2Select: Handle paste of CSV into selects with allowFreeEntries
Special handling for Et2SelectEmail to handle email addresses that may have a name or comma
2023-01-31 09:48:27 -07:00
nathan
e575c40ff3 Some missed cases where client-side lavatar was not used 2023-01-30 15:26:09 -07:00
nathan
f503743956 Use client-side Et2LAvatar instead of image for Et2SelectEmail options & tags
Should now be only avatar.php image when provided
2023-01-27 13:27:31 -07:00
nathan
5bab72b8be Use client-side Et2LAvatar for user accounts whenever possible, only using avatar.php when there's a real image.
TODO:
- Need to find a cheap way to determine if there's a real image in Api/src/Accounts.php & class.mail_compose.inc.php

- Still some work for me to do in Et2SelectEmail
2023-01-27 10:34:40 -07:00
nathan
9cebab3c2f Fix readonly selects could display 'undefined' with no value and no emptyLabel 2023-01-26 12:58:37 -07:00
nathan
62bc77a4d2 Make sure egw.lang() doesn't error trying to translate option label
This un-reverts 4e5f68f97c
2023-01-25 14:24:08 -07:00
nathan
4b8b454566 Make sure values are strings, otherwise they might not match comparison
Should fix tracker list "Created by" filter losing display when you select a search result
2023-01-25 13:43:35 -07:00
ralf
6ef78c9591 Revert "Fix missing translation on read-only select"
Causes:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at Object.lang (egw_lang.js:73:16)
    at Et2SelectAccountReadonly._readonlyRender (Et2SelectReadonly.ts:189:59)
    at Et2SelectAccountReadonly.render (Et2SelectReadonly.ts:168:16)
    at Et2SelectAccountReadonly.update (lit-element.js:6:304)
    at Et2SelectAccountReadonly.performUpdate (reactive-element.js:6:4849)
    at Et2SelectAccountReadonly.scheduleUpdate (reactive-element.js:6:4496)
    at Et2SelectAccountReadonly._$Ej (reactive-element.js:6:4404)

This reverts commit 4e5f68f97c.
2023-01-25 09:46:22 +01:00
nathan
4e5f68f97c Fix missing translation on read-only select 2023-01-24 14:44:28 -07:00
nathan
9bf0149645 Fix selectbox positioning issue
Tracker owner would open down instead of up with fontsize = 14.  Updating to shoelace 2.0.0-beta.81 fixes it.  Going farther introduces some other issues that I don't want to get into right now
2023-01-24 13:58:38 -07:00
nathan
2332c2a806 Et2Tag: Make edit textbox larger 2023-01-24 08:27:52 -07:00
nathan
7518278948 Add edit button to freeEntry selectbox tags 2023-01-23 17:34:37 -07:00
nathan
86917eff65 Fix file settings error "'0' is NOT allowed ('not found')!" for gid.
It did not have a '0' => 'root' option, which is what we were using for the value.
2023-01-19 09:21:03 -07:00
nathan
80fbd3cc26 Fix placeholder widget
IDs on et2-boxes caused unwanted namespace, Et2Listbox couldn't find its ID before fully initializing
2023-01-19 08:44:52 -07:00
nathan
4f7b54c6bb Fix some more select attribute / legacy options issues 2023-01-11 15:49:56 -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
7d94692dfd Fix some missing account names
- egw().accounts() were not cleaned
- accounts not in normal cache did not call requestUpdate() properly
2022-12-19 12:01:29 -07:00
nathan
ac97af35cb Lets try creating options directly when we get them, rather than going through update first
Timing was not getting menu items created soon enough, resulting in IDs instead of names in the options
2022-12-16 11:48:12 -07:00
nathan
a9fe524123 Et2Select: Fix value got wrecked by fix_bad_value() when there are option groups 2022-12-15 11:31:56 -07:00
nathan
e756962f86 Change egw.accounts() to always return a Promise 2022-12-15 10:22:19 -07:00
nathan
3b5f64a4c3 Implement option groups 2022-12-14 14:32:20 -07:00
nathan
5acc8c55c8 Et2SelectEmail: Fix fullEmail did not show full email 2022-12-12 14:07:08 -07:00
nathan
34172704dc Fix SelectAccount didn't always get values into options correctly 2022-12-12 13:10:53 -07:00
nathan
0f37d2f437 Fix sometimes missing accounts for SelectAccount widgets 2022-12-09 13:16:44 -07:00
nathan
6177ca0536 SearchMixin: Filter selected remote correctly for single selects too 2022-12-09 13:14:57 -07:00
nathan
8ed40c8c0e Et2SelectThumbnail: Fix current value(s) did not display 2022-12-09 09:03:43 -07:00
nathan
4b4d6fe184 Stop scrolling new tag into view, it causes calendar sidemenu to get stuck 2022-12-08 14:47:02 -07:00
nathan
ce64ddf9e0 Fix doubled tags if widget gets select_options after a remote option is selected 2022-12-08 14:28:05 -07:00