refactoring view, now combining modals and view into one module.
Also common modal components can now be nicely separated and reused
This commit is contained in:
@@ -2,7 +2,7 @@ from message.message import Message, ClickMessage
|
||||
from message.translation_edit import AddTranslation ,EditTranslation
|
||||
|
||||
from model.sense import NewSense
|
||||
import modals
|
||||
from view import modals
|
||||
|
||||
|
||||
class GenericShowModal(ClickMessage):
|
||||
|
||||
@@ -51,7 +51,7 @@ class EditExampleTranslation(Message):
|
||||
|
||||
def update_model(self, model):
|
||||
self.example.translations = []
|
||||
for input_el in document.getElementsByClassName("example-translation-edit-input"):
|
||||
for input_el in document.getElementsByClassName("list-adder-input"):
|
||||
new_example_translation = input_el.value
|
||||
if new_example_translation != "":
|
||||
self.example.translations.append(new_example_translation)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from message.message import Message, ClickMessage, msg
|
||||
from browser import window
|
||||
import modals
|
||||
|
||||
|
||||
class Reset(ClickMessage):
|
||||
|
||||
Reference in New Issue
Block a user