KUMobile

API Docs for: 0.0.2

KUMobile.Directory

Module: KUMobile

Contains all directory related functions for loading and controlling the directory page. This only takes faculty directory into consideration.

deobfuscate

(
  • message
)
String

Deobfuscation method to properly interpret directory information

Parameters:

Name Type Description
message String
  • whacky string to deobfuscate

Example:

var secret = KUMobile.Directory.deobfuscate("insert-crazy-message-here");

loadNextPage

()

Loads and displays the next set of directory items.

Example:

KUMobile.Directory.loadNextPage();

reinitialize

()

Reinitializes all properties of KUMobile.Directory as if to restore a new/default instance.

Example:

KUMobile.Directory.reinitialize();

lastValue

string

Represents the last value the user has searched for in the directory

Default: ""

listQueue

Array private

Contains the current list of article DOM

  • tag items that still need to be added to the DOM (much faster to add all at once after load is done downloading). This helps prevent the application from seeming to hang or become unresponsive.

  • LOAD_THRESHOLD_PX

    int

    Designates the minimum number of pixels that the user can scroll (calculated from the bottom) before another load event is triggered.

    Default: 660

    loading

    boolean

    Is the directory page loading?

    Default: false

    page

    int

    Current page number as referenced from the directory website.

    Default: 0

    PAGES_TO_LOAD

    int

    Number of pages to load from the directory website after a trigger event occurs.

    Default: 2

    queue

    int private

    How many pages that need to be downloaded still. This is used to asynchronously download pages.

    Default: 0

    reachedEnd

    boolean

    Tells whether or not the user has reached the end of the scrolling.

    Default: false

    sentTimeout

    Object private

    Contains the last timeout call sent. This allows us to restart the timeout if the user re-searches in any way (dropdown, or searchbar). The major benefit of this is that it gives us the feeling of incremental searching, e.g we send a timeout of some milliseconds whenever the KEY_UP event triggers, as well as cancelling out the last timeout we sent.

    sentTimeout

    Object private

    Contains the last timeout call sent. This allows us to restart the timeout if the user re-searches in any way (dropdown, or searchbar). The major benefit of this is that it gives us the feeling of incremental searching, e.g we send a timeout of some milliseconds whenever the KEY_UP event triggers, as well as cancelling out the last timeout we sent.

    tid

    string

    The latest topic identifier for Kettering's directory searching. This represents the department the user has selected to filter by.

    Default: "All"

    typing

    boolean

    Is the user currently typing?

    Default: false

    directSearch

    Triggered when the user does a direct change. The direct change includes typing then changing focus or pressing the clear button. This is redundant to the incremental search event, except for the clear button!!

    incrementalSearch

    Triggered when the user does a key up event in order to simulate incremental searching for the attached search bar.

    pageCreate

    Triggered when the directory page is first created based on jQuery Mobile pagecreate event. This is called after the page itself is created but before any jQuery Mobile styling is applied.

    pageInit

    Triggered when the directory page is first initialized based on jQuery Mobile pageinit event.

    scroll

    Triggered when regular scroll event happens in directory scroller window. It is used to check if the user is near the bottom of the page, so more content can be loaded (simulate infinite scrolling).

    tidChange

    Triggered when the user does a change to the TID/department drop down box. When this happens, we generally need to redo the search.