mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
* dummy * Renamed internationalized strings to more meaningful names * moved the new group creation state out to its own URL, so it can also be linked to by the static/plans page * Added redirect-through-login functionality from the static/plans page new-group button This includes a static non-modal login page (similar to how other sites have both a login page and login modal) The login body has been abstracted out from its modal-specific view into mixins to accomplish this * deleted bak files added by mistake * deleted scripts added by mistake * changed static/plans Create Group button text * Added form link (https://github.com/HabitRPG/habitica/issues/8674#issuecomment-303518039) Removed changes to non-EN locale files (https://github.com/HabitRPG/habitica/pull/8729#issuecomment-303555211) * reverted key name changes as per https://github.com/HabitRPG/habitica/pull/8729#issuecomment-304515534 * changed $rootScope to $scope https://github.com/HabitRPG/habitica/pull/8729#discussion_r120695874
This commit is contained in:
@@ -26,11 +26,20 @@ window.habitrpg = angular.module('habitrpg', ['chieffancypants.loadingBar', 'ui.
|
||||
$http.defaults.headers.common['x-client'] = 'habitica-web';
|
||||
}])
|
||||
|
||||
.controller("PlansCtrl", ['$rootScope','Analytics',
|
||||
function($rootScope,Analytics) {
|
||||
.controller("PlansCtrl", ['$rootScope','Analytics','$location','User','$scope',
|
||||
function($rootScope,Analytics,$location,User,$scope) {
|
||||
$rootScope.clickContact = function(){
|
||||
Analytics.track({'hitType':'event','eventCategory':'button','eventAction':'click','eventLabel':'Contact Us (Plans)'})
|
||||
}
|
||||
};
|
||||
$scope.goToNewGroupPage = function () {
|
||||
if (User.authenticated()) {
|
||||
window.location.href="/#/options/groups/new-group";
|
||||
} else {
|
||||
// There is no authenticated user, so redirect to the login page,
|
||||
// taking the hash with it to effectively redirect after login.
|
||||
window.location.href = "/static/login#/options/groups/new-group";
|
||||
}
|
||||
};
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user