annotate core/modules/quickedit/js/views/EntityDecorationView.js @ 5:12f9dff5fda9
tip
Update to Drupal core 8.7.1
author |
Chris Cannam |
date |
Thu, 09 May 2019 15:34:47 +0100 |
parents |
c75dbcec494b |
children |
|
rev |
line source |
Chris@0
|
1 /**
|
Chris@0
|
2 * DO NOT EDIT THIS FILE.
|
Chris@0
|
3 * See the following change record for more information,
|
Chris@0
|
4 * https://www.drupal.org/node/2815083
|
Chris@0
|
5 * @preserve
|
Chris@0
|
6 **/
|
Chris@0
|
7
|
Chris@0
|
8 (function (Drupal, $, Backbone) {
|
Chris@0
|
9 Drupal.quickedit.EntityDecorationView = Backbone.View.extend({
|
Chris@0
|
10 initialize: function initialize() {
|
Chris@0
|
11 this.listenTo(this.model, 'change', this.render);
|
Chris@0
|
12 },
|
Chris@0
|
13 render: function render() {
|
Chris@0
|
14 this.$el.toggleClass('quickedit-entity-active', this.model.get('isActive'));
|
Chris@0
|
15 },
|
Chris@0
|
16 remove: function remove() {
|
Chris@0
|
17 this.setElement(null);
|
Chris@0
|
18 Backbone.View.prototype.remove.call(this);
|
Chris@0
|
19 }
|
Chris@0
|
20 });
|
Chris@0
|
21 })(Drupal, jQuery, Backbone); |