/* global jQuery */ (function (jQuery) { 'use strict'; window.readyPrefix = function readyPrefix(eventName) { return '<%= Wallaby.configuration.features.turbolinks_enabled ? "turbolinks:load" : "ready" %>' + eventName; } jQuery(document).off(readyPrefix('.wallaby')).on(readyPrefix('.wallaby'), function () { 'use strict'; // for tooltip jQuery('[data-toggle="tooltip"]').tooltip({ container: 'body' }) // for modal jQuery('#imodal').on('show.bs.modal', function (event) { var $button = jQuery(event.relatedTarget), $this = jQuery(this); $this.find('.modal-title').html($button.siblings('.modaler__title').html()); $this.find('.modal-body').html($button.siblings('.modaler__body').html()); }) jQuery('.index').each(function() { // add styling for query input box jQuery('.query', this).each(function () { var $this = jQuery(this); jQuery('input:visible', this).on('focus.modifier', function () { $this.addClass('query--focus'); }).on('blur', function () { $this.removeClass('query--focus'); }) }) jQuery('.resources').each(function () { var $this = jQuery(this); // let's clone the actions, just for styling jQuery('.resources__data', this).each(function () { var $actions_table = jQuery('