1(function ($) { 2 3"use strict"; 4 5Backdrop.behaviors.toggles = { 6 attach: function(context, settings) { 7 var $toggles = $(context).find('[data-toggle]').once('toggle'); 8 9 $toggles.on('click', function(){ 10 var $this = $(this); 11 var $target = $('[data-toggleable="' + $this.attr('data-toggle') + '"]'); 12 $target.toggleClass('js-toggled'); 13 }); 14 } 15}; 16 17/** 18 * Override tableDragHandle(). 19 */ 20Backdrop.theme.prototype.tableDragHandle = function() { 21 return '<a href="#" title="' + Backdrop.t('Drag to re-order') + '" class="tabledrag-handle"><div class="handle"><div class="handle-inner"> </div></div></a>'; 22}; 23 24/** 25 * Tests for background-blend-mode used on some hero elements 26 * 27 * @return {boolean} True if browser supports background-blend-mode. 28 * 29 */ 30Backdrop.featureDetect.backgroundBlendMode = function() { 31 var $body = $('body'), 32 $testElement = $('<div style="background-blend-mode: luminosity; width: 0; height: 0;"></div>'); 33 34 if ($body.hasClass('has-background-blend-mode')) { 35 return true; 36 } else if ($body.hasClass('no-background-blend-mode')) { 37 return false; 38 } else { 39 $body.append($testElement); 40 if ($testElement.css('background-blend-mode') === 'luminosity') { 41 $('body').addClass('has-background-blend-mode'); 42 $testElement.remove(); 43 return true; 44 } 45 else { 46 $body.addClass('no-background-blend-mode'); 47 $testElement.remove(); 48 return false; 49 } 50 } 51} 52 53$(document).ready(function() { 54 Backdrop.featureDetect.backgroundBlendMode(); 55 Backdrop.featureDetect.flexbox(); 56}); 57 58})(jQuery); 59;
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.