first commit
This commit is contained in:
28
templates/instytut_dendrologii_/js/repairsearch.js
Normal file
28
templates/instytut_dendrologii_/js/repairsearch.js
Normal file
@@ -0,0 +1,28 @@
|
||||
window.addEventListener('load', () => {
|
||||
reapirsearch();
|
||||
})
|
||||
function reapirsearch(){
|
||||
console.log('seacrh red');
|
||||
var param =new URLSearchParams(window.location.search);
|
||||
var itemid= param.get('Itemid');
|
||||
console.log('seacrh red'+itemid);
|
||||
|
||||
document.querySelectorAll('.com-finder__form form input').forEach(inp => {
|
||||
|
||||
inp.setAttribute('value',itemid);
|
||||
|
||||
})
|
||||
|
||||
document.querySelector('.com-finder__form form').setAttribute('action','/component/finder/search?Itemid='+itemid);
|
||||
var newhref= document.querySelector('.com-finder__explained a').getAttribute('href').slice(0,-3);
|
||||
document.querySelector(' .com-finder__explained a').setAttribute('href',newhref+itemid);
|
||||
document.querySelectorAll('form input').forEach(ins => {
|
||||
var ins1= ins.getAttribute('name');
|
||||
if(ins1=='f'){
|
||||
ins.remove();
|
||||
}
|
||||
})
|
||||
document.querySelector(' .query-required a').setAttribute('href','/component/finder/search?Itemid='+itemid);
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user