Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

Adding menu/menuBar support for Playbook and Smartphones #53

Merged
merged 22 commits into from Apr 12, 2012
Merged

Adding menu/menuBar support for Playbook and Smartphones #53

merged 22 commits into from Apr 12, 2012

Conversation

glasspear
Copy link
Collaborator

This is the code for Issue 27.

I've tested it with a PlayBook on 2.0, a 9900 and Ripple. My fork was from before iScroll was integrated, so if someone can just double checked I merged it in properly it would be good idea.

I added instructions to the readme.md on how to setup the menu div

Rory
(please be gentle this is my first ever pull request using git/github :))

Added support for menu separators for Smartphones
(data-bb-type="menu-separator")

Added ability to set data-bb-selected="true" for menu items to be
default item, if multiple are set the last one is the one that sticks
for Smart Phones

Removed clearMenuItems from menu setup, handled in both pushScreen and
popScreen.

Cleaned up check for necessary blackberry features done before setting
up menu and before clearing menus to avoid throwing errors
Added usage instructions to readme.md
Added menu separator for PlayBook menuBar
Added copy of class(es) attached to menu and menu items
Tweaked CSS for display to get colours/sizing closer to native.
Cleaned up CSS file
Cleaned up JS file
Ported changes back to source
@tneil
Copy link
Collaborator

tneil commented Mar 31, 2012

Hi Rory,

The code changes are looking great. Each time I was thinking "he should probably do X", the next change list included X :o)

Looking through the changes, I didn't find a sample added to the samples area that would show the menu.. Is it there and I missed it?

I'm hoping for a menu.htm file that will provide a simple example of the menu working. A couple of small screen shots added to the README would be great too if it wouldn't be too much trouble.

Also, can you make sure that you also copy your latest pkg/bbUI.js and pkg/bbUI.css into the samples directory. There's a copy of it there to make the sample be a simple self contained folder.

Once the samples are there I'll download it and run it through some tests

Thanks again for all the hard work!!

@glasspear
Copy link
Collaborator Author

Added a sample and moved the bbUI.js and bbUI.css in there as well. I called the sample menuBar.htm as menu.htm was already used. The icons I used are mine and open to whoever wants to use them. They are also used in the swipemenu.js examples.

I am working on the screenshots for you. I remembered them after I I made the initial pull request.

As we discussed one of WebWorks, WebKit or JS is not handling the self-closed <div>'s properly. It pulls the div after the menu into the menu with undesirable results. I have left the example with the trailing </div> until that figured out.

@glasspear
Copy link
Collaborator Author

I think this should cover all your points now. Screenshot has been added for Smartphone and PlayBook

@tneil
Copy link
Collaborator

tneil commented Apr 5, 2012

Cool.. I'll try and get the review and testing done as soon as I can

@tneil
Copy link
Collaborator

tneil commented Apr 12, 2012

Hi Rory.. it looks like there's a conflict on your last changes of the README.md. What file editor are you using? It looks like the line endings are off based on the last check in because it shows the removal of all of the readme and then the re-adding of the readme. Are you using the same editor as your code editing?

If you try opening it in your code editor and re-saving it.. it may fix the line end endings. I think this is the only issue for the merge to work and the big green "merge" button to show up :)

@tneil tneil merged commit 9c3cbd4 into blackberry:master Apr 12, 2012
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

2 participants