6532 Commits

Author SHA1 Message Date
Ben Thomson
e304c28292 Import CSS within widgets, make IconPicker assets consistent 2023-01-24 20:49:04 +08:00
Ben Thomson
bcb7817e03 Fix issue where icon picker widget buttons don't appear within fancy layout 2023-01-24 20:31:39 +08:00
Ben Thomson
45e2acc795 Rewrite color picker widget as a Snowboard widget 2023-01-24 14:21:21 +08:00
Ben Thomson
64e1e31fb8 Add mutation observer to automatically destroy widgets
This will track nodes being removed from the DOM, and if any widgets are active in these nodes, they will automatically be destructed. This will be more reliable than just tracking AJAX updates, as it should also apply to elements/widgets being removed by JS, such as widgets within modals.
2023-01-24 11:47:18 +08:00
Ben Thomson
2dff8adf25 Significantly refactor backend widget loading
- Move most shared vendor files used in Backend widgets and UI to separate vendor file
- Remove Vue embedding in Icon Picker (now uses shared vendor instance of Vue)
- Add Widget and Event handlers
- Upgraded Babel Loader to version 5 to fix potential security issue with JSON5 library (not that we used it)
2023-01-24 11:03:37 +08:00
Ben Thomson
68b9a55abd
Fix tests badge 2023-01-18 14:41:43 +08:00
Luke Towers
18e3893f7f
Update README.md 2022-12-23 12:35:57 -06:00
Teranode
fc541b56c8
Fix TagList nullable type hint. (#806)
This is causing an error when using relation mode and you have an empty relation and try to save. The method expects an array, but in some cases can be null.
2022-12-17 15:55:32 +08:00
Damien MATHIEU
864d3fbdcf
Allow removeField() on contextual field names (#790)
The addFields() method already filters out fields that don't match the current context. As such, the normalized field name should be used when adding the field to the tab containers instead of the name with the context included. This matches the definition in allFields.
2022-12-13 08:09:46 -06:00
Ben Thomson
f61da3e800 Remove workshop from repo 2022-12-13 19:58:32 +08:00
Ben Thomson
c563f20f87 Allow sorting of lists by invisible columns
A previous bug fix applied here (18af35d928) forced only visible columns to be sortable to prevent an error from occurring if someone sorts by a column that is then removed from the columns list.

This change results in the same fix, but simply checks that the column is sortable (which would be false if the column no longer exists). This would  allow columns that are invisible but are also sortable to still be used for sorting purposes.

Fixes #796, #709
Refs:
- https://github.com/octobercms/october/issues/5227
2022-12-12 15:07:41 +08:00
Robert Alexa
d0d066f6c2
Fix issue with autoloading modules (#792) 2022-12-08 14:41:10 -06:00
Robert Alexa
34d13ca0d8
Add support for icon picker (#725)
This took inspiration from https://github.com/hasinhayder/vue3-icon-picker but was modified greatly in the end. Credit to @robertalexa
2022-12-07 23:10:31 -06:00
Luke Towers
0aed0b4b02
Classloader improvements (#779)
See wintercms/storm#72
2022-11-29 21:06:46 -06:00
Ben Thomson
596f8cc98d Update Markdown content test
The CommonMark implementation of Markdown specifies that a newline should follow block-level elements
2022-11-30 10:39:19 +08:00
WebVPF
07bec10876
Improved Ukrainian translation (#766) 2022-11-29 14:26:59 -06:00
Ben Thomson
1ee713afae
Add AJAX form validation to Snowboard (#777)
Refs:
- https://wintercms.com/docs/snowboard/extras#ajax-validation
- Workshop Theme examples: 431e761c05
2022-11-28 09:37:00 +08:00
Matteo Trubini
9b2282b280
Improve theme scaffolding (#778)
If gtag() is undefined an error is raised.
2022-11-27 18:59:32 -06:00
Luke Towers
6a99274461 Fix broken return type 2022-11-23 11:30:17 -06:00
Luke Towers
554dd0e726 Fix AuthManager tests 2022-11-23 11:12:00 -06:00
Luke Towers
7296aab7b2
Merge pull request #771 from wintercms/wip/improve-multidbconnection-support
Improve multidbconnection support
2022-11-23 10:27:57 -06:00
WebVPF
f44f79a5b7
Improved Russian translation (#767) 2022-11-22 10:42:54 -06:00
Robert Alexa
618350a757
Remove empty widget width option (#772) 2022-11-22 10:41:18 -06:00
Luke Towers
1d8af5964c Fix overlooked reference to App facade instead of local instance 2022-11-21 15:44:45 -06:00
Luke Towers
f2447bb136 Use local app instance rather than facade 2022-11-21 15:40:39 -06:00
Luke Towers
5be4454c44 Don't register backend permissions in the testing suite 2022-11-21 15:34:18 -06:00
Luke Towers
981bb1c343 Type hinting and style tweaks 2022-11-21 15:20:03 -06:00
Luke Towers
94f6c9caa7 Use the model instance returned by getRelationModel directly rather than as a static class reference 2022-11-21 15:19:37 -06:00
Luke Towers
f45882de5f Clone the form model before passing it to the RelationController
This prevents issues caused by extensions to the RelationController making changes to the relation's parent model for use cases needed in relations. These changes were previously also affecting the model instance used by the FormController behaviour.

If it is desired to interact with the exactly model instance as used by the FormController behaviour inside of your extensions to the RelationController you can use $controller->formGetModel() instead.
2022-11-21 15:18:29 -06:00
Luke Towers
46bf2dcc56 Ensure backend permissions are always registered
Backend user permissions are occasionally checked in the frontend, see the Post component of the Winter.Blog plugin.
2022-11-17 15:18:15 -06:00
Luke Towers
605c2eaa7f Use the Storm File model's getLocalRootPath() implementation
This override is no longer required as of c62ee79d7d
2022-11-16 02:55:17 -06:00
Ben Thomson
f0a442b4f1
Prevent fancy layout styling from spilling over into nested forms (#763)
Fixes #758.

The edits made to the fancylayout.less should more directly target just the root elements of the UI, and not spill over into nested forms.

Test case in the Test plugin: wintercms/wn-test-plugin@eaebfae
Accessible in the Pages section.
2022-11-15 10:39:06 -06:00
Ben Thomson
692d856ece Allow Snowboard event listeners to be closures 2022-11-15 17:00:46 +08:00
Marc Jauvin
baea29b142
CMS Twig extension contentFunction() should return bool like partialFunction() (#746)
This allows people to use the `content` function as a conditional to add fallback content if a given content file does not exist.
2022-11-14 13:47:56 +08:00
Marc Jauvin
9a13e6a53a
prevent previous relations from being unlinked (#765) 2022-11-11 14:44:26 -06:00
Ben Thomson
48e26fedad Allow cms.restrictBaseDir to be controlled via env variable 2022-11-11 09:42:57 +08:00
Robert Alexa
aa78d658a6
Pass element's maxlength to slugify and toCamel to respect field definition (#762) 2022-11-09 11:26:35 -06:00
Ben Thomson
8f2d2c7f53 Allow Snowboard debugging to be controlled independently
Adds the "develop.debugSnowboard" config option to enable to disable Snowboard debugging, overriding the default behaviour in following the app debug mode.
2022-11-09 09:59:07 +08:00
Jack Wilkinson
cdd9c6a433
Show required indicators on checkbox fields (#754) 2022-11-06 10:54:07 +08:00
Ben Thomson
d5923bddfd
Allow component assets to be mirrored by "winter:mirror" command 2022-11-04 15:15:41 +08:00
Jack Wilkinson
5617dbd338
Added fix to prevent path duplication (#745) 2022-10-28 09:02:34 -06:00
QuangTrọngOnline
7f1109fdce
Fix return type for onLoadMovePopup (#744) 2022-10-26 13:34:16 -06:00
Luke Towers
41cfc8df8f
Fix base path for FrameworkNode 2022-10-26 10:57:57 -06:00
Luke Towers
435179061f
Add missing import 2022-10-26 10:45:37 -06:00
Jack Wilkinson
6b07509e7c
Switch from using Request::getBasePath() to Url::asset() (#742) 2022-10-26 10:28:48 -06:00
Luke Towers
e9739361bb
Set pivot data when initially syncing the relationship (#739)
Also performs the sync with model instances rather than just raw IDs to support relationships with a custom relatedKey set (the key on the related model's table that is stored on the pivot table to connect the relationship, normally just the primary key but can be anything).
2022-10-26 01:24:52 -06:00
Luke Towers
dd479281cd
Added CLI signature to mix:list command 2022-10-26 01:00:38 -06:00
Ben Thomson
98c78bdbf1 Fix Navigation Manager unit test
The Singleton changes introduced to Storm (ca5959495b) that bind singletons to the app means that in unit tests, we will need to re-initialise any scope we need for tests, as the app is cleared upon each test case being run.
2022-10-25 17:33:14 +08:00
Eric Pfeiffer
dc70c90d3b
Update jobs tables to support Laravel 9 (#730)
Updates `failed_jobs` table to add missing `uuid` column. This also updates the `payload` and `exception` columns to be inline with the default Laravel migration.
2022-10-19 23:01:16 -06:00
Luke Towers
a52b466e8e
Add migrate to list of protected commands (#733)
Prevents issues with unelevated plugins that expect the database to exist always.
2022-10-19 18:10:49 -06:00