PageSourceSearch

https://argentat-sur-dordogne.fr/modules/contrib/ckeditor_bootstrap_tabs/js/tabs.js?tm2quw

js argentat-sur-dordogne.fr collected 2026-10-02 22:24:45 UTC 1,176 bytes, 51 lines download raw bytes

1/**
2 * @file
3 * Provides JavaScript additions to ckeditor tabs bootstrap.
4 *
5 * This file provides bootstrap tabs in ckeditor.
6 */
7
8(function ($, Drupal) {
9
10  "use strict";
11
12  /**
13   * Attach behaviors to tabs for ckeditor.
14   */
15  Drupal.behaviors.ckeditorTabs = {
16    attach: function (context, settings) {
17      if (typeof CKEDITOR === 'undefined') {
18        var $viewTabs = $('.bootstrap-tabs', context);
19        if ($viewTabs.length > 0) {
20          tabsInit($viewTabs);
21        }
22        return;
23      }
24    }
25  };
26
27  function tabsInit(elements) {
28    var $tabComponents = elements;
29
30    if ($tabComponents.length > 0) {
31      $tabComponents.each(function () {
32        var $tabs = $(this).find('.nav-tabs');
33        $tabs
34          .off('click', 'li > a')
35          .on('click', 'li > a', function (e) {
36            e.preventDefault();
37
38            var link = $(this);
39
40            link
41              .parent().addClass('active')
42              .siblings().removeClass('active');
43
44            link.parents('.bootstrap-tabs').find(link.attr('href')).addClass('active')
45              .siblings().removeClass('active');
46          })
47      });
48    }
49  }
50
51})(jQuery, Drupal);

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.