zzurang / backbone

Give your JS App some Backbone with Models, Views, Collections, and Events

Home Page:http://documentcloud.github.com/backbone/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changes

Model triggering 'after_sync' after Backbone.sync gets 2xx from sync with backend. This gives more event driven passion in view code

  class window.EditableUserInfoView extends Backbone.View
      ...
       
      initialize: (attributes, options) ->            
          @after_save_callback  = (options && options['after_save']) || @change_to_display_mode
          @model.bind 'change', @render
          @model.bind 'error', @show_validation_error
          @model.bind 'after_save', @after_save_callback
      ...

About

Give your JS App some Backbone with Models, Views, Collections, and Events

http://documentcloud.github.com/backbone/

License:MIT License


Languages

Language:HTML 57.4%Language:JavaScript 41.5%Language:Ruby 0.6%Language:CoffeeScript 0.4%