clean install

This commit is contained in:
2024-12-10 15:08:16 +01:00
commit e14eb2d8fd
31193 changed files with 3555714 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
/**
* @file
* JSON:API Extras resources behaviors.
*/
(function ($, Drupal) {
'use strict';
/**
* Filters the resources tables by a text input search string.
*/
Drupal.behaviors.resourcesTableFilterByText = {
attach: function (context, settings) {
var $input = $(once('jsonapi-resources-filter-text', 'input.jsonapi-resources-filter-text', context));
var $table = $($input.attr('data-table'));
var $rows;
function filterViewList(e) {
var query = $(e.target).val().toLowerCase();
function showViewRow(index, row) {
var $row = $(row);
$row.closest('tr').toggle($row.is(":contains('" + query.toLowerCase() + "')"));
}
// Filter if the length of the query is at least 2 characters.
if (query.length >= 2) {
$rows.each(showViewRow);
}
else {
$rows.show();
}
}
if ($table.length) {
$rows = $table.find('tbody tr');
$input.on('keyup', filterViewList);
}
}
};
$.expr[":"].contains = $.expr.createPseudo(function(arg) {
return function( elem ) {
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
};
});
}(jQuery, Drupal));

View File

@@ -0,0 +1,32 @@
/**
* @file
* JSON:API Extras table with collapsible rows behaviors.
*/
(function ($, Drupal) {
'use strict';
/**
* Handles the events to collapse/expand rows.
*/
Drupal.behaviors.jsonapi_extras_expandable_rows_table = {
attach: function (context, settings) {
var $advanced_opts_links = $(once('toggle-expanded', '.toggle-expanded', context));
$advanced_opts_links.click(function () {
$(this).removeClass("content-collapsed content-expanded");
// 'data-open' attribute holds the id of the element that we should display/hide.
var $el = $('#' + $(this).attr('data-open'));
$el.toggle();
if ($el.is(':visible')){
$(this).addClass("content-expanded");
}
else {
$(this).addClass("content-collapsed");
}
})
}
}
}(jQuery, Drupal));