Skip to content

Commit

Permalink
Migrate supportAssignments into a separate module #1450
Browse files Browse the repository at this point in the history
  • Loading branch information
ltwheeler committed Nov 30, 2017
1 parent 2a143be commit 56f305b
Show file tree
Hide file tree
Showing 28 changed files with 693 additions and 33 deletions.
18 changes: 17 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ module.exports = function (grunt) {
src: ['supportCall/**/*.html'],
dest: '<%= folders.webapp.build %>/js/supportCallTemplates.js'
},
supportAssignmentApp: {
cwd: '<%= folders.webapp.root %>',
src: ['supportAssignment/**/*.html'],
dest: '<%= folders.webapp.build %>/js/supportAssignmentTemplates.js'
},
courseApp: {
cwd: '<%= folders.webapp.root %>',
src: ['course/**/*.html'],
Expand Down Expand Up @@ -232,6 +237,14 @@ module.exports = function (grunt) {
],
dest: '<%= folders.webapp.build %>/js/supportCallApp.js'
},
jsSupportAssignment: {
src: [
'<%= folders.webapp.root %>/supportAssignment/*.js',
'<%= folders.webapp.root %>/supportAssignment/**/*.js',
'<%= ngtemplates.supportAssignmentApp.dest %>'
],
dest: '<%= folders.webapp.build %>/js/supportAssignmentApp.js'
},
// schedulingApp module files
jsScheduling: {
src: [
Expand Down Expand Up @@ -425,6 +438,7 @@ module.exports = function (grunt) {
'<%= folders.webapp.build %>/summary.html',
'<%= folders.webapp.build %>/teachingCall.html',
'<%= folders.webapp.build %>/supportCall.html',
'<%= folders.webapp.build %>/supportAssignment.html',
'<%= folders.webapp.build %>/teachingCallResponseReport.html',
'<%= folders.webapp.build %>/workgroup.html']
}
Expand Down Expand Up @@ -465,6 +479,7 @@ module.exports = function (grunt) {
'^/instructionalSupport.* /instructionalSupport.html [L]',
'^/teachingCalls.* /teachingCall.html [L]',
'^/supportCalls.* /supportCall.html [L]',
'^/supportAssignments.* /supportAssignment.html [L]',
'^/scheduling.* /scheduling.html [L]',
'^/registrarReconciliationReport.* /registrarReconciliationReport.html [L]',
'^/scheduleSummaryReport.* /scheduleSummaryReport.html [L]',
Expand Down Expand Up @@ -509,7 +524,8 @@ module.exports = function (grunt) {
'concat:jsRegistrarReconciliationReport', 'concat:jsScheduleSummaryReport', 'concat:jsTeachingCallResponseReport', 'concat:cssLib', 'concat:cssShared', 'uglify:dist', 'cssmin', 'cachebreaker']);

grunt.registerTask('serve', ['clean', 'eslint', 'copy', 'ngtemplates', 'bower_concat', 'concat:jsShared', 'concat:jsConfig', 'concat:jsDevSnippets',
'concat:jsCourse', 'concat:jsAdmin', 'concat:jsBudget', 'concat:jsInstructionalSupport', 'concat:jsWorkgroup', 'concat:jsSummary', 'concat:jsAssignment', 'concat:jsTeachingCall', 'concat:jsSupportCall', 'concat:jsScheduling', 'concat:jsRegistrarReconciliationReport',
'concat:jsCourse', 'concat:jsAdmin', 'concat:jsBudget', 'concat:jsInstructionalSupport', 'concat:jsWorkgroup', 'concat:jsSummary', 'concat:jsAssignment', 'concat:jsTeachingCall', 'concat:jsSupportCall',
'concat:jsSupportAssignment', 'concat:jsScheduling', 'concat:jsRegistrarReconciliationReport',
'concat:jsScheduleSummaryReport', 'concat:jsTeachingCallResponseReport', 'concat:cssLib', 'concat:cssShared', 'cachebreaker', 'connect', 'watch']);

grunt.registerTask('default', ['serve']);
Expand Down

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions app/instructionalSupport/instructionalSupportApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@ window.instructionalSupportApp = angular.module("instructionalSupportApp", ["sha

instructionalSupportApp.config(function ($routeProvider) {
return $routeProvider
.when("/", {
templateUrl: "InstructionalSupportAssignment.html",
controller: "InstructionalSupportAssignmentCtrl",
resolve: {
payload: InstructionalSupportAssignmentCtrl.getPayload
}
})
.when("/:workgroupId/:year/:termShortCode", {
templateUrl: "InstructionalSupportAssignment.html",
controller: "InstructionalSupportAssignmentCtrl",
reloadOnSearch: false,
resolve: {
payload: InstructionalSupportAssignmentCtrl.getPayload
}
})
.when("/:workgroupId/:year/:termShortCode/instructorSupportCallForm", {
templateUrl: "InstructorSupportCallForm.html",
controller: "InstructorSupportCallFormCtrl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* # AssignmentCtrl
* Controller of the ipaClientAngularApp
*/
instructionalSupportApp.controller('InstructionalSupportAssignmentCtrl', ['$scope', '$rootScope', '$window', '$location', '$routeParams', '$uibModal', 'instructionalSupportAssignmentActionCreators', '$timeout',
supportAssignmentApp.controller('InstructionalSupportAssignmentCtrl', ['$scope', '$rootScope', '$window', '$location', '$routeParams', '$uibModal', 'instructionalSupportAssignmentActionCreators', '$timeout',
this.InstructionalSupportAssignmentCtrl = function ($scope, $rootScope, $window, $location, $routeParams, $uibModal, instructionalSupportAssignmentActionCreators, $timeout) {
$window.document.title = "Instructional Support";
$scope.workgroupId = $routeParams.workgroupId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
instructionalSupportApp.controller('ModalAddAssignmentSlotCtrl', this.ModalAddAssignmentSlotCtrl = function($scope, $rootScope, $uibModalInstance, instructionalSupportAssignmentActionCreators, sectionGroupId, appointmentType) {
supportAssignmentApp.controller('ModalAddAssignmentSlotCtrl', this.ModalAddAssignmentSlotCtrl = function($scope, $rootScope, $uibModalInstance, instructionalSupportAssignmentActionCreators, sectionGroupId, appointmentType) {
$scope.title = generateTitle($scope.appointmentType);
$scope.formData = {appointmentPercentage: 50, numberOfAppointments: 1};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
supportAssignmentApp.controller('ModalManageInstructorReviewCtrl', this.ModalManageInstructorReviewCtrl = function($scope, $rootScope, $uibModalInstance, instructionalSupportAssignmentActionCreators) {
// do nothing
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
supportAssignmentApp.controller('ModalManageInstructorReviewCtrl', this.ModalManageInstructorReviewCtrl = function($scope, $rootScope, $uibModalInstance, instructionalSupportAssignmentActionCreators) {
// do nothing
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides the main course table in the Courses View
*/
instructionalSupportApp.directive("courseAssignmentSelector", this.courseAssignmentSelector = function ($rootScope, instructionalSupportAssignmentActionCreators) {
supportAssignmentApp.directive("courseAssignmentSelector", this.courseAssignmentSelector = function ($rootScope, instructionalSupportAssignmentActionCreators) {
return {
restrict: 'E',
templateUrl: 'CourseAssignmentSelector.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides the main course table in the Courses View
*/
instructionalSupportApp.directive("coursePivot", this.coursePivot = function ($rootScope, instructionalSupportAssignmentActionCreators) {
supportAssignmentApp.directive("coursePivot", this.coursePivot = function ($rootScope, instructionalSupportAssignmentActionCreators) {
return {
restrict: 'E',
templateUrl: 'CoursePivot.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides the main course table in the Courses View
*/
instructionalSupportApp.directive("supportStaffPivot", this.supportStaffPivot = function ($rootScope, instructionalSupportAssignmentActionCreators) {
supportAssignmentApp.directive("supportStaffPivot", this.supportStaffPivot = function ($rootScope, instructionalSupportAssignmentActionCreators) {
return {
restrict: 'E',
templateUrl: 'SupportStaffPivot.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides the main course table in the Courses View
*/
instructionalSupportApp.directive("supportStaffSelector", this.supportStaffSelector = function ($rootScope, instructionalSupportAssignmentActionCreators) {
supportAssignmentApp.directive("supportStaffSelector", this.supportStaffSelector = function ($rootScope, instructionalSupportAssignmentActionCreators) {
return {
restrict: 'E',
templateUrl: 'SupportStaffSelector.html',
Expand Down
Loading

0 comments on commit 56f305b

Please sign in to comment.