Commit d3058d3591f2e70b0f88a6f229faa074caf5cbbf
Exists in
master
and in
39 other branches
Merge pull request #38 from interlegis/upstream/master
Various changes
Showing
16 changed files
with
685 additions
and
118 deletions
Show diff stats
README.rst
@@ -24,11 +24,11 @@ Application that integrates existing systems to represent the contributions of t | @@ -24,11 +24,11 @@ Application that integrates existing systems to represent the contributions of t | ||
24 | Features | 24 | Features |
25 | ======== | 25 | ======== |
26 | 26 | ||
27 | -* Developerd by Interlegis Communities http://colab.interlegis.leg.br/ | 27 | +* Developed by Interlegis Communities http://colab.interlegis.leg.br/ |
28 | 28 | ||
29 | -* Writed with Python http://python.org/ | 29 | +* Written with Python http://python.org/ |
30 | 30 | ||
31 | -* Build in Django Web Framework https://www.djangoproject.com/ | 31 | +* Built in Django Web Framework https://www.djangoproject.com/ |
32 | 32 | ||
33 | * Search engine with Solr https://lucene.apache.org/solr/ | 33 | * Search engine with Solr https://lucene.apache.org/solr/ |
34 | 34 |
src/accounts/templates/accounts/user_detail.html
@@ -8,8 +8,8 @@ | @@ -8,8 +8,8 @@ | ||
8 | {% trans "Messages" as group_collabs %} | 8 | {% trans "Messages" as group_collabs %} |
9 | {% trans "Contributions" as type_collabs %} | 9 | {% trans "Contributions" as type_collabs %} |
10 | 10 | ||
11 | - {% include "pizza-chart.html" with chart_data=type_count chart_div="collabs" chart_height=300 name=type_collabs %} | ||
12 | - {% include "pizza-chart.html" with chart_data=list_activity chart_div="collabs2" chart_height=300 name=group_collabs %} | 11 | + {% include "doughnut-chart.html" with chart_data=type_count chart_canvas="collabs" name=type_collabs %} |
12 | + {% include "doughnut-chart.html" with chart_data=list_activity chart_canvas="collabs2" name=group_collabs %} | ||
13 | {% endblock %} | 13 | {% endblock %} |
14 | 14 | ||
15 | {% block main-content %} | 15 | {% block main-content %} |
@@ -97,10 +97,14 @@ | @@ -97,10 +97,14 @@ | ||
97 | <div class="col-lg-4 col-md-4 col-sm-7"> | 97 | <div class="col-lg-4 col-md-4 col-sm-7"> |
98 | <div class="panel panel-default"> | 98 | <div class="panel panel-default"> |
99 | <div class="panel-heading"> | 99 | <div class="panel-heading"> |
100 | - <h3 class="panel-title">{% trans "Contributions by Type" %}</h3> | 100 | + <h3 class="panel-title">{% trans "Collaborations by Type" %}</h3> |
101 | </div> | 101 | </div> |
102 | <div class="panel-body"> | 102 | <div class="panel-body"> |
103 | <div id="collabs"></div> | 103 | <div id="collabs"></div> |
104 | + <div class="chart collabs"> | ||
105 | + <canvas width="200" height="200"></canvas> | ||
106 | + <p></p> | ||
107 | + </div> | ||
104 | </div> | 108 | </div> |
105 | </div> | 109 | </div> |
106 | </div> | 110 | </div> |
@@ -112,7 +116,10 @@ | @@ -112,7 +116,10 @@ | ||
112 | <h3 class="panel-title">{% trans "Participation by Group" %}</h3> | 116 | <h3 class="panel-title">{% trans "Participation by Group" %}</h3> |
113 | </div> | 117 | </div> |
114 | <div class="panel-body"> | 118 | <div class="panel-body"> |
115 | - <div id="collabs2"></div> | 119 | + <div class="chart collabs2"> |
120 | + <canvas width="200" height="200"></canvas> | ||
121 | + <p></p> | ||
122 | + </div> | ||
116 | </div> | 123 | </div> |
117 | </div> | 124 | </div> |
118 | </div> | 125 | </div> |
@@ -150,13 +157,13 @@ | @@ -150,13 +157,13 @@ | ||
150 | {% endfor %} | 157 | {% endfor %} |
151 | </ul> | 158 | </ul> |
152 | <a href="{% url 'haystack_search' %}?type=thread&author={{ user_.username }}"> | 159 | <a href="{% url 'haystack_search' %}?type=thread&author={{ user_.username }}"> |
153 | - {% trans "View more discussions..." %} | 160 | + {% trans "View more posts..." %} |
154 | </a> | 161 | </a> |
155 | <div> </div> | 162 | <div> </div> |
156 | </div> | 163 | </div> |
157 | 164 | ||
158 | <div class="col-lg-6 col-md-6 col-sm-12"> | 165 | <div class="col-lg-6 col-md-6 col-sm-12"> |
159 | - <h3>{% trans "Contributions" %}</h3> | 166 | + <h3>{% trans "Latest contributions" %}</h3> |
160 | <ul class="message-list"> | 167 | <ul class="message-list"> |
161 | {% for result in results %} | 168 | {% for result in results %} |
162 | {% include "message-preview.html" %} | 169 | {% include "message-preview.html" %} |
src/accounts/templates/accounts/user_update_form.html
@@ -190,7 +190,7 @@ $(function() { | @@ -190,7 +190,7 @@ $(function() { | ||
190 | </div> | 190 | </div> |
191 | <div class="panel-body"> | 191 | <div class="panel-body"> |
192 | <div class="form-group"> | 192 | <div class="form-group"> |
193 | - {% trans "This feature is available only for who needs to change the password for some reason as having an old user with the same username, forgot your password to commit, usage of other XMPP Client for connection. Usually, you won't need to change this password. Only change it if you are sure about what you are doing." %} | 193 | + {% trans "This feature is available only for those who need to change the password for some reason as having an old user with the same username, forgot your password to commit, usage of other XMPP Client for connection. Usually, you won't need to change this password. Only change it if you are sure about what you are doing." %} |
194 | </div> | 194 | </div> |
195 | <a href="{% url 'change_password' %}" class="btn btn-default pull-right"><span class="icon-warning-sign"></span> {% trans "Change Password" %}</a> | 195 | <a href="{% url 'change_password' %}" class="btn btn-default pull-right"><span class="icon-warning-sign"></span> {% trans "Change Password" %}</a> |
196 | </div> | 196 | </div> |
src/accounts/utils/mailman.py
@@ -82,3 +82,16 @@ def get_list_description(listname, lists=None): | @@ -82,3 +82,16 @@ def get_list_description(listname, lists=None): | ||
82 | lists = dict(lists) | 82 | lists = dict(lists) |
83 | 83 | ||
84 | return lists.get(listname) | 84 | return lists.get(listname) |
85 | + | ||
86 | + | ||
87 | +def list_users(listname): | ||
88 | + url = get_url(listname) | ||
89 | + | ||
90 | + params = {} | ||
91 | + | ||
92 | + try: | ||
93 | + users = requests.get(url, timeout=TIMEOUT, params=params) | ||
94 | + except requests.exceptions.RequestException: | ||
95 | + return [] | ||
96 | + | ||
97 | + return users.json() |
src/colab/custom_settings.py
@@ -306,6 +306,7 @@ DPASTE_EXPIRE_CHOICES = ( | @@ -306,6 +306,7 @@ DPASTE_EXPIRE_CHOICES = ( | ||
306 | DPASTE_EXPIRE_DEFAULT = DPASTE_EXPIRE_CHOICES[4][0] | 306 | DPASTE_EXPIRE_DEFAULT = DPASTE_EXPIRE_CHOICES[4][0] |
307 | DPASTE_DEFAULT_GIST_DESCRIPTION = 'Gist created on Colab Interlegis' | 307 | DPASTE_DEFAULT_GIST_DESCRIPTION = 'Gist created on Colab Interlegis' |
308 | DPASTE_DEFAULT_GIST_NAME = 'colab_paste' | 308 | DPASTE_DEFAULT_GIST_NAME = 'colab_paste' |
309 | +DPASTE_LEXER_DEFAULT = 'text' | ||
309 | 310 | ||
310 | try: | 311 | try: |
311 | from local_settings import * | 312 | from local_settings import * |
src/locale/pt_BR/LC_MESSAGES/django.mo
No preview for this file type
src/locale/pt_BR/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid "" | @@ -7,7 +7,7 @@ msgid "" | ||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: PACKAGE VERSION\n" | 8 | "Project-Id-Version: PACKAGE VERSION\n" |
9 | "Report-Msgid-Bugs-To: \n" | 9 | "Report-Msgid-Bugs-To: \n" |
10 | -"POT-Creation-Date: 2013-12-19 11:20+0000\n" | 10 | +"POT-Creation-Date: 2014-08-07 12:49+0000\n" |
11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 | "Language-Team: LANGUAGE <LL@li.org>\n" | 13 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -33,7 +33,7 @@ msgstr "Datas importantes" | @@ -33,7 +33,7 @@ msgstr "Datas importantes" | ||
33 | msgid "Social account does not exist" | 33 | msgid "Social account does not exist" |
34 | msgstr "Conta social não existe" | 34 | msgstr "Conta social não existe" |
35 | 35 | ||
36 | -#: accounts/forms.py:56 accounts/templates/accounts/user_detail.html:34 | 36 | +#: accounts/forms.py:56 accounts/templates/accounts/user_detail.html:38 |
37 | msgid "Bio" | 37 | msgid "Bio" |
38 | msgstr "Bio" | 38 | msgstr "Bio" |
39 | 39 | ||
@@ -133,76 +133,86 @@ msgstr "Informações pessoais" | @@ -133,76 +133,86 @@ msgstr "Informações pessoais" | ||
133 | msgid "Subscribe to groups" | 133 | msgid "Subscribe to groups" |
134 | msgstr "Inscreva-se nos grupos" | 134 | msgstr "Inscreva-se nos grupos" |
135 | 135 | ||
136 | -#: accounts/templates/accounts/user_create_form.html:60 templates/base.html:98 | 136 | +#: accounts/templates/accounts/user_create_form.html:60 |
137 | +#: templates/base.html:106 templates/base.html.py:111 | ||
137 | msgid "Register" | 138 | msgid "Register" |
138 | msgstr "Cadastre-se" | 139 | msgstr "Cadastre-se" |
139 | 140 | ||
140 | -#: accounts/templates/accounts/user_detail.html:25 | 141 | +#: accounts/templates/accounts/user_detail.html:8 badger/models.py:22 |
142 | +#: super_archives/models.py:258 | ||
143 | +msgid "Messages" | ||
144 | +msgstr "Mensagens" | ||
145 | + | ||
146 | +#: accounts/templates/accounts/user_detail.html:9 badger/models.py:23 | ||
147 | +#: templates/home.html:7 | ||
148 | +msgid "Contributions" | ||
149 | +msgstr "Contribuições" | ||
150 | + | ||
151 | +#: accounts/templates/accounts/user_detail.html:29 | ||
141 | msgid "edit profile" | 152 | msgid "edit profile" |
142 | msgstr "editar perfil" | 153 | msgstr "editar perfil" |
143 | 154 | ||
144 | -#: accounts/templates/accounts/user_detail.html:26 | 155 | +#: accounts/templates/accounts/user_detail.html:30 |
145 | msgid "group membership" | 156 | msgid "group membership" |
146 | msgstr "Inscrições nos grupos" | 157 | msgstr "Inscrições nos grupos" |
147 | 158 | ||
148 | -#: accounts/templates/accounts/user_detail.html:61 | 159 | +#: accounts/templates/accounts/user_detail.html:65 |
149 | msgid "Twitter account" | 160 | msgid "Twitter account" |
150 | msgstr "Conta Twitter" | 161 | msgstr "Conta Twitter" |
151 | 162 | ||
152 | -#: accounts/templates/accounts/user_detail.html:64 | 163 | +#: accounts/templates/accounts/user_detail.html:68 |
153 | msgid "Facebook account" | 164 | msgid "Facebook account" |
154 | msgstr "Conta Facebook" | 165 | msgstr "Conta Facebook" |
155 | 166 | ||
156 | -#: accounts/templates/accounts/user_detail.html:69 | 167 | +#: accounts/templates/accounts/user_detail.html:73 |
157 | msgid "Google talk account" | 168 | msgid "Google talk account" |
158 | msgstr "Conta Google" | 169 | msgstr "Conta Google" |
159 | 170 | ||
160 | -#: accounts/templates/accounts/user_detail.html:73 | 171 | +#: accounts/templates/accounts/user_detail.html:77 |
161 | msgid "Github account" | 172 | msgid "Github account" |
162 | msgstr "Conta Github" | 173 | msgstr "Conta Github" |
163 | 174 | ||
164 | -#: accounts/templates/accounts/user_detail.html:77 | 175 | +#: accounts/templates/accounts/user_detail.html:81 |
165 | msgid "Personal webpage" | 176 | msgid "Personal webpage" |
166 | msgstr "Página web pessoal" | 177 | msgstr "Página web pessoal" |
167 | 178 | ||
168 | -#: accounts/templates/accounts/user_detail.html:83 | 179 | +#: accounts/templates/accounts/user_detail.html:87 |
169 | msgid "Groups: " | 180 | msgid "Groups: " |
170 | msgstr "Grupos: " | 181 | msgstr "Grupos: " |
171 | 182 | ||
172 | -#: accounts/templates/accounts/user_detail.html:96 | ||
173 | -msgid "Contributions by Type" | ||
174 | -msgstr "Contribuições por tipo" | 183 | +#: accounts/templates/accounts/user_detail.html:100 |
184 | +msgid "Collaborations by Type" | ||
185 | +msgstr "Colaborações por tipo" | ||
175 | 186 | ||
176 | -#: accounts/templates/accounts/user_detail.html:108 | 187 | +#: accounts/templates/accounts/user_detail.html:116 |
177 | msgid "Participation by Group" | 188 | msgid "Participation by Group" |
178 | msgstr "Participação por grupo" | 189 | msgstr "Participação por grupo" |
179 | 190 | ||
180 | -#: accounts/templates/accounts/user_detail.html:121 badger/models.py:70 | 191 | +#: accounts/templates/accounts/user_detail.html:132 badger/models.py:70 |
181 | msgid "Badges" | 192 | msgid "Badges" |
182 | msgstr "Medalhas" | 193 | msgstr "Medalhas" |
183 | 194 | ||
184 | -#: accounts/templates/accounts/user_detail.html:140 | 195 | +#: accounts/templates/accounts/user_detail.html:151 |
185 | msgid "Latest posted" | 196 | msgid "Latest posted" |
186 | msgstr "Últimas postagens" | 197 | msgstr "Últimas postagens" |
187 | 198 | ||
188 | -#: accounts/templates/accounts/user_detail.html:145 | 199 | +#: accounts/templates/accounts/user_detail.html:156 |
189 | msgid "There are no posts by this user so far." | 200 | msgid "There are no posts by this user so far." |
190 | msgstr "Não há posts deste usuário até agora." | 201 | msgstr "Não há posts deste usuário até agora." |
191 | 202 | ||
192 | -#: accounts/templates/accounts/user_detail.html:149 templates/home.html:57 | ||
193 | -#: templates/home.html.py:76 | ||
194 | -msgid "View more discussions..." | ||
195 | -msgstr "Ver mais discussões..." | 203 | +#: accounts/templates/accounts/user_detail.html:160 |
204 | +msgid "View more posts..." | ||
205 | +msgstr "Ver mais postagens..." | ||
196 | 206 | ||
197 | -#: accounts/templates/accounts/user_detail.html:155 badger/models.py:23 | ||
198 | -msgid "Contributions" | ||
199 | -msgstr "Contribuições" | 207 | +#: accounts/templates/accounts/user_detail.html:166 |
208 | +msgid "Latest contributions" | ||
209 | +msgstr "Últimas colaborações" | ||
200 | 210 | ||
201 | -#: accounts/templates/accounts/user_detail.html:160 | 211 | +#: accounts/templates/accounts/user_detail.html:171 |
202 | msgid "No contributions of this user so far." | 212 | msgid "No contributions of this user so far." |
203 | msgstr "Não há posts deste usuário até agora." | 213 | msgstr "Não há posts deste usuário até agora." |
204 | 214 | ||
205 | -#: accounts/templates/accounts/user_detail.html:164 | 215 | +#: accounts/templates/accounts/user_detail.html:175 |
206 | msgid "View more contributions..." | 216 | msgid "View more contributions..." |
207 | msgstr "Ver mais colaborações..." | 217 | msgstr "Ver mais colaborações..." |
208 | 218 | ||
@@ -274,7 +284,7 @@ msgstr "" | @@ -274,7 +284,7 @@ msgstr "" | ||
274 | 284 | ||
275 | #: accounts/templates/accounts/user_update_form.html:193 | 285 | #: accounts/templates/accounts/user_update_form.html:193 |
276 | msgid "" | 286 | msgid "" |
277 | -"This feature is available only for who needs to change the password for some " | 287 | +"This feature is available only for those who need to change the password for some " |
278 | "reason as having an old user with the same username, forgot your password to " | 288 | "reason as having an old user with the same username, forgot your password to " |
279 | "commit, usage of other XMPP Client for connection. Usually, you won't need " | 289 | "commit, usage of other XMPP Client for connection. Usually, you won't need " |
280 | "to change this password. Only change it if you are sure about what you are " | 290 | "to change this password. Only change it if you are sure about what you are " |
@@ -322,10 +332,6 @@ msgstr "Automaticamente" | @@ -322,10 +332,6 @@ msgstr "Automaticamente" | ||
322 | msgid "Manual" | 332 | msgid "Manual" |
323 | msgstr "Manual" | 333 | msgstr "Manual" |
324 | 334 | ||
325 | -#: badger/models.py:22 super_archives/models.py:258 | ||
326 | -msgid "Messages" | ||
327 | -msgstr "Mensagens" | ||
328 | - | ||
329 | #: badger/models.py:24 | 335 | #: badger/models.py:24 |
330 | msgid "Wikis" | 336 | msgid "Wikis" |
331 | msgstr "Wikis" | 337 | msgstr "Wikis" |
@@ -419,14 +425,35 @@ msgstr "Compactado" | @@ -419,14 +425,35 @@ msgstr "Compactado" | ||
419 | msgid "Spreadsheet" | 425 | msgid "Spreadsheet" |
420 | msgstr "Planilha" | 426 | msgstr "Planilha" |
421 | 427 | ||
422 | -#: colab/custom_settings.py:265 | 428 | +#: colab/custom_settings.py:267 |
423 | msgid "Planet Colab" | 429 | msgid "Planet Colab" |
424 | msgstr "" | 430 | msgstr "" |
425 | 431 | ||
426 | -#: colab/custom_settings.py:266 | 432 | +#: colab/custom_settings.py:268 |
427 | msgid "Colab blog aggregator" | 433 | msgid "Colab blog aggregator" |
428 | msgstr "Agregador de blog Colab" | 434 | msgstr "Agregador de blog Colab" |
429 | 435 | ||
436 | +#: colab/custom_settings.py:309 | ||
437 | +msgid "One Time Snippet" | ||
438 | +msgstr "" | ||
439 | + | ||
440 | +#: colab/custom_settings.py:310 | ||
441 | +msgid "In one hour" | ||
442 | +msgstr "" | ||
443 | + | ||
444 | +#: colab/custom_settings.py:311 | ||
445 | +msgid "In one week" | ||
446 | +msgstr "" | ||
447 | + | ||
448 | +#: colab/custom_settings.py:312 | ||
449 | +msgid "In one month" | ||
450 | +msgstr "" | ||
451 | + | ||
452 | +#: colab/custom_settings.py:313 | ||
453 | +#, fuzzy | ||
454 | +msgid "Never" | ||
455 | +msgstr "Seriedade" | ||
456 | + | ||
430 | #: planet/templates/feedzilla/_post_template.html:8 | 457 | #: planet/templates/feedzilla/_post_template.html:8 |
431 | msgid "From" | 458 | msgid "From" |
432 | msgstr "De" | 459 | msgstr "De" |
@@ -439,19 +466,19 @@ msgstr "em" | @@ -439,19 +466,19 @@ msgstr "em" | ||
439 | msgid "Read original" | 466 | msgid "Read original" |
440 | msgstr "Leia o original" | 467 | msgstr "Leia o original" |
441 | 468 | ||
442 | -#: planet/templates/feedzilla/base.html:5 | 469 | +#: planet/templates/feedzilla/base.html:7 |
443 | msgid "Community Blogs" | 470 | msgid "Community Blogs" |
444 | msgstr "Blogs da Comunidade" | 471 | msgstr "Blogs da Comunidade" |
445 | 472 | ||
446 | -#: planet/templates/feedzilla/base.html:15 | 473 | +#: planet/templates/feedzilla/base.html:17 |
447 | msgid "Tags" | 474 | msgid "Tags" |
448 | msgstr "Etiquetas" | 475 | msgstr "Etiquetas" |
449 | 476 | ||
450 | -#: planet/templates/feedzilla/base.html:19 | 477 | +#: planet/templates/feedzilla/base.html:21 |
451 | msgid "Source Blogs" | 478 | msgid "Source Blogs" |
452 | msgstr "Blogs de origem" | 479 | msgstr "Blogs de origem" |
453 | 480 | ||
454 | -#: planet/templates/feedzilla/base.html:23 | 481 | +#: planet/templates/feedzilla/base.html:25 |
455 | #: planet/templates/feedzilla/submit_blog.html:5 | 482 | #: planet/templates/feedzilla/submit_blog.html:5 |
456 | msgid "Submit a blog" | 483 | msgid "Submit a blog" |
457 | msgstr "Sugerir um blog" | 484 | msgstr "Sugerir um blog" |
@@ -505,7 +532,7 @@ msgid "Latest collaborations" | @@ -505,7 +532,7 @@ msgid "Latest collaborations" | ||
505 | msgstr "Últimas colaborações" | 532 | msgstr "Últimas colaborações" |
506 | 533 | ||
507 | #: search/forms.py:16 search/templates/search/search.html:41 | 534 | #: search/forms.py:16 search/templates/search/search.html:41 |
508 | -#: templates/base.html:92 | 535 | +#: templates/base.html:91 |
509 | msgid "Search" | 536 | msgid "Search" |
510 | msgstr "Busca" | 537 | msgstr "Busca" |
511 | 538 | ||
@@ -524,7 +551,7 @@ msgstr "" | @@ -524,7 +551,7 @@ msgstr "" | ||
524 | 551 | ||
525 | #: search/forms.py:26 search/views.py:36 | 552 | #: search/forms.py:26 search/views.py:36 |
526 | msgid "Mailinglist" | 553 | msgid "Mailinglist" |
527 | -msgstr "Lista de email" | 554 | +msgstr "Grupo" |
528 | 555 | ||
529 | #: search/forms.py:30 search/views.py:46 | 556 | #: search/forms.py:30 search/views.py:46 |
530 | msgid "Milestone" | 557 | msgid "Milestone" |
@@ -606,6 +633,7 @@ msgstr "Tamanho" | @@ -606,6 +633,7 @@ msgstr "Tamanho" | ||
606 | 633 | ||
607 | #: search/utils.py:7 search/views.py:20 | 634 | #: search/utils.py:7 search/views.py:20 |
608 | #: search/templates/search/includes/search_filters.html:116 | 635 | #: search/templates/search/includes/search_filters.html:116 |
636 | +#: templates/open-data.html:130 | ||
609 | msgid "Wiki" | 637 | msgid "Wiki" |
610 | msgstr "Wiki" | 638 | msgstr "Wiki" |
611 | 639 | ||
@@ -788,7 +816,7 @@ msgstr "" | @@ -788,7 +816,7 @@ msgstr "" | ||
788 | msgid "Email address verified!" | 816 | msgid "Email address verified!" |
789 | msgstr "Endereço de e-mail verificado!" | 817 | msgstr "Endereço de e-mail verificado!" |
790 | 818 | ||
791 | -#: super_archives/management/commands/import_emails.py:205 | 819 | +#: super_archives/management/commands/import_emails.py:207 |
792 | msgid "[Colab] Warning - Email sent with a blank subject." | 820 | msgid "[Colab] Warning - Email sent with a blank subject." |
793 | msgstr "[Colab] Aviso - E-mail enviado com o campo assunto em branco." | 821 | msgstr "[Colab] Aviso - E-mail enviado com o campo assunto em branco." |
794 | 822 | ||
@@ -824,11 +852,11 @@ msgstr "Relacionado:" | @@ -824,11 +852,11 @@ msgstr "Relacionado:" | ||
824 | 852 | ||
825 | #: super_archives/templates/message-thread.html:156 | 853 | #: super_archives/templates/message-thread.html:156 |
826 | msgid "Statistics:" | 854 | msgid "Statistics:" |
827 | -msgstr "Estátisticas:" | 855 | +msgstr "Estatísticas:" |
828 | 856 | ||
829 | #: super_archives/templates/message-thread.html:160 | 857 | #: super_archives/templates/message-thread.html:160 |
830 | msgid "started at" | 858 | msgid "started at" |
831 | -msgstr "começou às" | 859 | +msgstr "começou à" |
832 | 860 | ||
833 | #: super_archives/templates/message-thread.html:166 | 861 | #: super_archives/templates/message-thread.html:166 |
834 | msgid "viewed" | 862 | msgid "viewed" |
@@ -852,21 +880,22 @@ msgstr "votado" | @@ -852,21 +880,22 @@ msgstr "votado" | ||
852 | msgid "Tags:" | 880 | msgid "Tags:" |
853 | msgstr "Etiquetas:" | 881 | msgstr "Etiquetas:" |
854 | 882 | ||
855 | -#: super_archives/templates/superarchives/thread-dashboard.html:5 | ||
856 | -#: templates/base.html:73 | 883 | +#: super_archives/templates/superarchives/thread-dashboard.html:4 |
884 | +#: super_archives/templates/superarchives/thread-dashboard.html:7 | ||
885 | +#: templates/base.html:66 | ||
857 | msgid "Groups" | 886 | msgid "Groups" |
858 | msgstr "Grupos" | 887 | msgstr "Grupos" |
859 | 888 | ||
860 | -#: super_archives/templates/superarchives/thread-dashboard.html:15 | 889 | +#: super_archives/templates/superarchives/thread-dashboard.html:17 |
861 | msgid "latest" | 890 | msgid "latest" |
862 | msgstr "mais recentes" | 891 | msgstr "mais recentes" |
863 | 892 | ||
864 | -#: super_archives/templates/superarchives/thread-dashboard.html:23 | ||
865 | -#: super_archives/templates/superarchives/thread-dashboard.html:37 | 893 | +#: super_archives/templates/superarchives/thread-dashboard.html:25 |
894 | +#: super_archives/templates/superarchives/thread-dashboard.html:39 | ||
866 | msgid "more..." | 895 | msgid "more..." |
867 | msgstr "mais..." | 896 | msgstr "mais..." |
868 | 897 | ||
869 | -#: super_archives/templates/superarchives/thread-dashboard.html:29 | 898 | +#: super_archives/templates/superarchives/thread-dashboard.html:31 |
870 | msgid "most relevant" | 899 | msgid "most relevant" |
871 | msgstr "mais relevantes" | 900 | msgstr "mais relevantes" |
872 | 901 | ||
@@ -956,113 +985,513 @@ msgstr "Não encontrado. Continue procurando! :)" | @@ -956,113 +985,513 @@ msgstr "Não encontrado. Continue procurando! :)" | ||
956 | msgid "Ooopz... something went wrong!" | 985 | msgid "Ooopz... something went wrong!" |
957 | msgstr "Opa... algo saiu errado!" | 986 | msgstr "Opa... algo saiu errado!" |
958 | 987 | ||
959 | -#: templates/base.html:79 | 988 | +#: templates/base.html:63 |
960 | msgid "Timeline" | 989 | msgid "Timeline" |
961 | msgstr "Linha do Tempo" | 990 | msgstr "Linha do Tempo" |
962 | 991 | ||
963 | -#: templates/base.html:85 | 992 | +#: templates/base.html:69 |
964 | msgid "Blogs" | 993 | msgid "Blogs" |
965 | msgstr "" | 994 | msgstr "" |
966 | 995 | ||
967 | -#: templates/base.html:88 | 996 | +#: templates/base.html:72 |
968 | msgid "Contribute" | 997 | msgid "Contribute" |
969 | msgstr "Contribua" | 998 | msgstr "Contribua" |
970 | 999 | ||
971 | -#: templates/base.html:92 | 1000 | +#: templates/base.html:76 |
972 | msgid "New Wiki Page" | 1001 | msgid "New Wiki Page" |
973 | msgstr "Nova Página Wiki" | 1002 | msgstr "Nova Página Wiki" |
974 | 1003 | ||
975 | -#: templates/base.html:91 | ||
976 | -msgid "Roadmap" | ||
977 | -msgstr "Planejamento" | 1004 | +#: templates/base.html:78 |
1005 | +msgid "View Tickets" | ||
1006 | +msgstr "Ver Tiquetes" | ||
978 | 1007 | ||
979 | -#: templates/base.html:93 | 1008 | +#: templates/base.html:80 |
980 | msgid "New Ticket" | 1009 | msgid "New Ticket" |
981 | msgstr "Novo Tíquete" | 1010 | msgstr "Novo Tíquete" |
982 | 1011 | ||
983 | -#: templates/base.html:95 | ||
984 | -msgid "View Tickets" | ||
985 | -msgstr "Ver Tiquetes" | 1012 | +#: templates/base.html:82 |
1013 | +msgid "Roadmap" | ||
1014 | +msgstr "Planejamento" | ||
986 | 1015 | ||
987 | -#: templates/base.html:96 | 1016 | +#: templates/base.html:86 |
988 | msgid "Browse Source" | 1017 | msgid "Browse Source" |
989 | msgstr "Códigos Fontes" | 1018 | msgstr "Códigos Fontes" |
990 | 1019 | ||
991 | -#: templates/base.html:84 | 1020 | +#: templates/base.html:87 |
992 | msgid "Continuous Integration" | 1021 | msgid "Continuous Integration" |
993 | msgstr "Integração Contínua" | 1022 | msgstr "Integração Contínua" |
994 | 1023 | ||
995 | -#: templates/base.html:107 | 1024 | +#: templates/base.html:95 |
1025 | +msgid "Help" | ||
1026 | +msgstr "Ajuda" | ||
1027 | + | ||
1028 | +#: templates/base.html:107 templates/base.html.py:112 | ||
996 | msgid "Login" | 1029 | msgid "Login" |
997 | msgstr "Entrar" | 1030 | msgstr "Entrar" |
998 | 1031 | ||
999 | -#: templates/base.html:121 | 1032 | +#: templates/base.html:126 |
1000 | msgid "My Profile" | 1033 | msgid "My Profile" |
1001 | msgstr "Meu Perfil" | 1034 | msgstr "Meu Perfil" |
1002 | 1035 | ||
1003 | -#: templates/base.html:122 | 1036 | +#: templates/base.html:127 |
1004 | msgid "Logout" | 1037 | msgid "Logout" |
1005 | msgstr "Sair" | 1038 | msgstr "Sair" |
1006 | 1039 | ||
1007 | -#: templates/base.html:134 templates/base.html.py:129 | 1040 | +#: templates/base.html:139 templates/base.html.py:142 |
1008 | msgid "Search here..." | 1041 | msgid "Search here..." |
1009 | msgstr "Pesquise aqui..." | 1042 | msgstr "Pesquise aqui..." |
1010 | 1043 | ||
1011 | -#: templates/base.html:150 | 1044 | +#: templates/base.html:155 |
1012 | msgid "The login has failed. Please, try again." | 1045 | msgid "The login has failed. Please, try again." |
1013 | msgstr "O login falhou. Por favor, tente novamente." | 1046 | msgstr "O login falhou. Por favor, tente novamente." |
1014 | 1047 | ||
1015 | -#: templates/base.html:179 | 1048 | +#: templates/base.html:182 |
1016 | msgid "Last email imported at" | 1049 | msgid "Last email imported at" |
1017 | msgstr "Último e-mail importado em" | 1050 | msgstr "Último e-mail importado em" |
1018 | 1051 | ||
1019 | -#: templates/base.html:181 | 1052 | +#: templates/base.html:189 |
1020 | msgid "The contents of this site is published under license" | 1053 | msgid "The contents of this site is published under license" |
1021 | msgstr "O conteúdo deste site está publicado sob a licença" | 1054 | msgstr "O conteúdo deste site está publicado sob a licença" |
1022 | 1055 | ||
1023 | -#: templates/base.html:183 | ||
1024 | -msgid "Creative Commons - attribution, non-commercial" | ||
1025 | -msgstr "Creative Commons - atribuição e não-comercial" | 1056 | +#: templates/base.html:192 |
1057 | +msgid "" | ||
1058 | +"Creative Commons 3.0 Brasil - Atribuição - Não-Comercial - Compartilha-Igual" | ||
1059 | +msgstr "" | ||
1026 | 1060 | ||
1027 | -#: templates/home.html:17 | 1061 | +#: templates/home.html:21 |
1028 | msgid "Latest Collaborations" | 1062 | msgid "Latest Collaborations" |
1029 | msgstr "Últimas Colaborações" | 1063 | msgstr "Últimas Colaborações" |
1030 | 1064 | ||
1031 | -#: templates/home.html:21 | 1065 | +#: templates/home.html:25 |
1032 | msgid "RSS - Latest collaborations" | 1066 | msgid "RSS - Latest collaborations" |
1033 | msgstr "RSS - Últimas Colaborações" | 1067 | msgstr "RSS - Últimas Colaborações" |
1034 | 1068 | ||
1035 | -#: templates/home.html:30 | 1069 | +#: templates/home.html:34 |
1036 | msgid "View more collaborations..." | 1070 | msgid "View more collaborations..." |
1037 | msgstr "Ver mais colaborações..." | 1071 | msgstr "Ver mais colaborações..." |
1038 | 1072 | ||
1039 | -#: templates/home.html:37 | 1073 | +#: templates/home.html:41 |
1040 | msgid "Collaboration Graph" | 1074 | msgid "Collaboration Graph" |
1041 | msgstr "Gráfico de Colaborações" | 1075 | msgstr "Gráfico de Colaborações" |
1042 | 1076 | ||
1043 | -#: templates/home.html:45 | 1077 | +#: templates/home.html:52 |
1044 | msgid "Most Relevant Threads" | 1078 | msgid "Most Relevant Threads" |
1045 | msgstr "Discussões Mais Relevantes" | 1079 | msgstr "Discussões Mais Relevantes" |
1046 | 1080 | ||
1047 | -#: templates/home.html:49 | 1081 | +#: templates/home.html:56 |
1048 | msgid "RSS - Most Relevant Threads" | 1082 | msgid "RSS - Most Relevant Threads" |
1049 | msgstr "RSS - Discussões Mais Relevantes" | 1083 | msgstr "RSS - Discussões Mais Relevantes" |
1050 | 1084 | ||
1051 | -#: templates/home.html:64 | 1085 | +#: templates/home.html:64 templates/home.html.py:83 |
1086 | +msgid "View more discussions..." | ||
1087 | +msgstr "Ver mais discussões..." | ||
1088 | + | ||
1089 | +#: templates/home.html:71 | ||
1052 | msgid "Latest Threads" | 1090 | msgid "Latest Threads" |
1053 | msgstr "Últimas Discussões" | 1091 | msgstr "Últimas Discussões" |
1054 | 1092 | ||
1055 | -#: templates/home.html:68 | 1093 | +#: templates/home.html:75 |
1056 | msgid "RSS - Latest Threads" | 1094 | msgid "RSS - Latest Threads" |
1057 | msgstr "RSS - Últimas Discussões" | 1095 | msgstr "RSS - Últimas Discussões" |
1058 | 1096 | ||
1059 | -#: templates/pizza-chart.html:26 | ||
1060 | -msgid "Willing to help" | ||
1061 | -msgstr "Vontade de ajudar" | 1097 | +#: templates/open-data.html:6 |
1098 | +msgid "OpenData - Communities Interlegis" | ||
1099 | +msgstr "OpenData - Comunidades Interlegis" | ||
1062 | 1100 | ||
1063 | -#: templates/includes/big_header.html:9 | ||
1064 | -msgid "INTERLEGIS COMMUNITIES" | ||
1065 | -msgstr "COMUNIDADES INTERLEGIS" | 1101 | +#: templates/open-data.html:7 |
1102 | +msgid "" | ||
1103 | +"If you are interested in any other data that is not provided by this API, " | ||
1104 | +"please contact us via the ticketing system (you must be registered in order " | ||
1105 | +"to create a ticket)." | ||
1106 | +msgstr "" | ||
1107 | + | ||
1108 | +#: templates/open-data.html:9 | ||
1109 | +msgid "Retrieving data via API" | ||
1110 | +msgstr "" | ||
1111 | + | ||
1112 | +#: templates/open-data.html:10 | ||
1113 | +msgid "Colab API works through HTTP/REST, always returning JSON objects." | ||
1114 | +msgstr "" | ||
1115 | + | ||
1116 | +#: templates/open-data.html:12 | ||
1117 | +msgid "The base API URL is" | ||
1118 | +msgstr "" | ||
1119 | + | ||
1120 | +#: templates/open-data.html:19 | ||
1121 | +msgid "" | ||
1122 | +"Each model listed below has a resource_uri field available, which is the " | ||
1123 | +"object's data URI." | ||
1124 | +msgstr "" | ||
1125 | + | ||
1126 | +#: templates/open-data.html:20 | ||
1127 | +msgid "" | ||
1128 | +"The following list contains the available models to retrieve data and its " | ||
1129 | +"fields available for filtering" | ||
1130 | +msgstr "" | ||
1131 | + | ||
1132 | +#: templates/open-data.html:24 templates/open-data.html.py:39 | ||
1133 | +#: templates/open-data.html:50 templates/open-data.html.py:62 | ||
1134 | +#: templates/open-data.html:74 templates/open-data.html.py:95 | ||
1135 | +msgid "Fields" | ||
1136 | +msgstr "" | ||
1137 | + | ||
1138 | +#: templates/open-data.html:25 | ||
1139 | +msgid "" | ||
1140 | +"The email field is not shown for user's privacy, but you can use it to filter" | ||
1141 | +msgstr "" | ||
1142 | + | ||
1143 | +#: templates/open-data.html:27 | ||
1144 | +msgid "The user's username" | ||
1145 | +msgstr "" | ||
1146 | + | ||
1147 | +#: templates/open-data.html:28 | ||
1148 | +#, fuzzy | ||
1149 | +msgid "The user's email address" | ||
1150 | +msgstr "Adicionar outro endereço de e-mail" | ||
1151 | + | ||
1152 | +#: templates/open-data.html:29 | ||
1153 | +msgid "What is the user's institution" | ||
1154 | +msgstr "" | ||
1155 | + | ||
1156 | +#: templates/open-data.html:30 | ||
1157 | +msgid "What is the user's role" | ||
1158 | +msgstr "" | ||
1159 | + | ||
1160 | +#: templates/open-data.html:31 | ||
1161 | +msgid "The user's first name" | ||
1162 | +msgstr "" | ||
1163 | + | ||
1164 | +#: templates/open-data.html:32 | ||
1165 | +msgid "The user's last name" | ||
1166 | +msgstr "" | ||
1167 | + | ||
1168 | +#: templates/open-data.html:33 | ||
1169 | +msgid "A mini bio of the user" | ||
1170 | +msgstr "" | ||
1171 | + | ||
1172 | +#: templates/open-data.html:40 | ||
1173 | +msgid "" | ||
1174 | +"The address field is not shown for user's privacy, but you can use it to " | ||
1175 | +"filter" | ||
1176 | +msgstr "" | ||
1177 | + | ||
1178 | +#: templates/open-data.html:42 | ||
1179 | +msgid "It has a relationshop with the user described above" | ||
1180 | +msgstr "" | ||
1181 | + | ||
1182 | +#: templates/open-data.html:43 | ||
1183 | +#, fuzzy | ||
1184 | +msgid "An email address" | ||
1185 | +msgstr "Adicionar outro endereço de e-mail" | ||
1186 | + | ||
1187 | +#: templates/open-data.html:44 | ||
1188 | +msgid "The user's real name" | ||
1189 | +msgstr "" | ||
1190 | + | ||
1191 | +#: templates/open-data.html:52 | ||
1192 | +msgid "It has a relationship with the emailaddress described above" | ||
1193 | +msgstr "" | ||
1194 | + | ||
1195 | +#: templates/open-data.html:53 | ||
1196 | +#, fuzzy | ||
1197 | +msgid "The message's body" | ||
1198 | +msgstr "Corpo da mensagem" | ||
1199 | + | ||
1200 | +#: templates/open-data.html:54 | ||
1201 | +#, fuzzy | ||
1202 | +msgid "The message's subject" | ||
1203 | +msgstr "Por favor, digite o assunto da mensagem" | ||
1204 | + | ||
1205 | +#: templates/open-data.html:55 | ||
1206 | +#, fuzzy | ||
1207 | +msgid "The message's id" | ||
1208 | +msgstr "Última mensagem" | ||
1209 | + | ||
1210 | +#: templates/open-data.html:56 | ||
1211 | +msgid "The message's received time" | ||
1212 | +msgstr "" | ||
1213 | + | ||
1214 | +#: templates/open-data.html:64 | ||
1215 | +msgid "The revision's author username" | ||
1216 | +msgstr "" | ||
1217 | + | ||
1218 | +#: templates/open-data.html:65 | ||
1219 | +msgid "When the revision's were created" | ||
1220 | +msgstr "" | ||
1221 | + | ||
1222 | +#: templates/open-data.html:66 | ||
1223 | +msgid "The revision's key" | ||
1224 | +msgstr "" | ||
1225 | + | ||
1226 | +#: templates/open-data.html:67 | ||
1227 | +msgid "The revision's message" | ||
1228 | +msgstr "" | ||
1229 | + | ||
1230 | +#: templates/open-data.html:68 | ||
1231 | +msgid "The revision's repository name" | ||
1232 | +msgstr "" | ||
1233 | + | ||
1234 | +#: templates/open-data.html:76 | ||
1235 | +msgid "The ticket's author username" | ||
1236 | +msgstr "" | ||
1237 | + | ||
1238 | +#: templates/open-data.html:77 | ||
1239 | +msgid "The ticket's component" | ||
1240 | +msgstr "" | ||
1241 | + | ||
1242 | +#: templates/open-data.html:78 | ||
1243 | +msgid "When the ticket's were created" | ||
1244 | +msgstr "" | ||
1245 | + | ||
1246 | +#: templates/open-data.html:79 | ||
1247 | +msgid "The ticket's description" | ||
1248 | +msgstr "" | ||
1249 | + | ||
1250 | +#: templates/open-data.html:80 | ||
1251 | +#, fuzzy | ||
1252 | +msgid "The ticket's id" | ||
1253 | +msgstr "Tíquetes" | ||
1254 | + | ||
1255 | +#: templates/open-data.html:81 | ||
1256 | +msgid "The ticket's keywords" | ||
1257 | +msgstr "" | ||
1258 | + | ||
1259 | +#: templates/open-data.html:82 | ||
1260 | +msgid "The ticket's milestone" | ||
1261 | +msgstr "" | ||
1262 | + | ||
1263 | +#: templates/open-data.html:83 templates/open-data.html.py:99 | ||
1264 | +msgid "The time of the last modification" | ||
1265 | +msgstr "" | ||
1266 | + | ||
1267 | +#: templates/open-data.html:84 | ||
1268 | +msgid "The username of the last user who modified the ticket" | ||
1269 | +msgstr "" | ||
1270 | + | ||
1271 | +#: templates/open-data.html:85 | ||
1272 | +msgid "The ticket's priority" | ||
1273 | +msgstr "" | ||
1274 | + | ||
1275 | +#: templates/open-data.html:86 | ||
1276 | +msgid "The ticket's severity" | ||
1277 | +msgstr "" | ||
1278 | + | ||
1279 | +#: templates/open-data.html:87 | ||
1280 | +msgid "The ticket's status" | ||
1281 | +msgstr "" | ||
1282 | + | ||
1283 | +#: templates/open-data.html:88 | ||
1284 | +msgid "The ticket's summary" | ||
1285 | +msgstr "" | ||
1286 | + | ||
1287 | +#: templates/open-data.html:89 | ||
1288 | +msgid "The ticket's version" | ||
1289 | +msgstr "" | ||
1290 | + | ||
1291 | +#: templates/open-data.html:97 | ||
1292 | +msgid "The wiki's author username" | ||
1293 | +msgstr "" | ||
1294 | + | ||
1295 | +#: templates/open-data.html:98 | ||
1296 | +msgid "When the wiki's were created" | ||
1297 | +msgstr "" | ||
1298 | + | ||
1299 | +#: templates/open-data.html:100 | ||
1300 | +msgid "The username of the last user who modified the wiki" | ||
1301 | +msgstr "" | ||
1302 | + | ||
1303 | +#: templates/open-data.html:101 | ||
1304 | +msgid "The wiki's name" | ||
1305 | +msgstr "" | ||
1306 | + | ||
1307 | +#: templates/open-data.html:102 | ||
1308 | +msgid "the wiki's content" | ||
1309 | +msgstr "" | ||
1310 | + | ||
1311 | +#: templates/open-data.html:109 | ||
1312 | +msgid "Parameters" | ||
1313 | +msgstr "" | ||
1314 | + | ||
1315 | +#: templates/open-data.html:112 | ||
1316 | +msgid "Results per page" | ||
1317 | +msgstr "" | ||
1318 | + | ||
1319 | +#: templates/open-data.html:113 | ||
1320 | +msgid "Number of results to be displayed per page." | ||
1321 | +msgstr "" | ||
1322 | + | ||
1323 | +#: templates/open-data.html:114 | ||
1324 | +msgid "Default: 20" | ||
1325 | +msgstr "" | ||
1326 | + | ||
1327 | +#: templates/open-data.html:118 | ||
1328 | +msgid "Starts of n element" | ||
1329 | +msgstr "" | ||
1330 | + | ||
1331 | +#: templates/open-data.html:119 | ||
1332 | +msgid "Where n is the index of the first result to appear in the page." | ||
1333 | +msgstr "" | ||
1334 | + | ||
1335 | +#: templates/open-data.html:120 | ||
1336 | +msgid "Default: 0" | ||
1337 | +msgstr "" | ||
1338 | + | ||
1339 | +#: templates/open-data.html:122 | ||
1340 | +#, fuzzy | ||
1341 | +msgid "Filtering" | ||
1342 | +msgstr "Filtro" | ||
1343 | + | ||
1344 | +#: templates/open-data.html:124 | ||
1345 | +msgid "The field name" | ||
1346 | +msgstr "" | ||
1347 | + | ||
1348 | +#: templates/open-data.html:125 | ||
1349 | +msgid "" | ||
1350 | +"If you are looking for a specific wiki, and you know the wiki's name, you " | ||
1351 | +"can filter it as below" | ||
1352 | +msgstr "" | ||
1353 | + | ||
1354 | +#: templates/open-data.html:126 | ||
1355 | +#, fuzzy | ||
1356 | +msgid "WikiName" | ||
1357 | +msgstr "Nome" | ||
1358 | + | ||
1359 | +#: templates/open-data.html:127 | ||
1360 | +msgid "" | ||
1361 | +"Where "name" is the fieldname and "WikiName" is the " | ||
1362 | +"value you want to filter." | ||
1363 | +msgstr "" | ||
1364 | + | ||
1365 | +#: templates/open-data.html:128 | ||
1366 | +#, fuzzy | ||
1367 | +msgid "Usage" | ||
1368 | +msgstr "Mensagem" | ||
1369 | + | ||
1370 | +#: templates/open-data.html:129 | ||
1371 | +msgid "" | ||
1372 | +"You can also filter using Django lookup fields with the double underscores, " | ||
1373 | +"just as below" | ||
1374 | +msgstr "" | ||
1375 | + | ||
1376 | +#: templates/open-data.html:131 templates/open-data.html.py:132 | ||
1377 | +#, fuzzy | ||
1378 | +msgid "test" | ||
1379 | +msgstr "mais recentes" | ||
1380 | + | ||
1381 | +#: templates/open-data.html:133 | ||
1382 | +msgid "Usage with relationships" | ||
1383 | +msgstr "" | ||
1384 | + | ||
1385 | +#: templates/open-data.html:134 | ||
1386 | +msgid "" | ||
1387 | +"You can use related fields to filter too. So, you can filter by any field of " | ||
1388 | +"emailaddress using the 'from_address' field of message, which has a relation " | ||
1389 | +"to emailaddress. You will achieve the related fields by using double " | ||
1390 | +"underscore and the field's name. See the example below" | ||
1391 | +msgstr "" | ||
1392 | + | ||
1393 | +#: templates/open-data.html:136 | ||
1394 | +msgid "" | ||
1395 | +"So, real_name is a field of emailaddress, and you had access to this field " | ||
1396 | +"by a message field called from_address and using double underscore to say " | ||
1397 | +"you want to use a field of that relationship" | ||
1398 | +msgstr "" | ||
1399 | + | ||
1400 | +#: templates/open-data.html:137 | ||
1401 | +msgid "" | ||
1402 | +"Note: email filters must be exact. Which means that __contains, " | ||
1403 | +"__startswith, __endswith and others won't work" | ||
1404 | +msgstr "" | ||
1405 | + | ||
1406 | +#: templates/open-data.html:138 | ||
1407 | +msgid "" | ||
1408 | +"Another example of usage with relations. Used to retrieve all messages of a " | ||
1409 | +"given user, using the username or the email field" | ||
1410 | +msgstr "" | ||
1411 | + | ||
1412 | +#: templates/dpaste/snippet_details.html:37 | ||
1413 | +#, fuzzy | ||
1414 | +msgid "Compare" | ||
1415 | +msgstr "Comparação" | ||
1416 | + | ||
1417 | +#: templates/dpaste/snippet_details.html:47 | ||
1418 | +#, python-format | ||
1419 | +msgid "Expires in: %(date)s" | ||
1420 | +msgstr "" | ||
1421 | + | ||
1422 | +#: templates/dpaste/snippet_details.html:49 | ||
1423 | +msgid "Snippet never expires" | ||
1424 | +msgstr "" | ||
1425 | + | ||
1426 | +#: templates/dpaste/snippet_details.html:51 | ||
1427 | +msgid "One-time snippet" | ||
1428 | +msgstr "" | ||
1429 | + | ||
1430 | +#: templates/dpaste/snippet_details.html:56 | ||
1431 | +msgid "Really delete this snippet?" | ||
1432 | +msgstr "" | ||
1433 | + | ||
1434 | +#: templates/dpaste/snippet_details.html:58 | ||
1435 | +#, fuzzy | ||
1436 | +msgid "Delete Now" | ||
1437 | +msgstr "Apagar" | ||
1438 | + | ||
1439 | +#: templates/dpaste/snippet_details.html:63 | ||
1440 | +#: templates/dpaste/snippet_details.html:65 | ||
1441 | +#, fuzzy | ||
1442 | +msgid "Compare Snippets" | ||
1443 | +msgstr "Comparação" | ||
1444 | + | ||
1445 | +#: templates/dpaste/snippet_details.html:69 | ||
1446 | +#: templates/dpaste/snippet_details.html:71 | ||
1447 | +msgid "View Raw" | ||
1448 | +msgstr "" | ||
1449 | + | ||
1450 | +#: templates/dpaste/snippet_details.html:75 | ||
1451 | +msgid "Gist" | ||
1452 | +msgstr "" | ||
1453 | + | ||
1454 | +#: templates/dpaste/snippet_details.html:88 | ||
1455 | +msgid "This is a one-time snippet." | ||
1456 | +msgstr "" | ||
1457 | + | ||
1458 | +#: templates/dpaste/snippet_details.html:90 | ||
1459 | +msgid "It will automatically get deleted after {{ remaining }} further views." | ||
1460 | +msgstr "" | ||
1461 | + | ||
1462 | +#: templates/dpaste/snippet_details.html:92 | ||
1463 | +msgid "It will automatically get deleted after the next view." | ||
1464 | +msgstr "" | ||
1465 | + | ||
1466 | +#: templates/dpaste/snippet_details.html:94 | ||
1467 | +msgid "It cannot be viewed again." | ||
1468 | +msgstr "" | ||
1469 | + | ||
1470 | +#: templates/dpaste/snippet_details.html:109 | ||
1471 | +msgid "Reply to this snippet" | ||
1472 | +msgstr "" | ||
1473 | + | ||
1474 | +#: templates/dpaste/snippet_diff.html:5 | ||
1475 | +#, python-format | ||
1476 | +msgid "" | ||
1477 | +"\n" | ||
1478 | +" Diff between <a href=\"%(filea_url)s\">#%(filea_id)s</a> and <a href=" | ||
1479 | +"\"%(fileb_url)s\">#%(fileb_id)s</a>\n" | ||
1480 | +" " | ||
1481 | +msgstr "" | ||
1482 | + | ||
1483 | +#: templates/dpaste/snippet_form.html:28 | ||
1484 | +msgid "Paste it" | ||
1485 | +msgstr "" | ||
1486 | + | ||
1487 | +#~ msgid "INTERLEGIS COMMUNITIES" | ||
1488 | +#~ msgstr "COMUNIDADES INTERLEGIS" | ||
1489 | + | ||
1490 | +#~ msgid "Creative Commons - attribution, non-commercial" | ||
1491 | +#~ msgstr "Creative Commons - atribuição e não-comercial" | ||
1492 | + | ||
1493 | +#~ msgid "Willing to help" | ||
1494 | +#~ msgstr "Vontade de ajudar" | ||
1066 | 1495 | ||
1067 | #~ msgid "Identi.ca account" | 1496 | #~ msgid "Identi.ca account" |
1068 | #~ msgstr "Conta Identi.ca" | 1497 | #~ msgstr "Conta Identi.ca" |
@@ -1121,6 +1550,3 @@ msgstr "COMUNIDADES INTERLEGIS" | @@ -1121,6 +1550,3 @@ msgstr "COMUNIDADES INTERLEGIS" | ||
1121 | 1550 | ||
1122 | #~ msgid "<strong>%(name)s</strong>" | 1551 | #~ msgid "<strong>%(name)s</strong>" |
1123 | #~ msgstr "<strong>%(name)s</strong>" | 1552 | #~ msgstr "<strong>%(name)s</strong>" |
1124 | - | ||
1125 | -#~ msgid "OpenData - Communities Interlegis" | ||
1126 | -#~ msgstr "OpenData - Comunidades Interlegis" |
src/static/css/screen.css
@@ -10,7 +10,7 @@ li hr { | @@ -10,7 +10,7 @@ li hr { | ||
10 | /* Header */ | 10 | /* Header */ |
11 | 11 | ||
12 | #header-searchbox { | 12 | #header-searchbox { |
13 | - width: 200px; | 13 | + width: 190px; |
14 | } | 14 | } |
15 | 15 | ||
16 | #header-hr { | 16 | #header-hr { |
@@ -428,3 +428,20 @@ span.highlighted { | @@ -428,3 +428,20 @@ span.highlighted { | ||
428 | max-width: 350px; | 428 | max-width: 350px; |
429 | width: 350px; | 429 | width: 350px; |
430 | } | 430 | } |
431 | + | ||
432 | +/* Chart div */ | ||
433 | +.chart { | ||
434 | + text-align: center; | ||
435 | +} | ||
436 | + | ||
437 | +.chart > canvas { | ||
438 | + width: 250px; | ||
439 | +} | ||
440 | + | ||
441 | +.chart > p { | ||
442 | + text-align: center; | ||
443 | + line-height: 1.5em; | ||
444 | +} | ||
445 | +.chart > p > label { | ||
446 | + margin: 0 2px; | ||
447 | +} |
728 Bytes
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +/*! | ||
2 | + * Chart.js | ||
3 | + * http://chartjs.org/ | ||
4 | + * Version: 1.0.1-beta.3 | ||
5 | + * | ||
6 | + * Copyright 2014 Nick Downie | ||
7 | + * Released under the MIT license | ||
8 | + * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md | ||
9 | + */ | ||
10 | +(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;this.width=t.canvas.width,this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n<t.length;n++)i.apply(e,[t[n],n].concat(s))}else for(var o in t)i.apply(e,[t[o],o].concat(s))},o=s.clone=function(t){var i={};return n(t,function(e,s){t.hasOwnProperty(s)&&(i[s]=e)}),i},a=s.extend=function(t){return n(Array.prototype.slice.call(arguments,1),function(i){n(i,function(e,s){i.hasOwnProperty(s)&&(t[s]=e)})}),t},h=s.merge=function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift({}),a.apply(null,t)},l=s.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},r=s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e},c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof t.define&&t.define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),x=s.radians=function(t){return t*(Math.PI/180)},S=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),C=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),y=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=C(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),x=Math.round(f/v);(x>a||a>2*x)&&!h;)if(x>a)v*=2,x=Math.round(f/v),x%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,x=Math.round(f/v)}else v/=2,x=Math.round(f/v);return h&&(x=o,v=f/x),{steps:x,stepValue:v,min:p,max:p+x*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}if(t instanceof Function)return t(i);var s={};return e(t,i)}),b=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=y(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),-(s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)))},easeOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),s*Math.pow(2,-10*t)*Math.sin(2*(1*t-i)*Math.PI/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:2==(t/=.5)?1:(e||(e=.3*1.5),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),1>t?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-b.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*b.easeInBounce(2*t):.5*b.easeOutBounce(2*t-1)+.5}}),w=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=(s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),s.animationLoop=function(t,i,e,s,n,o){var a=0,h=b[e]||b.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=w(l):n.apply(o)};w(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),L=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},k=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},P(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){L(t.chart.canvas,e,i)})}),F=s.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},R=s.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))}),T=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},M=s.fontString=function(t,i,e){return i+" "+t+"px "+e},W=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},z=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return T(this.chart),this},stop:function(){return s.cancelAnimFrame.call(t,this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=F(this.chart.canvas),s=this.options.maintainAspectRatio?e/this.chart.aspectRatio:R(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=s,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return y(this.options.legendTemplate,this)},destroy:function(){this.clear(),k(this,this.events),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,t[h]&&a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:y(this.options.tooltipTemplate,t),chart:this.chart}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,i){var e=s.getAngleFromPoint(this,{x:t,y:i}),n=e.angle>=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;switch(t.fillStyle=this.fillColor,this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}z(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=M(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=W(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){z(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?W(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),t<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,i,e=this.ctx.measureText(this.xLabels[0]).width,s=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=s/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=W(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(x(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(x(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/(this.valuesCount-(this.offsetGridLines?0:1)),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a);t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+S(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+S(this.lineWidth),o=this.xLabelRotation>0;t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath(),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*x(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;i<this.valuesCount;i++)t=this.getPointPosition(i,d),e=this.ctx.measureText(y(this.templateString,{value:this.labels[i]})).width+5,0===i||i===this.valuesCount/2?(s=e/2,t.x+s>p&&(p=t.x+s,n=i),t.x-s<g&&(g=t.x-s,a=i)):i<this.valuesCount/2?t.x+e>p&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e<g&&(g=t.x-e,a=i);l=g,r=Math.ceil(p-this.width),o=this.getIndexAngle(n),h=this.getIndexAngle(a),c=r/Math.sin(o+Math.PI/2),u=l/Math.sin(h+Math.PI/2),c=f(c)?c:0,u=f(u)?u:0,this.drawingArea=d-(u+c)/2,this.setCenterPoint(u,c)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,s=t+this.drawingArea;this.xCenter=(s+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=2*Math.PI/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(n(this.yLabels,function(i,e){if(e>0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)s=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(s.x,s.y):t.lineTo(s.x,s.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=t.measureText(i).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-h/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(i,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(n,o){e.isNumber(n)&&s.bars.push(new this.BarClass({value:n,label:t.labels[o],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<this.datasets.length;a++)for(i=0;i<this.datasets[a].bars.length;i++)if(this.datasets[a].bars[i].inRange(n.x,n.y))return e.each(this.datasets,o),s;return s},buildScale:function(t){var i=this,s=function(){var t=[];return i.eachBars(function(i){t.push(i.value)}),t},n={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(s(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(n,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(n)},addData:function(t,i){e.each(t,function(t,s){e.isNumber(t)&&this.datasets[s].bars.push(new this.BarClass({value:t,label:i,x:this.scale.calculateBarX(this.datasets.length,s,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[s].strokeColor,fillColor:this.datasets[s].fillColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t,s){e.each(t.bars,function(t,e){t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,s,e),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)},i).draw()},this)},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[]; | ||
11 | +e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(t/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle)},this)}}),i.types.Doughnut.extend({name:"Pie",defaults:e.merge(s,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(n,o){e.isNumber(n)&&s.points.push(new this.PointClass({value:n,label:t.labels[o],datasetLabel:i.label,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,i){e.extend(t,{x:this.scale.calculateX(i),y:this.scale.endPoint}),t.save()},this)},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.datasets,function(t){e.each(t.points,function(t){t.inRange(s.x,s.y)&&i.push(t)})},this),i},buildScale:function(t){var s=this,n=function(){var t=[];return s.eachPoints(function(i){t.push(i.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(n(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(o,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new i.Scale(o)},addData:function(t,i){e.each(t,function(t,s){e.isNumber(t)&&this.datasets[s].points.push(new this.PointClass({value:t,label:i,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[s].pointStrokeColor,fillColor:this.datasets[s].pointColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();var s=this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(e)},i)},this),this.options.bezierCurve&&e.each(t.points,function(i,s){i.controlPoints=0===s?e.splineCurve(i,i,t.points[s+1],0):s>=t.points.length-1?e.splineCurve(t.points[s-1],i,i,0):e.splineCurve(t.points[s-1],i,t.points[s+1],this.options.bezierCurveTension)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(i,e){e>0?this.options.bezierCurve?s.bezierCurveTo(t.points[e-1].controlPoints.outer.x,t.points[e-1].controlPoints.outer.y,i.controlPoints.inner.x,i.controlPoints.inner.y,i.x,i.y):s.lineTo(i.x,i.y):s.moveTo(i.x,i.y)},this),s.stroke(),this.options.datasetFill&&(s.lineTo(t.points[t.points.length-1].x,this.scale.endPoint),s.lineTo(this.scale.calculateX(0),this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(t.points,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers;i.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(n,o){if(e.isNumber(n)){var a;this.scale.animation||(a=this.scale.getPointPosition(o,this.scale.calculateCenterOffset(n))),s.points.push(new this.PointClass({value:n,label:t.labels[o],datasetLabel:i.label,x:this.options.animation?this.scale.xCenter:a.x,y:this.options.animation?this.scale.yCenter:a.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))}},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,s){if(e.isNumber(t)){var n=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[s].points.push(new this.PointClass({value:t,label:i,x:n.x,y:n.y,strokeColor:this.datasets[s].pointStrokeColor,fillColor:this.datasets[s].pointColor}))}},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.draw()})},this)}})}.call(this); | ||
0 | \ No newline at end of file | 12 | \ No newline at end of file |
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +/** echo * @license echo * while read i do echo * done echo | ||
2 | +*/ | ||
3 | +!function(){var Color,K,PITHIRD,TWOPI,X,Y,Z,bezier,brewer,chroma,clip_rgb,colors,cos,css2rgb,hex2rgb,hsi2rgb,hsl2rgb,hsv2rgb,lab2lch,lab2rgb,lab_xyz,lch2lab,lch2rgb,limit,luminance,luminance_x,rgb2hex,rgb2hsi,rgb2hsl,rgb2hsv,rgb2lab,rgb2lch,rgb_xyz,root,type,unpack,xyz_lab,xyz_rgb,_ref;chroma=function(x,y,z,m){return new Color(x,y,z,m)};if(typeof module!=="undefined"&&module!==null&&module.exports!=null){module.exports=chroma}if(typeof define==="function"&&define.amd){define([],function(){return chroma})}else{root=typeof exports!=="undefined"&&exports!==null?exports:this;root.chroma=chroma}chroma.color=function(x,y,z,m){return new Color(x,y,z,m)};chroma.hsl=function(h,s,l,a){return new Color(h,s,l,a,"hsl")};chroma.hsv=function(h,s,v,a){return new Color(h,s,v,a,"hsv")};chroma.rgb=function(r,g,b,a){return new Color(r,g,b,a,"rgb")};chroma.hex=function(x){return new Color(x)};chroma.css=function(x){return new Color(x)};chroma.lab=function(l,a,b){return new Color(l,a,b,"lab")};chroma.lch=function(l,c,h){return new Color(l,c,h,"lch")};chroma.hsi=function(h,s,i){return new Color(h,s,i,"hsi")};chroma.gl=function(r,g,b,a){return new Color(r*255,g*255,b*255,a,"gl")};chroma.interpolate=function(a,b,f,m){if(a==null||b==null){return"#000"}if(type(a)==="string"){a=new Color(a)}if(type(b)==="string"){b=new Color(b)}return a.interpolate(f,b,m)};chroma.mix=chroma.interpolate;chroma.contrast=function(a,b){var l1,l2;if(type(a)==="string"){a=new Color(a)}if(type(b)==="string"){b=new Color(b)}l1=a.luminance();l2=b.luminance();if(l1>l2){return(l1+.05)/(l2+.05)}else{return(l2+.05)/(l1+.05)}};chroma.luminance=function(color){return chroma(color).luminance()};chroma._Color=Color;Color=function(){function Color(){var a,arg,args,m,me,me_rgb,x,y,z,_i,_len,_ref,_ref1,_ref2,_ref3;me=this;args=[];for(_i=0,_len=arguments.length;_i<_len;_i++){arg=arguments[_i];if(arg!=null){args.push(arg)}}if(args.length===0){_ref=[255,0,255,1,"rgb"],x=_ref[0],y=_ref[1],z=_ref[2],a=_ref[3],m=_ref[4]}else if(type(args[0])==="array"){if(args[0].length===3){_ref1=args[0],x=_ref1[0],y=_ref1[1],z=_ref1[2];a=1}else if(args[0].length===4){_ref2=args[0],x=_ref2[0],y=_ref2[1],z=_ref2[2],a=_ref2[3]}else{throw"unknown input argument"}m=args[1]}else if(type(args[0])==="string"){x=args[0];m="hex"}else if(type(args[0])==="object"){_ref3=args[0]._rgb,x=_ref3[0],y=_ref3[1],z=_ref3[2],a=_ref3[3];m="rgb"}else if(args.length>=3){x=args[0];y=args[1];z=args[2]}if(args.length===3){m="rgb";a=1}else if(args.length===4){if(type(args[3])==="string"){m=args[3];a=1}else if(type(args[3])==="number"){m="rgb";a=args[3]}}else if(args.length===5){a=args[3];m=args[4]}if(a==null){a=1}if(m==="rgb"){me._rgb=[x,y,z,a]}else if(m==="gl"){me._rgb=[x*255,y*255,z*255,a]}else if(m==="hsl"){me._rgb=hsl2rgb(x,y,z);me._rgb[3]=a}else if(m==="hsv"){me._rgb=hsv2rgb(x,y,z);me._rgb[3]=a}else if(m==="hex"){me._rgb=hex2rgb(x)}else if(m==="lab"){me._rgb=lab2rgb(x,y,z);me._rgb[3]=a}else if(m==="lch"){me._rgb=lch2rgb(x,y,z);me._rgb[3]=a}else if(m==="hsi"){me._rgb=hsi2rgb(x,y,z);me._rgb[3]=a}me_rgb=clip_rgb(me._rgb)}Color.prototype.rgb=function(){return this._rgb.slice(0,3)};Color.prototype.rgba=function(){return this._rgb};Color.prototype.hex=function(){return rgb2hex(this._rgb)};Color.prototype.toString=function(){return this.name()};Color.prototype.hsl=function(){return rgb2hsl(this._rgb)};Color.prototype.hsv=function(){return rgb2hsv(this._rgb)};Color.prototype.lab=function(){return rgb2lab(this._rgb)};Color.prototype.lch=function(){return rgb2lch(this._rgb)};Color.prototype.hsi=function(){return rgb2hsi(this._rgb)};Color.prototype.gl=function(){return[this._rgb[0]/255,this._rgb[1]/255,this._rgb[2]/255,this._rgb[3]]};Color.prototype.luminance=function(){return luminance(this._rgb)};Color.prototype.name=function(){var h,k;h=this.hex();for(k in chroma.colors){if(h===chroma.colors[k]){return k}}return h};Color.prototype.alpha=function(alpha){if(arguments.length){this._rgb[3]=alpha;return this}return this._rgb[3]};Color.prototype.css=function(mode){var hsl,me,rgb,rnd;if(mode==null){mode="rgb"}me=this;rgb=me._rgb;if(mode.length===3&&rgb[3]<1){mode+="a"}if(mode==="rgb"){return mode+"("+rgb.slice(0,3).join(",")+")"}else if(mode==="rgba"){return mode+"("+rgb.join(",")+")"}else if(mode==="hsl"||mode==="hsla"){hsl=me.hsl();rnd=function(a){return Math.round(a*100)/100};hsl[0]=rnd(hsl[0]);hsl[1]=rnd(hsl[1]*100)+"%";hsl[2]=rnd(hsl[2]*100)+"%";if(mode.length===4){hsl[3]=rgb[3]}return mode+"("+hsl.join(",")+")"}};Color.prototype.interpolate=function(f,col,m){var dh,hue,hue0,hue1,lbv,lbv0,lbv1,me,res,sat,sat0,sat1,xyz0,xyz1;me=this;if(m==null){m="rgb"}if(type(col)==="string"){col=new Color(col)}if(m==="hsl"||m==="hsv"||m==="lch"||m==="hsi"){if(m==="hsl"){xyz0=me.hsl();xyz1=col.hsl()}else if(m==="hsv"){xyz0=me.hsv();xyz1=col.hsv()}else if(m==="hsi"){xyz0=me.hsi();xyz1=col.hsi()}else if(m==="lch"){xyz0=me.lch();xyz1=col.lch()}if(m.substr(0,1)==="h"){hue0=xyz0[0],sat0=xyz0[1],lbv0=xyz0[2];hue1=xyz1[0],sat1=xyz1[1],lbv1=xyz1[2]}else{lbv0=xyz0[0],sat0=xyz0[1],hue0=xyz0[2];lbv1=xyz1[0],sat1=xyz1[1],hue1=xyz1[2]}if(!isNaN(hue0)&&!isNaN(hue1)){if(hue1>hue0&&hue1-hue0>180){dh=hue1-(hue0+360)}else if(hue1<hue0&&hue0-hue1>180){dh=hue1+360-hue0}else{dh=hue1-hue0}hue=hue0+f*dh}else if(!isNaN(hue0)){hue=hue0;if(lbv1===1||lbv1===0){sat=sat0}}else if(!isNaN(hue1)){hue=hue1;if(lbv0===1||lbv0===0){sat=sat1}}else{hue=Number.NaN}if(sat==null){sat=sat0+f*(sat1-sat0)}lbv=lbv0+f*(lbv1-lbv0);if(m.substr(0,1)==="h"){res=new Color(hue,sat,lbv,m)}else{res=new Color(lbv,sat,hue,m)}}else if(m==="rgb"){xyz0=me._rgb;xyz1=col._rgb;res=new Color(xyz0[0]+f*(xyz1[0]-xyz0[0]),xyz0[1]+f*(xyz1[1]-xyz0[1]),xyz0[2]+f*(xyz1[2]-xyz0[2]),m)}else if(m==="lab"){xyz0=me.lab();xyz1=col.lab();res=new Color(xyz0[0]+f*(xyz1[0]-xyz0[0]),xyz0[1]+f*(xyz1[1]-xyz0[1]),xyz0[2]+f*(xyz1[2]-xyz0[2]),m)}else{throw"color mode "+m+" is not supported"}res.alpha(me.alpha()+f*(col.alpha()-me.alpha()));return res};Color.prototype.premultiply=function(){var a,rgb;rgb=this.rgb();a=this.alpha();return chroma(rgb[0]*a,rgb[1]*a,rgb[2]*a,a)};Color.prototype.darken=function(amount){var lch,me;if(amount==null){amount=20}me=this;lch=me.lch();lch[0]-=amount;return chroma.lch(lch).alpha(me.alpha())};Color.prototype.darker=function(amount){return this.darken(amount)};Color.prototype.brighten=function(amount){if(amount==null){amount=20}return this.darken(-amount)};Color.prototype.brighter=function(amount){return this.brighten(amount)};Color.prototype.saturate=function(amount){var lch,me;if(amount==null){amount=20}me=this;lch=me.lch();lch[1]+=amount;return chroma.lch(lch).alpha(me.alpha())};Color.prototype.desaturate=function(amount){if(amount==null){amount=20}return this.saturate(-amount)};return Color}();clip_rgb=function(rgb){var i;for(i in rgb){if(i<3){if(rgb[i]<0){rgb[i]=0}if(rgb[i]>255){rgb[i]=255}}else if(i===3){if(rgb[i]<0){rgb[i]=0}if(rgb[i]>1){rgb[i]=1}}}return rgb};css2rgb=function(css){var hsl,i,m,rgb,_i,_j,_k,_l;css=css.toLowerCase();if(chroma.colors!=null&&chroma.colors[css]){return hex2rgb(chroma.colors[css])}if(m=css.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){rgb=m.slice(1,4);for(i=_i=0;_i<=2;i=++_i){rgb[i]=+rgb[i]}rgb[3]=1}else if(m=css.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/)){rgb=m.slice(1,5);for(i=_j=0;_j<=3;i=++_j){rgb[i]=+rgb[i]}}else if(m=css.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){rgb=m.slice(1,4);for(i=_k=0;_k<=2;i=++_k){rgb[i]=Math.round(rgb[i]*2.55)}rgb[3]=1}else if(m=css.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){rgb=m.slice(1,5);for(i=_l=0;_l<=2;i=++_l){rgb[i]=Math.round(rgb[i]*2.55)}rgb[3]=+rgb[3]}else if(m=css.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){hsl=m.slice(1,4);hsl[1]*=.01;hsl[2]*=.01;rgb=hsl2rgb(hsl);rgb[3]=1}else if(m=css.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){hsl=m.slice(1,4);hsl[1]*=.01;hsl[2]*=.01;rgb=hsl2rgb(hsl);rgb[3]=+m[4]}return rgb};hex2rgb=function(hex){var a,b,g,r,rgb,u;if(hex.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)){if(hex.length===4||hex.length===7){hex=hex.substr(1)}if(hex.length===3){hex=hex.split("");hex=hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]}u=parseInt(hex,16);r=u>>16;g=u>>8&255;b=u&255;return[r,g,b,1]}if(hex.match(/^#?([A-Fa-f0-9]{8})$/)){if(hex.length===9){hex=hex.substr(1)}u=parseInt(hex,16);r=u>>24&255;g=u>>16&255;b=u>>8&255;a=u&255;return[r,g,b,a]}if(rgb=css2rgb(hex)){return rgb}throw"unknown color: "+hex};hsi2rgb=function(h,s,i){var b,g,r,_ref;_ref=unpack(arguments),h=_ref[0],s=_ref[1],i=_ref[2];h/=360;if(h<1/3){b=(1-s)/3;r=(1+s*cos(TWOPI*h)/cos(PITHIRD-TWOPI*h))/3;g=1-(b+r)}else if(h<2/3){h-=1/3;r=(1-s)/3;g=(1+s*cos(TWOPI*h)/cos(PITHIRD-TWOPI*h))/3;b=1-(r+g)}else{h-=2/3;g=(1-s)/3;b=(1+s*cos(TWOPI*h)/cos(PITHIRD-TWOPI*h))/3;r=1-(g+b)}r=limit(i*r*3);g=limit(i*g*3);b=limit(i*b*3);return[r*255,g*255,b*255]};hsl2rgb=function(){var b,c,g,h,i,l,r,s,t1,t2,t3,_i,_ref,_ref1;_ref=unpack(arguments),h=_ref[0],s=_ref[1],l=_ref[2];if(s===0){r=g=b=l*255}else{t3=[0,0,0];c=[0,0,0];t2=l<.5?l*(1+s):l+s-l*s;t1=2*l-t2;h/=360;t3[0]=h+1/3;t3[1]=h;t3[2]=h-1/3;for(i=_i=0;_i<=2;i=++_i){if(t3[i]<0){t3[i]+=1}if(t3[i]>1){t3[i]-=1}if(6*t3[i]<1){c[i]=t1+(t2-t1)*6*t3[i]}else if(2*t3[i]<1){c[i]=t2}else if(3*t3[i]<2){c[i]=t1+(t2-t1)*(2/3-t3[i])*6}else{c[i]=t1}}_ref1=[Math.round(c[0]*255),Math.round(c[1]*255),Math.round(c[2]*255)],r=_ref1[0],g=_ref1[1],b=_ref1[2]}return[r,g,b]};hsv2rgb=function(){var b,f,g,h,i,p,q,r,s,t,v,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6;_ref=unpack(arguments),h=_ref[0],s=_ref[1],v=_ref[2];v*=255;if(s===0){r=g=b=v}else{if(h===360){h=0}if(h>360){h-=360}if(h<0){h+=360}h/=60;i=Math.floor(h);f=h-i;p=v*(1-s);q=v*(1-s*f);t=v*(1-s*(1-f));switch(i){case 0:_ref1=[v,t,p],r=_ref1[0],g=_ref1[1],b=_ref1[2];break;case 1:_ref2=[q,v,p],r=_ref2[0],g=_ref2[1],b=_ref2[2];break;case 2:_ref3=[p,v,t],r=_ref3[0],g=_ref3[1],b=_ref3[2];break;case 3:_ref4=[p,q,v],r=_ref4[0],g=_ref4[1],b=_ref4[2];break;case 4:_ref5=[t,p,v],r=_ref5[0],g=_ref5[1],b=_ref5[2];break;case 5:_ref6=[v,p,q],r=_ref6[0],g=_ref6[1],b=_ref6[2]}}r=Math.round(r);g=Math.round(g);b=Math.round(b);return[r,g,b]};K=18;X=.95047;Y=1;Z=1.08883;lab2lch=function(){var a,b,c,h,l,_ref;_ref=unpack(arguments),l=_ref[0],a=_ref[1],b=_ref[2];c=Math.sqrt(a*a+b*b);h=Math.atan2(b,a)/Math.PI*180;return[l,c,h]};lab2rgb=function(l,a,b){var g,r,x,y,z,_ref,_ref1;if(l!==void 0&&l.length===3){_ref=l,l=_ref[0],a=_ref[1],b=_ref[2]}if(l!==void 0&&l.length===3){_ref1=l,l=_ref1[0],a=_ref1[1],b=_ref1[2]}y=(l+16)/116;x=y+a/500;z=y-b/200;x=lab_xyz(x)*X;y=lab_xyz(y)*Y;z=lab_xyz(z)*Z;r=xyz_rgb(3.2404542*x-1.5371385*y-.4985314*z);g=xyz_rgb(-.969266*x+1.8760108*y+.041556*z);b=xyz_rgb(.0556434*x-.2040259*y+1.0572252*z);return[limit(r,0,255),limit(g,0,255),limit(b,0,255),1]};lab_xyz=function(x){if(x>.206893034){return x*x*x}else{return(x-4/29)/7.787037}};xyz_rgb=function(r){return Math.round(255*(r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055))};lch2lab=function(){var c,h,l,_ref;_ref=unpack(arguments),l=_ref[0],c=_ref[1],h=_ref[2];h=h*Math.PI/180;return[l,Math.cos(h)*c,Math.sin(h)*c]};lch2rgb=function(l,c,h){var L,a,b,g,r,_ref,_ref1;_ref=lch2lab(l,c,h),L=_ref[0],a=_ref[1],b=_ref[2];_ref1=lab2rgb(L,a,b),r=_ref1[0],g=_ref1[1],b=_ref1[2];return[limit(r,0,255),limit(g,0,255),limit(b,0,255)]};luminance=function(r,g,b){var _ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];r=luminance_x(r);g=luminance_x(g);b=luminance_x(b);return.2126*r+.7152*g+.0722*b};luminance_x=function(x){x/=255;if(x<=.03928){return x/12.92}else{return Math.pow((x+.055)/1.055,2.4)}};rgb2hex=function(){var b,g,r,str,u,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];u=r<<16|g<<8|b;str="000000"+u.toString(16);return"#"+str.substr(str.length-6)};rgb2hsi=function(){var TWOPI,b,g,h,i,min,r,s,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];TWOPI=Math.PI*2;r/=255;g/=255;b/=255;min=Math.min(r,g,b);i=(r+g+b)/3;s=1-min/i;if(s===0){h=0}else{h=(r-g+(r-b))/2;h/=Math.sqrt((r-g)*(r-g)+(r-b)*(g-b));h=Math.acos(h);if(b>g){h=TWOPI-h}h/=TWOPI}return[h*360,s,i]};rgb2hsl=function(r,g,b){var h,l,max,min,s,_ref;if(r!==void 0&&r.length>=3){_ref=r,r=_ref[0],g=_ref[1],b=_ref[2]}r/=255;g/=255;b/=255;min=Math.min(r,g,b);max=Math.max(r,g,b);l=(max+min)/2;if(max===min){s=0;h=Number.NaN}else{s=l<.5?(max-min)/(max+min):(max-min)/(2-max-min)}if(r===max){h=(g-b)/(max-min)}else if(g===max){h=2+(b-r)/(max-min)}else if(b===max){h=4+(r-g)/(max-min)}h*=60;if(h<0){h+=360}return[h,s,l]};rgb2hsv=function(){var b,delta,g,h,max,min,r,s,v,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];min=Math.min(r,g,b);max=Math.max(r,g,b);delta=max-min;v=max/255;if(max===0){h=Number.NaN;s=0}else{s=delta/max;if(r===max){h=(g-b)/delta}if(g===max){h=2+(b-r)/delta}if(b===max){h=4+(r-g)/delta}h*=60;if(h<0){h+=360}}return[h,s,v]};rgb2lab=function(){var b,g,r,x,y,z,_ref;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];r=rgb_xyz(r);g=rgb_xyz(g);b=rgb_xyz(b);x=xyz_lab((.4124564*r+.3575761*g+.1804375*b)/X);y=xyz_lab((.2126729*r+.7151522*g+.072175*b)/Y);z=xyz_lab((.0193339*r+.119192*g+.9503041*b)/Z);return[116*y-16,500*(x-y),200*(y-z)]};rgb_xyz=function(r){if((r/=255)<=.04045){return r/12.92}else{return Math.pow((r+.055)/1.055,2.4)}};xyz_lab=function(x){if(x>.008856){return Math.pow(x,1/3)}else{return 7.787037*x+4/29}};rgb2lch=function(){var a,b,g,l,r,_ref,_ref1;_ref=unpack(arguments),r=_ref[0],g=_ref[1],b=_ref[2];_ref1=rgb2lab(r,g,b),l=_ref1[0],a=_ref1[1],b=_ref1[2];return lab2lch(l,a,b)};chroma.scale=function(colors,positions){var classifyValue,f,getClass,getColor,resetCache,setColors,setDomain,tmap,_colorCache,_colors,_correctLightness,_domain,_fixed,_max,_min,_mode,_nacol,_numClasses,_out,_pos,_spread;_mode="rgb";_nacol=chroma("#ccc");_spread=0;_fixed=false;_domain=[0,1];_colors=[];_out=false;_pos=[];_min=0;_max=1;_correctLightness=false;_numClasses=0;_colorCache={};setColors=function(colors,positions){var c,col,_i,_j,_ref,_ref1,_ref2;if(colors==null){colors=["#ddd","#222"]}if(colors!=null&&type(colors)==="string"&&((_ref=chroma.brewer)!=null?_ref[colors]:void 0)!=null){colors=chroma.brewer[colors]}if(type(colors)==="array"){colors=colors.slice(0);for(c=_i=0,_ref1=colors.length-1;0<=_ref1?_i<=_ref1:_i>=_ref1;c=0<=_ref1?++_i:--_i){col=colors[c];if(type(col)==="string"){colors[c]=chroma(col)}}if(positions!=null){_pos=positions}else{_pos=[];for(c=_j=0,_ref2=colors.length-1;0<=_ref2?_j<=_ref2:_j>=_ref2;c=0<=_ref2?++_j:--_j){_pos.push(c/(colors.length-1))}}}resetCache();return _colors=colors};setDomain=function(domain){if(domain==null){domain=[]}_domain=domain;_min=domain[0];_max=domain[domain.length-1];resetCache();if(domain.length===2){return _numClasses=0}else{return _numClasses=domain.length-1}};getClass=function(value){var i,n;if(_domain!=null){n=_domain.length-1;i=0;while(i<n&&value>=_domain[i]){i++}return i-1}return 0};tmap=function(t){return t};classifyValue=function(value){var i,maxc,minc,n,val;val=value;if(_domain.length>2){n=_domain.length-1;i=getClass(value);minc=_domain[0]+(_domain[1]-_domain[0])*(0+_spread*.5);maxc=_domain[n-1]+(_domain[n]-_domain[n-1])*(1-_spread*.5);val=_min+(_domain[i]+(_domain[i+1]-_domain[i])*.5-minc)/(maxc-minc)*(_max-_min)}return val};getColor=function(val,bypassMap){var c,col,f0,i,k,p,t,_i,_ref;if(bypassMap==null){bypassMap=false}if(isNaN(val)){return _nacol}if(!bypassMap){if(_domain.length>2){c=getClass(val);t=c/(_numClasses-1)}else{t=f0=(val-_min)/(_max-_min);t=Math.min(1,Math.max(0,t))}}else{t=val}if(!bypassMap){t=tmap(t)}k=Math.floor(t*1e4);if(_colorCache[k]){col=_colorCache[k]}else{if(type(_colors)==="array"){for(i=_i=0,_ref=_pos.length-1;0<=_ref?_i<=_ref:_i>=_ref;i=0<=_ref?++_i:--_i){p=_pos[i];if(t<=p){col=_colors[i];break}if(t>=p&&i===_pos.length-1){col=_colors[i];break}if(t>p&&t<_pos[i+1]){t=(t-p)/(_pos[i+1]-p);col=chroma.interpolate(_colors[i],_colors[i+1],t,_mode);break}}}else if(type(_colors)==="function"){col=_colors(t)}_colorCache[k]=col}return col};resetCache=function(){return _colorCache={}};setColors(colors,positions);f=function(v){var c;c=getColor(v);if(_out&&c[_out]){return c[_out]()}else{return c}};f.domain=function(domain,classes,mode,key){var d;if(mode==null){mode="e"}if(!arguments.length){return _domain}if(classes!=null){d=chroma.analyze(domain,key);if(classes===0){domain=[d.min,d.max]}else{domain=chroma.limits(d,mode,classes)}}setDomain(domain);return f};f.mode=function(_m){if(!arguments.length){return _mode}_mode=_m;resetCache();return f};f.range=function(colors,_pos){setColors(colors,_pos);return f};f.out=function(_o){_out=_o;return f};f.spread=function(val){if(!arguments.length){return _spread}_spread=val;return f};f.correctLightness=function(v){if(!arguments.length){return _correctLightness}_correctLightness=v;resetCache();if(_correctLightness){tmap=function(t){var L0,L1,L_actual,L_diff,L_ideal,max_iter,pol,t0,t1;L0=getColor(0,true).lab()[0];L1=getColor(1,true).lab()[0];pol=L0>L1;L_actual=getColor(t,true).lab()[0];L_ideal=L0+(L1-L0)*t;L_diff=L_actual-L_ideal;t0=0;t1=1;max_iter=20;while(Math.abs(L_diff)>.01&&max_iter-->0){!function(){if(pol){L_diff*=-1}if(L_diff<0){t0=t;t+=(t1-t)*.5}else{t1=t;t+=(t0-t)*.5}L_actual=getColor(t,true).lab()[0];return L_diff=L_actual-L_ideal}()}return t}}else{tmap=function(t){return t}}return f};f.colors=function(out){var i,samples,_i,_j,_len,_ref;if(out==null){out="hex"}colors=[];samples=[];if(_domain.length>2){for(i=_i=1,_ref=_domain.length;1<=_ref?_i<_ref:_i>_ref;i=1<=_ref?++_i:--_i){samples.push((_domain[i-1]+_domain[i])*.5)}}else{samples=_domain}for(_j=0,_len=samples.length;_j<_len;_j++){i=samples[_j];colors.push(f(i)[out]())}return colors};return f};if((_ref=chroma.scales)==null){chroma.scales={}}chroma.scales.cool=function(){return chroma.scale([chroma.hsl(180,1,.9),chroma.hsl(250,.7,.4)])};chroma.scales.hot=function(){return chroma.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")};chroma.analyze=function(data,key,filter){var add,k,r,val,visit,_i,_len;r={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};if(filter==null){filter=function(){return true}}add=function(val){if(val!=null&&!isNaN(val)){r.values.push(val);r.sum+=val;if(val<r.min){r.min=val}if(val>r.max){r.max=val}r.count+=1}};visit=function(val,k){if(filter(val,k)){if(key!=null&&type(key)==="function"){return add(key(val))}else if(key!=null&&type(key)==="string"||type(key)==="number"){return add(val[key])}else{return add(val)}}};if(type(data)==="array"){for(_i=0,_len=data.length;_i<_len;_i++){val=data[_i];visit(val)}}else{for(k in data){val=data[k];visit(val,k)}}r.domain=[r.min,r.max];r.limits=function(mode,num){return chroma.limits(r,mode,num)};return r};chroma.limits=function(data,mode,num){var assignments,best,centroids,cluster,clusterSizes,dist,i,j,kClusters,limits,max,max_log,min,min_log,mindist,n,nb_iters,newCentroids,p,pb,pr,repeat,sum,tmpKMeansBreaks,value,values,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_ref1,_ref10,_ref11,_ref12,_ref13,_ref14,_ref15,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9,_s,_t,_u,_v,_w;if(mode==null){mode="equal"}if(num==null){num=7}if(data.values==null){data=chroma.analyze(data)}min=data.min;max=data.max;sum=data.sum;values=data.values.sort(function(a,b){return a-b});limits=[];if(mode.substr(0,1)==="c"){limits.push(min);limits.push(max)}if(mode.substr(0,1)==="e"){limits.push(min);for(i=_i=1,_ref1=num-1;1<=_ref1?_i<=_ref1:_i>=_ref1;i=1<=_ref1?++_i:--_i){limits.push(min+i/num*(max-min))}limits.push(max)}else if(mode.substr(0,1)==="l"){if(min<=0){throw"Logarithmic scales are only possible for values > 0"}min_log=Math.LOG10E*Math.log(min);max_log=Math.LOG10E*Math.log(max);limits.push(min);for(i=_j=1,_ref2=num-1;1<=_ref2?_j<=_ref2:_j>=_ref2;i=1<=_ref2?++_j:--_j){limits.push(Math.pow(10,min_log+i/num*(max_log-min_log)))}limits.push(max)}else if(mode.substr(0,1)==="q"){limits.push(min);for(i=_k=1,_ref3=num-1;1<=_ref3?_k<=_ref3:_k>=_ref3;i=1<=_ref3?++_k:--_k){p=values.length*i/num;pb=Math.floor(p);if(pb===p){limits.push(values[pb])}else{pr=p-pb;limits.push(values[pb]*pr+values[pb+1]*(1-pr))}}limits.push(max)}else if(mode.substr(0,1)==="k"){n=values.length;assignments=new Array(n);clusterSizes=new Array(num);repeat=true;nb_iters=0;centroids=null;centroids=[];centroids.push(min);for(i=_l=1,_ref4=num-1;1<=_ref4?_l<=_ref4:_l>=_ref4;i=1<=_ref4?++_l:--_l){centroids.push(min+i/num*(max-min))}centroids.push(max);while(repeat){for(j=_m=0,_ref5=num-1;0<=_ref5?_m<=_ref5:_m>=_ref5;j=0<=_ref5?++_m:--_m){clusterSizes[j]=0}for(i=_n=0,_ref6=n-1;0<=_ref6?_n<=_ref6:_n>=_ref6;i=0<=_ref6?++_n:--_n){value=values[i];mindist=Number.MAX_VALUE;for(j=_o=0,_ref7=num-1;0<=_ref7?_o<=_ref7:_o>=_ref7;j=0<=_ref7?++_o:--_o){dist=Math.abs(centroids[j]-value);if(dist<mindist){mindist=dist;best=j}}clusterSizes[best]++;assignments[i]=best}newCentroids=new Array(num);for(j=_p=0,_ref8=num-1;0<=_ref8?_p<=_ref8:_p>=_ref8;j=0<=_ref8?++_p:--_p){newCentroids[j]=null}for(i=_q=0,_ref9=n-1;0<=_ref9?_q<=_ref9:_q>=_ref9;i=0<=_ref9?++_q:--_q){cluster=assignments[i];if(newCentroids[cluster]===null){newCentroids[cluster]=values[i]}else{newCentroids[cluster]+=values[i]}}for(j=_r=0,_ref10=num-1;0<=_ref10?_r<=_ref10:_r>=_ref10;j=0<=_ref10?++_r:--_r){newCentroids[j]*=1/clusterSizes[j]}repeat=false;for(j=_s=0,_ref11=num-1;0<=_ref11?_s<=_ref11:_s>=_ref11;j=0<=_ref11?++_s:--_s){if(newCentroids[j]!==centroids[i]){repeat=true;break}}centroids=newCentroids;nb_iters++;if(nb_iters>200){repeat=false}}kClusters={};for(j=_t=0,_ref12=num-1;0<=_ref12?_t<=_ref12:_t>=_ref12;j=0<=_ref12?++_t:--_t){kClusters[j]=[]}for(i=_u=0,_ref13=n-1;0<=_ref13?_u<=_ref13:_u>=_ref13;i=0<=_ref13?++_u:--_u){cluster=assignments[i];kClusters[cluster].push(values[i])}tmpKMeansBreaks=[];for(j=_v=0,_ref14=num-1;0<=_ref14?_v<=_ref14:_v>=_ref14;j=0<=_ref14?++_v:--_v){tmpKMeansBreaks.push(kClusters[j][0]);tmpKMeansBreaks.push(kClusters[j][kClusters[j].length-1])}tmpKMeansBreaks=tmpKMeansBreaks.sort(function(a,b){return a-b});limits.push(tmpKMeansBreaks[0]);for(i=_w=1,_ref15=tmpKMeansBreaks.length-1;_w<=_ref15;i=_w+=2){if(!isNaN(tmpKMeansBreaks[i])){limits.push(tmpKMeansBreaks[i])}}}return limits};/** | ||
4 | + ColorBrewer colors for chroma.js | ||
5 | + | ||
6 | + Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The | ||
7 | + Pennsylvania State University. | ||
8 | + | ||
9 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
10 | + you may not use this file except in compliance with the License. | ||
11 | + You may obtain a copy of the License at | ||
12 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
13 | + | ||
14 | + Unless required by applicable law or agreed to in writing, software distributed | ||
15 | + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR | ||
16 | + CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
17 | + specific language governing permissions and limitations under the License. | ||
18 | + | ||
19 | + @preserve | ||
20 | + */ | ||
21 | +chroma.brewer=brewer={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};chroma.colors=colors={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"};type=function(){var classToType,name,_i,_len,_ref1;classToType={};_ref1="Boolean Number String Function Array Date RegExp Undefined Null".split(" ");for(_i=0,_len=_ref1.length;_i<_len;_i++){name=_ref1[_i];classToType["[object "+name+"]"]=name.toLowerCase()}return function(obj){var strType;strType=Object.prototype.toString.call(obj);return classToType[strType]||"object"}}();limit=function(x,min,max){if(min==null){min=0}if(max==null){max=1}if(x<min){x=min}if(x>max){x=max}return x};unpack=function(args){if(args.length>=3){return args}else{return args[0]}};TWOPI=Math.PI*2;PITHIRD=Math.PI/3;cos=Math.cos;bezier=function(colors){var I,I0,I1,c,lab0,lab1,lab2,lab3,_ref1,_ref2,_ref3;colors=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(chroma(c))}return _results}();if(colors.length===2){_ref1=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(c.lab())}return _results}(),lab0=_ref1[0],lab1=_ref1[1];I=function(t){var i,lab;lab=function(){var _i,_results;_results=[];for(i=_i=0;_i<=2;i=++_i){_results.push(lab0[i]+t*(lab1[i]-lab0[i]))}return _results}();return chroma.lab.apply(chroma,lab)}}else if(colors.length===3){_ref2=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(c.lab())}return _results}(),lab0=_ref2[0],lab1=_ref2[1],lab2=_ref2[2];I=function(t){var i,lab;lab=function(){var _i,_results;_results=[];for(i=_i=0;_i<=2;i=++_i){_results.push((1-t)*(1-t)*lab0[i]+2*(1-t)*t*lab1[i]+t*t*lab2[i])}return _results}();return chroma.lab.apply(chroma,lab)}}else if(colors.length===4){_ref3=function(){var _i,_len,_results;_results=[];for(_i=0,_len=colors.length;_i<_len;_i++){c=colors[_i];_results.push(c.lab())}return _results}(),lab0=_ref3[0],lab1=_ref3[1],lab2=_ref3[2],lab3=_ref3[3];I=function(t){var i,lab;lab=function(){var _i,_results;_results=[];for(i=_i=0;_i<=2;i=++_i){_results.push((1-t)*(1-t)*(1-t)*lab0[i]+3*(1-t)*(1-t)*t*lab1[i]+3*(1-t)*t*t*lab2[i]+t*t*t*lab3[i])}return _results}();return chroma.lab.apply(chroma,lab)}}else if(colors.length===5){I0=bezier(colors.slice(0,3));I1=bezier(colors.slice(2,5));I=function(t){if(t<.5){return I0(t*2)}else{return I1((t-.5)*2)}}}return I};chroma.interpolate.bezier=bezier}.call(this); | ||
0 | \ No newline at end of file | 22 | \ No newline at end of file |
src/super_archives/templates/superarchives/thread-dashboard.html
@@ -7,9 +7,13 @@ | @@ -7,9 +7,13 @@ | ||
7 | <h2>{% trans 'Groups'|title %}</h2> | 7 | <h2>{% trans 'Groups'|title %}</h2> |
8 | <hr/> | 8 | <hr/> |
9 | 9 | ||
10 | - {% for listname, description, latest, most_relevant in lists %} | 10 | + {% for listname, description, latest, most_relevant, number_of_users in lists %} |
11 | {% if latest or most_relevant %} | 11 | {% if latest or most_relevant %} |
12 | - <h3 class="text-center"><b>{{ listname|title }} {% if description %} ({{ description }}){% endif %}</b></h3> | 12 | + <h3><b>{{ listname|title|lower }} {% if description %} ({{ description }}){% endif %}</b></h3> |
13 | + <div class="btn-group btn-group-sm"> | ||
14 | + <a href="#" class="btn btn-default" disabled="disabled">{{ number_of_users }} membros</a> | ||
15 | + <a href="/wiki/grupos/{{listname}}" class="btn btn-default">Wiki</a> | ||
16 | + </div> | ||
13 | <hr/> | 17 | <hr/> |
14 | 18 | ||
15 | <div class="row"> | 19 | <div class="row"> |
src/super_archives/views.py
@@ -133,6 +133,7 @@ class ThreadDashboardView(View): | @@ -133,6 +133,7 @@ class ThreadDashboardView(View): | ||
133 | '-latest_message__received_time' | 133 | '-latest_message__received_time' |
134 | )[:MAX], | 134 | )[:MAX], |
135 | SearchQuerySet().filter(type='thread', tag=list_.name)[:MAX], | 135 | SearchQuerySet().filter(type='thread', tag=list_.name)[:MAX], |
136 | + len(mailman.list_users(list_.name)), | ||
136 | )) | 137 | )) |
137 | 138 | ||
138 | return render(request, 'superarchives/thread-dashboard.html', context) | 139 | return render(request, 'superarchives/thread-dashboard.html', context) |
src/templates/base.html
@@ -22,12 +22,6 @@ | @@ -22,12 +22,6 @@ | ||
22 | href="{{ STATIC_URL }}third-party/font-awesome/css/font-awesome.min.css" | 22 | href="{{ STATIC_URL }}third-party/font-awesome/css/font-awesome.min.css" |
23 | type="text/css" media="screen" /> | 23 | type="text/css" media="screen" /> |
24 | 24 | ||
25 | - {% if not is_mobile %} | ||
26 | - {% conversejs_static %} | ||
27 | - {% endif %} | ||
28 | - | ||
29 | - <link rel="stylesheet" href="{{ STATIC_URL }}css/screen.css" | ||
30 | - type="text/css" media="screen" /> | ||
31 | 25 | ||
32 | <!-- JQuery 2+ won't work for IE < 9 --> | 26 | <!-- JQuery 2+ won't work for IE < 9 --> |
33 | <script type="text/javascript" src="{{ STATIC_URL }}third-party/jquery-2.0.3.min.js"></script> | 27 | <script type="text/javascript" src="{{ STATIC_URL }}third-party/jquery-2.0.3.min.js"></script> |
@@ -38,6 +32,13 @@ | @@ -38,6 +32,13 @@ | ||
38 | {% block head_js %}{% endblock %} | 32 | {% block head_js %}{% endblock %} |
39 | {% block head_css %}{% endblock %} | 33 | {% block head_css %}{% endblock %} |
40 | 34 | ||
35 | + {% if not is_mobile %} | ||
36 | + {% conversejs_static %} | ||
37 | + {% endif %} | ||
38 | + | ||
39 | + <link rel="stylesheet" href="{{ STATIC_URL }}css/screen.css" | ||
40 | + type="text/css" media="screen" /> | ||
41 | + | ||
41 | {% endblock %} | 42 | {% endblock %} |
42 | </head> | 43 | </head> |
43 | 44 | ||
@@ -103,6 +104,8 @@ | @@ -103,6 +104,8 @@ | ||
103 | <li><a href="/trac/newticket">{% trans "New Ticket" %}</a></li> | 104 | <li><a href="/trac/newticket">{% trans "New Ticket" %}</a></li> |
104 | {% endif %} | 105 | {% endif %} |
105 | <li><a href="/trac/roadmap">{% trans "Roadmap" %}</a></li> | 106 | <li><a href="/trac/roadmap">{% trans "Roadmap" %}</a></li> |
107 | + <!-- TODO: Must be optional like trac and separated --> | ||
108 | + <li><a href="/paste">Paste</a></li> | ||
106 | <li><a href="/trac/browser">{% trans "Browse Source" %}</a></li> | 109 | <li><a href="/trac/browser">{% trans "Browse Source" %}</a></li> |
107 | <!-- TODO: Must be optional like trac and separated --> | 110 | <!-- TODO: Must be optional like trac and separated --> |
108 | <li><a href="/ci">{% trans "Continuous Integration" %}</a></li> | 111 | <li><a href="/ci">{% trans "Continuous Integration" %}</a></li> |
@@ -113,13 +116,27 @@ | @@ -113,13 +116,27 @@ | ||
113 | <li class="hidden-lg hidden-md"> | 116 | <li class="hidden-lg hidden-md"> |
114 | <a href="{% url 'haystack_search' %}?q=">{% trans "Search" %}</a> | 117 | <a href="{% url 'haystack_search' %}?q=">{% trans "Search" %}</a> |
115 | </li> | 118 | </li> |
119 | + {% if user.is_active %} | ||
120 | + <li> | ||
121 | + <a href="/wiki/ComoUsarColab">{% trans "Help" %}</a> | ||
122 | + </li> | ||
123 | + {% endif %} | ||
116 | </ul> | 124 | </ul> |
117 | 125 | ||
118 | <ul class="nav navbar-nav navbar-right"> | 126 | <ul class="nav navbar-nav navbar-right"> |
119 | {% if not user.is_authenticated %} | 127 | {% if not user.is_authenticated %} |
120 | - <li><a href="{% url 'signup' %}">{% trans "Register" %}</a></li> | 128 | + |
129 | + <li class="dropdown hidden-xs hidden-lg"> | ||
130 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Acesso <b class="caret"></b></a> | ||
131 | + <ul class="dropdown-menu"> | ||
132 | + <li><a href="{% url 'signup' %}">{% trans "Register" %}</a></li> | ||
133 | + {% trans 'Login' as login_text %} | ||
134 | + <li>{% browserid_login text=login_text %}</li> | ||
135 | + </ul> | ||
136 | + </li> | ||
137 | + <li class="visible-xs hidden-sm hidden-md"><a href="{% url 'signup' %}">{% trans "Register" %}</a></li> | ||
121 | {% trans 'Login' as login_text %} | 138 | {% trans 'Login' as login_text %} |
122 | - <li>{% browserid_login text=login_text %}</li> | 139 | + <li class="visible-xs hidden-sm hidden-md">{% browserid_login text=login_text %}</li> |
123 | {% else %} | 140 | {% else %} |
124 | <li id="user-menu" class="dropdown"> | 141 | <li id="user-menu" class="dropdown"> |
125 | <a href="#" class="dropdown-toggle user" data-toggle="dropdown">{% gravatar user.email 40 %} <b class="caret"></b> </a> | 142 | <a href="#" class="dropdown-toggle user" data-toggle="dropdown">{% gravatar user.email 40 %} <b class="caret"></b> </a> |
@@ -188,16 +205,18 @@ | @@ -188,16 +205,18 @@ | ||
188 | 205 | ||
189 | {% block footer %} | 206 | {% block footer %} |
190 | <div class="footer row"> | 207 | <div class="footer row"> |
191 | - <p class="col-lg-12 text-center"> | ||
192 | - <a href="{% url 'opendata' %}"><img src="{{ STATIC_URL }}img/opendata3.png"/></a> | ||
193 | - </p> | ||
194 | {% if user.is_staff %} | 208 | {% if user.is_staff %} |
195 | <p class="col-lg-12 text-center">{% trans "Last email imported at" %} {{ last_imported_message.received_time|date:'DATETIME_FORMAT' }}</p> | 209 | <p class="col-lg-12 text-center">{% trans "Last email imported at" %} {{ last_imported_message.received_time|date:'DATETIME_FORMAT' }}</p> |
196 | {% endif %} | 210 | {% endif %} |
197 | <p class="col-lg-12 text-center"> | 211 | <p class="col-lg-12 text-center"> |
198 | - {% trans "The contents of this site is published under license" %} | ||
199 | - <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/br/"> | ||
200 | - {% trans "Creative Commons - attribution, non-commercial" %} | 212 | + <a href="{% url 'opendata' %}"><img src="{{ STATIC_URL }}img/opendata3.png"/></a> |
213 | + <a href="http://creativecommons.org/licenses/by-sa/4.0/deed.pt_BR"><img src="{{ STATIC_URL }}img/cc_by_sa.png"/></a> | ||
214 | + </p> | ||
215 | + <p class="col-lg-12 text-center"> | ||
216 | + {% trans "The contents of this site is published under license" %}: | ||
217 | + <br> | ||
218 | + <a href="http://creativecommons.org/licenses/by-sa/4.0/deed.pt_BR"> | ||
219 | + {% trans "Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual" %}. | ||
201 | </a> | 220 | </a> |
202 | </p> | 221 | </p> |
203 | </div> | 222 | </div> |
@@ -0,0 +1,44 @@ | @@ -0,0 +1,44 @@ | ||
1 | +{% load i18n %} | ||
2 | + | ||
3 | +<script src="{{ STATIC_URL }}third-party/chartjs/js/Chart.min.js"></script> | ||
4 | +<script src="{{ STATIC_URL }}third-party/chroma/js/chroma.min.js"></script> | ||
5 | + | ||
6 | +<script> | ||
7 | +$(function () { | ||
8 | + var color; | ||
9 | + var colors = ['#2F7ED8', '#0D233A', '#8BBC21', '#910000', '#1AADCE', | ||
10 | + '#492970', '#F28F43', '#77A1E5', '#C42525', '#A6C96A', '#FFDB42', | ||
11 | + '#A2B4BD', '#AA734A']; | ||
12 | + var description = $('.{{ chart_canvas }} > p'); | ||
13 | + var data = []; | ||
14 | + | ||
15 | + {% for option, value in chart_data.items %} | ||
16 | + {% if value > 0 %} | ||
17 | + color = colors.shift(); | ||
18 | + data.push( | ||
19 | + { | ||
20 | + value: {{ value }}, | ||
21 | + color: color, | ||
22 | + highlight: chroma(color).darken().hex(), | ||
23 | + label: "{{ option }}" | ||
24 | + } | ||
25 | + ); | ||
26 | + description.append($('<label>') | ||
27 | + .addClass('label label-default') | ||
28 | + .css('background', color) | ||
29 | + .append('{{ option }}') | ||
30 | + ); | ||
31 | + description.append(' '); | ||
32 | + {% endif %} | ||
33 | + {% endfor %} | ||
34 | + | ||
35 | + var context = $('.{{ chart_canvas }} > canvas').get(0).getContext("2d"); | ||
36 | + var chart = new Chart(context).Pie(data, { | ||
37 | + animateRotate: true, | ||
38 | + animationSteps: 30, | ||
39 | + animationEasing: "easeInOutCirc", | ||
40 | + segmentStrokeWidth: 1, | ||
41 | + tooltipFontSize: 16, | ||
42 | + }); | ||
43 | +}); | ||
44 | +</script> |
src/templates/home.html
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | {% block head_js %} | 6 | {% block head_js %} |
7 | {% trans "Contributions" as collabs_name %} | 7 | {% trans "Contributions" as collabs_name %} |
8 | 8 | ||
9 | - {% include "pizza-chart.html" with chart_data=type_count chart_div="collabs" chart_height=330 name=collabs_name %} | 9 | + {% include "doughnut-chart.html" with chart_data=type_count chart_canvas="collabs" name=collabs_name %} |
10 | {% endblock %} | 10 | {% endblock %} |
11 | 11 | ||
12 | {% block header %} | 12 | {% block header %} |
@@ -39,7 +39,10 @@ | @@ -39,7 +39,10 @@ | ||
39 | 39 | ||
40 | <div class="col-lg-6 col-md-6"> | 40 | <div class="col-lg-6 col-md-6"> |
41 | <h3 class="column-align">{% trans "Collaboration Graph" %}</h3> | 41 | <h3 class="column-align">{% trans "Collaboration Graph" %}</h3> |
42 | - <div id="collabs"></div> | 42 | + <div class="chart collabs"> |
43 | + <canvas width="270" height="270"></canvas> | ||
44 | + <p></p> | ||
45 | + </div> | ||
43 | </div> | 46 | </div> |
44 | </div> | 47 | </div> |
45 | 48 |