Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
6 app/assets/javascripts/backbone/views/islands/island_view.js.coffee
View
@@ -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
@@ -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})

No commit comments for this range

Something went wrong with that request. Please try again.