mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Added start party option, locales, and plus button
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User',
|
||||
function($scope, Groups, User) {
|
||||
habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User', '$location', '$rootScope',
|
||||
function($scope, Groups, User, $location, $rootScope) {
|
||||
|
||||
$scope.Math = window.Math;
|
||||
$scope.user = User.user;
|
||||
@@ -16,6 +16,17 @@ habitrpg.controller("HeaderCtrl", ['$scope', 'Groups', 'User',
|
||||
$scope.$watch('user.party.orderAscending', triggerResort);
|
||||
});
|
||||
|
||||
$scope.inviteOrStartParty = function(group) {
|
||||
if (group.type === "party") {
|
||||
$rootScope.openModal('invite-friends', {controller:'InviteToGroupCtrl', resolve:
|
||||
{injectedGroup: function(){
|
||||
return group;
|
||||
}}});
|
||||
} else {
|
||||
$location.path("/options/groups/party");
|
||||
}
|
||||
}
|
||||
|
||||
function resortParty() {
|
||||
var result = _.sortBy(
|
||||
_.filter($scope.party.members, function(member){
|
||||
|
||||
Reference in New Issue
Block a user