mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Added dequip ability per ticket: 3730
This commit is contained in:
@@ -133,5 +133,6 @@
|
|||||||
"critBonus": "Critical Hit! Bonus: ",
|
"critBonus": "Critical Hit! Bonus: ",
|
||||||
"displayNameDescription1": "This is what appears in messages you post in the Tavern, guilds, and party chat, along with what is displayed on your avatar. Go to",
|
"displayNameDescription1": "This is what appears in messages you post in the Tavern, guilds, and party chat, along with what is displayed on your avatar. Go to",
|
||||||
"displayNameDescription2": "Settings->Site",
|
"displayNameDescription2": "Settings->Site",
|
||||||
"displayNameDescription3": "and scroll down to the Registration section to change your login name."
|
"displayNameDescription3": "and scroll down to the Registration section to change your login name.",
|
||||||
|
"dequipAll": "Dequip All"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,5 +233,18 @@ habitrpg.controller("InventoryCtrl",
|
|||||||
|
|
||||||
return filteredArray;
|
return filteredArray;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.dequip = function(){
|
||||||
|
|
||||||
|
for ( item in user.items.gear.equipped ){
|
||||||
|
var itemKey = user.items.gear.equipped[item];
|
||||||
|
if ( user.items.gear.owned[itemKey] ) {
|
||||||
|
user.ops.equip({params: {key: itemKey}});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
user.preferences.background = "";
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ script(type='text/ng-template', id='partials/options.inventory.equipment.html')
|
|||||||
.row
|
.row
|
||||||
.col-md-6.border-right
|
.col-md-6.border-right
|
||||||
h3.equipment-title.hint(popover-trigger='mouseenter', popover-placement='top', popover-append-to-body='true', popover=env.t('battleGearText'))=env.t('battleGear')
|
h3.equipment-title.hint(popover-trigger='mouseenter', popover-placement='top', popover-append-to-body='true', popover=env.t('battleGearText'))=env.t('battleGear')
|
||||||
|
div(ng-click='dequip();')
|
||||||
|
button {{env.t("dequipAll")}}
|
||||||
li.customize-menu.inventory-gear
|
li.customize-menu.inventory-gear
|
||||||
menu.pets-menu(label='{{::label}}', ng-repeat='(klass,label) in {warrior:env.t("warrior"), wizard:env.t("mage"), rogue:env.t("rogue"), healer:env.t("healer"), special:env.t("special"), mystery:env.t("mystery")}', ng-show='gear[klass]')
|
menu.pets-menu(label='{{::label}}', ng-repeat='(klass,label) in {warrior:env.t("warrior"), wizard:env.t("mage"), rogue:env.t("rogue"), healer:env.t("healer"), special:env.t("special"), mystery:env.t("mystery")}', ng-show='gear[klass]')
|
||||||
div(ng-repeat='item in gear[klass]')
|
div(ng-repeat='item in gear[klass]')
|
||||||
|
|||||||
Reference in New Issue
Block a user