diff --git a/ui/static/app/group.js b/ui/static/app/group.js index 723f3e3..05fe1aa 100644 --- a/ui/static/app/group.js +++ b/ui/static/app/group.js @@ -53,6 +53,15 @@ app.controller('GroupManageController', function($scope, $http, $location){ } $scope.acceptMember = acceptMember; $scope.denyMember = denyMember; + + $http.get('/api/group/'+groupID).then(function(data){ + $scope.group = data.data; + }); + + $scope.editInfo = function(){ + $http.put('/api/group/'+groupID+'/edit/',$scope.group).success(function(data){ + }); + } }) @@ -63,20 +72,5 @@ app.controller('GroupCategoryController', function($scope, $http, $stateParams){ }); }); - - -app.controller('AdminPageController', function($scope, $http, $location){ - var groupID = $location.path().split('/')[2]; - - $http.get('/api/group/'+groupID).then(function(data){ - $scope.group = data.data; - }); - $scope.editInfo = function(){ - console.log("type: "+$scope.group) - $http.put('/api/group/'+groupID+'/edit/',$scope.group).success(function(data){ - }); - } - -}) })(); \ No newline at end of file diff --git a/ui/static/app/main.js b/ui/static/app/main.js index e5f2fc9..c9e95a9 100644 --- a/ui/static/app/main.js +++ b/ui/static/app/main.js @@ -44,11 +44,6 @@ app.config(function($stateProvider, $urlRouterProvider) { templateUrl: 'templates/groupmanage.html', controller: 'GroupManageController' }) - .state('root.group.edit', { - url: '/edit', - templateUrl: 'templates/groupmanage.html', - controller: 'AdminPageController' - }) .state('root.lfg', { url: '/groups/browse', templateUrl: 'templates/groupbrowser.html', diff --git a/ui/static/templates/groupmanage.html b/ui/static/templates/groupmanage.html index 8a13d5c..0d49658 100644 --- a/ui/static/templates/groupmanage.html +++ b/ui/static/templates/groupmanage.html @@ -32,7 +32,7 @@ - +

What's this group about