summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/contextual/js/contextual.js
diff options
context:
space:
mode:
authorNathaniel Catchpole <catch@35733.no-reply.drupal.org>2014-01-02 13:46:53 +0000
committerNathaniel Catchpole <catch@35733.no-reply.drupal.org>2014-01-02 13:46:53 +0000
commit76e06cfb021bee2ae195d10a0c2282d567274402 (patch)
tree177f2d320628340dc10f84b9292c6f4b9da9d162 /core/modules/contextual/js/contextual.js
parent174a7d1a8ff7ec47dd9ed68cdbe311620548aba5 (diff)
downloaddrupal-76e06cfb021bee2ae195d10a0c2282d567274402.tar.gz
drupal-76e06cfb021bee2ae195d10a0c2282d567274402.zip
Issue #1800022 by Wim Leers, JohnAlbin, herom: Update Backbone and Underscore.
Diffstat (limited to 'core/modules/contextual/js/contextual.js')
-rw-r--r--core/modules/contextual/js/contextual.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/modules/contextual/js/contextual.js b/core/modules/contextual/js/contextual.js
index ab404a23cc1a..46164113362d 100644
--- a/core/modules/contextual/js/contextual.js
+++ b/core/modules/contextual/js/contextual.js
@@ -269,7 +269,7 @@ Drupal.contextual = {
* {@inheritdoc}
*/
initialize: function () {
- this.model.on('change', this.render, this);
+ this.listenTo(this.model, 'change', this.render);
},
/**
@@ -308,7 +308,9 @@ Drupal.contextual = {
* {@inheritdoc}
*/
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.
this.$el.attr('role', 'form');
@@ -399,7 +401,7 @@ Drupal.contextual = {
* {@inheritdoc}
*/
initialize: function () {
- this.model.on('change:hasFocus', this.render, this);
+ this.listenTo(this.model, 'change:hasFocus', this.render);
},
/**