EntityDecorationView.js 615 B

123456789101112131415161718192021
  1. /**
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/2815083
  5. * @preserve
  6. **/
  7. (function (Drupal, $, Backbone) {
  8. Drupal.quickedit.EntityDecorationView = Backbone.View.extend({
  9. initialize: function initialize() {
  10. this.listenTo(this.model, 'change', this.render);
  11. },
  12. render: function render() {
  13. this.$el.toggleClass('quickedit-entity-active', this.model.get('isActive'));
  14. },
  15. remove: function remove() {
  16. this.setElement(null);
  17. Backbone.View.prototype.remove.call(this);
  18. }
  19. });
  20. })(Drupal, jQuery, Backbone);