1/** 2 * @file 3 * JS for Radix. 4 */ 5(function ($, Drupal, window, document, undefined) { 6 7 // Show dropdown on hover. 8 Drupal.behaviors.radix_dropdown = { 9 attach: function(context, setting) { 10 $('.dropdown').once('radix-dropdown', function(){ 11 // Show dropdown on hover. 12 $(this).mouseenter(function(){ 13 $(this).addClass('open'); 14 }); 15 $(this).mouseleave(function(){ 16 $(this).removeClass('open'); 17 }); 18 }); 19 } 20 } 21 22 // Bootstrap tooltip. 23 Drupal.behaviors.radix_tooltip = { 24 attach: function(context, setting) { 25 if ($.fn.tooltip) { 26 $("[data-toggle='tooltip']").tooltip(); 27 } 28 } 29 } 30 31 // Bootstrap popover. 32 Drupal.behaviors.radix_popover = { 33 attach: function(context, setting) { 34 if ($.fn.popover) { 35 $("[data-toggle='popover']").popover(); 36 } 37 } 38 } 39 40 $(document).ready(function() { 41 // Allow main menu dropdown-toggle to be clickable. 42 $('#main-menu .dropdown > a.dropdown-toggle').once('radix-dropdown', function(){ 43 $(this).click(function(e) { 44 e.preventDefault(); 45 window.location.href = $(this).attr('href'); 46 }); 47 }); 48 49 // Show first tab by default. 50 // Ignore the "primary" tabs on the node edit page. 51 if ($.fn.tab) { 52 var tabs = $('.nav-tabs').not('.primary'); 53 tabs.children('li').first().find('a').tab('show'); 54 55 if (hash = window.location.hash) { 56 $('.nav-tabs > li > a[href$="' + hash + '"]').tab('show'); 57 } 58 } 59 }); 60})(jQuery, Drupal, this, this.document);
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.