Commit 76e06cfb authored by catch's avatar catch

Issue #1800022 by Wim Leers, JohnAlbin, herom: Update Backbone and Underscore.

parent 174a7d1a
This diff is collapsed.
This diff is collapsed.
...@@ -120,8 +120,8 @@ Drupal.ckeditor = { ...@@ -120,8 +120,8 @@ Drupal.ckeditor = {
this.getCKEditorFeatures(this.model.get('hiddenEditorConfig'), this.disableFeaturesDisallowedByFilters.bind(this)); this.getCKEditorFeatures(this.model.get('hiddenEditorConfig'), this.disableFeaturesDisallowedByFilters.bind(this));
// Push the active editor configuration to the textarea. // Push the active editor configuration to the textarea.
this.model.on('change:activeEditorConfig', this.model.sync, this.model); this.model.listenTo(this.model, 'change:activeEditorConfig', this.model.sync);
this.model.on('change:isDirty', this.parseEditorDOM, this); this.listenTo(this.model, 'change:isDirty', this.parseEditorDOM);
}, },
/** /**
...@@ -462,7 +462,7 @@ Drupal.ckeditor = { ...@@ -462,7 +462,7 @@ Drupal.ckeditor = {
* {@inheritdoc} * {@inheritdoc}
*/ */
initialize: function () { initialize: function () {
this.model.on('change:isDirty change:groupNamesVisible', this.render, this); this.listenTo(this.model, 'change:isDirty change:groupNamesVisible', this.render);
// Add a toggle for the button group names. // Add a toggle for the button group names.
$(Drupal.theme('ckeditorButtonGroupNamesToggle')) $(Drupal.theme('ckeditorButtonGroupNamesToggle'))
...@@ -959,7 +959,7 @@ Drupal.ckeditor = { ...@@ -959,7 +959,7 @@ Drupal.ckeditor = {
initialize: function () { initialize: function () {
// Announce the button and group positions when the model is no longer // Announce the button and group positions when the model is no longer
// dirty. // dirty.
this.model.on('change:isDirty', this.announceMove, this); this.listenTo(this.model, 'change:isDirty', this.announceMove);
}, },
/** /**
......
...@@ -269,7 +269,7 @@ Drupal.contextual = { ...@@ -269,7 +269,7 @@ Drupal.contextual = {
* {@inheritdoc} * {@inheritdoc}
*/ */
initialize: function () { initialize: function () {
this.model.on('change', this.render, this); this.listenTo(this.model, 'change', this.render);
}, },
/** /**
...@@ -308,7 +308,9 @@ Drupal.contextual = { ...@@ -308,7 +308,9 @@ Drupal.contextual = {
* {@inheritdoc} * {@inheritdoc}
*/ */
initialize: function (options) { initialize: function (options) {
this.model.on('change', this.render, this); this.options = options;
this.listenTo(this.model, 'change', this.render);
// Use aria-role form so that the number of items in the list is spoken. // Use aria-role form so that the number of items in the list is spoken.
this.$el.attr('role', 'form'); this.$el.attr('role', 'form');
...@@ -399,7 +401,7 @@ Drupal.contextual = { ...@@ -399,7 +401,7 @@ Drupal.contextual = {
* {@inheritdoc} * {@inheritdoc}
*/ */
initialize: function () { initialize: function () {
this.model.on('change:hasFocus', this.render, this); this.listenTo(this.model, 'change:hasFocus', this.render);
}, },
/** /**
......
...@@ -20,8 +20,19 @@ var strings = { ...@@ -20,8 +20,19 @@ var strings = {
* A contextual links DOM element as rendered by the server. * A contextual links DOM element as rendered by the server.
*/ */
function initContextualToolbar (context) { function initContextualToolbar (context) {
if (!Drupal.contextual || !Drupal.contextual.collection) {
return;
}
var contextualToolbar = Drupal.contextualToolbar; var contextualToolbar = Drupal.contextualToolbar;
var model = contextualToolbar.model = new contextualToolbar.Model(); var model = contextualToolbar.model = new contextualToolbar.Model({
// Checks whether localStorage indicates we should start in edit mode
// rather than view mode.
// @see Drupal.contextualToolbar.VisualView.persist()
isViewing: localStorage.getItem('Drupal.contextualToolbar.isViewing') !== 'false'
}, {
contextualCollection: Drupal.contextual.collection,
});
var viewOptions = { var viewOptions = {
el: $('.toolbar .toolbar-bar .contextual-toolbar-tab'), el: $('.toolbar .toolbar-bar .contextual-toolbar-tab'),
...@@ -30,36 +41,6 @@ function initContextualToolbar (context) { ...@@ -30,36 +41,6 @@ function initContextualToolbar (context) {
}; };
new contextualToolbar.VisualView(viewOptions); new contextualToolbar.VisualView(viewOptions);
new contextualToolbar.AuralView(viewOptions); new contextualToolbar.AuralView(viewOptions);
// Show the edit tab while there's >=1 contextual link.
if (Drupal.contextual && Drupal.contextual.collection) {
var contextualCollection = Drupal.contextual.collection;
var trackContextualCount = function () {
model.set('contextualCount', contextualCollection.length);
};
contextualCollection.on('reset remove add', trackContextualCount);
trackContextualCount();
// Whenever edit mode is toggled, lock all contextual links.
model.on('change:isViewing', function() {
contextualCollection.each(function (contextualModel) {
contextualModel.set('isLocked', !model.get('isViewing'));
});
});
// When a new contextual link is added and edit mode is enabled, lock it.
contextualCollection.on('add', function (contextualModel) {
if (!model.get('isViewing')) {
contextualModel.set('isLocked', true);
}
});
}
// Checks whether localStorage indicates we should start in edit mode
// rather than view mode.
// @see Drupal.contextualToolbar.VisualView.persist()
if (localStorage.getItem('Drupal.contextualToolbar.isViewing') === 'false') {
model.set('isViewing', false);
}
} }
/** /**
...@@ -96,10 +77,67 @@ Drupal.contextualToolbar = { ...@@ -96,10 +77,67 @@ Drupal.contextualToolbar = {
// of tabbable elements when edit mode is enabled. // of tabbable elements when edit mode is enabled.
tabbingContext: null tabbingContext: null
}, },
initialize: function () {
this.on('change:contextualCount', function (model) { /**
model.set('isVisible', model.get('contextualCount') > 0); * {@inheritdoc}
*
* @param Object attrs
* @param Object options
* An object with the following option:
* - Backbone.collection contextualCollection: the collection of
* Drupal.contextual.Model models that represent the contextual links
* on the page.
*/
initialize: function (attrs, options) {
// Respond to new/removed contextual links.
this.listenTo(options.contextualCollection, {
'reset remove add': this.countCountextualLinks,
'add': this.lockNewContextualLinks
});
this.listenTo(this, {
// Automatically determine visibility.
'change:contextualCount': this.updateVisibility,
// Whenever edit mode is toggled, lock all contextual links.
'change:isViewing': function (model, isViewing) {
options.contextualCollection.each(function (contextualModel) {
contextualModel.set('isLocked', !isViewing);
});
}
}); });
},
/**
* Tracks the number of contextual link models in the collection.
*
* @param Drupal.contextual.Model affectedModel
* The contextual links model that was added or removed.
* @param Backbone.Collection contextualCollection
* The collection of contextual link models.
*/
countCountextualLinks: function (contextualModel, contextualCollection) {
this.set('contextualCount', contextualCollection.length);
},
/**
* Lock newly added contextual links if edit mode is enabled.
*
* @param Drupal.contextual.Model addedContextualModel
* The contextual links model that was added.
* @param Backbone.Collection contextualCollection
* The collection of contextual link models.
*/
lockNewContextualLinks: function (contextualModel, contextualCollection) {
if (!this.get('isViewing')) {
contextualModel.set('isLocked', true);
}
},
/**
* Automatically updates visibility of the view/edit mode toggle.
*/
updateVisibility: function () {
this.set('isVisible', this.get('contextualCount') > 0);
} }
}), }),
...@@ -128,8 +166,8 @@ Drupal.contextualToolbar = { ...@@ -128,8 +166,8 @@ Drupal.contextualToolbar = {
* {@inheritdoc} * {@inheritdoc}
*/ */
initialize: function () { initialize: function () {
this.model.on('change', this.render, this); this.listenTo(this.model, 'change', this.render);
this.model.on('change:isViewing', this.persist, this); this.listenTo(this.model, 'change:isViewing', this.persist);
}, },
/** /**
...@@ -175,9 +213,11 @@ Drupal.contextualToolbar = { ...@@ -175,9 +213,11 @@ Drupal.contextualToolbar = {
/* /*
* {@inheritdoc} * {@inheritdoc}
*/ */
initialize: function () { initialize: function (options) {
this.model.on('change', this.render, this); this.options = options;
this.model.on('change:isViewing', this.manageTabbing, this);
this.listenTo(this.model, 'change', this.render);
this.listenTo(this.model, 'change:isViewing', this.manageTabbing);
$(document).on('keyup', _.bind(this.onKeypress, this)); $(document).on('keyup', _.bind(this.onKeypress, this));
}, },
......
...@@ -61,6 +61,7 @@ function edit_library_info() { ...@@ -61,6 +61,7 @@ function edit_library_info() {
$path . '/js/edit.js' => $options, $path . '/js/edit.js' => $options,
$path . '/js/util.js' => $options, $path . '/js/util.js' => $options,
// Models. // Models.
$path . '/js/models/BaseModel.js' => $options,
$path . '/js/models/AppModel.js' => $options, $path . '/js/models/AppModel.js' => $options,
$path . '/js/models/EntityModel.js' => $options, $path . '/js/models/EntityModel.js' => $options,
$path . '/js/models/FieldModel.js' => $options, $path . '/js/models/FieldModel.js' => $options,
......
...@@ -275,7 +275,7 @@ function processField (fieldElement) { ...@@ -275,7 +275,7 @@ function processField (fieldElement) {
// If an EntityModel for this field already exists (and hence also a "Quick // If an EntityModel for this field already exists (and hence also a "Quick
// edit" contextual link), then initialize it immediately. // edit" contextual link), then initialize it immediately.
if (Drupal.edit.collections.entities.where({ entityID: entityID, entityInstanceID: entityInstanceID }).length > 0) { if (Drupal.edit.collections.entities.findWhere({ entityID: entityID, entityInstanceID: entityInstanceID })) {
initializeField(fieldElement, fieldID, entityID, entityInstanceID); initializeField(fieldElement, fieldID, entityID, entityInstanceID);
} }
// Otherwise: queue the field. It is now available to be set up when its // Otherwise: queue the field. It is now available to be set up when its
...@@ -298,10 +298,10 @@ function processField (fieldElement) { ...@@ -298,10 +298,10 @@ function processField (fieldElement) {
* The field's entity's instance ID. * The field's entity's instance ID.
*/ */
function initializeField (fieldElement, fieldID, entityID, entityInstanceID) { function initializeField (fieldElement, fieldID, entityID, entityInstanceID) {
var entity = Drupal.edit.collections.entities.where({ var entity = Drupal.edit.collections.entities.findWhere({
entityID: entityID, entityID: entityID,
entityInstanceID: entityInstanceID entityInstanceID: entityInstanceID
})[0]; });
$(fieldElement).addClass('edit-field'); $(fieldElement).addClass('edit-field');
...@@ -528,17 +528,15 @@ function initializeEntityContextualLink (contextualLink) { ...@@ -528,17 +528,15 @@ function initializeEntityContextualLink (contextualLink) {
function deleteContainedModelsAndQueues($context) { function deleteContainedModelsAndQueues($context) {
$context.find('[data-edit-entity-id]').addBack('[data-edit-entity-id]').each(function (index, entityElement) { $context.find('[data-edit-entity-id]').addBack('[data-edit-entity-id]').each(function (index, entityElement) {
// Delete entity model. // Delete entity model.
// @todo change to findWhere() as soon as we have Backbone 1.0 in Drupal var entityModel = Drupal.edit.collections.entities.findWhere({el: entityElement});
// core. @see https://drupal.org/node/1800022 if (entityModel) {
var entityModels = Drupal.edit.collections.entities.where({el: entityElement}); var contextualLinkView = entityModel.get('contextualLinkView');
if (entityModels.length) {
var contextualLinkView = entityModels[0].get('contextualLinkView');
contextualLinkView.undelegateEvents(); contextualLinkView.undelegateEvents();
contextualLinkView.remove(); contextualLinkView.remove();
// Remove the EntityDecorationView. // Remove the EntityDecorationView.
entityModels[0].get('entityDecorationView').remove(); entityModel.get('entityDecorationView').remove();
// Destroy the EntityModel; this will also destroy its FieldModels. // Destroy the EntityModel; this will also destroy its FieldModels.
entityModels[0].destroy(); entityModel.destroy();
} }
// Filter queue. // Filter queue.
......
/**
* @file
* A Backbone Model subclass that enforces validation when calling set().
*/
(function (Backbone) {
"use strict";
Drupal.edit.BaseModel = Backbone.Model.extend({
/**
* {@inheritdoc}
*/
initialize: function (options) {
this.__initialized = true;
return Backbone.Model.prototype.initialize.call(this, options);
},
/**
* {@inheritdoc}
*/
set: function (key, val, options) {
if (this.__initialized) {
// Deal with both the "key", value and {key:value}-style arguments.
if (typeof key === 'object') {
key.validate = true;
}
else {
if (!options) {
options = {};
}
options.validate = true;
}
}
return Backbone.Model.prototype.set.call(this, key, val, options);
}
});
}(Backbone));
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"use strict"; "use strict";
Drupal.edit.EntityModel = Backbone.Model.extend({ Drupal.edit.EntityModel = Drupal.edit.BaseModel.extend({
defaults: { defaults: {
// The DOM element that represents this entity. It may seem bizarre to // The DOM element that represents this entity. It may seem bizarre to
...@@ -62,11 +62,14 @@ Drupal.edit.EntityModel = Backbone.Model.extend({ ...@@ -62,11 +62,14 @@ Drupal.edit.EntityModel = Backbone.Model.extend({
this.set('fields', new Drupal.edit.FieldCollection()); this.set('fields', new Drupal.edit.FieldCollection());
// Respond to entity state changes. // Respond to entity state changes.
this.on('change:state', this.stateChange, this); this.listenTo(this, 'change:state', this.stateChange);
// The state of the entity is largely dependent on the state of its // The state of the entity is largely dependent on the state of its
// fields. // fields.
this.get('fields').on('change:state', this.fieldStateChange, this); this.listenTo(this.get('fields'), 'change:state', this.fieldStateChange);
// Call Drupal.edit.BaseModel's initialize() method.
Drupal.edit.BaseModel.prototype.initialize.call(this);
}, },
/** /**
...@@ -511,9 +514,9 @@ Drupal.edit.EntityModel = Backbone.Model.extend({ ...@@ -511,9 +514,9 @@ Drupal.edit.EntityModel = Backbone.Model.extend({
* @inheritdoc * @inheritdoc
*/ */
destroy: function (options) { destroy: function (options) {
Backbone.Model.prototype.destroy.apply(this, options); Drupal.edit.BaseModel.prototype.destroy.call(this, options);
this.off(null, null, this); this.stopListening();
// Destroy all fields of this entity. // Destroy all fields of this entity.
this.get('fields').each(function (fieldModel) { this.get('fields').each(function (fieldModel) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
/** /**
* State of an in-place editable field in the DOM. * State of an in-place editable field in the DOM.
*/ */
Drupal.edit.FieldModel = Backbone.Model.extend({ Drupal.edit.FieldModel = Drupal.edit.BaseModel.extend({
defaults: { defaults: {
// The DOM element that represents this field. It may seem bizarre to have // The DOM element that represents this field. It may seem bizarre to have
...@@ -73,6 +73,9 @@ Drupal.edit.FieldModel = Backbone.Model.extend({ ...@@ -73,6 +73,9 @@ Drupal.edit.FieldModel = Backbone.Model.extend({
// Automatically generate the logical field ID. // Automatically generate the logical field ID.
this.set('logicalFieldID', this.get('fieldID').split('/').slice(0, 4).join('/')); this.set('logicalFieldID', this.get('fieldID').split('/').slice(0, 4).join('/'));
// Call Drupal.edit.BaseModel's initialize() method.
Drupal.edit.BaseModel.prototype.initialize.call(this, options);
}, },
/** /**
...@@ -82,7 +85,7 @@ Drupal.edit.FieldModel = Backbone.Model.extend({ ...@@ -82,7 +85,7 @@ Drupal.edit.FieldModel = Backbone.Model.extend({
if (this.get('state') !== 'inactive') { if (this.get('state') !== 'inactive') {
throw new Error("FieldModel cannot be destroyed if it is not inactive state."); throw new Error("FieldModel cannot be destroyed if it is not inactive state.");
} }
Backbone.Model.prototype.destroy.call(this, options); Drupal.edit.BaseModel.prototype.destroy.call(this, options);
}, },
/** /**
......
...@@ -36,21 +36,21 @@ Drupal.edit.AppView = Backbone.View.extend({ ...@@ -36,21 +36,21 @@ Drupal.edit.AppView = Backbone.View.extend({
this.changedFieldStates = ['changed', 'saving', 'saved', 'invalid']; this.changedFieldStates = ['changed', 'saving', 'saved', 'invalid'];
this.readyFieldStates = ['candidate', 'highlighted']; this.readyFieldStates = ['candidate', 'highlighted'];
options.entitiesCollection this.listenTo(options.entitiesCollection, {
// Track app state. // Track app state.
.on('change:state', this.appStateChange, this) 'change:state': this.appStateChange,
.on('change:isActive', this.enforceSingleActiveEntity, this); 'change:isActive': this.enforceSingleActiveEntity
});
options.fieldsCollection // Track app state.
// Track app state. this.listenTo(options.fieldsCollection, 'change:state', this.editorStateChange);
.on('change:state', this.editorStateChange, this) // Respond to field model HTML representation change events.
// Respond to field model HTML representation change events. this.listenTo(options.fieldsCollection, 'change:html', this.renderUpdatedField);
.on('change:html', this.propagateUpdatedField, this) this.listenTo(options.fieldsCollection, 'change:html', this.propagateUpdatedField);
.on('change:html', this.renderUpdatedField, this) // Respond to addition.
// Respond to addition. this.listenTo(options.fieldsCollection, 'add', this.rerenderedFieldToCandidate);
.on('add', this.rerenderedFieldToCandidate, this) // Respond to destruction.
// Respond to destruction. this.listenTo(options.fieldsCollection, 'destroy', this.teardownEditor);
.on('destroy', this.teardownEditor, this);
}, },
/** /**
...@@ -540,10 +540,10 @@ Drupal.edit.AppView = Backbone.View.extend({ ...@@ -540,10 +540,10 @@ Drupal.edit.AppView = Backbone.View.extend({
* A field that was just added to the collection of fields. * A field that was just added to the collection of fields.
*/ */
rerenderedFieldToCandidate: function (fieldModel) { rerenderedFieldToCandidate: function (fieldModel) {
var activeEntity = Drupal.edit.collections.entities.where({isActive: true})[0]; var activeEntity = Drupal.edit.collections.entities.findWhere({isActive: true});
// Early-return if there is no active entity. // Early-return if there is no active entity.
if (activeEntity === null) { if (!activeEntity) {
return; return;
} }
......
...@@ -39,7 +39,7 @@ Drupal.edit.ContextualLinkView = Backbone.View.extend({ ...@@ -39,7 +39,7 @@ Drupal.edit.ContextualLinkView = Backbone.View.extend({
// Initial render. // Initial render.
this.render(); this.render();
// Re-render whenever this entity's isActive attribute changes. // Re-render whenever this entity's isActive attribute changes.
this.model.on('change:isActive', this.render, this); this.listenTo(this.model, 'change:isActive', this.render);
}, },
/** /**
......
...@@ -40,7 +40,7 @@ Drupal.edit.EditorView = Backbone.View.extend({ ...@@ -40,7 +40,7 @@ Drupal.edit.EditorView = Backbone.View.extend({
*/ */
initialize: function (options) { initialize: function (options) {
this.fieldModel = options.fieldModel; this.fieldModel = options.fieldModel;
this.fieldModel.on('change:state', this.stateChange, this); this.listenTo(this.fieldModel, 'change:state', this.stateChange);
}, },
/** /**
...@@ -50,7 +50,6 @@ Drupal.edit.EditorView = Backbone.View.extend({ ...@@ -50,7 +50,6 @@ Drupal.edit.EditorView = Backbone.View.extend({
// The el property is the field, which should not be removed. Remove the // The el property is the field, which should not be removed. Remove the
// pointer to it, then call Backbone.View.prototype.remove(). // pointer to it, then call Backbone.View.prototype.remove().
this.setElement(); this.setElement();
this.fieldModel.off(null, null, this);
Backbone.View.prototype.remove.call(this); Backbone.View.prototype.remove.call(this);
}, },
......
...@@ -15,7 +15,7 @@ Drupal.edit.EntityDecorationView = Backbone.View.extend({ ...@@ -15,7 +15,7 @@ Drupal.edit.EntityDecorationView = Backbone.View.extend({
* Associated with the DOM root node of an editable entity. * Associated with the DOM root node of an editable entity.
*/ */
initialize: function () { initialize: function () {
this.model.on('change', this.render, this); this.listenTo(this.model, 'change', this.render);
}, },
/** /**
......
...@@ -29,11 +29,11 @@ Drupal.edit.EntityToolbarView = Backbone.View.extend({ ...@@ -29,11 +29,11 @@ Drupal.edit.EntityToolbarView = Backbone.View.extend({
this.$entity = $(this.model.get('el')); this.$entity = $(this.model.get('el'));
// Rerender whenever the entity state changes. // Rerender whenever the entity state changes.
this.model.on('change:isActive change:isDirty change:state', this.render, this); this.listenTo(this.model, 'change:isActive change:isDirty change:state', this.render);
// Also rerender whenever a different field is highlighted or activated. // Also rerender whenever a different field is highlighted or activated.
this.appModel.on('change:highlightedField change:activeField', this.render, this); this.listenTo(this.appModel, 'change:highlightedField change:activeField', this.render);
// Rerender when a field of the entity changes state. // Rerender when a field of the entity changes state.
this.model.get('fields').on('change:state', this.fieldStateChange, this); this.listenTo(this.model.get('fields'), 'change:state', this.fieldStateChange);
// Reposition the entity toolbar as the viewport and the position within the // Reposition the entity toolbar as the viewport and the position within the
// viewport changes. // viewport changes.
...@@ -121,8 +121,6 @@ Drupal.edit.EntityToolbarView = Backbone.View.extend({ ...@@ -121,8 +121,6 @@ Drupal.edit.EntityToolbarView = Backbone.View.extend({
this.$fence.remove(); this.$fence.remove();
// Stop listening to additional events. // Stop listening to additional events.
this.appModel.off(null, null, this);
this.model.get('fields').off(null, null, this);
$(window).off('resize.edit scroll.edit'); $(window).off('resize.edit scroll.edit');
$(document).off('drupalViewportOffsetChange.edit'); $(document).off('drupalViewportOffsetChange.edit');
......
...@@ -29,8 +29,8 @@ Drupal.edit.FieldDecorationView = Backbone.View.extend({ ...@@ -29,8 +29,8 @@ Drupal.edit.FieldDecorationView = Backbone.View.extend({
initialize: function (options) { initialize: function (options) {
this.editorView = options.editorView; this.editorView = options.editorView;
this.model.on('change:state', this.stateChange, this); this.listenTo(this.model, 'change:state', this.stateChange);
this.model.on('change:isChanged change:inTempStore', this.renderChanged, this); this.listenTo(this.model, 'change:isChanged change:inTempStore', this.renderChanged);
}, },
/** /**
......
...@@ -28,7 +28,7 @@ Drupal.edit.FieldToolbarView = Backbone.View.extend({ ...@@ -28,7 +28,7 @@ Drupal.edit.FieldToolbarView = Backbone.View.extend({
// Generate a DOM-compatible ID for the form container DOM element. // Generate a DOM-compatible ID for the form container DOM element.
this._id = 'edit-toolbar-for-' + this.model.id.replace(/[\/\[\]]/g, '_'); this._id = 'edit-toolbar-for-' + this.model.id.replace(/[\/\[\]]/g, '_');
this.model.on('change:state', this.stateChange, this); this.listenTo(this.model, 'change:state', this.stateChange)
}, },
/** /**
......
...@@ -1743,7 +1743,7 @@ function system_library_info() { ...@@ -1743,7 +1743,7 @@ function system_library_info() {
$libraries['underscore'] = array( $libraries['underscore'] = array(
'title' => 'Underscore.js', 'title' => 'Underscore.js',
'website' => 'http://underscorejs.org/', 'website' => 'http://underscorejs.org/',
'version' => '1.4.0', 'version' => '1.5.2',
'js' => array( 'js' => array(
'core/assets/vendor/underscore/underscore.js' => array('group' => JS_LIBRARY, 'weight' => -20), 'core/assets/vendor/underscore/underscore.js' => array('group' => JS_LIBRARY, 'weight' => -20),
), ),
...@@ -1753,7 +1753,7 @@ function system_library_info() { ...@@ -1753,7 +1753,7 @@ function system_library_info() {
$libraries['backbone'] = array( $libraries['backbone'] = array(
'title' => 'Backbone.js', 'title' => 'Backbone.js',
'website' => 'http://backbonejs.org/', 'website' => 'http://backbonejs.org/',
'version' => '0.9.2', 'version' => '1.1.0',
'js' => array( 'js' => array(
'core/assets/vendor/backbone/backbone.js' => array('group' => JS_LIBRARY, 'weight' => -19), 'core/assets/vendor/backbone/backbone.js' => array('group' => JS_LIBRARY, 'weight' => -19),
), ),
......
...@@ -257,8 +257,8 @@ Drupal.toolbar = { ...@@ -257,8 +257,8 @@ Drupal.toolbar = {
initialize: function (options) { initialize: function (options) {
this.strings = options.strings; this.strings = options.strings;