Skip to content

Commit

Permalink
Submit changes on attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
decioferreira committed May 31, 2012
1 parent 738a9a6 commit a1ec4d5
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -34,7 +34,6 @@ class MangroveValidation.Views.Islands.IslandView extends Backbone.View
@changeView('geometry') if @currentView != 'geometry'
else if tabLi.prop('id') == 'attributes-tab'
@changeView('show') if @currentView == 'geometry'


changeView: (view) =>
# Change the current view and render
Expand All @@ -49,6 +48,11 @@ class MangroveValidation.Views.Islands.IslandView extends Backbone.View
viewParams.activeTab = 'attributes'
@$el.html(@template(viewParams))

if @currentView == 'edit'
@model.off('change', @render)
else
@model.on('change', @render)

# Create a sub-view based on the currentView
if @currentView == 'show'
view = new MangroveValidation.Views.Islands.ShowView({model: @model})
Expand Down

0 comments on commit a1ec4d5

Please sign in to comment.