refactor(content): concatenate notes

This commit is contained in:
Sabe Jones
2016-08-09 23:19:53 +00:00
parent 051763bc49
commit 72f1114d85
4 changed files with 8 additions and 13 deletions

View File

@@ -518,25 +518,25 @@ api.premiumHatchingPotions = {
value: 2,
text: t('hatchingPotionSpooky'),
limited: true,
season: 'fall',
_season: 'fall',
},
Peppermint: {
value: 2,
text: t('hatchingPotionPeppermint'),
limited: true,
season: 'winter',
_season: 'winter',
},
Floral: {
value: 2,
text: t('hatchingPotionFloral'),
limited: true,
season: 'spring',
_season: 'spring',
},
Thunderstorm: {
value: 2,
text: t('hatchingPotionThunderstorm'),
limited: true,
season: 'summer',
_season: 'summer',
canBuy: (function() {
return true;
}),
@@ -565,7 +565,7 @@ _.each(api.premiumHatchingPotions, function(pot, key) {
notes: t('hatchingPotionNotes', {
potText: pot.text
}),
addlNotes: t(`${pot.season}EventAvailability`),
_addlNotes: t(`${pot._season}EventAvailability`),
premium: true,
limited: false,
canBuy: (function() {

View File

@@ -70,8 +70,7 @@ shops.getMarketCategories = function getMarket (user, language) {
return {
key: premiumHatchingPotion.key,
text: premiumHatchingPotion.text(language),
notes: premiumHatchingPotion.notes(language),
addlNotes: premiumHatchingPotion.addlNotes(language),
notes: `${premiumHatchingPotion.notes(language)} ${premiumHatchingPotion._addlNotes(language)}`,
class: `Pet_HatchingPotion_${premiumHatchingPotion.key}`,
value: premiumHatchingPotion.value,
locked: false,

View File

@@ -22,11 +22,7 @@ describe('shops', () => {
it('items contain required fields', () => {
_.each(shopCategories, (category) => {
_.each(category.items, (item) => {
if (item.addlNotes) {
expect(item).to.have.all.keys(['key', 'text', 'notes', 'addlNotes', 'value', 'currency', 'locked', 'purchaseType', 'class']);
} else {
expect(item).to.have.all.keys(['key', 'text', 'notes', 'value', 'currency', 'locked', 'purchaseType', 'class']);
}
expect(item).to.have.all.keys(['key', 'text', 'notes', 'value', 'currency', 'locked', 'purchaseType', 'class']);
});
});
});

View File

@@ -116,7 +116,7 @@
div(ng-repeat='item in category.items')
button.customize-option(class='{{item.class}}',
popover='{{item.notes}} {{item.addlNotes}}', popover-append-to-body='true',
popover='{{item.notes}}', popover-append-to-body='true',
popover-title!='{{item.text}}',
popover-trigger='mouseenter', popover-placement='top',
ng-click='purchase(category.identifier, item)')