Commit Graph

672 Commits

Author SHA1 Message Date
Kerim d6e4c9171b from mac 2022-12-14 20:55:13 +05:00
merdan 9489f49958 home page start 2021-03-11 15:16:57 +05:00
Luke Towers b407f26e02 Add support for \Path\To\Class::staticMethodName for defining field options.
Related: 95d0b61a29
2020-09-10 12:12:46 -06:00
Luke Towers 91e4e96929 Allow the Filter widget container to be targeted by the AJAX framework 2020-09-04 14:29:06 -06:00
Luke Towers acd0616aaa Fix typo, credit to @alxy for identifying 2020-08-30 02:08:06 -06:00
Luke Towers 779a87999c Added support for new "image" column type that uses the ImageResizer class 2020-08-21 17:54:31 -06:00
Luke Towers 18af35d928 Prevent error from occurring when the active sorting column is hidden from the results.
Fixes #5227
2020-07-30 10:54:09 -06:00
Luke Towers c1fd1b9346 Fix support for ignoreTimezone in date filter types
Fixes #5197
2020-07-19 01:01:09 -06:00
Klaas Poortinga 517c588ef7
Fix filter type "group" when 500+ options are available (#5141)
When 500 options or more are presented in a group filter, PHP `max_input_vars` limits may prevent the filter from working. This fix passes selected options through as a JSON string to get around the limits.
2020-07-17 17:12:41 +08:00
Luke Towers b2d88d6da9 Fix issue when refreshing an entire form that occurs because the toggleEmptyTabs timer runs after the elements it was based on have all been replaced. 2020-06-24 11:33:44 -06:00
Luke Towers 0cdda52eb8 Fix bug where a field with `@context` in the name would completely break forms if it also depended on other fields.
The bug occurred because if specific fields aren't detected in onRefresh(), the entire Form widget HTML will be returned as the result instead of specific fields. This created a problem because the october.form.js JS is not setup to gracefully handle having the entire root form DOM node completely replaced in the middle of a request being completed. Specifically, this would cause problems when trying to detect empty tabs, and then the problems would cascade from there as there would be an instance of october.form.js attached to the page with broken references to no-longer existing DOM nodes.

This fix solves the immediate issue of `field@context` using the `dependsOn` feature breaking by ensuring that the actual final field name for a given field is used instead of the name used in the configuration of the field. Future work should probably be done to better support an entire form being re-rendered if no fields are detected in onRefresh however.
2020-06-17 03:05:40 -06:00
Luke Towers 02af8bb254 Improve error handling when uploading a file that exceeds the server's post_max_size 2020-06-05 15:56:15 -06:00
Luke Towers 314b15dd13 Support decompiling mediamanager assets 2020-06-05 15:52:59 -06:00
Marco Grüter b417a4938f
Render the css classes on the filter widget (#5067) 2020-05-26 15:25:06 -06:00
Tobias Kündig dc72cafcd1
Don't persist failed search terms (#5039)
If a column is defined as searchable, that is not actually searchable (like a partial) and a user filters a list using the searchbox, an Exception is thrown.

Unfortunately, this errorenous search term has already been persisted to the session so on subsequent page loads, the user is presented with an Exception with no way to resolve it themselves.

This PR catches any exception that happens during the search and resets any persisted search terms so that the user can continue working after a page load.

The exception itself will still be thrown.

To reproduce the issue this PR solves:

Set a partial column in any list as searchable: true
Submit a search query
Hit F5
2020-04-27 01:55:40 -06:00
4NIK3T baca3c8adf
Allow translations of default column values (#5038)
Currently the default column values cannot be translated. This change will allow us to translate them.
2020-04-12 11:17:45 -06:00
Luke Towers 5d4f3dd90a Support ignoreTimezone on `type: date` filter scopes too 2020-04-04 22:16:32 -06:00
Larry Barker 56e2805f15
Add option to ignore timestamps for date range filters (#4966) 2020-04-04 22:12:32 -06:00
Rike-cz b445b65150
Add support for linkable form tabs (#4754) 2020-04-04 21:56:48 -06:00
Luke Towers 4f7e2995c7
Simplify Media Library upload logic (#5026)
Based heavily off the work done by @alxy in #4314

May require https://github.com/rainlab/pages-plugin/pull/421 if testing with RainLab.Pages.

Replaces #4314, related: #4311, Credit to @alxy for the initial work.
2020-04-04 02:11:28 -06:00
Samuell a9b4a5b2c7
Prevent browser caching of list checkboxes (#4949) 2020-03-31 02:31:16 -06:00
Luke Towers 52cdfda935 Trigger form change events when items are added / removed in a repeater.
Fixes #3595. Replaces #4736. Credit to @SebastiaanKloos for the initial solution.

Also fixes a longstanding issue where dynamically added fields were not considered when refreshing dependant fields.
2020-03-30 18:07:53 -06:00
Klaas Poortinga cbfa309c39
Modify password field to support placeholder attribute (#5003) 2020-03-26 13:38:40 -06:00
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