Commit Graph

269 Commits

Author SHA1 Message Date
Samuel Georges 29040b416c Allow redirect: false on importExportController
Implement getFieldName() method
2016-11-28 07:50:06 +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
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 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 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
Samuel Georges 88196fb660 Allow passing an explicit format to datepicker
Refs #1919
Recompile assets
2016-10-20 08:44:14 +11:00
Samuel Georges 535dc78db1 Pass model as 3rd arg in relation extend overrides
Refs #2308
2016-10-19 08:45:43 +11:00
Samuel Georges 259e0c0226 Add support for recordOnClick in relationRender 2016-10-15 10:11:54 +11:00
Samuel Georges 8eafcaa090 Encode extra config to isolate the logic
Fixes #2417
2016-10-15 10:10:11 +11:00
Samuel Georges 19c3c19a00 Added extended useList options, including raw output 2016-10-06 18:44:26 +11:00
Samuel Georges b3fe8de7fb Prevent extra config from bleeding to other definitions 2016-09-28 13:26:28 +10:00
Samuel Georges baefa3e50d Allow passing arbitrary recordUrl to relationRender 2016-09-27 20:39:29 +10:00
Samuel Georges 0d336151d2 Improvements to data persistence, rework readOnly
Fixes #2308
2016-09-27 20:21:32 +10:00
Samuel Georges 1e3f5a22ef Provides an opportunity to manipulate the field configuration.
Refs #2245
2016-09-27 17:00:26 +10:00
Samuel Georges cd0cd260b5 Make manage[form] config optional
There are times when manage form mode just isn't needed. This will make the view[list] unclickable, which is OK
2016-09-27 16:53:46 +10:00
Samuel Georges cc2973e148 Merge pull request #2275 from Arekusei/develop
Added support for Many To Many polymorphic relations.(morphToMany and…
2016-09-18 12:08:57 +10:00
Samuel Georges 6c474bcae9 Move list pagination out of table footer
Remove docs on list-unresponsive (removed a while ago)
Add topPartial and sidePartial options to list controller configuration (experimental)
2016-09-03 12:13:38 +10:00
Jack Dark a6b0d3da7d Merge remote-tracking branch 'remotes/upstream/develop' into develop
# Conflicts:
#	modules/backend/behaviors/RelationController.php
2016-08-18 02:02:43 +03:00
Jérémy Gaulin 198230e281 Reorder must use the model `getKey()` method (configurable key name) instead of harcoded `id` property. 2016-08-16 19:36:55 +04:00
Samuel Georges 5c53b10c20 Merge pull request #2295 from gabsource/fix-relation-manage-readonly
Propagate the RelationController readOnly option to the viewClickList AJAX action
2016-08-13 15:30:58 +10:00
Samuel Georges 618a035616 Apply defined constraints to view mode
In the same way it is currently applied to manage mode
Fixes #2292
2016-08-13 15:21:17 +10:00
Samuel Georges c2d2250a1c RelationController "Remove" now works with deferred bindings
This brings the logic in line with the "Add" logic, using session keys where applicable
Fixes #1150
2016-08-13 12:41:03 +10:00
Samuel Georges d7b9b4f65e Fixes vague error when attribute is not fillable
Previously an error was being thrown with just the attribute name, not helpful at all.
Fixes #2302
2016-08-13 10:48:52 +10:00
Jérémy Gaulin 7f22ba62dc Propagate the readOnly option to the viewClickList AJAX action 2016-08-08 08:35:57 +02:00
Samuel Georges 61ac68fd5e Allows relationRender to specify readOnly mode
Fixes #2245
2016-08-06 13:15:08 +10:00
MarvinDurot ce1e7949d7 Fix multiple definition list refresh when index_onDelete method is called 2016-08-04 12:46:11 +02:00
Jack Dark aaab9c2eaa Added support for Many To Many polymorphic relations.(morphToMany and morphedByMany) 2016-08-02 17:56:49 +03:00
Samuel Georges 59c1d57b3f Revert "fix hardcoded sort order name" 2016-08-02 19:53:20 +10:00
Cesar e0f5b560bc fix hardcoded sort order name 2016-07-30 18:50:32 -04:00
Samuel Georges fdcfe801a7 Write tests for #2258
Prevent nulling when model fails validation
2016-07-30 10:59:25 +10:00
Luke Towers b26eeed03c Enable refresh on form controller requests (correct branch)
This adds support for a redirect to the current page (a refresh) to be returned by the form controller. An example use case is adding `data-request-data="refresh:1"` to the save button on an update form. I'm using it for an update form that disables certain fields (including a relationRender partial) based on values submitted on that page. Refreshing the view after saving allows my disabling rules to take effect.
2016-07-27 09:05:12 -06:00
Samuel Georges dbdf8f780a Merge pull request #2128 from slipgrom/develop
morphMany Relation support
2016-07-16 14:08:35 +10:00
Samuel Georges 8e4142558b Merge pull request #1741 from ARH-Digital/develop
Add morphic relations to backend
2016-07-09 20:38:21 +10:00
Roman Gerasimov 587b8a449d morphMany Relation support 2016-06-17 10:55:03 +03:00
Samuel Georges cdb35f5070 UserPreferences -> UserPreference
(Models should be singular)
2016-05-27 07:35:32 +10:00
Jérémy Gaulin 3556fe2869 Fix class name used on stream_filter_register to match the refactored class name. 2016-05-21 22:35:29 +02: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 e52fa7bd33 Compat with CSV v8 2016-04-28 06:39:35 +10:00
Samuel Georges 0d451eaa78 Be less strict about formExtendModel returning a model 2016-04-28 05:47:14 +10:00
Samuel Georges 0504da41f2 Add hasFields methods
formHasOutsideFields, formHasPrimaryTabs + formHasSecondaryTabs
2016-04-23 05:13:08 +10:00
Samuel Georges abaa65cc0e Cut back the design
Switch to hard lines
2016-04-22 08:21:08 +10:00
Samuel Georges 51bef96db9 More styling changes and other minor improvements 2016-04-21 04:52:21 +10:00
Samuel Georges bff35e5f1a Lists can now define search scope or mode (see docs) 2016-04-19 19:54:22 +10:00
Samuel Georges a548d6ee56 Merge remote-tracking branch 'remotes/origin/stable' into develop
Conflicts:
	modules/backend/lang/en/lang.php
	modules/backend/lang/fr/lang.php
2016-04-01 13:00:32 +11:00
Samuel Georges a035acdc2c Tidy up some logic, restore firstRowTitles setting
Refs #1856
2016-03-26 14:10:05 +11:00
Jérémy Gaulin 2a60e34558 Import options to configure the CSV reader + patch to prevent unfriendly error to be thrown due to bad import source file encoding (on AJAX request) 2016-03-26 12:54:13 +11:00
Samuel Georges 6f6a3cc78c Merge pull request #1855 from gabsource/enchancement/import-export-french-translation
French translations for import/export errors strings
2016-03-26 12:38:42 +11:00
Samuel Georges a585fe3316 Share pivot|list title logic
We already had a key for this... spooky!
Refs #1755
2016-03-25 14:24:38 +11:00
Samuel Georges e19ae42e45 (Rollback) Keep instances to themselves 2016-03-25 14:17:13 +11:00