classes: header z-index:100, generalized shop_money classes, only show

owned gear if == true
This commit is contained in:
Tyler Renelle
2013-12-14 11:34:41 -07:00
parent dc348d5601
commit 26697546e8
3 changed files with 7 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
.header-wrap
width: 100% // this is for the sticky
padding: 0
z-index: 1
z-index: 100
background: #f5f5f5
border-bottom: 1px solid rgba(0,0,0,0.2)
// margin-top: -1px

View File

@@ -4,9 +4,9 @@
line-height: 1.5em
padding-left: 0.75em
[class^="shop_"]
vertical-align: top
display: inline-block
.shop_gold, .shop_silver, .shop_copper
vertical-align: top
display: inline-block
.btn-buy
width: 4.5em

View File

@@ -22,12 +22,13 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', 'User', 'API_URL',
$scope.gear = {
base: _.where(Content.gear.flat, {klass: 'base'})
};
_.each(gear.owned, function(bool,key){
_.each(gear.owned, function(v,key){
if (v === false) return;
var item = Content.gear.flat[key];
if (!$scope.gear[item.klass]) $scope.gear[item.klass] = [];
$scope.gear[item.klass].push(item);
})
}, true)
}, true);
$scope.chooseEgg = function(egg){
if ($scope.selectedEgg && $scope.selectedEgg.name == egg) {