mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Add clicking on output search result
This commit is contained in:
parent
5d52f4a760
commit
413e80ed3e
@ -210,7 +210,7 @@ class Manager {
|
||||
document.getElementById("output-num-results").addEventListener("change", this.output.filterTabSearch.bind(this.output));
|
||||
document.getElementById("output-num-results").addEventListener("keyup", this.output.filterTabSearch.bind(this.output));
|
||||
document.getElementById("output-filter-refresh").addEventListener("click", this.output.filterTabSearch.bind(this.output));
|
||||
// this.addDynamicListener(".output-filter-result", "click", this.output.filterItemClick, this.output);
|
||||
this.addDynamicListener(".output-filter-result", "click", this.output.filterItemClick, this.output);
|
||||
|
||||
|
||||
// Options
|
||||
|
@ -1333,6 +1333,21 @@ class OutputWaiter {
|
||||
resultsList.appendChild(newListItem);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for clicking on a filter result.
|
||||
* Changes to the clicked output
|
||||
*
|
||||
* @param {event} e
|
||||
*/
|
||||
filterItemClick(e) {
|
||||
if (!e.target) return;
|
||||
const inputNum = parseInt(e.target.getAttribute("inputNum"), 10);
|
||||
if (inputNum <= 0) return;
|
||||
|
||||
$("#output-tab-modal").modal("hide");
|
||||
this.changeTab(inputNum, this.app.options.syncTabs);
|
||||
}
|
||||
}
|
||||
|
||||
export default OutputWaiter;
|
||||
|
Loading…
Reference in New Issue
Block a user