lexonomy_custom_editor/src/message/delete_messages.py

27 lines
779 B
Python

from browser import document
from message.message import Message
from message.simple_messages import NoReset
class DeleteComment(NoReset):
def update_model(self, model):
document.getElementById("modal-question").value = ""
class DeleteVariants(NoReset):
def update_model(self, model):
for el in document.getElementsByClassName("list-adder-input"):
el.value = ""
class DeleteRelatedEntries(DeleteVariants):
pass
class DeleteEntryLabels(NoReset):
def update_model(self, model):
for sel in document.getElementsByClassName("label-value"):
sel.selectedIndex = 0
for inpt in document.getElementsByClassName("label-value-other"):
inpt.value = ""