diff --git a/locales/bg/app.json b/locales/bg/app.json index d4a0b0aafb..f8805bbf7a 100644 --- a/locales/bg/app.json +++ b/locales/bg/app.json @@ -130,6 +130,10 @@ "hair": "Hair", "skin": "Skin", "clothing" : "Clothing", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Photo Url", "fullName": "Full Name", "blurb": "Blurb", diff --git a/locales/cs/app.json b/locales/cs/app.json index b29382a176..d3c776157a 100644 --- a/locales/cs/app.json +++ b/locales/cs/app.json @@ -131,6 +131,10 @@ "hair": "Hair", "skin": "Skin", "clothing" : "Clothing", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Photo Url", "fullName": "Full Name", "blurb": "Blurb", diff --git a/locales/cu/app.json b/locales/cu/app.json index 37b003b75c..d69a2a23d0 100644 --- a/locales/cu/app.json +++ b/locales/cu/app.json @@ -132,6 +132,10 @@ "hair": "Hair", "skin": "Skin", "clothing" : "Clothing", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Photo Url", "fullName": "Full Name", "blurb": "Blurb", diff --git a/locales/de/app.json b/locales/de/app.json index 90d862c503..26a139867e 100644 --- a/locales/de/app.json +++ b/locales/de/app.json @@ -131,6 +131,10 @@ "hair": "Haare", "skin": "Haut", "clothing" : "Kleidung", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Bild-Url", "fullName": "Name", "blurb": "über dich", diff --git a/locales/el/app.json b/locales/el/app.json index f89ce2a0bc..349009af8c 100644 --- a/locales/el/app.json +++ b/locales/el/app.json @@ -135,6 +135,10 @@ "hair": "Μαλλιά", "skin": "Δέρμα", "clothing" : "Ρούχα", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Url Φωτογραφίας", "fullName": "Πλήρες Όνομα", "blurb": "Κείμενο", diff --git a/locales/en/app.json b/locales/en/app.json index f068b817c5..607e721ff9 100644 --- a/locales/en/app.json +++ b/locales/en/app.json @@ -137,6 +137,10 @@ "hair": "Hair", "skin": "Skin", "clothing" : "Clothing", + "showWeapon": "Show Weapon", + "other" : "Other", + "showShield": "Show Shield", + "showArmor": "Show Armor", "photoUrl": "Photo Url", "fullName": "Full Name", "blurb": "Blurb", diff --git a/locales/es/app.json b/locales/es/app.json index fdddf5d73b..a4abe78bf4 100644 --- a/locales/es/app.json +++ b/locales/es/app.json @@ -131,6 +131,10 @@ "hair": "Cabello", "skin": "Piel", "clothing" : "Ropa", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Url de la Imagen", "fullName": "Nombre Completo", "blurb": "Descripción", diff --git a/locales/fr/app.json b/locales/fr/app.json index ce61a15538..80e646e8e6 100644 --- a/locales/fr/app.json +++ b/locales/fr/app.json @@ -128,10 +128,14 @@ "avatar": "Avatar", "head": "Tête", - "showHelm": "Afficher le casque", + "showHelm": "Montrer le casque", "hair": "Cheveux", "skin": "Peau", "clothing" : "Vêtements", + "showArmor": "Montrer l'armure", + "other": "Autres", + "showWeapon": "Montrer l'arme", + "showShield": "Montrer le bouclier", "photoUrl": "Lien vers la photo", "fullName": "Nom complet", "blurb": "Bio", diff --git a/locales/he/app.json b/locales/he/app.json index b2f0ec81de..6a5aa7e8b4 100644 --- a/locales/he/app.json +++ b/locales/he/app.json @@ -136,6 +136,10 @@ "hair": "שיער", "skin": "עור", "clothing" : "לבוש", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "כתובת תמונה", "fullName": "שם מלא", "blurb": "קצת על עצמך", diff --git a/locales/id/app.json b/locales/id/app.json index 6e96308bb3..8e58a655a6 100644 --- a/locales/id/app.json +++ b/locales/id/app.json @@ -132,6 +132,10 @@ "hair": "Hair", "skin": "Skin", "clothing" : "Clothing", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Photo Url", "fullName": "Full Name", "blurb": "Blurb", diff --git a/locales/it/app.json b/locales/it/app.json index 8b84bfd77b..a8d3d5882c 100644 --- a/locales/it/app.json +++ b/locales/it/app.json @@ -132,6 +132,10 @@ "hair": "Capelli", "skin": "Pelle", "clothing" : "Abbigliamento", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Url Foto", "fullName": "Nome Completo", "blurb": "Firma", diff --git a/locales/ja/app.json b/locales/ja/app.json index 3f6b197354..879daa5c31 100644 --- a/locales/ja/app.json +++ b/locales/ja/app.json @@ -132,6 +132,10 @@ "hair": "Hair", "skin": "皮膚", "clothing" : "衣料", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "写真 URL", "fullName": "名前", "blurb": "自己紹介", diff --git a/locales/nl/app.json b/locales/nl/app.json index 812296ef2a..90093b7574 100644 --- a/locales/nl/app.json +++ b/locales/nl/app.json @@ -132,6 +132,10 @@ "hair": "Haar", "skin": "Huid", "clothing" : "Kleding", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Foto URL", "fullName": "Volledige Naam", "blurb": "Blurp", diff --git a/locales/no/app.json b/locales/no/app.json index 8e837fec62..b668b942bb 100644 --- a/locales/no/app.json +++ b/locales/no/app.json @@ -137,6 +137,10 @@ "skin": "Hudfarge", "clothing" : "Klær", "photoUrl": "Bilde-URL", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "fullName": "Fullt navn", "blurb": "Kort om deg", "websites": "Nettsider", diff --git a/locales/pl/app.json b/locales/pl/app.json index a24f2b8c5e..ee97d430b3 100644 --- a/locales/pl/app.json +++ b/locales/pl/app.json @@ -132,6 +132,10 @@ "hair": "Włosy", "skin": "Karnacja", "clothing" : "Ubranie", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "URL obrazka", "fullName": "Imię i nazwisko", "blurb": "Krótki opis", diff --git a/locales/pt/app.json b/locales/pt/app.json index 1e81ab6a67..669488790c 100644 --- a/locales/pt/app.json +++ b/locales/pt/app.json @@ -132,6 +132,10 @@ "hair": "Cabelo", "skin": "Pele", "clothing" : "Vestimentas", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Url da Foto", "fullName": "Nome Completo", "blurb": "Sinopse", diff --git a/locales/ru/app.json b/locales/ru/app.json index 7d46037ed6..1e13f69762 100644 --- a/locales/ru/app.json +++ b/locales/ru/app.json @@ -132,6 +132,10 @@ "hair": "Волосы", "skin": "Кожа", "clothing" : "Одежда", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Ссылка на фото", "fullName": "Полное имя", "blurb": "О себе", diff --git a/locales/sl/app.json b/locales/sl/app.json index 34e1db8429..ef5783c5e9 100644 --- a/locales/sl/app.json +++ b/locales/sl/app.json @@ -136,7 +136,11 @@ "showHelm": "Pokaži čelado", "hair": "Lasje", "skin": "Polt", - "clothing" : "Oblačila", + "clothing" : "OblaËila", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Spletni naslov slike", "fullName": "Polno ime", "blurb": "O tebi", @@ -410,4 +414,4 @@ "yesterday":"Včeraj", "daysAgo":"dni nazaj" -} \ No newline at end of file +} diff --git a/locales/uk/app.json b/locales/uk/app.json index ac63261901..2dbe2ecedc 100644 --- a/locales/uk/app.json +++ b/locales/uk/app.json @@ -132,6 +132,10 @@ "hair": "Волосся", "skin": "Кожа", "clothing" : "Одяг", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Посилання на фото", "fullName": "Повне ім'я", "blurb": "Про себе", diff --git a/locales/ur/app.json b/locales/ur/app.json index d108b425bc..25129f1f72 100644 --- a/locales/ur/app.json +++ b/locales/ur/app.json @@ -131,6 +131,10 @@ "hair": "بال", "skin": "Skin", "clothing" : "Clothing", + "showArmor": "Show Armor", + "other": "Other", + "showWeapon": "Show Weapon", + "showShield": "Show Shield", "photoUrl": "Photo Url", "fullName": "Full Name", "blurb": "Blurb", diff --git a/migrations/20131115_update_gear_preferences.js b/migrations/20131115_update_gear_preferences.js new file mode 100644 index 0000000000..9ec1264b2f --- /dev/null +++ b/migrations/20131115_update_gear_preferences.js @@ -0,0 +1,10 @@ +//Add defaults to show gears in all users +db.users.update( + {}, + {$set:{ + 'preferences.showWeapon': true, + 'preferences.showShield': true, + 'preferences.showArmor': true, + }}, + {multi:true} +) diff --git a/public/js/controllers/userCtrl.js b/public/js/controllers/userCtrl.js index 793f54c9f7..70a950c9cd 100644 --- a/public/js/controllers/userCtrl.js +++ b/public/js/controllers/userCtrl.js @@ -6,9 +6,6 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$ $scope.hideUserAvatar = function() { $(".userAvatar").hide(); }; - $scope.toggleHelm = function(val){ - User.log({op:'set', data:{'preferences.showHelm':val}}); - } $scope.$watch('_editing.profile', function(value){ if(value === true) $scope.editingProfile = angular.copy(User.user.profile); diff --git a/src/models/user.js b/src/models/user.js index f1ac9ea5e5..402dddf34f 100644 --- a/src/models/user.js +++ b/src/models/user.js @@ -191,6 +191,9 @@ var UserSchema = new Schema({ hair: {type:String, 'default':'blond'}, hideHeader: {type:Boolean, 'default':false}, showHelm: {type:Boolean, 'default':true}, + showWeapon: {type:Boolean, 'default':true}, + showShield: {type:Boolean, 'default':true}, + showArmor: {type:Boolean, 'default':true}, skin: {type:String, 'default':'white'}, timezoneOffset: Number, language: String diff --git a/views/options/profile.jade b/views/options/profile.jade index 27c5baa885..b3ae3da80e 100644 --- a/views/options/profile.jade +++ b/views/options/profile.jade @@ -9,14 +9,26 @@ script(id='partials/options.profile.avatar.html', type='text/ng-template') button.m_head_0.customize-option(type='button', ng-click='set("preferences.gender","m")') button.f_head_0.customize-option(type='button', ng-click='set("preferences.gender","f")') label.checkbox - input(type='checkbox', ng-model='user.preferences.showHelm', ng-change='toggleHelm(user.preferences.showHelm)') + input(type='checkbox', ng-model='user.preferences.showHelm', ng-change='set("preferences.showHelm", user.preferences.showHelm?true: false)') | Show Helm - - menu(ng-show='user.preferences.gender=="f"', type='list') + menu(type='list') li.customize-menu menu(label='Clothing') - button.f_armor_0_v1.customize-option(type='button', ng-click='set("preferences.armorSet","v1")') - button.f_armor_0_v2.customize-option(type='button', ng-click='set("preferences.armorSet","v2")') + button.f_armor_0_v1.customize-option(ng-show='user.preferences.gender=="f"', type='button', ng-click='set("preferences.armorSet","v1")') + button.f_armor_0_v2.customize-option(ng-show='user.preferences.gender=="f"', type='button', ng-click='set("preferences.armorSet","v2")') + label.checkbox + input(type='checkbox', ng-model='user.preferences.showArmor', ng-change='set("preferences.showArmor", user.preferences.showArmor?true: false)') + | Show Armor + menu(type='list') + li.customize-menu + menu(label='Other') + label.checkbox + input(type='checkbox', ng-model='user.preferences.showWeapon', ng-change='set("preferences.showWeapon", user.preferences.showWeapon?true: false)') + | Show Weapon + label.checkbox + input(type='checkbox', ng-model='user.preferences.showShield', ng-change='set("preferences.showShield", user.preferences.showShield?true: false)') + | Show Shield + .span4 // hair diff --git a/views/shared/header/avatar.jade b/views/shared/header/avatar.jade index 3154f5f92d..4ea0f2b05c 100644 --- a/views/shared/header/avatar.jade +++ b/views/shared/header/avatar.jade @@ -11,11 +11,12 @@ figure.herobox(ng-click='clickMember(profile._id)', data-name='{{profile.profile // Avatar span(class='{{profile.preferences.gender}}_skin_{{profile.preferences.skin}}') span(class='{{profile.preferences.gender}}_hair_{{profile.preferences.hair}}') - span(class='{{equipped("armor", profile.items.armor, profile.preferences, profile.backer, profile.contributor)}}') + span(class='{{equipped("armor", 0, profile.preferences, profile.backer, profile.contributor)}}') + span(class='{{equipped("armor", profile.items.armor, profile.preferences, profile.backer, profile.contributor)}}', ng-show='profile.preferences.showArmor') span(class='{{profile.preferences.gender}}_head_0', ng-hide='profile.preferences.showHelm') span(class='{{equipped("head", profile.items.head, profile.preferences, profile.backer, profile.contributor)}}', ng-show='profile.preferences.showHelm') - span(class='{{equipped("shield",profile.items.shield,profile.preferences, profile.backer, profile.contributor)}}') - span(class='{{equipped("weapon",profile.items.weapon,profile.preferences, profile.backer, profile.contributor)}}') + span(class='{{equipped("shield",profile.items.shield,profile.preferences, profile.backer, profile.contributor)}}', ng-show='profile.preferences.showShield') + span(class='{{equipped("weapon",profile.items.weapon,profile.preferences, profile.backer, profile.contributor)}}', ng-show='profile.preferences.showWeapon') // Mount Head span(ng-if='profile.items.currentMount', class='Mount_Head_{{profile.items.currentMount}}')