2019-11-13 22:21:57 +00:00
|
|
|
from browser import window
|
2019-11-05 21:18:20 +00:00
|
|
|
from model import Model
|
|
|
|
from view import View
|
|
|
|
from update import update
|
2019-11-13 22:21:57 +00:00
|
|
|
from export import export_to_xml
|
2019-11-05 21:18:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
model = Model()
|
|
|
|
|
|
|
|
|
2019-11-13 22:21:57 +00:00
|
|
|
def plugin_init(div, _entry, editable):
|
|
|
|
view = View(div)
|
2019-11-05 21:18:20 +00:00
|
|
|
update.set_model(model)
|
2019-11-13 22:21:57 +00:00
|
|
|
update.set_view(view)
|
|
|
|
|
|
|
|
|
|
|
|
def plugin_render(_div, entry):
|
|
|
|
model.import_xml(entry.content)
|
2019-11-05 21:18:20 +00:00
|
|
|
update.update_model()
|
|
|
|
|
|
|
|
|
2019-11-13 22:21:57 +00:00
|
|
|
def plugin_save(_div):
|
|
|
|
return export_to_xml(model)
|
|
|
|
|
|
|
|
|
|
|
|
# export!
|
|
|
|
window.plugin_init = plugin_init
|
|
|
|
window.plugin_render = plugin_render
|
|
|
|
window.plugin_save = plugin_save
|
2019-11-05 21:18:20 +00:00
|
|
|
|