Merge branch '4401_multiple_buy_gems_popups_with_mixins' of https://github.com/lucymhdavies/habitrpg into gems-mixin

Conflicts:
	views/shared/gems.jade
	views/shared/modals/buy-gems.jade
This commit is contained in:
Blade Barringer
2015-01-01 23:18:28 -06:00
6 changed files with 13 additions and 6 deletions
+1
View File
@@ -23,6 +23,7 @@ html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":a
body(ng-cloak, ng-controller='GroupsCtrl')
include ./shared/mixins
include ./shared/header/avatar
include ./shared/header/menu
include ./shared/modals/index
+8
View File
@@ -0,0 +1,8 @@
mixin gemButton(isGemsModal)
a.pull-right.gem-wallet(ng-click=( isGemsModal ? '' : 'openModal("buyGems",{track:"Gems > Wallet"})'), popover-trigger='mouseenter', popover-title=env.t('gems'), popover=env.t('gemsWhatFor'), popover-placement='bottom')
if !isGemsModal
span.task-action-btn.tile.flush.bright.add-gems-btn
span.task-action-btn.tile.flush.neutral
.Pet_Currency_Gem2x.Gems
| {{user.balance * 4 | number:0}}
=env.t('gems')
+1 -3
View File
@@ -1,9 +1,7 @@
script(id='modals/buyGems.html', type='text/ng-template')
.modal-body
.buy-gems
- var isGemsModal = true
include ../gems
- isGemsModal = false
+gemButton(true)
.well
h3=env.t('buyGems')
table.table
+1 -1
View File
@@ -18,7 +18,7 @@ script(type='text/ng-template', id='modals/pet-key.html')
.modal-header
h4=env.t('petKeyBegin')
.modal-body
include ../gems
+gemButton
figure
.npc_alex
p=env.t('petKeyInfo')
+1 -1
View File
@@ -15,7 +15,7 @@ script(type='text/ng-template', id='modals/rebirth.html')
.modal-header
h4=env.t('rebirthBegin')
.modal-body
include ../gems
+gemButton
figure
.rebirth_orb
p=env.t('rebirthStartOver')
+1 -1
View File
@@ -3,7 +3,7 @@ script(type='text/ng-template', id='modals/reroll.html')
.modal-header
h4=env.t('fortify')
.modal-body
include ../gems
+gemButton
p=env.t('fortifyText')
.modal-footer