Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "jeeves"

Index

Variables

Promise

Promise: Promise = e6promise.Promise

Polyfills Promise.

active

active: number = 0

The index of the current active calendar.

activefilter

activefilter: Filter = new Filter()

The current active filter that is still being modified. Once 'enter' is pressed, this is moved to filters and activefilter is set to a new Filter.

buffer

buffer: string = ""

The current text buffer for the filter bar.

calendars

calendars: Calendar[] = []

Master list of all calendar data

coursecatalogue

coursecatalogue: CourseCatalogue = new CourseClasses.CourseCatalogue()

All courses to be used in this session.

courseexportTether

courseexportTether: any

Tethers (from Tether.js) used in the modals.

filters

filters: Filter[] = []

List of all filters active.

modalmenuTether

modalmenuTether: any

Tethers (from Tether.js) used in the modals.

searchboxTimeout

searchboxTimeout: any = null

Stores the setTimeout() index for the search bar.

unitindex

unitindex: any = null

Functions

activateModals

  • activateModals(): void

addToCourses

  • addToCourses(code: string, sectionindex: string, sectiondata: any): void
  • Adds a course to the calendar. Also redraws search results.

    todo

    figure out if sectiondata is still needed. seems no.

    Parameters

    • code: string

      The course name (eg, CSCI-SH 101)

    • sectionindex: string

      The section code, not necessarily a number.

    • sectiondata: any

    Returns void

askremove

clonecalendar

  • clonecalendar(): void
  • Makes a deep copy of an existing calendar and pans camera to it.

    Returns void

decideNothingMessage

  • decideNothingMessage(selection: any): void
  • Decides when to show "Enter something to get started!"

    todo

    figure out what selection is

    Parameters

    • selection: any

      The css selector for the search bar, probably.

    Returns void

displaySearchResults

  • displaySearchResults(includeActive: boolean, scrollTo: string): void
  • Combines the various filters and displays the results in the search area.

    Parameters

    • includeActive: boolean

      Whether to also display the active filter's results.

    • scrollTo: string

      To prevent the search results from jumping around, the provided CSS selector scrollTo will be used to attempt to keep the results at roughly the 'same' location.

    Returns void

expandOrContractText

exportCourseNumbers

  • exportCourseNumbers(): void
  • Updates the modal table that displays all course selected.

    Returns void

exportImage

  • exportImage(): void
  • Renders a copy of the calendar and triggers a download.

    Returns void

filterintersect

hideModals

  • hideModals(): void

init

  • init(testing: boolean): void
  • Initializes the entire Jeeves app.

    Parameters

    • testing: boolean

    Returns void

max

  • max(a: any, b: any): any
  • Returns the larger of a and b.

    Parameters

    • a: any
    • b: any

    Returns any

newcalendar

  • newcalendar(): void
  • Initializes a new calendar and pans camera to it.

    Returns void

promiseJson

  • promiseJson(filenames: any): Promise<Object>
  • Reads all files in parallel.

    Parameters

    • filenames: any

      List of files to read.

    Returns Promise<Object>

readJson

  • readJson(filename: any): Promise<Object>
  • Returns a Promise for reading a file rom courses/ and importing into the course catalogue.

    Parameters

    • filename: any

      The file from courses/ to read.

    Returns Promise<Object>

    a Promise.

removecalendar

  • removecalendar(d: Calendar, target: Selection<any>): void
  • Handles the logic of deleting a calendar.

    todo

    figure out what target is.

    Parameters

    • d: Calendar

      Calendar to delete

    • target: Selection<any>

    Returns void

removefilter

  • removefilter(d: any, i: number): void
  • On-click function for deleting a filter.

    Parameters

    • d: any

      d3's d

    • i: number

      d3's i

    Returns void

resetremovebutton

  • resetremovebutton(target: Selection<any>): void
  • Clicking Remove causes it to turn into a red button that says "Really delete?" This function resets remove button to the original state.

    Parameters

    • target: Selection<any>

      The button to affect.

    Returns void

resultFormatter

  • resultFormatter(d: [string, CourseComponent[], number[]], i: number): void
  • Draws courses and components in search results.

    Parameters

    Returns void

sanitize

  • sanitize(s: any): string
  • The function used to sanitize all input.

    Parameters

    • s: any

      The string to sanitize

    Returns string

satisfiedCourseRequirements

  • Takes the list of required components from Course, and compares it vs the currently selected components. If the requirements aren't fully filled, it returns the components that are missing.

    Parameters

    • courseinfo: Course

      The course to check against.

    • sectionsSelected: SelectedCourse[]

      The selected course sections.

    Returns string[]

    List of missing components

scrollleft

  • scrollleft(): void
  • Pans camera to the calendar to the left.

    Returns void

scrollright

  • scrollright(): void
  • Pans camera to the calendar to the right.

    Returns void

search

  • Gets all courses that satisfy the filter.

    Parameters

    • filter: string

    Returns SearchResult[]

    List of courses that satisfy the filter.

searchbox

  • searchbox(): void
  • Handles keydown events for the search bar, as well as executing searches.

    Returns void

setFilter

  • setFilter(): void
  • Renders a filter's "blue tag" under the search bar and re-initializes activeFilter.

    Returns void

setFilterIfSpaces

  • setFilterIfSpaces(): void
  • Automatically sets a new filter once the user types a space.

    Returns void

setFilterTo

  • setFilterTo(filter: any): void
  • Testing function to programmatically add an active filter.

    Parameters

    • filter: any

      The filter to add.

    Returns void

showMenu

  • showMenu(): void

timeCollides

  • Check if a given component overlaps with any of the already selected courses.

    Parameters

    Returns boolean

updateURLExport

  • updateURLExport(): void
  • Updates the base 64 URL export.

    Returns void

utoa

  • utoa(str: any): string

wait

  • wait(target: any): void
  • Resets remove button after some time.

    Parameters

    • target: any

      The button.

    Returns void

Generated using TypeDoc