[#1477] port settings modals to jade, implemented restore

This commit is contained in:
Tyler Renelle
2013-09-08 13:23:37 -04:00
parent d471688c54
commit 5e51148f8e
5 changed files with 80 additions and 74 deletions

View File

@@ -49,5 +49,21 @@ habitrpg.controller('SettingsCtrl',
});
}
$scope.restore = function(){
var stats = User.user.stats,
items = User.user.items;
User.setMultiple({
"stats.hp": stats.hp,
"stats.exp": stats.exp,
"stats.gp": stats.gp,
"stats.lvl": stats.lvl,
"items.weapon": items.weapon,
"items.armor": items.armor,
"items.head": items.head,
"items.shield": items.shield
});
$rootScope.modals.restore = false;
}
}
]);