webseite-grav/plugins/admin/themes/grav/app/tools/logs.js

15 lines
422 B
JavaScript
Raw Normal View History

2021-04-30 11:23:26 +02:00
import $ from 'jquery';
import { setParam } from 'mout/queryString';
const prepareQuery = (key, value) => {
return setParam(global.location.href, key, value);
};
$(document).on('change', '.logs-content .block-select select[name]', (event) => {
const target = $(event.currentTarget);
const name = target.attr('name');
const value = target.val();
global.location.href = prepareQuery(name, value);
});