Metadata
- Source
- FLUID-1285
- Type
- Improvement
- Priority
- Blocker
- Status
- Closed
- Resolution
- Fixed
- Assignee
- N/A
- Reporter
- Michelle D'Souza
- Created
2008-08-21T09:39:12.000-0400 - Updated
2011-02-22T16:27:53.594-0500 - Versions
- N/A
- Fixed Versions
-
- 0.5
- Component
-
- Layout Reorderer
Description
The layout customizer currently has this API:
fluid.initLayoutCustomizer = function (layout, perms, orderChangedCallbackUrl, options)
This is inconsistent with our other APIs. orderChangedCallbackUrl should be pushed into the options. Perhaps layout and perms should be to.
dev-iteration43
Comments
-
Colin Clark commented
2008-08-21T11:59:47.000-0400 We chatted about this in the channel:
colinclark: So there seems to be three options on the table:
[11:23am] colinclark: 1. Two different functions... say, dataDrivenLayoutCustomizer() and just plain old layoutCustomizer().
[11:24am] colinclark: 2. Overloading: a single layoutCustomizer() function that either takes a container (jquery or selector string) or a simple hash containing a layout and a perms object.
[11:24am] colinclark: 3. Options stuff: user either supplies a container and set of selectors, or a layout. In the case of getting both, we pick.Here's how they'd be used:
colinclark: 1a. var myLC = dataDrivenLayoutCustomizer(layout, perms, options);
[11:26am] colinclark: 1b. var myLC = layoutCustomizer("#foo", options);
[11:27am] colinclark: 2a. var myLC = layoutCustomizer({layout: myLayout, perms: myPerms}, options);
[11:27am] colinclark: 2b. var myLC = layoutCustomizer("#foo", options);
[11:28am] colinclark: 3a. var myLC = layoutCustomizer("#foo", {layout: myLayout, perms: myPerms});
[11:28am] colinclark: 3b. var myLC = layoutCustomizer("#foo", {selectors: {columns: ".column", portlets: ".portlet"}});After thinking about it a bit, my vote is for scenario #3. We'll have options for selectors and layout. If a layout is found, it is used and the selectors are ignored. Permissions should be optional in either case. If they're not specified, they should be synthesized from the selectors.
We agreed to wait to check in with Antranig about the topic since he's already changed the code significantly in the FLUID-1148 branch.
-
Colin Clark commented
2008-09-16T09:27:03.000-0400 Given the substantial refactoring of Reorderer and the removal of the permissions structure, this issue is now moot.
-
Anastasia Cheetham commented
2008-09-16T12:47:56.000-0400 The API should still be modified to be consistent with other components, i.e.
fluid.layoutCustomizer(container, options); -
Michelle D'Souza commented
2008-09-17T17:56:17.000-0400 initLayoutCustomizer was removed and the examples now use reorderLayout
-
Michelle D'Souza commented
2011-02-22T16:27:53.593-0500 Closing issues that were resolved for 1.0 and earlier releases.