649 Commits

Author SHA1 Message Date
Ben Thomson
2f500ab034
Auto-detect correct postback handler for datatable widget. (#4967)
This change removes the default postback handler for the datatable
widget (onSave) and instead relies on the closest form's request
handler. While `onSave` was a safe default, it did not take into account
the relation widget using other handlers.

The table widget will use an explicitly specified handler first, then it
will try and use the form's request handler, before using `onSave` as a
fallback, although this should really never occur.

Fixes #4776.
2020-03-05 16:37:16 +08:00
Marc Jauvin
7b6053768d
Fix argument name in event handler examples (#4950) 2020-02-19 23:42:51 -06:00
danielbidala
c27e4d1148
Display '0' in preview mode for type: number fields (#4944) 2020-02-19 23:26:17 -06:00
Ben Thomson
f8634e0757 Immediately load a lazy tab if it is the initial active tab.
Fixes #4879
2020-02-19 10:49:15 +08:00
Luke Towers
136fd53109 Improve error handling on invalid model attributes being used for form fields 2020-02-13 16:48:39 -06:00
Samuell
a68f3abf1c
Fix pagination reset if search input is filled (#4918)
Fixes #4914.
2020-02-12 07:52:09 -08:00
Rike-cz
495b0f085a Ignore user preferences for lists when setup modal is disabled (#4921) 2020-02-10 14:24:09 +08:00
Scott Bedard
60ffd91064 Fix small typo in number range filter widget (#4891)
When a `max` is defined with no `min`, the filter should read "Negative infinity → max". Right now, it reads "Infinity → max", which is not accurate.
2020-01-17 12:11:38 -06:00
Ben Thomson
c046466913 Set Dropzone.js uploaders to have no time limit (#4878)
The upgrade to the latest Dropzone.js brought in a new `timeout` configuration variable, which defaults to 30s. This removes the time limit and restores original functionality.

Fixes #4869
2020-01-14 16:47:25 -06:00
Samuel Georges
cd4f56c64c Broken link report
Refs https://github.com/octobercms/docs/issues/427
2019-12-30 09:55:38 +11:00
Samuel Georges
953061797d Remove hard coded widget name for lazy tabs (#4839)
- The widget alias may not always be form, so pass the handler name
- No need to spam non-lazy tabs with useless data tags
2019-12-22 16:39:45 +11:00
Marc Jauvin
3a49b5fa7a allow loading of lazy tabs for secondary tabs as well (#4839) 2019-12-22 15:24:42 +11:00
Samuel Georges
63729e401b Fixes typo in merge conflict 2019-12-09 20:58:16 +11:00
Tobias Kündig
4704f85096 Added lazy loading for backend form tabs (#4658)
* Added lazy loading for backend form tabs
2019-12-09 20:45:26 +11:00
Samuel Georges
1e449c82b6 Prevents erratic rendering issues
This occurs due to a race condition in the rendering where the scrollbars enable and disable over and over because of a slow height calculation. Giving any height number appears to close the loop by never letting the height resolve to 0

Refs #4632
2019-12-08 10:27:59 +11:00
Tobias Kündig
a4359c91e9 Explicitly pass focused item along as it is already known (#4807)
If the DataTable widget is loaded in a Popup, the .focus() call does not
seem to focus the target element correctly, which leads to the problem,
that the updateCellFromFocusedItem method fails to find the focused
item.
This commit passes the target item along since it is already known.
2019-12-07 11:33:06 +11:00
Luke Towers
5f8a5454ee Narrow the scope of when Lists orderBy conditions are reset.
Credit to @bennothommo & @daftspunk
Replaces: 9f8d8ec9fa. Refs: #4439
2019-12-04 02:36:51 -06:00
empower-josh
4ab464cede Add public methods to access Lists widget's sort direction & column (#4746)
Credit to @empower-josh.
2019-12-04 02:29:24 -06:00
Samuel Georges
aa31667952 Make fake-infinity precise to 4 bytes 2019-12-04 18:30:32 +11:00
Samuel Georges
905e5fbb72 Fix for strict SQL languages (Pgsql)
When the value is null [id >= ''] an error is thrown, not being an integer, while [id >= null] will return nil results, curiously. Here we emulate infinity by using a large-ish number instead of null. In future if this becomes a problem we may need to resort to multiple condition definitions as a more verbose solution, for example:

- For when both are set (conditions: id >= ':min' and id <= ':max')
- For when min is set (conditionsMin: id >= ':min')
- For when max is set (conditionsMax: id >= ':max')
2019-12-02 17:27:43 +11:00
Ben Thomson
9f8d8ec9fa
Force ordering when list widget column is sorted
When ordering is applied externally, ie. by a relation config, the orderBy call in the List widget simply adds an additional field to the ordering clauses, which prevents lists in these scenarios from being re-ordered correctly. This changes the order clause so that the ordering is reset and only the specified column is ordered when the user sorts a column.

Developers can continue to use the `extendQuery` event to do specialised custom ordering if required.

Fixes #4439.
2019-12-02 09:27:25 +08:00
Tobias Kündig
61129b48ec Only put sortOptions to the session if the List query succeeded 2019-11-29 08:26:37 +01:00
Ben Thomson
9b72c2d181
Number range filter improvements (#4789)
- Allow minimum or maximum to be unspecified, meaning you want everything up to maximum, or everything above minimum.
- Allow for zero values to work
- Tweak display of infinite values

Fixes #3982.
2019-11-28 22:23:28 +08:00
Luke Towers
14387b74b4 Minor cleanup from #4764 2019-11-15 15:40:57 -06:00
Luke Towers
19ce51ba4a Implemented client side refresh of dependent options & server side checking of valid filter values before applying them to the query 2019-11-13 13:55:06 -06:00
Luke Towers
17b8ba75af re-add accidentally removed comment 2019-11-12 17:07:10 -06:00
Luke Towers
6f0e4afbbd cleanup 2019-11-12 17:06:23 -06:00
Luke Towers
70107c6376 Initial WIP on implementing dependsOn support for filter scopes.
Still need to resolve an issue where if the slave filter has values set when the master filter updates, thus triggering a change of the available options to the slave, the original values are still set on the slave but not actually visible in the popup as options because they're no longer valid options. To fix this we'll need the ability to get the browser to refresh the slave filter's selected values (count icon basically since it already forces the options popup to refresh) when its masters update; while at the same rechecking the slave's scope values set on the server to ensure that they're all valid and there aren't values left over from the previous request that are no longer valid but are still being applied to the query.
2019-11-12 17:02:25 -06:00
Samuel Georges
49d68f0671 Cookies are no longer serialized
Based on update to library 09e859a13e we no longer serialize cookies, so the decrypter no longer needs to apply a serialization layer
2019-11-02 14:52:00 +11:00
Samuell
348040a4e4 Add permission support for fields, columns and filter scopes (#4520)
Credit to @Samuell1. Fixes #1837.
2019-10-09 16:41:53 -06:00
Luke Towers
e246427463 Provide system.assets.beforeAddAsset event to modify asset attributes
Fixes octobercms/october#4611 (when combined with a PR to https://github.com/heathdutton/cloudflare)
Related: octobercms/october#4092, octobercms/october#3841, octobercms/october#3839
2019-10-09 11:51:06 -06:00
Luke Towers
17f3c6f74b Added 'email' field type 2019-10-06 16:15:29 -06:00
Tobias Kündig
4f34ac5f4a Prevent flash of unstyled tabs on page load (#4666)
Credit to @tobias-kuendig.
2019-10-06 14:42:40 +08:00
Samuel Georges
6daea258b9 Tidy up checkbox list - refs #4599
Also had to revert the 100vw improvement on tabs because it causes unnecessary scroll/drag activation. Also reverted change in form.base.less that had no reasoning.
2019-09-21 12:36:31 +10:00
Samuel Georges
202d1f6b04
Update the checkbox list widget (#4599) 2019-09-21 11:57:53 +10:00
Luke Towers
fafd05f7c0 Cleaning up spacing 2019-09-14 06:27:24 -06:00
Dan Harrin
7b8fecaa51 Replace use of parseJSON with JSON.parse (#4517)
Credit to @DanHarrin
2019-09-14 06:25:18 -06:00
Samuel Georges
2962f75221 Include the JSON parser natively in framework.js
We've also included it as a separate framework.parser.js file in case its needed by some external lib, such as Storm UI
2019-09-14 17:56:18 +10:00
Samuel Georges
ebcb7ee6fd
Add a small JSON Parser to October framework lib (#4527)
* Add a small JSON Parser to October framework lib
2019-09-14 17:29:31 +10:00
pavelmgn
4684312cee Pass path by reference in media.file.upload (#4616)
Credit to @pavelmgn. Refs: https://github.com/octobercms/october/issues/3124#issuecomment-529577947
2019-09-11 22:22:08 -06:00
Samuel Georges
52e2a838eb Fixes typo, recompile assets 2019-09-11 21:42:02 +10:00
Samuel Georges
3291e07191
Update Deprecated code in October into (event.key) (#4489)
Update Deprecated code in October into (event.key)
2019-09-11 21:35:18 +10:00
Ayumi Hamasaki
6942e38615 Remove the IE5 - IE7 Holly Hack support (#4594)
Credit to @ayumihamsaki
2019-09-04 09:32:29 -06:00
Dan Harrin
9521dd795c Minor Formatting Corrections in Usage Comments (#4541)
Credit to @DanHarrin
2019-08-15 09:14:54 -06:00
Dan Harrin
67c9decb20 Standardise use of [] vs array() (#4548)
Credit to @DanHarrin
2019-08-14 20:46:36 -06:00
Ben Thomson
199407f1a0
Revert #4401 for build 458.
Reverts commit 22847e7892a2054da91bd85ec183ba6e7bc52094. Will be redeployed in build 459.
2019-08-09 16:07:32 +08:00
Ben Thomson
610e0c383c
Set validation attributes after context check.
This prevent fields with multiple contexts from overwriting the label name of another context in the validation messages.

Fixes https://github.com/rainlab/user-plugin/issues/371.
2019-07-26 00:27:45 +08:00
Ben Thomson
a59d3b83eb Code quality clean up (#4449)
Credit to @bennothommo
2019-07-18 08:50:37 -06:00
Alexander Guth
7557173df4 Fix text filter scope (#4445)
Credit to @alxy. Fixes https://github.com/octobercms/october/pull/4241#issuecomment-510140574
2019-07-17 15:12:32 -06:00
Ayumi Hamasaki
22847e7892 Improve backend accessibility (#4401)
Credit to @ayumihamsaki. Fixes #4400.

- Added WAI-ARIA to the layout templates files.
- Added Focus-ring polyfill to allow better keyboard navigation and screen reader support.
- Added WAI-ARIA to tabs and created keyboard arrow controls for tabs.
- Added event.key polyfill to allow removal of deprecated event.keyCode, event.charCode and event.which.
- Fixed all the whitespace, tabbing and indent issues with all the lang files.
- Keyboard navigation now allows the following key actions: Tab, Up Arrow, Down Arrow, Left Arrow, Right Arrow, Home and End buttons.
- Added keyboard navigation for tab panels.
2019-07-17 15:07:45 -06:00