Skip to content

Commit

Permalink
Merge pull request #68 from molgen/show-input-language-v2
Browse files Browse the repository at this point in the history
Add language hints
  • Loading branch information
donald authored Feb 7, 2020
2 parents 7b00a97 + d233085 commit 70eb4e0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
Binary file added mpicms/static/images/de.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mpicms/static/images/de.xcf
Binary file not shown.
Binary file added mpicms/static/images/en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mpicms/static/images/en.xcf
Binary file not shown.
26 changes: 26 additions & 0 deletions mpicms/templates/wagtailadmin/pages/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,31 @@
.fieldname-markdown textarea {
font-family: monospace;
}

li.object.stream-field.english {
background-image: url("http://localhost:8000/static/images/en.png");
background-repeat: no-repeat
}
li.object.stream-field.german {
background: #cfe2e2;
background-image: url("http://localhost:8000/static/images/de.png");
background-repeat: no-repeat
}
</style>
{% endblock %}

{% block extra_js %}
{{ block.super }}
<script type="text/javascript">
$(document).ready(function() {
$("div#body_de-list, div#sidebar_de-list").
closest("li.object.stream-field").
addClass("german");
$("div#body_en-list, div#sidebar_en-list").
closest("li.object.stream-field").
addClass("english");
$("label:contains('[de]')").append(" 🇩🇪");
$("label:contains('[en]')").append(" 🇬🇧");
});
</script>
{% endblock %}

0 comments on commit 70eb4e0

Please sign in to comment.