mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
classes: header z-index:100, generalized shop_money classes, only show
owned gear if == true
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
.header-wrap
|
.header-wrap
|
||||||
width: 100% // this is for the sticky
|
width: 100% // this is for the sticky
|
||||||
padding: 0
|
padding: 0
|
||||||
z-index: 1
|
z-index: 100
|
||||||
background: #f5f5f5
|
background: #f5f5f5
|
||||||
border-bottom: 1px solid rgba(0,0,0,0.2)
|
border-bottom: 1px solid rgba(0,0,0,0.2)
|
||||||
// margin-top: -1px
|
// margin-top: -1px
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
line-height: 1.5em
|
line-height: 1.5em
|
||||||
padding-left: 0.75em
|
padding-left: 0.75em
|
||||||
|
|
||||||
[class^="shop_"]
|
.shop_gold, .shop_silver, .shop_copper
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
display: inline-block
|
display: inline-block
|
||||||
|
|
||||||
.btn-buy
|
.btn-buy
|
||||||
width: 4.5em
|
width: 4.5em
|
||||||
|
|||||||
@@ -22,12 +22,13 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', 'User', 'API_URL',
|
|||||||
$scope.gear = {
|
$scope.gear = {
|
||||||
base: _.where(Content.gear.flat, {klass: 'base'})
|
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];
|
var item = Content.gear.flat[key];
|
||||||
if (!$scope.gear[item.klass]) $scope.gear[item.klass] = [];
|
if (!$scope.gear[item.klass]) $scope.gear[item.klass] = [];
|
||||||
$scope.gear[item.klass].push(item);
|
$scope.gear[item.klass].push(item);
|
||||||
})
|
})
|
||||||
}, true)
|
}, true);
|
||||||
|
|
||||||
$scope.chooseEgg = function(egg){
|
$scope.chooseEgg = function(egg){
|
||||||
if ($scope.selectedEgg && $scope.selectedEgg.name == egg) {
|
if ($scope.selectedEgg && $scope.selectedEgg.name == egg) {
|
||||||
|
|||||||
Reference in New Issue
Block a user