[damned-lies] Fix "Hide completed modules" in user page and all modules page



commit 75abfa6788cb7d0b91ca1c4862cf54ec96023c15
Author: Grégoire Détrez <gregoire detrez gu se>
Date:   Sat Sep 26 12:56:43 2015 +0200

    Fix "Hide completed modules" in user page and all modules page
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754190

 templates/languages/language_all_modules.html   |   10 ----------
 templates/languages/language_release.html       |    5 -----
 templates/languages/language_release_stats.html |    5 +++++
 templates/people/person_detail.html             |   12 ++++--------
 4 files changed, 9 insertions(+), 23 deletions(-)
---
diff --git a/templates/languages/language_all_modules.html b/templates/languages/language_all_modules.html
index dcbd5ef..f36825b 100644
--- a/templates/languages/language_all_modules.html
+++ b/templates/languages/language_all_modules.html
@@ -22,16 +22,6 @@ $(document).ready(function()
 
 <h2>{% trans "All modules" %} - <a href="{{ language.get_team_url }}">{{ language.get_name }}</a></h2>
 
-<div id="hide-show">
-  <p id="hide">
-   <a href="#" onclick="return showHideCompleted('stats-table');">{% trans "Hide completed modules" %}</a>
-  </p>
-
-  <p id="show" style="display:none">
-   <a href="#" onclick="return showHideCompleted('stats-table');">{% trans "Show completed modules" %}</a>
-  </p>
-</div>
-
 <h3>{{ stats_title }}</h3>
 {% with stats as modstats %}
   {% include "languages/language_release_stats.html" %}
diff --git a/templates/languages/language_release.html b/templates/languages/language_release.html
index 53f3025..a8a3972 100644
--- a/templates/languages/language_release.html
+++ b/templates/languages/language_release.html
@@ -25,11 +25,6 @@ $(document).ready(function()
 <p><i>{% trans "The modules of this release are not part of the GNOME Git repository. Please check each 
module's web page to see where to send translations." %}</i></p>
 {% endif %}
 
-<div id="hide-show">
-   <a href="#" id="hide-completed-modules">{% trans "Hide completed modules" %}</a>
-   <a href="#" id="show-completed-modules" style="display: none;">{% trans "Show completed modules" %}</a>
-</div>
-
 <h3>{{ stats_title }}</h3>
 {% with stats as modstats %}
   {% include "languages/language_release_stats.html" %}
diff --git a/templates/languages/language_release_stats.html b/templates/languages/language_release_stats.html
index 019a2c1..678a884 100644
--- a/templates/languages/language_release_stats.html
+++ b/templates/languages/language_release_stats.html
@@ -2,6 +2,11 @@
 
 {% load i18n stats_extras %}
 
+<div id="hide-show">
+   <a href="#" id="hide-completed-modules">{% trans "Hide completed modules" %}</a>
+   <a href="#" id="show-completed-modules" style="display: none;">{% trans "Show completed modules" %}</a>
+</div>
+
 <table>
 <tr>
   <td class="leftcell" colspan="3" title="{% trans "Translated/Fuzzy/Untranslated" %}"><span 
style="margin-right: 10px;">{{ modstats.totaltransperc }}% ({{ modstats.totaltrans }}/{{ modstats.totalfuzzy 
}}/{{ modstats.totaluntrans }})</span></td>
diff --git a/templates/people/person_detail.html b/templates/people/person_detail.html
index d4e841f..eb16c06 100644
--- a/templates/people/person_detail.html
+++ b/templates/people/person_detail.html
@@ -48,14 +48,10 @@ $(document).ready(function()
 {% include "people/person_team_membership.html" %}
 
 {% if states %}
-<div id="hide-show">
-  <p id="hide">
-   <a href="#" onclick="return showHideCompleted('working_on');">{% trans "Hide completed modules" %}</a>
-  </p>
 
-  <p id="show" style="display:none">
-   <a href="#" onclick="return showHideCompleted('working_on');">{% trans "Show completed modules" %}</a>
- </p>
+<div id="hide-show">
+   <a href="#" id="hide-completed-modules">{% trans "Hide completed modules" %}</a>
+   <a href="#" id="show-completed-modules" style="display: none;">{% trans "Show completed modules" %}</a>
 </div>
 
 <h2>{% trans "Current activity" %}</h2>
@@ -66,7 +62,7 @@ $(document).ready(function()
 </tr></thead>
 <tbody>
 {% for state, stats in states %}
-<tr id="{{ state.id }}{% if stats.tr_percentage == 100 %}-complete{% endif %}">
+<tr id="{{ state.id }}{% if stats.tr_percentage == 100 %}-complete{% endif %}" {% if stats.tr_percentage == 
100 %}class="completed-module"{% endif %}>
   <td><span style="display: none;">{{ state.updated|date:"c" }}</span>{{ 
state.updated|naturalday:"DATE_FORMAT" }}</td>
   <td><a href="{{ state.get_absolute_url }}">{{ state.branch.module.get_description }} - {{ 
state.branch.name }} - {{ state.domain.get_description }} - {{ state.language.get_name }}</a></td>
   <td>{{ stats.tr_percentage|default:"0" }}%</td>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]