Class: nt.Views.Editor

nt.Views.Editor

new nt.Views.Editor()

Tracker Editor View
Source:

Extends

  • Backbone.View

Methods

close()

Destroy date picker and this view
Source:

createFood()

Create a new model for the Tracker and copy the nutritionView's data to it
Source:

getFoodAttributes()

Get original food attribute values from the nutrition view model
Source:

initialize()

Create a new food model this view will display and listen for changes
Source:

removeError()

Remove error message
Source:

render()

Render food
Source:

renderDatePicker()

Activate the date picker plugin
Source:

renderError()

Display validation error
Source:

saveFood()

Save the model to the collection and close the view
Source:

servingDecrease()

Decrease serving amount and update values
Source:

servingIncrease()

Increase serving amount and update values
Source:

updateView()

Re-render the editor view
Source:

userAttributes()

Get the latest values for user editable attributes
Source: