2183 Commits

Author SHA1 Message Date
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
Meysam
9ab9c87e6a Fix typo 2016-12-10 06:33:21 +03:30
Samuel Georges
b85c4f9b7b Improve list tree styling and minor fix
Fixes bug with non standard primary key on model when using tree mode
Fixes #2532
Recompile assets
2016-12-10 13:19:32 +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
Pásztor Gábor
94ab13cd8b Fix exception message, remove some unneded imports. 2016-12-07 21:33:05 +01:00
Samuel Georges
afa2c83c3c Fixes bug introduced by #2507
The many-to-many relationship types choke pretty hard on this enhancement, so only use it for the simple one-to-many/one-to-one style relations instead.
Fixes #2524
2016-12-04 10:48:22 +11:00
Samuel Georges
fad4d52e79 Merge pull request #2515 from LukeTowers/patch-9
Respect whitespace on disabled codeeditors
2016-12-03 08:13:17 +11:00
Samuel Georges
4fa40d342e Allow export to disable first row as header 2016-12-03 07:36:39 +11:00
Samuel Georges
c31d3a9a96 Merge pull request #2513 from gpasztor87/patch-1
Using flexbox on login and reset page.
2016-11-30 07:17:18 +11:00
Samuel Georges
f771887ee5 When refreshing fields, forceFill is a bit too flaky
- Using a proxy field would populate a relation with an array of attributes, this is not good or consistent. Instead the FormModelSaver trait is used to bring the behavior in line with FormController and others. This should improve consistency in the behavior and developer expectations.

- The noticeable difference will be that relations and their values are now set by the postback data where possible. In cases where this is undesirable -- eg: updating a relation triggers proxy fields to update with existing values, when they should seed from the relation instead (desire to lose prior changes) -- the formExtendRefreshData controller override can be used to prune the existing values from the dataset, where they will then be seeded from the model as normal.

- Also the $data property is only rebuilt if it differs from the model. Previously it would corrupt the model-based dataset by converting to an array then back to an object. If the two objects are the same, they will be passed by reference and values will replicate this way.
2016-11-30 07:08:12 +11:00
Samuel Georges
85ca7715f2 Add Backend::date shorthand helper 2016-11-30 06:59:50 +11:00
Luke Towers
33c2d1c3bb Respect whitespace on disabled codeeditors
This wraps the contents of a disabled codeeditor field in an `pre` element so that the browser renders it respecting the formatting / whitespace of the contents (code in this widgets case) instead of squishing it all down.
2016-11-28 15:35:00 -06: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
f1d746abab Merge pull request #2507 from oliverpool/patch-1
Use the otherKey to update a relation
2016-11-28 08:45:40 +11:00
Samuel Georges
29040b416c Allow redirect: false on importExportController
Implement getFieldName() method
2016-11-28 07:50:06 +11:00
Pásztor Gábor
fc5af0de8f Fix on mobile view. 2016-11-27 20:48:24 +01:00
Pásztor Gábor
87a68f7bf7 Using flexbox on login and reset page. 2016-11-27 16:29:38 +01:00
oliverpool
01193511d5 Use the otherKey to update a relation
If the `otherKey` of the relationship was set, the widget was considering the wrong column name.
2016-11-24 13:33:20 +01:00
Samuel Georges
35296c5b26 Adds getFieldName helper to FormWidgetBase
Refs https://github.com/octobercms/docs/pull/207
2016-11-24 08:59:07 +11:00
Samuel Georges
6bbf496ab2 Simplify code
This makes xdebug happy
Refs #2502
2016-11-23 08:11:24 +11:00
Samuel Georges
97b0bc481f Merge pull request #2496 from LukeTowers/patch-7
Pass current model to RelationController view & manage scopes
2016-11-18 08:21:50 +11:00
Luke Towers
05ab8bdb01 Pass current model to RelationController view & manage scopes
This improves the extensibility of the relation controller by passing the parent relation model to the query scope that will be applied to both the view and manage options. It allows the use of attributes of the parent relation model in the query scope applied to the relation.

This is a mirror of october/octobercms#2419, except for the relation controller instead of the record finder widget. If necessary, I can create a case in the test plugin, but if this is simple enough with the added reference to the prior PR to not require a case in the test plugin, that would be simpler for me :) 

@daftspunk, let me know what you think.
2016-11-16 12:05:44 -06:00
Samuel Georges
1a41f632bc Merge pull request #2477 from zerkms/USER_FILTER_SUPERUSER_BOOLEAN
[!!!] Fix for postgresql: you cannot compare a boolean column with integers
2016-11-16 07:14:56 +11:00
Ivan Kurnosov
c9ba4c49e6 Fix for postgresql: you cannot compare a boolean column with integers 2016-11-15 16:55:23 +13:00
Samuel Georges
a2a0b207c6 Expose isCodeViewActive API function
Recompile JS
2016-11-12 14:12:48 +11:00
Szabó Gergő
d1268c9905 Translate the Page link popup (#2467)
* Translate the Page link popup

* Remove the unnecessary dot

* Update the import/export Hungarian translation

* Update the Froala Hungarian translation
2016-11-10 07:39:29 +11:00
Samuel Georges
be3bf61a3b Merge pull request #2470 from acrontum/develop
Update DE Lang File
2016-11-10 07:36:05 +11:00
Samuel Georges
a313d4eb5b Minor fixes 2016-11-10 06:49:45 +11:00
Michael Brode
dc3c2efe6a Update DE Lang File 2016-11-09 08:36:04 +01:00
joseph-d
af7950b9d0 Update Filter.php
There is an addScopes function for extensibility but no way to remove scopes which are already there.
2016-11-08 09:46:27 +00: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
4aca2d40ff Remove "allowClear" and tidy up #2459
Allow clear is not necessary, equivalent of allowClear false is "placeholder" and allowClear true is "emptyOption".
2016-11-07 08:43:52 +11:00
Joseba Juániz
1ee0250441 Dropdown can support either placeholder / emptyOption
The difference between a placeholder and an emptyOption is that the placeholder cannot be reselected,whereas the emptyOption can.
Fixes #2450
2016-11-07 08:29:49 +11:00
Samuell1
b320632eb4 Fixes taglist working inside a repeater
Fixes #2254
2016-11-07 08:08:48 +11:00
Samuel Georges
50d3ffb035 Halycon models do not declare forceFill
Only bind purgeable fallback event once (only needed once)
Refs https://github.com/rainlab/translate-plugin/issues/54#issuecomment-256067096
2016-11-05 10:59:53 +11:00
Samuel Georges
7b0f33e9b3 Adds an isNested flag to Form widget
This is useful when a form renders another form inside, specifically the repeater. In these cases the model and data will diverge, and it also provides an opportunity to not apply extension logic to nested form fields.
Fixes #2257
2016-11-05 09:53:23 +11:00
Samuel Georges
348dd85338 Merge pull request #2446 from justin-lau/fix-import-file-path-order
Fixing default import template doesn't extract columns from the latest uploaded file.
2016-11-03 07:10:16 +11:00
Samuel Georges
6173ff177b Typo in variable name 2016-11-02 08:58:07 +11:00
Samuel Georges
0aadcc6675 Merge paths and vars when calling widget handler
When an AJAX handler is called for a widget, the view paths and specified variables should be merged in to the controller. This sets the appropriate context:

1) Look at the widget first
2) Fall back to the controller

Fixes #2432
2016-11-02 08:50:15 +11:00
Samuel Georges
ced920e5d2 Exception handling
Addresses issue specified in https://github.com/daftspunk/oc-test-plugin/issues/21
2016-11-02 07:21:04 +11:00
Samuel Georges
bc165078de Removes redundant code
The form widget label and widgetDetails() method was intended for use by the Builder plugin, since it ended up using its own internal registration system, this is not used anywhere so is removed.

Refs https://github.com/octobercms/docs/issues/200
2016-11-01 08:15:03 +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
788f109361 Use transactions when saving form models
This is a good idea in general to protect the data integrity. There may be some edge cases where transactions are undesirable, if/when we find one, a configuration option should be created to disable this behavior.
Fixes #2431
2016-10-29 11:28:39 +11:00
Justin Lau
844d2d1b28 Use id instead of updated_at for more consistent behavior 2016-10-27 00:31:44 +08:00
Samuel Georges
359461d93e Styling fix to the welcome widget
Add unit test for constraining by pivot data
2016-10-25 07:33:24 +11:00
Justin Lau
325ae4ad08 Return the latest uploaded (updated) file path. 2016-10-25 00:21:18 +08: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
88196fb660 Allow passing an explicit format to datepicker
Refs #1919
Recompile assets
2016-10-20 08:44:14 +11:00