Class: H_search

H_search

Utility class for search UI logic used by admin modules.
Not used by public search module.
Handles filtering, pagination, and search actions.
Used as h.libs.search.
ui.js, line 2217

Methods

staticH_search.change_filter(evt, module_name, dom_id)

ui.js, line 2321
Adds change event to filter inputs.
Name Type Description
evt Event The event.
module_name string optional Module name.
dom_id string optional DOM id.

staticH_search.del(evt, module_name, id, dom_id)

ui.js, line 2354
Deletes an item, then refreshes the search.
The `data-confirm` question is asked by H_event before this handler runs: the button carries the attribute, this function only does the deletion and the refresh.
Name Type Default Description
evt Event The event.
module_name string optional Module name.
id number 0 optional Item id.
dom_id string optional DOM id.

staticH_search.filter(val, module_name, dom_id)

ui.js, line 2247
Sets filter value and triggers search.
Name Type Description
val string Filter value.
module_name string optional Module name.
dom_id string optional DOM id.

staticH_search.jump_to(e, module_name, dom_id)

ui.js, line 2304
Jumps to a specific page in search results.
Name Type Description
e Event The event.
module_name string optional Module name.
dom_id string optional DOM id.

staticH_search.modal_edit(id, module_name, tableName, action, dom_id)

ui.js, line 2378
Opens a modal for editing a search result item.
One window per module instance (dom_id), living in that instance's container: two lists opened in two tabs can each have their own editing form at the same time.
Name Type Default Description
id number 0 optional Item id.
module_name string optional Module name.
tableName string optional Table name.
action string optional Action name.
dom_id string optional DOM id.

staticH_search.move_page(direction, module_name, dom_id)

ui.js, line 2264
Moves the search results by one page.
The previous page stops at the first one, the next page has no upper bound (the search answers an empty page past the end).
Name Type Description
direction number -1 for the previous page, 1 for the next one.
module_name string optional Module name.
dom_id string optional DOM id.

staticH_search.next(module_name, dom_id)

ui.js, line 2294
Goes to next page in search results.
Name Type Description
module_name string optional Module name.
dom_id string optional DOM id.

staticH_search.previous(module_name, dom_id)

ui.js, line 2285
Goes to previous page in search results.
Name Type Description
module_name string optional Module name.
dom_id string optional DOM id.

staticH_search.save(module_name, dom_id)

ui.js, line 2339
trig the save action then refresh the search
Name Type Description
module_name string optional Module name.
dom_id string optional DOM id.
ui.js, line 2234
Triggers a search on Enter key.
Name Type Description
event Event The keyboard event.
module_name string optional Module name.
dom_id string optional DOM id.