Make WordPress Core


Ignore:
Timestamp:
03/03/2013 07:04:06 AM (12 years ago)
Author:
koopersmith
Message:

Update Backbone to 0.9.10. Update media to handle breaking changes.

  • When overriding Backbone.sync(), ensure the sync and error events fire consistently.
  • Model#make() has been removed. Use $ instead, and be sure to grab the DOM node where necessary (using [0]).
  • Collection#get() now accepts cids. Collection#getByCid() has been removed.
  • When overriding the State constructor, bind change callbacks after the default Model constructor is called, because the Model constructor no longer passes the silent flag when calling set() for the default attributes.
  • In 'change' events, options.changes was removed. It can now be accessed through model.changed. Check if any attributes have changed by calling model.hasChanged(). Also, don't mess with model.changed; it persists beyond the scope of a single event.
  • options.index is no longer be set in the add event callback. Use collection.indexOf(model) can be used to retrieve the index of a model instead.

props gcorne. fixes #23262.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r23581 r23589  
    272272    $scripts->add( 'underscore', '/wp-includes/js/underscore.min.js', array(), '1.4.4', 1 );
    273273    $scripts->add( 'template', "/wp-includes/js/template$suffix.js", array('underscore'), '1.4.4', 1 );
    274     $scripts->add( 'backbone', '/wp-includes/js/backbone.min.js', array('underscore','jquery', 'template'), '0.9.2', 1 );
     274    $scripts->add( 'backbone', '/wp-includes/js/backbone.min.js', array('underscore','jquery', 'template'), '0.9.10', 1 );
    275275
    276276    $scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'backbone', 'jquery-ui-slider' ), false, 1 );
Note: See TracChangeset for help on using the changeset viewer.