mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
gMerge branch 'challenges' into develop
Conflicts: migrations/20131028_cleanup_deleted_tags.js src/controllers/groups.js views/options/groups/group.jade views/options/profile.jade
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
/* Make user and settings available for everyone through root scope.
|
||||
*/
|
||||
|
||||
habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$http',
|
||||
function($scope, $rootScope, $location, User, $http) {
|
||||
habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$http', '$state', '$stateParams',
|
||||
function($scope, $rootScope, $location, User, $http, $state, $stateParams) {
|
||||
$rootScope.modals = {};
|
||||
$rootScope.modals.achievements = {};
|
||||
$rootScope.User = User;
|
||||
@@ -12,6 +12,15 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
||||
$rootScope.settings = User.settings;
|
||||
$rootScope.flash = {errors: [], warnings: []};
|
||||
|
||||
// Angular UI Router
|
||||
$rootScope.$state = $state;
|
||||
$rootScope.$stateParams = $stateParams;
|
||||
|
||||
// indexOf helper
|
||||
$scope.indexOf = function(haystack, needle){
|
||||
return haystack && ~haystack.indexOf(needle);
|
||||
}
|
||||
|
||||
$scope.safeApply = function(fn) {
|
||||
var phase = this.$root.$$phase;
|
||||
if(phase == '$apply' || phase == '$digest') {
|
||||
|
||||
Reference in New Issue
Block a user