Constructor
- Since:
- Source:
Extends
Members
className :string
The HTML classes to use for this view's element
Type:
- Source:
templateVars
Values meant to be used by the rendered HTML template.
- Source:
type :string
The type of View this is
Type:
- Source:
Methods
blur()
Blur the input field in this View.
- Source:
clearError()
Clear error text, remove error styling and hide the error element.
- Source:
events()
The events this view will listen to and the associated function to call.
- Source:
focus()
Focus the input field in this View.
- Source:
Get the cancel icon button container.
- Source:
Returns:
jQuery element representing the cancel icon button container. Or
an empty jQuery selector if the button is not found.
getError()
Get the error text element.
- Source:
Returns:
jQuery element representing the error text. Or an empty
jQuery selector if the button is not found.
Get the input.
- Source:
Returns:
jQuery element representing the input. Or an empty
jQuery selector if the button is not found.
Get the container element for the input.
- Source:
Returns:
jQuery element representing the input container. Or an empty
jQuery selector if the button is not found.
Get the current value of the input field.
- Source:
Returns:
The current value of the input field or empty string if the
input field is not found.
Get the search icon button.
- Source:
Returns:
jQuery element representing the search icon button. Or an empty
jQuery selector if the button is not found.
hideCancelAndDimSearch()
Manage state change for the search button and cancel button when user has
cleared the input.
- Source:
onBlur()
Event handler for Backbone.View configuration that is called whenever
the user blurs the input.
- Source:
onCancel()
Handler function for the cancel icon button action.
- Source:
onFocus()
Event handler for Backbone.View configuration that is called whenever
the user focuses the input.
- Source:
onKeydown()
Event handler for Backbone.View configuration that is called whenever
the user types a key.
- Source:
onKeyup()
Event handler for Backbone.View configuration that is called whenever
the user types a key.
- Source:
onSearch()
Event handler for Backbone.View configuration that is called whenever
the user clicks the search button or hits the Enter key.
- Source:
render()
Render the view by updating the HTML of the element.
The new HTML is computed from an HTML template that
is passed an object with relevant view state.
- Source:
setError(errorText)
API for the view that conducts the search to toggle on the error message.
Parameters:
Name |
Type |
Description |
errorText |
string
|
|
- Source:
Set the current value of the input field.
- Source:
showCancelAndSearch()
Manage state change for the search button and cancel button when user has
entered some input.
- Source: