U4-6402 - Grid config file should be merged with package.manifests

Created by Shannon Deminick 12 Mar 2015, 22:12:29 Updated by Jeavon Leopold 20 May 2015, 06:53:53

Relates to: U4-6427

Relates to: U4-6506

Currently there is just one grid configuration file, package editors would need a script to modify this single file which isn't ideal.

We should add the grid configuration portion to be able to exist in the package.manifest of a package. That way a package can work without having to modify any files it doesn't ship with, which also greatly improves the uninstall process too.

Comments

Shannon Deminick 19 Mar 2015, 02:53:39

Fixed in rev: 9469b0b844d47328a557cf66e517c3059f646ebd


Shannon Deminick 19 Mar 2015, 02:54:51

You can now have "gridEditors" in your package.manifest file, for example:

{ "propertyEditors": [ ], "javascript": [ "/App_Plugins/Articulate/BackOffice/Dashboards/blogimporter.controller.js", "/App_Plugins/Articulate/BackOffice/PropertyEditors/themepicker.controller.js" ], "gridEditors": [ { "name": "My Quote", "alias": "myQuote", "view": "textstring", "icon": "icon-quote", "config": { "markup": "

#value#
" } } ] }


Geoff Beaumont 26 Mar 2015, 11:11:23

This doesn't appear to work in 7.2.4?

The same editor definition works fine in the main grid configuration file, but not in a package manifest.


Jeavon Leopold 30 Mar 2015, 14:49:53

@Shandem I also can't seem to get this to work in v7.2.4....?


Shannon Deminick 30 Mar 2015, 21:28:57

I'll have a look, what does your manifest contain?


Geoff Beaumont 31 Mar 2015, 09:02:51

@Shandem this is what we have, edited down somewhat (I can send you the full version if you let me know where to send it): { "javascript": [ "/App_Plugins/MyPlugin/small-hero/controller.js", "/App_Plugins/MyPlugin/document-links-by-category/controller.js" ], "css": [ "~/App_Plugins/MyPlugin/grid-editors.css" ], "gridEditors": [ { "name": "Small Hero", "alias": "small-hero", "view": "/App_Plugins/MyPlugin/small-hero/editortemplate.html", "render": "/Views/Partials/Grid/Editors/SmallHero.cshtml", "icon": "icon-presentation", "config": { "image": { "size": { "width": 1200, "height": 185 } }, "link": { "maxNumberOfItems": 1, "minNumberOfItems": 0 } } }, { "name": "Document Links By Category", "alias": "document-links-by-category", "view": "/App_Plugins/MyPlugin/document-links-by-category/editortemplate.html", "render": "/Views/Partials/Grid/Editors/DocumentLinksByCategory.cshtml", "icon": "icon-umb-members" } ] }

The same editor definitions work fine in grid.editors.config.js


Shannon Deminick 07 Apr 2015, 02:22:44

It's an issue with multiple grid editors defined, if you have one it works. I'll fix this up.


Jeavon Leopold 19 May 2015, 08:55:03

@Shandem did you fix up the multiple issue for 7.2.5?


Shannon Deminick 20 May 2015, 01:29:53

Yes it should all be resolved and working: 0eac50cebaef27a4debb5ab94a56b1e2b4a5564a


Shannon Deminick 20 May 2015, 01:30:19

http://issues.umbraco.org/issue/U4-6506


Jeavon Leopold 20 May 2015, 06:53:53

Thanks!


Priority: Normal

Type: Feature (request)

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.2.3

Sprint:

Story Points:

Cycle: