Commit Graph

5194 Commits

Author SHA1 Message Date
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 ee4078ac44 Tweak chart markup to not depend on an external class
This fixes the rendering of the example markup. The line chart has no styles but just needs to know the display height
2019-12-04 08:25:44 +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
Ben Thomson 1283121069
Trigger "change" event when time picker is changed
This allows dependent fields (ie. dependsOn) to trigger correctly when a time field, or the time part of a datetime field, is changed.

Fixes #4268
2019-11-30 00:09:49 +08:00
Samuel Georges 411bd92737
Merge pull request #4795 from OFFLINE-GmbH/delay-sort-session
Only put sortOptions to the session if the List query succeeded
2019-11-29 18:59:40 +11:00
Tobias Kündig 61129b48ec Only put sortOptions to the session if the List query succeeded 2019-11-29 08:26:37 +01:00
Luke Towers 7e98e199a4 Revert #4567, fixes #4648.
If including the asset extension is important, this can be done by listening to the `system.assets.beforeAddAsset(&$type, &$path, &$attributes)` event introduced in Build 460.
2019-11-28 10:32:34 -06:00
Ben Thomson e24a5964a1
Drop PHP 7.4 testing for now
Will bring it back with the L6 upgrade.
2019-11-28 22:53:40 +08: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
Samuel Georges 566f138eab Fixes touch events in sortable plugin
Refs #4791
Refs #4777
Refs #3755
2019-11-28 21:03:32 +11:00
Ben Thomson 249051b89c
Include SQLite in automated tests 2019-11-28 12:57:36 +08:00
Ben Thomson a91fa3f5ff
Add a few more PHP extensions into the automated tests 2019-11-28 12:52:31 +08:00
Ben Thomson 0849720494
Delay running post-update Composer scripts in automated tests
Allows us to reset the October codebase to what's in Git *before* running these tasks.
2019-11-28 12:48:56 +08:00
Ben Thomson c70af0ec64
Ensure necessary PHP extensions are installed with unit tests 2019-11-28 09:25:10 +08:00
Ben Thomson e9abdf7783
Parenthesise some double ternary conditions in Asset Combiner.
Improve compatibility with PHP 7.4, where "Unparenthesized `a ? b : c ?: d` is deprecated"

Fixes #4790.
2019-11-28 09:21:03 +08:00
Samuel Georges 18398a8318 Add touch events back to modernizer 2019-11-25 16:59:20 +11:00
Marc Jauvin 992e84e602 Add missing documentation comment blocks for fired events (#4788)
Credit to @mjauvin.
2019-11-24 23:59:00 -06:00
Luke Towers 106756d656 Fixed conflict between JS input trigger plugin & JS filter plugin.
Related: https://github.com/octobercms/october/issues/3202#issuecomment-556042766
2019-11-22 18:39:25 -06:00
Ben Thomson 7e3136564f
Merge branch 'develop' into wip/laravel-5.9 2019-11-21 23:18:25 +08:00
Samuell 5d13788f16 Improved Slovak translation (#4778)
Credit to @Samuell1
2019-11-20 11:09:33 -06:00
Jim Cottrell b5ed0b313a Restore support for Select2 data format in custom select control (#4712)
Credit to @jimcottrell. Refs: #4413
2019-11-19 15:13:08 +08:00
Marek Erben 1b4147212d Improved Czech translations in /modules/system/lang (#4773)
Credit to @maraerben.
2019-11-19 11:49:05 +08:00
Ben Thomson 68c9feb622
Fix copy and paste on alert popups (#4740) 2019-11-16 16:27:37 +08:00
Luke Towers 14387b74b4 Minor cleanup from #4764 2019-11-15 15:40:57 -06:00
Luke Towers 46fe07c2da
Merge pull request #4764 from octobercms/wip/fix-4254
Implemented dependsOn support for filter scopes. Fixes #4254. Documented by https://github.com/octobercms/docs/pull/419.
2019-11-15 15:05:29 -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
Luke Towers 85fadbfef3 Check user permission for the mediafinder formwidget.
Fixes #4216. Replaces #4669. Credit to @gergo85.
2019-11-12 12:32:17 -06:00
Tomasz Strojny 8fb9c59ee1 Removed double checking if file is protected in FileUpload widget (#4753)
Credit to @tomaszstrojny. Cleanup from 4f7c5cc1e7.
2019-11-11 12:34:58 -06:00
Christophe Vuagniaux f0db465f46 Avoid array_intersect error if argv is not defined (#4751)
Credit to @ChVuagniaux. Can be triggered when attempting to run Laravel HTTP tests on OctoberCMS (https://laravel.com/docs/6.x/http-tests)
2019-11-10 10:52:36 -06:00
Luke Towers 615c4cdb04 Change default of cms.backendForceSecure to reflect the config default that's been in place since 2016. 2019-11-07 12:14:32 -06:00
Luke Towers 07ac19f7b3 cleanup from last commit 2019-11-07 12:03:10 -06:00
Luke Towers d56dded458 Restore middleware support in backend controllers.
Reverts f73d8e6d49.  While there are other ways to achieve some of the same end results, this code existed in the code base for 8 months without issues and is included in the official docs. This means that there could be devs that are depending on this behavior. Additionally, while this may make the internal logic to the BackendController class more complex, it simplifies the developer experience by bringing the Backend\Classes\Controller base class more in line with the standard Laravel controller class.
2019-11-07 11:59:00 -06:00
Luke Towers 490b1d6b00 minor formatting fix 2019-11-06 16:56:46 -06:00
Luke Towers c9df45a87d Fixed typo 2019-11-06 16:55:16 -06:00
Ben Thomson e97057246a
Fix empty Richeditor class lists from breaking widget (#4725) 2019-11-06 17:44:46 +08:00
Samuel Georges 8da798a5cd Remove XSRF cookie
This was a contentious change is generally a bad idea to blanket all requests with a dependant cookie. We will try something else.

Revert enableXsrfCookies setting. Fixes UX issue introduced where the token expires. This should be replaced by a CSRF policy that determines whether this is needed on the front end.
2019-11-04 09:06:05 +11:00
Samuel Georges c5bd5f0e0a Apply ResponseMaker to backend AJAX and cms.page.display event 2019-11-03 08:02:28 +11:00
Samuel Georges 1df8e72e4a Remove unused import 2019-11-02 19:42:09 +11:00
Samuel Georges 63f65a3f25 Add XSRF to backend, simplify CMS controller run() method
runInternal has been removed because we do not want to blanket our response logic over every single response, only the happy path. This is because it is impossible to remove. So it is better to take the inverted approach, where if you want the CMS' headers in your custom response, add them yourself. This becomes easy via the new makeResponse() method
2019-11-02 19:14:45 +11:00
Samuel Georges 9d120ad66b Add header and cookie support to ResponseMaker 2019-11-02 18:57:32 +11:00
Samuel Georges ff8f899fbe Move response common functions to ResponseMaker trait 2019-11-02 18:21:22 +11:00
Samuel Georges f269901d72
Merge pull request #4732 from octobercms/remove_double_middleware
Remove double middleware
2019-11-02 18:06:50 +11:00
Samuel Georges c0fffc665d
Merge pull request #4731 from octobercms/no_serialize_cookie
No serialize cookie
2019-11-02 18:06:27 +11:00
Samuel Georges 92bd8360b9 Fixes issue where behaviors are not booting 2019-11-02 16:30:33 +11:00