Commit 2ad5b885 authored by Romain Loth's avatar Romain Loth

add a function changeTargetId to fix scope where ui.item.id never changes...

add a function changeTargetId to fix scope where ui.item.id never changes because still interpreted in its orginal context
parent 2bc6b946
......@@ -180,16 +180,20 @@ $(document).ready(function() {
// (by default widget behavior)
// change the 2 onclick events
$("#print2").click(function() {
return window.open("/print_scholar_directory.php?query=" + ui.item.id);
});
$("#generate2").click(function() {
return window.open('/explorerjs.html?type="uid"&nodeidparam="' + ui.item.id + '"');
});
changeTargetId(ui.item.id)
}
}
})
changeTargetId = function(nodeId) {
document.getElementById('print2').onclick = function() {
return window.open("/print_scholar_directory.php?query=" + nodeId);
}
document.getElementById('generate2').onclick = function() {
return window.open('/explorerjs.html?type="uid"&nodeidparam="' + nodeId + '"');
}
}
// main form collect function
collectFilters = function(cb) {
var collect, query;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment