Mercurial > libervia-web
comparison libervia/pages/photos/_browser/__init__.py @ 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 | ff44f822bfdd |
children | 106bae41f5c8 |
comparison
equal
deleted
inserted
replaced
1356:39719ff4fcad | 1357:dbd573b0bc9c |
---|---|
47 | 47 |
48 @bind(".action_delete", "click") | 48 @bind(".action_delete", "click") |
49 def on_delete(evt): | 49 def on_delete(evt): |
50 evt.stopPropagation() | 50 evt.stopPropagation() |
51 target = evt.currentTarget | 51 target = evt.currentTarget |
52 item_elt = DOMNode(target.elt.closest('.item')) | 52 item_elt = DOMNode(target.closest('.item')) |
53 item_elt.classList.add("selected_for_deletion") | 53 item_elt.classList.add("selected_for_deletion") |
54 item = JSON.parse(item_elt.dataset.item) | 54 item = JSON.parse(item_elt.dataset.item) |
55 dialog.Confirm( | 55 dialog.Confirm( |
56 f"album {item['name']!r} will be deleted (inluding all its photos), " | 56 f"album {item['name']!r} will be deleted (inluding all its photos), " |
57 f"are you sure?", | 57 f"are you sure?", |