Files
habitica/assets/js/controllers/userAvatarCtrl.js
T
Tyler Renelle 7bfaac80a7 rewrite2 big one: add ngRoute for /#/tasks & /#/options. requires 2
/partial routes on server. code cleanup & reorganization, remove a lot
of return statements (coffeescript compiled)
2013-08-27 21:13:05 -04:00

24 lines
558 B
JavaScript

"use strict";
habitrpg.controller("UserAvatarCtrl", function($scope, $location, filterFilter, User) {
debugger
$scope.profile = User.user;
$scope.hideUserAvatar = function() {
$(".userAvatar").hide();
};
$scope.clickAvatar = function(profile) {
debugger
if (User.user.id == profile.id) {
if ($location.path() == '/tasks') {
$location.path('/options')
} else {
$location.path('/tasks');
}
} else {
//TODO show party member modal
//$("#avatar-modal-#{uid}").modal('show')
}
}
});