Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

bbUI.js overhaul

For those that haven't seen it yet, my mind was blown:

https://github.com/blackberry/bbUI.js

 

Newly added support for PlayBook, BB10, and even 5.0 devices. If you're looking for a UI framework that gives you a native look-and-feel across devices, this one is absolutely worth checking out.

 

This screenshot just says it all (also, BatBerry pictures):

 

grid.png

 

Being a web developer myself, huge thanks to Tim Neil and the community for their continued dedication to this.

 

Erik Oros

BlackBerry Development Advisor


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
bert2002
Posts: 172
Registered: ‎05-01-2010
My Device: Z10

Re: bbUI.js overhaul

WOW! This looks really stunning. Looking forward for the new UI. It looks awesome! Great work.



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de
Developer
greenback
Posts: 535
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

Re: bbUI.js overhaul

Thank you for your contribution Tim and team! This is really fantastic.

 

:Batman:

Contributor
fotodng
Posts: 21
Registered: ‎05-04-2012
My Device: Dev Alpha B & C, Z10 and PlayBook

Re: bbUI.js overhaul

Excelent!!! I'll prove it in my next Dpx release
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: bbUI.js overhaul

BlackBerry 5 support is "ROUGH" to say the least.. but BB6+ support is pretty good.

 

I've posted up all the current  milestones... things are pretty fluid but at least there's a plan :smileyhappy:

 

I'm currently working on refactoring the README.md into the wiki so that each control can have its own page of instructions and samples.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: bbUI.js overhaul

 

There's a video of the Jam Session demonstration available too:

 

http://www.youtube.com/watch?v=_kPewENDF2M

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
bert2002
Posts: 172
Registered: ‎05-01-2010
My Device: Z10

Re: bbUI.js overhaul

When I woke up and saw the video, I just needed to get startet right away :smileyhappy: To build an image grid was actually straight forward and looks beautiful! 

 

I am just stuck with adding a href od onclick to the pictures to open a context menu. I tried various things to add the attribute to a <a> or directly to the <div> which contains the image. For example:

listItem = document.createElement('div');
listItem.setAttribute('data-bb-type', 'item');
listItem.setAttribute('data-bb-img', itemPicture);
listItem.setAttribute('data-bb-title', itemTitle);
listItem.setAttribute('onclick', 'alert('Hi');';
 

 Unfortunatly I couldnt find a solution. Is it possible that bb.grid.apply(); is removing any href or onclick element? 

 

best bert



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: bbUI.js overhaul

I honesly haven't tried creating an grid image item dynamically...  try the following

 

listItem.onclick = function() { 
                      alert('Hi');
                   };

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: bbUI.js overhaul

Oh.. and hopefully the press-and-hold context menu will automatically be wired to the grid list for you :smileyhappy:

 

https://github.com/blackberry/bbUI.js/issues/87

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
bert2002
Posts: 172
Registered: ‎05-01-2010
My Device: Z10

Re: bbUI.js overhaul

ha! working perfectly. Many thanks. Code will be online tomorrow!

A built in function for the grid would be helpful anyway :smileywink:



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de