Mercurial > libervia-web
changeset 1357:dbd573b0bc9c
browser: updated code to work with new Brython 3.8.10:
/!\ Brython 3.8.10 is now the minimal version
Removed `.js.` and `.elt.` attributes which are not working and needed anymore.
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 17 Sep 2020 22:46:55 +0200 |
parents | 39719ff4fcad |
children | 3c5054a22e7a |
files | libervia/pages/_browser/slideshow.py libervia/pages/photos/_browser/__init__.py libervia/pages/photos/album/_browser/__init__.py setup.py |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/pages/_browser/slideshow.py Thu Sep 17 16:44:54 2020 +0200 +++ b/libervia/pages/_browser/slideshow.py Thu Sep 17 22:46:55 2020 +0200 @@ -34,7 +34,7 @@ if current is None: return None try: - return current.js._item + return current._item except AttributeError: return None @@ -45,7 +45,7 @@ if current is None: return None try: - return current.js._options + return current._options except AttributeError: return None
--- a/libervia/pages/photos/_browser/__init__.py Thu Sep 17 16:44:54 2020 +0200 +++ b/libervia/pages/photos/_browser/__init__.py Thu Sep 17 22:46:55 2020 +0200 @@ -49,7 +49,7 @@ def on_delete(evt): evt.stopPropagation() target = evt.currentTarget - item_elt = DOMNode(target.elt.closest('.item')) + item_elt = DOMNode(target.closest('.item')) item_elt.classList.add("selected_for_deletion") item = JSON.parse(item_elt.dataset.item) dialog.Confirm(
--- a/libervia/pages/photos/album/_browser/__init__.py Thu Sep 17 16:44:54 2020 +0200 +++ b/libervia/pages/photos/album/_browser/__init__.py Thu Sep 17 22:46:55 2020 +0200 @@ -160,7 +160,7 @@ def on_delete(evt): evt.stopPropagation() target = evt.currentTarget - item_elt = DOMNode(target.elt.closest('.item')) + item_elt = DOMNode(target.closest('.item')) item_elt.classList.add("selected_for_deletion") item = JSON.parse(item_elt.dataset.item) dialog.Confirm( @@ -226,7 +226,7 @@ def on_cover(evt): evt.stopPropagation() target = evt.currentTarget - item_elt = DOMNode(target.elt.closest('.item')) + item_elt = DOMNode(target.closest('.item')) item_elt.classList.add("selected_for_action") item = JSON.parse(item_elt.dataset.item) dialog.Confirm( @@ -246,7 +246,7 @@ evt.preventDefault() slideshow = SlideShow() target = evt.currentTarget - clicked_item_elt = DOMNode(target.elt.closest('.item')) + clicked_item_elt = DOMNode(target.closest('.item')) slideshow.attach() for idx, item_elt in enumerate(document.select('.item')):
--- a/setup.py Thu Sep 17 16:44:54 2020 +0200 +++ b/setup.py Thu Sep 17 22:46:55 2020 +0200 @@ -32,7 +32,7 @@ "jinja2>=2.9", "shortuuid", "autobahn", - "brython", + "brython>=3.8.10", ] long_description = """\ Libervia is a web frontend for Salut à Toi (SàT), a multi-frontends and multi-purposes XMPP client.