Skip to content
This repository has been 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
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

rcruz
Copy link

@rcruz rcruz commented Dec 13, 2012

...t menu

@rcruz
Copy link
Author

rcruz commented Dec 13, 2012

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

@ejzn
Copy link
Contributor

ejzn commented Dec 13, 2012

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

@rcruz
Copy link
Author

rcruz commented Dec 13, 2012

Fixed listDisabledPlatformItems()

@ejzn
Copy link
Contributor

ejzn commented Dec 19, 2012

@ishneur Can you test this one out?

@jeffheifetz
Copy link
Contributor

Missing functional tests

@nukulb
Copy link
Contributor

nukulb commented Dec 20, 2012

@ishneur can you give this a quick test

@ishneur
Copy link
Contributor

ishneur commented Dec 20, 2012

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
Copy link
Contributor

nukulb commented Dec 20, 2012

@erikj54 - is this expected?

@ejzn
Copy link
Contributor

ejzn commented Dec 20, 2012

  • 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
Copy link
Contributor

ishneur commented Dec 21, 2012

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

@ishneur
Copy link
Contributor

ishneur commented Jan 2, 2013

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
Copy link
Contributor

ejzn commented Jan 2, 2013

The above seems like a bug. @rcruz

@rcruz
Copy link
Author

rcruz commented Jan 3, 2013

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

@nukulb
Copy link
Contributor

nukulb commented Jan 7, 2013

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.

None yet

5 participants