109 Commits

Author SHA1 Message Date
Luke Towers
ac2e5937f0 Document list widget column value events
Documents `backend.list.overrideColumnValue` and adds and documents `backend.list.overrideColumnValueRaw`. See https://github.com/octobercms/october/issues/3180 for why this is necessary.
2017-10-18 10:57:17 -06:00
datune
4a0a488ff6 Account for NestedTree Trait setting (#3143)
* Account for NestedTree Trait setting

See https://github.com/rainlab/blog-plugin/issues/338. The Lists Widget did not account for the NestedTree setting.

* Update Lists.php
2017-10-04 14:04:12 -06:00
Luke Towers
9565565865 Add ignoreTimezone option to datepicker field and column types.
Adds the ability to specify an `ignoreTimezone: true` option on the config for a datepicker form widget or date column type. This will ignore both October's and the backend user's timezone settings to display the date exactly as it is stored.
2017-09-10 22:39:15 -06:00
Samuel Georges
8a1b060a29 Tidy up from #3084 2017-09-06 09:00:53 +10:00
Jofry S
2c97c55ea8 Allow simple pagination option on ListControllers 2017-09-05 13:33:51 +10:00
Samuel Georges
7e76f39e6c Add app.name config
Various other refittings
2017-05-16 18:50:41 +10:00
Quezler
cc17b679f1 Code dusting (#2826)
Code cleaning according to PSR-2 w/ exemptions (mostly dust).
2017-04-24 21:38:19 +10:00
Samuel Georges
b841f9e066 {@inheritDoc} -> @inheritDoc 2017-03-16 06:26:14 +11:00
Samuel Georges
d9a2b88852 Pass records by reference to overcome halting event issue
Refs https://github.com/octobercms/october/pull/1853
2017-02-15 05:58:44 +11:00
Luke Towers
9f3c2b8bf6 Switched backend.list.extendRecords event triggering
Made the event triggering for the new backend.list.extendRecords event triggering more consistent with the rest of the class.
2017-02-14 02:20:23 -06:00
Luke Towers
fd3fbf5e52 Merge pull request #1853 from leocavalcante/feature-list-extend-records
Make available to extends Lists records
2017-02-14 02:17:16 -06:00
Samuel Georges
c644f8b66d Fixes issue where nested columns forcibly hide
Eg: "myrelation[attribute]" as a column name would cause the list setup to hide these fields with no ability to bring them back
2016-12-14 19:14:41 +11:00
Samuel Georges
0a2b343047 Simplify system events
This pipes all event calls through a new EventEmitter trait, which substitutes the October Rain event emitter trait. The view event has been moved to this trait also.
Pass some variables by reference to allow multi-extension.
Fixes #2420
2016-12-10 09:02:06 +11:00
Samuel Georges
b39ebec812 Pass columns to search scope
This allows the default search to be applied and combined with any custom constraints
2016-11-29 06:46:52 +11:00
Samuel Georges
46c473e2f2 Fixes fetching multi tiered pivot relation values
Refs https://github.com/daftspunk/oc-crm-plugin/issues/3
Minor code clean on select.js
2016-11-08 07:02:31 +11:00
Samuel Georges
57b10704ce Support for overriding list views
For consistency, entry partial for controller behaviors should be called "container"
Added addViewPath() method to ViewMaker
Remove "fa" from icon docs (not necessary)
Fixes #2439
2016-10-29 14:10:21 +11:00
Samuel Georges
ee2dd78b3d Exception handling for type: relation
It would appear many plugins incorrectly use type: relation as a list column, when this does nothing. Previously it would fallback to the text type, now that invalid types fail hard, this adds a softer landing by spamming the trace log instead.
Refs #2438
2016-10-22 04:18:28 +11:00
Samuel Georges
91e7e8b950 List column number type was falling back to text
Since custom list column types an exception is thrown for unknowns. This makes number known.
Fixes #2438
2016-10-22 03:10:50 +11:00
Samuel Georges
f9dd5b2f57 Plugins can now define custom list column types 2016-10-21 07:15:08 +11:00
Samuel Georges
19c3c19a00 Added extended useList options, including raw output 2016-10-06 18:44:26 +11:00
Samuel Georges
fe74fcb8e0 Comma concat all single dimension arrays, for text columns
This is useful when the attribute is a basic jsonable store and needs to be in a suitable format for "useList" export mode
2016-09-28 16:31:21 +10:00
CSNWEB
34bd318427 Fix searching in non text fields under Postgres
Fixes #2092
2016-07-23 12:24:41 +10:00
Samuel Georges
1a3bf59301 Fixes not updating list record count immediately 2016-06-10 07:43:21 +10:00
Samuel Georges
3bad70f041 Relation controller now applies the defined constraints by default
Relation controller now supports scope and conditions for the manage mode (list)
Logic has been modified across recordfinder and filter that only allows one constraint in this order (1. conditions, 2. scope, 3. defined constraints (where applicable))
Fixes #1203
2016-05-17 05:17:40 +10:00
Samuel Georges
d3efc1af4c Make the datepicker preview mode show pretty dates
Improve styles of preview form controls
2016-04-26 06:59:02 +10:00
Samuel Georges
02165a8a4a Introduce a new localized date control
Added a helped Backend::DateTime() for rendering the appropriate HTML output as a <time /> tag
The meta now specifies the locale and timezone preference used here
Lists now take advantage of this to display dates relative to the timezone and language (awesome sauce)
@todo Still need to get apply this logic to the datepicker form widget
2016-04-23 13:17:04 +10:00
Samuel Georges
788ffbb417 Minor fix to custom list search scope 2016-04-20 05:29:24 +10:00
Samuel Georges
bff35e5f1a Lists can now define search scope or mode (see docs) 2016-04-19 19:54:22 +10:00
leocavalcante
f5f7ed08e4 Make available to extends Lists records 2016-03-18 21:05:23 -03:00
Samuel Georges
98eb4f8239 Add support for "relation" with Tree models
- This makes the list slightly more efficient for small collections, less efficient for larger collections. If this becomes a problem in future we may need to look at a solution that grabs all the root nodes to start, then lazy loads any expanded nodes as secondary AJAX requests.
- Write tests for the Tree trait improvements
Fixes #1647
2016-02-27 11:29:07 +11:00
Samuel Georges
d34350a7b1 Merge branch 'develop' into stable 2016-01-16 10:20:21 +11:00
Samuel Georges
d2561dcfd0 Merge pull request #1689 from CSNWEB/patch-2
Use Grammar from Query in Widget List
2016-01-16 09:02:29 +11:00
Samuel Georges
d8922c263f Remove global scopes for join SQL
Fixes PostgreSQL strictness
Refs https://github.com/rainlab/blog-plugin/issues/171
2016-01-12 20:53:53 +11:00
CSNWEB
aa5f37aae6 Use Grammar from Query in Widget List
When using models with a different database software than the default, the old code produced a syntax error. 
Using the Grammar from the query ensures that the alias is always wrapped correctly. 

Suggestion: The code should be scanned for similar errors, produced by using DB Facade.
2016-01-10 14:10:49 +01:00
Samuel Georges
0762e5cf53 Remove dependency on illuminate\html 2016-01-02 14:59:59 +11:00
Samuel Georges
5c12d99cc9 Minor revision to #1469 2015-10-17 08:41:10 +11:00
Karl Thibault
d9e85380af Add localization for the backend Switch widget 2015-09-26 22:03:05 -04:00
Jakub Zych
0e3e19a685 string replaced with translation key
backend::lang.list.no_records exists in all language files
2015-09-23 15:14:10 +02:00
Samuel Georges
6b916cb554 Adds a timetense list column, inspired by FB
Also added |time_since and |time_tense Twig filters
2015-09-17 05:15:12 +10:00
Samuel Georges
ddf8ff09ff Fixes #1416 to include empty strings 2015-09-03 07:15:52 +10:00
Vojta Svoboda
beb253a5c0 Fix evaluate zero value as null 2015-09-02 22:43:33 +02:00
Samuel Georges
2619de0ae7 Fixes bug in valueFrom when relation is null 2015-09-02 17:28:22 +10:00
Samuel Georges
f4890eec0c Add better support for pivot relations in lists 2015-08-05 19:53:05 +10:00
Samuel Georges
23dc27e679 Ensure the models primary key is always available in the URL values
Fixes https://github.com/rainlab/forum-plugin/issues/74
2015-08-05 07:48:18 +10:00
Samuel Georges
b010732796 These methods should be protected, update client lang 2015-08-04 10:01:17 +10:00
Samuel Georges
e3ba89ba74 List columns don't support morphTo (yet) 2015-07-18 08:47:02 +10:00
Samuel Georges
ac9df4c076 Lists support appended attributes in url links 2015-07-14 07:42:45 +10:00
Samuel Georges
c9a9c6ea16 List columns now support specifying a default option used when the value would otherwise be null. 2015-06-27 10:39:07 +10:00
krisawzm
da0a7cbd86 Fixes #1129 2015-05-12 19:12:29 +02:00
Samuel Georges
dd8bf186a6 Minor 2015-05-02 10:50:19 +10:00