refactor(bs3): sync with develop

This commit is contained in:
Matteo Pagliazzi 2014-02-02 13:26:35 +01:00
commit f31723b0ab
6 changed files with 12 additions and 4 deletions

View file

@ -159,6 +159,10 @@ a span.glyphicon
.btn
margin-right: 5px
// Buttons in groups should not have a 5px margin between them; suppress margin for buttons in groups.
.btn-group .btn
margin-right: 0px
.modal-indented-list
margin-left: 10px;
padding-left: 10px;

View file

@ -142,6 +142,8 @@ habitrpg.controller("InventoryCtrl", ['$rootScope', '$scope', '$window', 'User',
}
$scope.buyQuest = function(quest) {
var item = Content.quests[quest];
if (item.lvl && item.lvl > user.stats.lvl)
return alert("You must be level " + item.lvl + ' to buy this quest!');
var completedPrevious = !item.previous || (User.user.achievements.quests && User.user.achievements.quests[item.previous]);
if (!completedPrevious)
return $scope.purchase("quests", item);

View file

@ -98,6 +98,7 @@ api.csv = function(req, res) {
})
output.push(uData);
});
res.header('Content-disposition', 'attachment; filename='+cid+'.csv');
res.csv(output);
})
}

View file

@ -99,7 +99,8 @@ var UserSchema = new Schema({
contributor: Boolean,
classSelected: {type: Boolean, 'default': false},
mathUpdates: Boolean,
rebirthEnabled: {type: Boolean, 'default': false}
rebirthEnabled: {type: Boolean, 'default': false},
levelDrops: {type:Schema.Types.Mixed, 'default':{}}
},
history: {
exp: Array, // [{date: Date, value: Number}], // big peformance issues if these are defined

View file

@ -4,7 +4,7 @@ script(type='text/ng-template', id='partials/options.inventory.equipment.html')
h3=env.t('battleGear')
small=env.t('battleGearText')
li.customize-menu.inventory-gear
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Wizard", rogue:"Rogue", healer:"Healer", special:"Special"}', ng-show='gear[klass]')
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Mage", rogue:"Rogue", healer:"Healer", special:"Special"}', ng-show='gear[klass]')
div(ng-repeat='item in gear[klass]')
button.customize-option(popover='{{item.notes}}', popover-title='{{item.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.equip({params:{key:item.key}})', class='shop_{{item.key}}', ng-class='{selectableInventory: user.items.gear.equipped[item.type] == item.key}')
.span6
@ -15,7 +15,7 @@ script(type='text/ng-template', id='partials/options.inventory.equipment.html')
input(type="checkbox", ng-model="user.preferences.costume", ng-click='set({"preferences.costume":!user.preferences.costume})')
=env.t('useCostume')
li.customize-menu(ng-if='user.preferences.costume')
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Wizard", rogue:"Rogue", healer:"Healer", special:"Special"}', ng-show='gear[klass]')
menu.pets-menu(label='{{label}}', ng-repeat='(klass,label) in {base:"Base", warrior:"Warrior", wizard:"Mage", rogue:"Rogue", healer:"Healer", special:"Special"}', ng-show='gear[klass]')
div(ng-repeat='item in gear[klass]')
button.customize-option(popover='{{item.notes}}', popover-title='{{item.text}}', popover-trigger='mouseenter', popover-placement='right', ng-click='user.ops.equip({params:{type:"costume", key:item.key}})', class='shop_{{item.key}}', ng-class='{selectableInventory: user.items.gear.costume[item.type] == item.key}')

View file

@ -18,7 +18,7 @@ script(type='text/ng-template', id='modals/member.html')
li(ng-show='profile.auth.timestamps.loggedin')=env.t('lastLoggedIn')
| {{timestamp(profile.auth.timestamps.loggedin)}} -
h3=env.t('stats')
.label.label-info {{profile.stats.class}}
.label.label-info {{ {warrior:'Warrior',wizard:'Mage',healer:'Healer',rogue:'Rogue'}[user.stats.class] }}
include ../profiles/stats
.span6
include ../header/avatar