diff --git a/config.js b/config.js index 4b55987..39469fe 100644 --- a/config.js +++ b/config.js @@ -4,7 +4,6 @@ angular.module('flashy', [ 'flashy.FeedController', 'flashy.DeckController', 'flashy.ClassAddController', - 'flashy.ClassDropController', 'flashy.RequestResetController', 'flashy.StudyController', 'flashy.UserService', @@ -108,12 +107,6 @@ angular.module('flashy', [ templateUrl: 'templates/addclass.html', controller: 'ClassAddController' }). - state('dropclass', { - resolve: auth_resolve, - url: '/settings/dropclass', - templateUrl: 'templates/dropclass.html', - controller: 'ClassDropController' - }). state('deck', { resolve: auth_resolve, url: '/deck/{sectionId}', diff --git a/home.html b/home.html index 9a23fa4..0e828e7 100644 --- a/home.html +++ b/home.html @@ -170,7 +170,6 @@ <script src="scripts/DeckController.js"></script> <script src="scripts/RequestResetController.js"></script> <script src="scripts/ClassAddController.js"></script> -<script src="scripts/ClassDropController.js"></script> <script src="scripts/StudyController.js"></script> <script src="scripts/ResetPasswordController.js"></script> <script src="scripts/CardListController.js"></script> diff --git a/scripts/ClassDropController.js b/scripts/ClassDropController.js deleted file mode 100644 index e715fd5..0000000 --- a/scripts/ClassDropController.js +++ /dev/null @@ -1,20 +0,0 @@ -angular.module('flashy.ClassDropController', ['ui.router']). - controller('ClassDropController', function($rootScope, $resource, $scope, $state, $http, UserService) { - $scope.hi = 'hi'; - $rootScope.SectionResource = $resource('/api/sections/:sectionId/'); - $rootScope.currentSection = {}; - $rootScope.UserService = UserService; - - $scope.dropClass = function(section) { - $http.post('/api/sections/' + section.id + '/drop/'). - success(function(data) { - console.log(section.short_name + ' dropped'); - - Materialize.toast('Dropped', 3000, 'rounded'); - }). - error(function(err) { - console.log('no drop for you'); - }); - }; - - }); diff --git a/templates/dropclass.html b/templates/dropclass.html deleted file mode 100644 index 78196a9..0000000 --- a/templates/dropclass.html +++ /dev/null @@ -1,28 +0,0 @@ -<div class="row"> - <div class="col s8 offset-s2"> - <div class="card-panel" id="dropClassForm"> - - <h2>Enrolled Classes</h2> - <div class="row" style="padding: 0px 25px"> - <table class="hoverable responsive-table"> - <thead> - <tr> - <th data-field="id">Class</th> - <th data-field="drop">Drop?</th> - </tr> - </thead> - - <tbody> - <tr ng-repeat="section in UserService.getUserData().sections"> - <td> - <span>{{section.short_name}}</span> - <p>{{section.long_name}}</p> - </td> - <td><a href="" ng-click="dropClass(section)"><i class="mdi-content-clear small"></i></a></td> - </tr> - </tbody> - </table> - </div> - </div> - </div> -</div>