Skip to content

Commit

Permalink
Merge pull request #142 from sbuttar/master
Browse files Browse the repository at this point in the history
Adding enhancement #131 - Student title vs. Instructor title
  • Loading branch information
mterwill authored Nov 26, 2019
2 parents 34c32ec + eeb9fbc commit cc00dea
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/assets/javascripts/components/course_queue.js.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ var CourseQueue = React.createClass({
instructorMessage: '',
};
},
updateTitle:function(){
var myRequest = this.getMyFirstRequest();
if (myRequest && this.state.requests.indexOf(myRequest.request) >= 0) {
var myRequestIdx = this.state.requests.indexOf(myRequest.request);
document.title = `(#${myRequestIdx + 1}) Office Hours Help Queue`
} else {
document.title = `(${this.state.requests.length}) Office Hours Help Queue`
}
},
enable: function () {
this.setState({ enabled: true });
},
Expand Down Expand Up @@ -162,6 +171,7 @@ var CourseQueue = React.createClass({
} else if (data.action === 'invalid_request') {
alert('Invalid request: ' + data.error);
}
this.updateTitle();
}.bind(this),
});

Expand Down

0 comments on commit cc00dea

Please sign in to comment.