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:
Tyler Renelle
2013-10-29 15:38:47 -07:00
49 changed files with 1899 additions and 1424 deletions

View File

@@ -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') {