-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
StudentSupportCallForm: Implementing preference table #1450
- Loading branch information
Showing
15 changed files
with
114 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...structionalSupport/studentSupportCallForm/directives/studentComments/studentComments.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div class="student-comments" ng-if="supportCallResponse.collectGeneralComments"> | ||
<div class="student-comments" ng-show="supportCallResponse.collectGeneralComments"> | ||
<h5>Comments</h5> | ||
<textarea | ||
class="student-comments__text" | ||
ng-model="supportCallResponse.generalComments" | ||
auto-input on-change="updateSupportCallResponse()" on-change-delay="500"> | ||
auto-input on-blur="updateStudentComments()"> | ||
</textarea> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...tCallForm/directives/studentPreferences/studentPreferenceTable/studentPreferenceTable.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.student-preference-table__empty-warn { | ||
text-align: center; | ||
height: 100%; | ||
background-color: white; | ||
} |
43 changes: 43 additions & 0 deletions
43
...CallForm/directives/studentPreferences/studentPreferenceTable/studentPreferenceTable.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<div class="student-preference-table"> | ||
<div ng-show="state && state.supportAssignments.ids.length == 0" class="jumbotron student-preference-table__empty-warn"> | ||
<p class="lead">There are no courses available for this support call.</p> | ||
<br /> | ||
<p class="lead">If you feel this is in error please contact the Academic Planner for {{ sharedState.workgroup.name }}.</p> | ||
</div> | ||
|
||
<div ng-show="state && state.supportAssignments.ids.length > 0"> | ||
<table> | ||
<thead> | ||
<th>Priority</th> | ||
<th>Course</th> | ||
<th>Comments</th> | ||
<th></th> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="preference in state.preferences | orderBy: 'priority'"> | ||
<td> | ||
{{ preference.priority }} | ||
</td> | ||
<td> | ||
{{ preference.subjectCode }} {{ preference.courseNumber }} - {{ preference.sequencePattern }} | ||
</td> | ||
<td> | ||
<button class="btn btn-default" ng-click="openPreferenceCommentModal(preference)"> | ||
Add preference comments | ||
</button> | ||
</td> | ||
<td> | ||
<div> | ||
<i class="glyphicon glyphicon-remove student-course-remove" | ||
uib-tooltip="Delete preference" tooltip-placement="bottom" | ||
confirm-button="deletePreference(preference)" | ||
message="Are you sure you want to delete this preference?" | ||
yes="Confirm" no="Cancel" placement="top"> | ||
</i> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> |
16 changes: 16 additions & 0 deletions
16
...rtCallForm/directives/studentPreferences/studentPreferenceTable/studentPreferenceTable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
instructionalSupportApp.directive("studentPreferenceTable", this.studentPreferenceTable = function () { | ||
return { | ||
restrict: 'E', | ||
templateUrl: 'studentPreferenceTable.html', | ||
replace: true, | ||
link: function (scope, element, attrs) { | ||
scope.addPreference = function(preference) { | ||
studentActions.addStudentPreference(preference); | ||
}; | ||
|
||
scope.deletePreference = function(preference) { | ||
studentActions.deleteStudentPreference(preference); | ||
}; | ||
} | ||
}; | ||
}); |
66 changes: 7 additions & 59 deletions
66
...ionalSupport/studentSupportCallForm/directives/studentPreferences/studentPreferences.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,12 @@ | ||
<div class="student-preferences"> | ||
<div class="student-course-container"> | ||
|
||
<ipa-section-header | ||
header-text="'Preferences'"> | ||
</ipa-section-header> | ||
|
||
<div style="margin-left: -200px;" ng-if="view.state && view.state.supportAssignments.ids.length == 0"> | ||
<!-- handle lack of active teaching call --> | ||
<div class="jumbotron" style="text-align: center; height: 100%; background-color: white;"> | ||
<p class="lead">There are no courses available for this support call.</p> | ||
<br /> | ||
<p class="lead">If you feel this is in error please contact the Academic Planner for {{ sharedState.workgroup.name }}.</p> | ||
</div> | ||
</div> | ||
<student-preference-table> | ||
</student-preference-table> | ||
|
||
<!-- preferences --> | ||
<ul id="sortable" class="sortable-student-preferences"> | ||
<li ng-repeat="preference in view.state.preferences | orderBy: 'priority'" class="student-course-section" id="{{ preference.id }}"> | ||
<div class="student-course"> | ||
<div> | ||
{{ preference.priority }} | ||
</div> | ||
|
||
<i class="glyphicon glyphicon-option-vertical move-course-icon"> | ||
</i> | ||
|
||
<div class="student-course-info"> | ||
<div> | ||
<div class="student-course_title"> | ||
{{ preference.subjectCode }} {{ preference.courseNumber }} - {{ preference.sequencePattern }} | ||
</div> | ||
<div class="student-preference"> | ||
{{ getRoleDisplayName(preference.type) }} | ||
</div> | ||
</div> | ||
<div> | ||
<i ng-if="view.state.ui.isFormLocked == false" class="glyphicon glyphicon-remove student-course-remove" | ||
uib-tooltip="Delete preference" tooltip-placement="bottom" | ||
confirm-button="deletePreference(preference)" | ||
message="Are you sure you want to delete this preference?" | ||
yes="Confirm" no="Cancel" placement="top"> | ||
</i> | ||
</div> | ||
</div> | ||
</div> | ||
<div ng-show="view.state.supportCallResponse.collectPreferenceComments" class="comments-btn"> | ||
<div ng-if="preference.comment.length == 0 && view.state.supportCallResponse.requirePreferenceComments == true" uib-tooltip="Preference comment is required"> | ||
<div ng-click="openPreferenceCommentModal(preference)"><i class="glyphicon glyphicon-edit preference-comments-ui" | ||
ng-class="{'preference-comment-submitted' : preference.comment.length > 0 }"></i> | ||
<span>Comments...</span> | ||
</div> | ||
</div> | ||
<div ng-if="preference.comment.length != 0 || view.state.supportCallResponse.requirePreferenceComments != true"> | ||
<div ng-click="openPreferenceCommentModal(preference)"><i class="glyphicon glyphicon-edit preference-comments-ui" | ||
ng-class="{'preference-comment-submitted' : preference.comment.length > 0 }"></i> | ||
<span>Comments...</span> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
</ul> | ||
<student-preference-selector> | ||
</student-preference-selector> | ||
|
||
</div> | ||
<student-preference-selector> | ||
</student-preference-selector> | ||
</div> |
4 changes: 2 additions & 2 deletions
4
...upport/studentSupportCallForm/directives/studentQualifications/studentQualifications.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div class="student-qualifications" ng-if="supportCallResponse.collectTeachingQualifications"> | ||
<div class="student-qualifications" ng-show="supportCallResponse.collectTeachingQualifications"> | ||
<h5>Teaching Qualification</h5> | ||
<textarea | ||
class="student-qualifications__text" | ||
ng-model="supportCallResponse.teachingQualifications" | ||
auto-input on-change="updateSupportCallResponse()" on-change-delay="1000"> | ||
auto-input on-blur="updateStudentQualifications()"> | ||
</textarea> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.ipa-tile { | ||
padding: 5px 25px 10px 25px; | ||
background-color: white; | ||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | ||
} |