mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-07 15:07:11 -04:00
fix 'clear all
This commit is contained in:
parent
4947f809a9
commit
c110e5a59f
4 changed files with 8 additions and 4 deletions
|
@ -154,6 +154,7 @@ class Manager {
|
|||
this.addDynamicListener(".arg:not(select)", "input", this.recipe.ingChange, this.recipe);
|
||||
this.addDynamicListener(".arg[type=checkbox], .arg[type=radio], select.arg", "change", this.recipe.ingChange, this.recipe);
|
||||
this.addDynamicListener("#rec-list .dropdown-menu.toggle-dropdown a", "click", this.recipe.dropdownToggleClick, this.recipe);
|
||||
this.addDynamicListener("#rec-list", "operationremove", this.recipe.clearRecipe.bind(this.recipe));
|
||||
this.addDynamicListener("textarea.arg", "dragover", this.recipe.textArgDragover, this.recipe);
|
||||
this.addDynamicListener("textarea.arg", "dragleave", this.recipe.textArgDragLeave, this.recipe);
|
||||
this.addDynamicListener("textarea.arg", "drop", this.recipe.textArgDrop, this.recipe);
|
||||
|
|
|
@ -132,6 +132,10 @@ export class CRecipeLi extends HTMLElement {
|
|||
|
||||
const clearfixDiv = document.createElement("div");
|
||||
|
||||
if (this.app.operations[this.name].flowControl) {
|
||||
li.classList.add("flow-control-op");
|
||||
}
|
||||
|
||||
li.appendChild(icons);
|
||||
li.appendChild(clearfixDiv);
|
||||
|
||||
|
|
|
@ -280,6 +280,7 @@ class OperationsWaiter {
|
|||
* @param {string} className - the className to update
|
||||
*/
|
||||
updateListItemsClasses(srcListSelector, className) {
|
||||
console.log("li update");
|
||||
const listItems = document.querySelectorAll(`${srcListSelector} li`);
|
||||
const ops = document.querySelectorAll("c-operation-li > li.operation");
|
||||
|
||||
|
|
|
@ -243,10 +243,6 @@ class RecipeWaiter {
|
|||
buildRecipeOperation(name) {
|
||||
const op = new CRecipeLi(this.app, name, this.app.operations[name].args);
|
||||
|
||||
if (this.app.operations[name].flowControl) {
|
||||
op.classList.add("flow-control-op");
|
||||
}
|
||||
|
||||
// Disable auto-bake if this is a manual op
|
||||
if (op.manualBake && this.app.autoBake_) {
|
||||
this.manager.controls.setAutoBake(false);
|
||||
|
@ -289,6 +285,8 @@ class RecipeWaiter {
|
|||
recList.removeChild(recList.firstChild);
|
||||
}
|
||||
recList.dispatchEvent(this.manager.operationremove);
|
||||
window.dispatchEvent(this.app.manager.statechange);
|
||||
this.app.manager.ops.updateListItemsClasses("#rec-list", "selected");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue