feat: Remove operation button by simple click
This commit is contained in:
parent
037590f831
commit
d4a8ffa679
@ -85,6 +85,7 @@ class HTMLOperation {
|
||||
<div class="recip-icons">
|
||||
<i class="material-icons breakpoint" title="Set breakpoint" break="false">pause</i>
|
||||
<i class="material-icons disable-icon" title="Disable operation" disabled="false">not_interested</i>
|
||||
<i class="material-icons remove" title="Remove operation" disabled="false">close</i>
|
||||
</div>
|
||||
<div class="clearfix"> </div>`;
|
||||
|
||||
|
||||
@ -137,6 +137,7 @@ class Manager {
|
||||
this.addDynamicListener(".arg[type=checkbox], .arg[type=radio], select.arg", "change", this.recipe.ingChange, this.recipe);
|
||||
this.addDynamicListener(".disable-icon", "click", this.recipe.disableClick, this.recipe);
|
||||
this.addDynamicListener(".breakpoint", "click", this.recipe.breakpointClick, this.recipe);
|
||||
this.addDynamicListener(".remove", "click", this.recipe.removeClick, this.recipe);
|
||||
this.addDynamicListener("#rec-list li.operation", "dblclick", this.recipe.operationDblclick, this.recipe);
|
||||
this.addDynamicListener("#rec-list li.operation > div", "dblclick", this.recipe.operationChildDblclick, this.recipe);
|
||||
this.addDynamicListener("#rec-list .dropdown-menu.toggle-dropdown a", "click", this.recipe.dropdownToggleClick, this.recipe);
|
||||
|
||||
@ -262,6 +262,19 @@ class RecipeWaiter {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler for remove click events.
|
||||
* Updates the icon status.
|
||||
*
|
||||
* @fires Manager#statechange
|
||||
* @param {event} e
|
||||
*/
|
||||
removeClick(e) {
|
||||
e.target.parentNode.parentNode.remove(e)
|
||||
this.opRemove(e);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handler for operation doubleclick events.
|
||||
* Removes the operation from the recipe and auto bakes.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user