Skip to content

Commit

Permalink
Limit height of strings table in screenshot detail page
Browse files Browse the repository at this point in the history
To prevent scroll and hiding the second table, a height limit has been added to the first table showing strings related to the screenshot.

Fixes: WeblateOrg#7085
  • Loading branch information
meel-hd committed Sep 5, 2024
1 parent 114588b commit 8d9dcc1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions weblate/static/styles/screenshots/screenshot_detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/

#sources-listing {
#sources-listing #strings-table-container {
max-height: 400px;
overflow-y: auto;
}

@media (max-width: 767px) {
#sources-listing {
#sources-listing #strings-table-container {
max-height: 300px;
}

Expand Down
10 changes: 7 additions & 3 deletions weblate/templates/screenshots/screenshot_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@


<div class="panel panel-default" id="sources-listing" data-href="{% url 'screenshot-js-get' pk=object.pk %}">
<div class="panel-heading"><h4 class="panel-title">{% trans "Assigned source strings" %}</h4></div>
{% include "screenshots/screenshot_sources_body.html" with sources=objects.units.order %}
<div class="panel-heading">
<h4 class="panel-title">{% trans "Assigned source strings" %}</h4>
</div>
<div id="strings-table-container">
{% include "screenshots/screenshot_sources_body.html" with sources=objects.units.order %}
</div>
<div class="panel-footer">
{% trans "Screenshot is shown to add visual context for all listed source strings." %}
</div>
Expand All @@ -56,7 +60,7 @@
</div>
<form class="form-inline double-submission">
{% csrf_token %}
<input type="text" required="yes" name="q" id="search-input" placeholder="{% trans "Source string search" %}" />
<input class="textinput form-control" type="text" required="yes" name="q" id="search-input" placeholder="{% trans "Source string search" %}" />
<button data-href="{% url 'screenshot-js-search' pk=object.pk %}" class="btn btn-primary" id="screenshots-search">{% trans "Search" %}</button>
</form>
</div>
Expand Down

0 comments on commit 8d9dcc1

Please sign in to comment.