Skip to content
This repository was archived by the owner on Sep 4, 2019. It is now read-only.

Exposed methods for disabling/enabling platform menu items in the contex...#476

Open
rcruz wants to merge 1 commit into
blackberry:nextfrom
blackberry-webworks:rcruz-disablePlatformItem
Open

Exposed methods for disabling/enabling platform menu items in the contex...#476
rcruz wants to merge 1 commit into
blackberry:nextfrom
blackberry-webworks:rcruz-disablePlatformItem

Conversation

@rcruz

@rcruz rcruz commented Dec 13, 2012

Copy link
Copy Markdown

...t menu

@rcruz

rcruz commented Dec 13, 2012

Copy link
Copy Markdown
Author

API Docs: blackberry/WebWorks-API-Docs#403

@ejzn

ejzn commented Dec 13, 2012

Copy link
Copy Markdown
Contributor

listDisabledPlatformItems doesn't seem to work. But the WP API works.

@rcruz

rcruz commented Dec 13, 2012

Copy link
Copy Markdown
Author

Fixed listDisabledPlatformItems()

@ejzn

ejzn commented Dec 19, 2012

Copy link
Copy Markdown
Contributor

@ishneur Can you test this one out?

@jeffheifetz

Copy link
Copy Markdown
Contributor

Missing functional tests

@nukulb

nukulb commented Dec 20, 2012

Copy link
Copy Markdown
Contributor

@ishneur can you give this a quick test

@ishneur

ishneur commented Dec 20, 2012

Copy link
Copy Markdown
Contributor

Tested and works correctly with some issues/comments:

  • Non-platform items like Share and Cancel items can be disabled and enabled.
  • disablePlatformItem/enablePlatformItem for not supported action for a particular context returns "true", e.g. disable Save Image for Link
  • For listDisabledPlatformItems(), items disabled for CONTEXT_ALL are listed only for CONTEXT_ALL and not for other contexts (even though they are disabled for other contexts too), but I don't know if they are supposed to be

@nukulb

nukulb commented Dec 20, 2012

Copy link
Copy Markdown
Contributor

@erikj54 - is this expected?

@ejzn

ejzn commented Dec 20, 2012

Copy link
Copy Markdown
Contributor
  • Cancel is a platform action, so yes, we would like it disabled. I'm not sure what you mean by Share @ishneur?
  • 2nd one is an issue, it should probabyl return a verbose error right @rcruz
  • I think we should add the CONTEXT_ALL items to ever other context when it returns the disabled list. @rcruz can we do this too? It could be done both in WW or WP depending on timing.

@ishneur

ishneur commented Dec 21, 2012

Copy link
Copy Markdown
Contributor

@erikj54 When I set actionId = "MenuService-0" inside disablePlatformItem(), the Share menu item is disabled.

@ishneur

ishneur commented Jan 2, 2013

Copy link
Copy Markdown
Contributor

Another issue I noticed is that if you disable an item (e.g. ACTION_COPY) for CONTEXT_ALL, and then try to enable it for a particular context, e.g. CONTEXT_LINK, it doesn't work and returns "false", so the only way to enable it again is to enable it for CONTEXT_ALL.

The same issue happens the other way around: if you disable an item for CONTEXT_LINK and then try to enable it for CONTEXT_ALL, it returns "false" too and the item is not added back for link.

I don't know if the above is intended or not, but it looks like the same context must be specified for enable/disable in order for it to work, even when enabling/disabling for CONTEXT_ALL.

@ejzn

ejzn commented Jan 2, 2013

Copy link
Copy Markdown
Contributor

The above seems like a bug. @rcruz

@rcruz

rcruz commented Jan 3, 2013

Copy link
Copy Markdown
Author

We'll fix the list to display a more accurate listing, and the CONTEXT_ALL combinations.

@nukulb

nukulb commented Jan 7, 2013

Copy link
Copy Markdown
Contributor

FYI

depends on http://github.rim.net/webworks/webplatform/pull/259

targetted at 10.2, will merge after we branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants