Closed Bug 971447 Opened 10 years ago Closed 10 years ago

[System2] Instantiable ActionMenu

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alive, Assigned: kgrandon)

References

Details

Attachments

(1 file)

We need action_menu.js to be instantiable and let bootstrap or its parent module to instantiate it.
Also jsdoc + unit test wanted.
Assignee: nobody → kgrandon
Attached file Github pull request
Comment on attachment 8377286 [details] [review]
Github pull request

Alive - would you have time for a review here? Thanks!
Attachment #8377286 - Flags: review?(alive)
Comment on attachment 8377286 [details] [review]
Github pull request

Please implement destroy to remove the DOM elements created by this class, otherwise we will have dead elements in the DOM tree and create new one each time we have an activity request!
(Call destroy on hide.)
Attachment #8377286 - Flags: review?(alive)
Comment on attachment 8377286 [details] [review]
Github pull request

Hey Alive - I added a few commits here which fix this a bit. I added start/stop methods to the class which will create/destroy the dom and add/remove listeners.

Consumers of this class would then do something like:

var menu = new ActionMenu(items, title, success);
menu.start();

Trying to follow other system conventions here as well as the start/stop methods in Tim's email. Let me know what you think - I will definitely squash this before merging. Thanks!
Attachment #8377286 - Flags: review?(alive)
Comment on attachment 8377286 [details] [review]
Github pull request

Thanks!
Attachment #8377286 - Flags: review?(alive) → review+
I want to get this landed before the bug bash today.

Landed in master: https://github.com/mozilla-b2g/gaia/commit/117b06a09a1e15ce19f21eaaf53a7fe187b233d8
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 985032
Depends on: 988034
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: