wiki-grav/plugins/admin/themes/grav/app/tools/logs.js
2022-04-24 14:32:58 +02:00

15 lines
422 B
JavaScript

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);
});