PageSourceSearch

https://sag.cl/core/modules/contextual/js/views/VisualView.js?v=9.3.11

js sag.cl collected 2026-10-02 03:57:37 UTC 1,517 bytes, 50 lines download raw bytes

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
8(function (Drupal, Backbone, Modernizr) {
9  Drupal.contextual.VisualView = Backbone.View.extend({
10    events: function events() {
11      var touchEndToClick = function touchEndToClick(event) {
12        event.preventDefault();
13        event.target.click();
14      };
15
16      var mapping = {
17        'click .trigger': function clickTrigger() {
18          this.model.toggleOpen();
19        },
20        'touchend .trigger': touchEndToClick,
21        'click .contextual-links a': function clickContextualLinksA() {
22          this.model.close().blur();
23        },
24        'touchend .contextual-links a': touchEndToClick
25      };
26
27      if (!Modernizr.touchevents) {
28        mapping.mouseenter = function () {
29          this.model.focus();
30        };
31      }
32
33      return mapping;
34    },
35    initialize: function initialize() {
36      this.listenTo(this.model, 'change', this.render);
37    },
38    render: function render() {
39      var isOpen = this.model.get('isOpen');
40      var isVisible = this.model.get('isLocked') || this.model.get('regionIsHovered') || isOpen;
41      this.$el.toggleClass('open', isOpen).find('.trigger').toggleClass('visually-hidden', !isVisible);
42
43      if ('isOpen' in this.model.changed) {
44        this.$el.closest('.contextual-region').find('.contextual .trigger:not(:first)').toggle(!isOpen);
45      }
46
47      return this;
48    }
49  });
50})(Drupal, Backbone, Modernizr);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.