I've been working on a site where the client does not want to use the points system in achievements but does want to grant badges and then facilitate people adding them to their Mozilla Backpack. So, I have enabled the achievements_pointless submodule but found that the Add to Backpack button then fails to appear.
It seems that the achievements_pointless module removes the <a>
link on the title of awarded badges so the amobb.js search mechanism at
var image = jQuery(this).children('div.achievement-image');
var a = image.children('a');
var i = a.children('img');
...fails because there is no <a>
surrounding the <img>
.
Attached is a patch that uses var i = image.find('img');
as this will search recursively down more than one level for the <img>
.
It seems to now work correctly whether the achievements_pointless submodule is enabled or not.
How does that look?
Rachel
Comment | File | Size | Author |
---|---|---|---|
#4 | achievements-pointless-support-2186317-4.patch | 918 bytes | jessehs |
#2 | create-backpack-button-regardless-of-achievements-pointless-2186317-8436185.patch | 740 bytes | rachel_norfolk |
Comments
Comment #1
rachel_norfolkPatch:
Comment #2
rachel_norfolkComment #3
EBIZON CreditAttribution: EBIZON commentedHi Rachel,
Thanks for showing up your interest in this project.
Comment #4
jessehsRe-rolled patch against 1.2 (it was not applying).