Methods
_bindItemEditCancel(handler)
EventListener of the cancelling of the element's editing.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | Callback executed over certains contitions. |
_bindItemEditDone(handler)
EventListener of the validation of the element's editing.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | Callback executed over certains contitions. |
_clearCompletedButton(completedCount, visible)
Hide completed items.
Parameters:
Name | Type | Description |
---|---|---|
completedCount |
number | The number of checked items. |
visible |
bolean | True if visible, false otherwise. |
_editItem(id, title)
Allows editing of an item.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The ID of the item to edit. |
title |
string | The content of the item's modifications. |
_editItemDone(id, title)
Replaces the old item by the edited item.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The ID of the item to edit. |
title |
string | The content of the item's modifications. |
_elementComplete(id, completed)
Test if the item is checked.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | ID of the item to test. |
completed |
bolean | The status of the item. |
_itemId(element)
Adds an ID to the element.
Parameters:
Name | Type | Description |
---|---|---|
element |
object | The active element. |
_removeItem(id)
Delete the todo according to his id.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The ID of the element to delete. |
_setFilter(currentPage)
Indicates the current page.
Parameters:
Name | Type | Description |
---|---|---|
currentPage |
string | The current page can have the values : '' || active || completed |
bind(event, handler)
Make the link between the controller's methods and the view's elements.
Parameters:
Name | Type | Description |
---|---|---|
event |
function | The active event. |
handler |
function | Callback executed over certains contitions. |
render(viewCmd, parameter)
Return the elements in the DOM.
Parameters:
Name | Type | Description |
---|---|---|
viewCmd |
string | The active function. |
parameter |
object | The active parameters. |