Javascript¶
The following documentation is directed towards people developing the front-end for EVE-SRP. These functions should not be used by end-users, and are purely an implementation detail.
Utilities¶
- month(month_int)¶
Convert an integer representing a month to the three letter abbreviation.
Arguments: - month_int (int) – An integer (0-11) representing a month.
Returns: The three letter abbreviation for that month.
Return type: string
- padNum(num, width)¶
Pad a number with leading 0s to the given width.
Arguments: - num (int) – The number to pad.
- width (int) – The width to pad num to.
Returns: num padded to width with 0s.
Return type: string
- pageNumbers(num_pages, current_page[, options])¶
Return an array of page numbers, skipping some of them as configured by the options argument. This function should be functionally identical to Flask-SQLAlchemy’s Pagination.iter_pages (including in default arguments). One deviation is that this function uses 0-indexed page numbers instead of 1-indexed, to ease compatibility with PourOver. Skipped numbers are represented by null.
Arguments: - num_pages (int) – The total number of pages.
- current_page (int) – The index of the current page.
- options – An object with vonfiguration values for where to sjip numbers. Keys are left_edge, left_current, right_current, and right_edge. The default values are 2, 2, 5 and 2 respectively.
Returns: The page numbers to be show, in order.
Return type: An array on integers (and null).
- pager_a_click(ev)¶
Event callback for pager links. It intercepts the event and changes the current PourOver view to reflect the new page.
Arguments: - ev (event) – The event object.
PourOver¶
- class RequestsView(name, collection)¶
An extension of PourOver.View with a custom render function recreating a table of Requests with the associated pager.