Skip to content

Commit

Permalink
Merge pull request #195 from mjuhanne/refactor_html
Browse files Browse the repository at this point in the history
Fix Stroke order buttons not working after refactoring
  • Loading branch information
hgiesel authored Aug 22, 2023
2 parents 82993c4 + 75e654e commit 8ebeecc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion addon/card_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def field_exists(name):
dmak_js = "<script>" + read_web_file("dmak.js") + "</script>\n\n"
raphael_js = "<script>" + read_web_file("raphael.js") + "</script>\n\n"
japanese_util_js = "<script>" + read_web_file("japanese-util.js") + "</script>\n\n"
launch_back_js = f"<script>render_page('{self.label}');</script>"

# Set template html
template["qfmt"] = (
Expand All @@ -143,8 +144,9 @@ def field_exists(name):
dmak_js +
raphael_js +
japanese_util_js +
read_web_file_with_includes(f"back-{self.label}.html") +
common_back_js +
read_web_file_with_includes(f"back-{self.label}.html")
launch_back_js
)

aqt.mw.col.models.save(model)
Expand Down
2 changes: 1 addition & 1 deletion addon/lookup_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def __init__(self, parent=None):
+ style_class
+ '">'
+ settings_html
+ common_back
+ body_html
+ common_back
+ set_keys_html
+ "</body></html>"
)
Expand Down
2 changes: 0 additions & 2 deletions addon/web/back-production.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ <h2 class="title-tooltip__title actions-back__title">
<!-- START - Addon script, Production, back -->
<script>
var kanjivg_uri = 'kanji_';

render_page("production");
</script>
<!-- END - Addon script, Production, back -->

Expand Down
2 changes: 0 additions & 2 deletions addon/web/back-recognition.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ <h2 class="title-tooltip__title actions-back__title">
<!-- START - Addon script, Recognition, back -->
<script>
var kanjivg_uri = 'kanji_';

render_page("recognition");
</script>
<!-- END - Addon script, Recognition, back -->

Expand Down

0 comments on commit 8ebeecc

Please sign in to comment.