Utils
Utils class, holds all convenience methods for project.
Static Method Summary
Static Public Methods | ||
public static |
addToggleButtonForElement(element: HTMLElement): jQuery |
|
public static |
|
|
public static |
|
|
public static |
getKeyIdFromEvent(clickEvent: MouseEvent): string |
|
public static |
|
|
public static |
|
|
public static |
Clear the local cache for the current page |
|
public static |
setFileInCache(fileId: string, visibilityBool: boolean): * |
|
public static |
store the current time as the lastViewed in page local cache |
|
public static |
toggleVisibility(fileContent: jQuery): boolean Toggle visibility and return the new visibility state of the element |
|
public static |
updateLocalStorage(key: string, value: object): boolean |
Static Public Methods
public static addToggleButtonForElement(element: HTMLElement): jQuery source
Params:
Name | Type | Attribute | Description |
element | HTMLElement | File container from pull page. |
public static getKeyIdFromEvent(clickEvent: MouseEvent): string source
Params:
Name | Type | Attribute | Description |
clickEvent | MouseEvent | Click event from a file's action bar. |
public static toggleVisibility(fileContent: jQuery): boolean source
Toggle visibility and return the new visibility state of the element
Params:
Name | Type | Attribute | Description |
fileContent | jQuery | jQuery div containing the diff for the file. |
Return:
boolean | true if the file should be visible on page load. false if the file should be hidden. |