PDA

View Full Version : Ext.ux.MultiBadgeButton



jerome76
7 Aug 2013, 5:08 PM
This is my first official component extension for Sencha Touch 2.x.

I came up with the idea for this after posting to kidmanmatch's thread:
http://www.sencha.com/forum/showthread.php?269464-Sencha-touch-Add-two-Badgetext-on-same-button

(http://www.sencha.com/forum/showthread.php?269464-Sencha-touch-Add-two-Badgetext-on-same-button)The MultiBadgeButton supports up to 4 different badges. Each badge is customizable with CSS. :)

45250

The default locations are in a counter-clockwise formation as follows:

Badge 1: top-right
Badge 2: top-left
Badge 3: bottom-left
Badge 4: bottom-right
The MultiBadgeButton can also just take 1 badge and still behave like a normal Ext.Button, but what is the fun in that?
You can view a Demo fiddle at: https://fiddle.sencha.com/#fiddle/6q
(https://fiddle.sencha.com/#fiddle/6q)(unfortunately I don't have a functioning web-server yet to host it yet)
You can view the code at GitHub: https://github.com/jerome76/MultiBadgeButton

(https://github.com/jerome76/MultiBadgeButton)This version 0.3 I have committed is still in testing since I started it a few hours ago, so please try it for yourself and let me know what you think! :-)

Brian

jerome76
8 Aug 2013, 8:59 AM
I plan on cleaning up some of the repetitive code in the next release.

fmoseley
9 Aug 2013, 12:21 PM
Nice job! I saw your recent post you did on multiple badges. Looks like you have taken it to another level.

kidmanmatch
12 Aug 2013, 2:53 AM
Thank you so much for your plugin..let me test and will give you feed back ...

kidmanmatch
12 Aug 2013, 4:31 AM
Working fine thanks a lot for your help

jerome76
12 Aug 2013, 12:41 PM
Glad it worked out for you! :) I'll post here again when and if I get a chance to optimize it more.