2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
8 (function (Drupal, Backbone) {
9 Drupal.contextual.AuralView = Backbone.View.extend({
10 initialize: function initialize(options) {
11 this.options = options;
13 this.listenTo(this.model, 'change', this.render);
15 this.$el.attr('role', 'form');
19 render: function render() {
20 var isOpen = this.model.get('isOpen');
22 this.$el.find('.contextual-links').prop('hidden', !isOpen);
24 this.$el.find('.trigger').text(Drupal.t('@action @title configuration options', {
25 '@action': !isOpen ? this.options.strings.open : this.options.strings.close,
26 '@title': this.model.get('title')
27 })).attr('aria-pressed', isOpen);