From fac2f9b367a31db642c08c76ac4b0c9948f315d4 Mon Sep 17 00:00:00 2001 From: Ojakoo Date: Mon, 4 Jul 2022 10:33:38 +0300 Subject: [PATCH] Added pre-commit linter, lint --- .pre-commit-config.yaml | 10 ++ infoscreen/static/infoscreen/css/abb.css | 2 +- infoscreen/static/infoscreen/css/apy.css | 4 +- .../static/infoscreen/css/infoscreen.css | 8 +- infoscreen/static/infoscreen/css/sosso.css | 6 +- infoscreen/static/infoscreen/html/events.html | 2 +- infoscreen/templates/tabs/rotations.html | 2 +- kaehmy/templates/export.html | 2 +- kaehmy/templates/list.html | 20 +-- kaehmy/templates/message.html | 2 +- kaehmy/templates/statistics.html | 6 +- members/templates/application_edit.html | 2 +- members/templates/application_list.html | 2 +- members/templates/member_add_many.html | 10 +- members/templates/member_list.html | 2 +- members/templates/payment_list.html | 2 +- members/templates/upload_form.html | 2 +- ohlhafv/templates/list.html | 2 +- poetry.lock | 117 +++++++++++++++++- pyproject.toml | 1 + scripts/db/init.sql | 4 +- .../ng-file-upload-bower-12.2.11/FileAPI.js | 36 +++--- webapp/templates/contact.html | 4 +- 23 files changed, 184 insertions(+), 64 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..cb576af --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: trailing-whitespace +- repo: https://github.com/psf/black + rev: 22.3.0 + hooks: + - id: black + language_version: python3.9 diff --git a/infoscreen/static/infoscreen/css/abb.css b/infoscreen/static/infoscreen/css/abb.css index af6e203..6ef29ca 100644 --- a/infoscreen/static/infoscreen/css/abb.css +++ b/infoscreen/static/infoscreen/css/abb.css @@ -3,7 +3,7 @@ body { } #header:after { - content: " "; + content: " "; display: block; clear: both; } diff --git a/infoscreen/static/infoscreen/css/apy.css b/infoscreen/static/infoscreen/css/apy.css index fce7b61..19f40cd 100644 --- a/infoscreen/static/infoscreen/css/apy.css +++ b/infoscreen/static/infoscreen/css/apy.css @@ -12,7 +12,7 @@ body { .event { font-size: 100px; font-weight: bold; - margin-left: 20px; + margin-left: 20px; } .event-col{ padding-top:1vh; @@ -21,7 +21,7 @@ body { .header-row{ margin: 30px; - margin-left: 20px; + margin-left: 20px; font-size: 130px; padding-bottom:20px; color:#24a05f; diff --git a/infoscreen/static/infoscreen/css/infoscreen.css b/infoscreen/static/infoscreen/css/infoscreen.css index c8f48c5..6968a43 100644 --- a/infoscreen/static/infoscreen/css/infoscreen.css +++ b/infoscreen/static/infoscreen/css/infoscreen.css @@ -1,8 +1,8 @@ #infocontent { - width: 100%; - height: 100%; - position: fixed; - left: 0px; + width: 100%; + height: 100%; + position: fixed; + left: 0px; top: 0px; z-index: -1; /* Ensure div tag stays behind content; -999 might work, too. */ } diff --git a/infoscreen/static/infoscreen/css/sosso.css b/infoscreen/static/infoscreen/css/sosso.css index ad43080..ecf77d0 100644 --- a/infoscreen/static/infoscreen/css/sosso.css +++ b/infoscreen/static/infoscreen/css/sosso.css @@ -31,10 +31,10 @@ max-height 200px; } -#sossoimage { +#sossoimage { height:300px; - position: relative; - left: 0px; + position: relative; + left: 0px; top: 0px; } diff --git a/infoscreen/static/infoscreen/html/events.html b/infoscreen/static/infoscreen/html/events.html index cd73f37..7b0e1b3 100644 --- a/infoscreen/static/infoscreen/html/events.html +++ b/infoscreen/static/infoscreen/html/events.html @@ -1,5 +1,5 @@ - +
Tapahtuma
diff --git a/infoscreen/templates/tabs/rotations.html b/infoscreen/templates/tabs/rotations.html index 2177861..1ed0cf9 100644 --- a/infoscreen/templates/tabs/rotations.html +++ b/infoscreen/templates/tabs/rotations.html @@ -26,7 +26,7 @@

{% trans "Rotation" %}: {$ selected_rot.name $}

- {% trans "Preview" %} + {% trans "Preview" %}
{% trans "Instances in currently selected rotation" %}:
diff --git a/kaehmy/templates/export.html b/kaehmy/templates/export.html index 7fa0682..9cc34b3 100644 --- a/kaehmy/templates/export.html +++ b/kaehmy/templates/export.html @@ -18,7 +18,7 @@

{% trans "Non-board applications" %}

{{ non_board_table|safe }} - +
{% trans "Front page" %}
diff --git a/kaehmy/templates/list.html b/kaehmy/templates/list.html index e8ae1da..9a5de8f 100644 --- a/kaehmy/templates/list.html +++ b/kaehmy/templates/list.html @@ -11,11 +11,11 @@ @@ -24,7 +24,7 @@

{% trans "All kaehmys" %}

-
+
{% csrf_token %} @@ -69,18 +69,18 @@
{% trans "Total kaehmys:" %} {{ application_count }}
- + {% for application in applications %}
-

{{ application.name }}

+

{{ application.name }}

{% if application.board_roles|length > 0 %} -
{{ application.board_roles }}
+
{{ application.board_roles }}
{% endif %} {% if application.official_roles|length > 0 %} -
{{ application.official_roles }}
- {% endif %} +
{{ application.official_roles }}
+ {% endif %}

{{ application.text|linebreaks|urlize }}

{% if application.comment_count > 0 %} @@ -95,7 +95,7 @@
-
+
{% for message in application.messages.all %} {% include "kaehmy:message.html" with messages=message.messages.all %} {% endfor %} diff --git a/kaehmy/templates/message.html b/kaehmy/templates/message.html index bee6b97..c766649 100644 --- a/kaehmy/templates/message.html +++ b/kaehmy/templates/message.html @@ -16,6 +16,6 @@ {% include "message.html" with messages=message.messages.all %} {% endfor %}
- +
\ No newline at end of file diff --git a/kaehmy/templates/statistics.html b/kaehmy/templates/statistics.html index fc82859..635bb62 100644 --- a/kaehmy/templates/statistics.html +++ b/kaehmy/templates/statistics.html @@ -10,12 +10,12 @@ {% block content %}
-

{% trans "Statistics" %}

+

{% trans "Statistics" %}

-
{% trans "Total kaehmys:" %} {{ application_count }}
+
{% trans "Total kaehmys:" %} {{ application_count }}
{% for role in role_list %} @@ -25,6 +25,6 @@ {% endfor %}
- +
{% endblock content %} diff --git a/members/templates/application_edit.html b/members/templates/application_edit.html index a342be6..5562af9 100644 --- a/members/templates/application_edit.html +++ b/members/templates/application_edit.html @@ -11,7 +11,7 @@
{% csrf_token %} - + {% bootstrap_form form %} {% buttons %}
diff --git a/members/templates/member_add_many.html b/members/templates/member_add_many.html index 574fbdc..77aa5df 100644 --- a/members/templates/member_add_many.html +++ b/members/templates/member_add_many.html @@ -11,7 +11,7 @@

{% blocktrans %} - Enter member information in CSV format, separate members on separate lines. + Enter member information in CSV format, separate members on separate lines. If a new member already exists in the database, a new payment event will be created for that member instead. {% endblocktrans %}

@@ -20,7 +20,7 @@
- +

{% blocktrans %}Columns: First name, last name, email address, place of origin, AYY member, JAS recipient{% endblocktrans %}

@@ -28,10 +28,10 @@
- + {% csrf_token %}

{% trans "Upload file" %}

- +
@@ -42,7 +42,7 @@ {% trans "This payment source will be used to create any payments for new members that already exist in the database." %} - +
diff --git a/members/templates/member_list.html b/members/templates/member_list.html index 6952362..f293064 100644 --- a/members/templates/member_list.html +++ b/members/templates/member_list.html @@ -41,7 +41,7 @@ {{ table|safe }}
{% endblock content %} diff --git a/members/templates/payment_list.html b/members/templates/payment_list.html index c7afbda..0329cd7 100644 --- a/members/templates/payment_list.html +++ b/members/templates/payment_list.html @@ -38,7 +38,7 @@ {{ table|safe }}
{% endblock content %} diff --git a/members/templates/upload_form.html b/members/templates/upload_form.html index 23ed103..8163128 100644 --- a/members/templates/upload_form.html +++ b/members/templates/upload_form.html @@ -5,6 +5,6 @@

{{ header }}

{% csrf_token %} {{ form }} - + {% endblock %} \ No newline at end of file diff --git a/ohlhafv/templates/list.html b/ohlhafv/templates/list.html index 59ff237..df0d75d 100644 --- a/ohlhafv/templates/list.html +++ b/ohlhafv/templates/list.html @@ -14,7 +14,7 @@ {% for challenge in challenges %}
-

{{ challenge.challenger }} vs. {{ challenge.victim }}

+

{{ challenge.challenger }} vs. {{ challenge.victim }}

{{ challenge.get_series_display }}

{{ challenge.message|linebreaks|urlize }}

diff --git a/poetry.lock b/poetry.lock index a1eeacd..f5e3067 100644 --- a/poetry.lock +++ b/poetry.lock @@ -53,6 +53,14 @@ category = "main" optional = false python-versions = ">=3.6" +[[package]] +name = "cfgv" +version = "3.3.1" +description = "Validate configuration and produce human readable error messages." +category = "main" +optional = false +python-versions = ">=3.6.1" + [[package]] name = "charset-normalizer" version = "2.0.12" @@ -110,6 +118,14 @@ category = "main" optional = false python-versions = ">=2.7" +[[package]] +name = "distlib" +version = "0.3.4" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" + [[package]] name = "django" version = "2.2.28" @@ -346,6 +362,18 @@ category = "main" optional = false python-versions = ">=3.6" +[[package]] +name = "filelock" +version = "3.7.1" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] +testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] + [[package]] name = "gunicorn" version = "20.1.0" @@ -360,6 +388,17 @@ gevent = ["gevent (>=1.4.0)"] setproctitle = ["setproctitle"] tornado = ["tornado (>=0.2)"] +[[package]] +name = "identify" +version = "2.5.1" +description = "File identification library for Python" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +license = ["ukkonen"] + [[package]] name = "idna" version = "3.3" @@ -439,6 +478,14 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "nodeenv" +version = "1.7.0" +description = "Node.js virtual environment builder" +category = "main" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" + [[package]] name = "nose" version = "1.3.7" @@ -513,7 +560,7 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "platformdirs" version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" +category = "main" optional = false python-versions = ">=3.7" @@ -521,6 +568,22 @@ python-versions = ">=3.7" docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] +[[package]] +name = "pre-commit" +version = "2.19.0" +description = "A framework for managing and maintaining multi-language pre-commit hooks." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +cfgv = ">=2.0.0" +identify = ">=1.0.0" +nodeenv = ">=0.11.1" +pyyaml = ">=5.1" +toml = "*" +virtualenv = ">=20.0.8" + [[package]] name = "psycopg2-binary" version = "2.8.6" @@ -650,7 +713,7 @@ python-versions = "*" name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -782,7 +845,7 @@ python-versions = "*" name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" @@ -823,6 +886,24 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "virtualenv" +version = "20.15.1" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +distlib = ">=0.3.1,<1" +filelock = ">=3.2,<4" +platformdirs = ">=2,<3" +six = ">=1.9.0,<2" + +[package.extras] +docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] + [[package]] name = "whitenoise" version = "4.1.4" @@ -849,7 +930,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "7bd8922d622b0f6a042c5508bb2789bb3fb69df3b3198ae0adca52ce12432887" +content-hash = "6ec0f461a5cc62edfc77f1b4e4f1b79647a86d9193d6492574ef6a44e15cc89b" [metadata.files] attrs = [ @@ -889,6 +970,10 @@ certifi = [ {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, ] +cfgv = [ + {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, + {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, +] charset-normalizer = [ {file = "charset-normalizer-2.0.12.tar.gz", hash = "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597"}, {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, @@ -963,6 +1048,10 @@ diff-match-patch = [ {file = "diff-match-patch-20200713.tar.gz", hash = "sha256:da6f5a01aa586df23dfc89f3827e1cafbb5420be9d87769eeb079ddfd9477a18"}, {file = "diff_match_patch-20200713-py3-none-any.whl", hash = "sha256:8bf9d9c4e059d917b5c6312bac0c137971a32815ddbda9c682b949f2986b4d34"}, ] +distlib = [ + {file = "distlib-0.3.4-py2.py3-none-any.whl", hash = "sha256:6564fe0a8f51e734df6333d08b8b94d4ea8ee6b99b5ed50613f731fd4089f34b"}, + {file = "distlib-0.3.4.zip", hash = "sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579"}, +] django = [ {file = "Django-2.2.28-py3-none-any.whl", hash = "sha256:365429d07c1336eb42ba15aa79f45e1c13a0b04d5c21569e7d596696418a6a45"}, {file = "Django-2.2.28.tar.gz", hash = "sha256:0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413"}, @@ -1034,10 +1123,18 @@ et-xmlfile = [ {file = "et_xmlfile-1.1.0-py3-none-any.whl", hash = "sha256:a2ba85d1d6a74ef63837eed693bcb89c3f752169b0e3e7ae5b16ca5e1b3deada"}, {file = "et_xmlfile-1.1.0.tar.gz", hash = "sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c"}, ] +filelock = [ + {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, + {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, +] gunicorn = [ {file = "gunicorn-20.1.0-py3-none-any.whl", hash = "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e"}, {file = "gunicorn-20.1.0.tar.gz", hash = "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"}, ] +identify = [ + {file = "identify-2.5.1-py2.py3-none-any.whl", hash = "sha256:0dca2ea3e4381c435ef9c33ba100a78a9b40c0bab11189c7cf121f75815efeaa"}, + {file = "identify-2.5.1.tar.gz", hash = "sha256:3d11b16f3fe19f52039fb7e39c9c884b21cb1b586988114fbe42671f03de3e82"}, +] idna = [ {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, @@ -1066,6 +1163,10 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] +nodeenv = [ + {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, + {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, +] nose = [ {file = "nose-1.3.7-py2-none-any.whl", hash = "sha256:dadcddc0aefbf99eea214e0f1232b94f2fa9bd98fa8353711dacb112bfcbbb2a"}, {file = "nose-1.3.7-py3-none-any.whl", hash = "sha256:9ff7c6cc443f8c51994b34a667bbcf45afd6d945be7477b52e97516fd17c53ac"}, @@ -1133,6 +1234,10 @@ platformdirs = [ {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] +pre-commit = [ + {file = "pre_commit-2.19.0-py2.py3-none-any.whl", hash = "sha256:10c62741aa5704faea2ad69cb550ca78082efe5697d6f04e5710c3c229afdd10"}, + {file = "pre_commit-2.19.0.tar.gz", hash = "sha256:4233a1e38621c87d9dda9808c6606d7e7ba0e087cd56d3fe03202a01d2919615"}, +] psycopg2-binary = [ {file = "psycopg2-binary-2.8.6.tar.gz", hash = "sha256:11b9c0ebce097180129e422379b824ae21c8f2a6596b159c7659e2e5a00e1aa0"}, {file = "psycopg2_binary-2.8.6-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:d14b140a4439d816e3b1229a4a525df917d6ea22a0771a2a78332273fd9528a4"}, @@ -1319,6 +1424,10 @@ urllib3 = [ uwsgi = [ {file = "uwsgi-2.0.20.tar.gz", hash = "sha256:88ab9867d8973d8ae84719cf233b7dafc54326fcaec89683c3f9f77c002cdff9"}, ] +virtualenv = [ + {file = "virtualenv-20.15.1-py2.py3-none-any.whl", hash = "sha256:b30aefac647e86af6d82bfc944c556f8f1a9c90427b2fb4e3bfbf338cb82becf"}, + {file = "virtualenv-20.15.1.tar.gz", hash = "sha256:288171134a2ff3bfb1a2f54f119e77cd1b81c29fc1265a2356f3e8d14c7d58c4"}, +] whitenoise = [ {file = "whitenoise-4.1.4-py2.py3-none-any.whl", hash = "sha256:6dfea214b7c12efd689007abf9afa87a426586e9dbc051873ad2c8e535e2a1ac"}, {file = "whitenoise-4.1.4.tar.gz", hash = "sha256:22f79cf8f1f509639330f93886acaece8ec5ac5e9600c3b981d33c34e8a42dfd"}, diff --git a/pyproject.toml b/pyproject.toml index 7fc3cd6..83ef4ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ sentry-sdk = "^1.4.3" django-polymorphic = "^3.1.0" python-dotenv = "^0.20.0" djangorestframework-simplejwt = "^5.2.0" +pre-commit = "^2.19.0" [tool.poetry.dev-dependencies] coverage = "^5.5" diff --git a/scripts/db/init.sql b/scripts/db/init.sql index 174e287..ad748e2 100644 --- a/scripts/db/init.sql +++ b/scripts/db/init.sql @@ -3,8 +3,8 @@ CREATE USER sik WITH PASSWORD 'password123'; ALTER ROLE sik SET client_encoding TO 'utf8'; ALTER ROLE sik SET default_transaction_isolation TO 'read committed'; ALTER ROLE sik SET timezone TO 'UTC'; -CREATE DATABASE sik - ENCODING 'UTF8' +CREATE DATABASE sik + ENCODING 'UTF8' OWNER sik; GRANT ALL PRIVILEGES ON DATABASE sik TO sik; ALTER USER sik CREATEDB; diff --git a/static/js/lib/ng-file-upload-bower-12.2.11/FileAPI.js b/static/js/lib/ng-file-upload-bower-12.2.11/FileAPI.js index 5caa110..2aa8c0e 100644 --- a/static/js/lib/ng-file-upload-bower-12.2.11/FileAPI.js +++ b/static/js/lib/ng-file-upload-bower-12.2.11/FileAPI.js @@ -3475,19 +3475,19 @@ } while( (node = node.parentNode) && (node !== document.body) ); }, - + disableMouseover: false, mouseover: function (evt){ if (!flash.disableMouseover) { var target = api.event.fix(evt).target; - + if( /input/i.test(target.nodeName) && target.type == 'file' && !target.disabled ){ var state = target.getAttribute(_attr) , wrapper = flash.getWrapper(target) ; - + if( api.multiFlash ){ // check state: // i — published @@ -3500,14 +3500,14 @@ else if( state != 'p' ){ // set "init" state target.setAttribute(_attr, 'i'); - + var dummy = document.createElement('div'); - + if( !wrapper ){ api.log('[err] FlashAPI.mouseover: js-fileapi-wrapper not found'); return; } - + _css(dummy, { top: 0 , left: 0 @@ -3516,21 +3516,21 @@ , zIndex: 1e6+'' // set max zIndex , position: 'absolute' }); - + wrapper.appendChild(dummy); flash.publish(dummy, api.uid()); - + // set "publish" state target.setAttribute(_attr, 'p'); } - + return true; } else if( wrapper ){ // Use one flash element var box = _getDimensions(wrapper); _css(flash.getEl(), box); - + // Set current input flash.curInp = target; } @@ -3543,7 +3543,7 @@ onEvent: function (evt){ var type = evt.type; - + if( type == 'ready' ){ try { // set "ready" state @@ -3632,9 +3632,9 @@ _each(files, function (file){ api.checkFileObj(file); }); - + _files[uid] = files; - + if( document.createEvent ){ event = document.createEvent('Event'); event.files = files; @@ -3664,7 +3664,7 @@ this.cmdFn(id, name, data, last); } }, - + cmdFn: function(id, name, data, last) { try { api.log('(js -> flash).'+name+':', data); @@ -3727,7 +3727,7 @@ callback(evt); }); }, - + getFiles: function (input, filter, callback){ if( callback ){ api.filterFiles(api.getFiles(input), filter, callback); @@ -4039,7 +4039,7 @@ } try { el.style[key] = val; } catch (e) {} } - + } } @@ -4161,7 +4161,7 @@ , body = document.body , docEl = (el && el.ownerDocument).documentElement ; - + function getOffset(obj) { var left, top; left = top = 0; @@ -4176,7 +4176,7 @@ top : top }; }; - + return { top: getOffset(el).top , left: getOffset(el).left diff --git a/webapp/templates/contact.html b/webapp/templates/contact.html index f0d6707..e24dd70 100644 --- a/webapp/templates/contact.html +++ b/webapp/templates/contact.html @@ -7,7 +7,7 @@ {% load static %}

{% trans "Contact" %}

- + {% if committees %} {% for committee in committees %} @@ -23,7 +23,7 @@
{{role.name}}
-

{{official.first_name}} +

{{official.first_name}} {{official.last_name}} {{official.email}}