Skip to content

Commit

Permalink
Merge pull request #30 from Weiqi97/bugfix/firefox_fit
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
WeiqiNs authored Jul 24, 2018
2 parents 29ae558 + 8b22131 commit c4d50cd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
Binary file removed static/images/github.png
Binary file not shown.
Binary file removed static/images/gmail-icon.png
Binary file not shown.
3 changes: 2 additions & 1 deletion static/js/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ export function readyCalendar () {

/**
* Add class from data table to calendar.
* @param event - The event object that was clicked.
* @returns {void} - This function has no return.
*/
export function toCalendar () {
export function toCalendar (event) {
// Get the row with the add button clicked.
const clickedRow = $(event.currentTarget).closest('tr')
// Get the data within the row.
Expand Down
3 changes: 2 additions & 1 deletion static/js/class_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ export function convertDataTable (table) {

/**
* This function sets expand data row when click.
* @param event - The event object that was clicked.
* @returns {void} - This function has no return.
*/
export function expandDataRow () {
export function expandDataRow (event) {
// Get the data table selector.
const courseTable = $('#course-table')
// Get the data table object.
Expand Down
8 changes: 6 additions & 2 deletions static/js/script_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ function getClassTable () {
const tableHolder = $('#course-container')
tableHolder.html(response)
classTable.convertDataTable(tableHolder.children())
$('.to-calendar').click(calendar.toCalendar)
$('.show-detail').click(classTable.expandDataRow)
$('.to-calendar').click(function (event) {
calendar.toCalendar(event)
})
$('.show-detail').click(function (event) {
classTable.expandDataRow(event)
})
}
)
.fail( // If something went wrong.
Expand Down

0 comments on commit c4d50cd

Please sign in to comment.