Commit Graph

121 Commits

Author SHA1 Message Date
Javi Martín
5211f47842 Add and apply ESLint spacing rules
For now we're only adding rules related to spacing and double quotes,
following the same rules we use in Ruby, which are the same rules
CoffeeScript followed when compiling these files.

We're also using the recommended ESLint rules, which will warn us about
many JavaScript common pitfalls, the `strict` rule which enforces using
strict mode, and the `no-console` rule, which will prevent us from
shipping code meant for debugging.

Although it's arguably more common to use the JSON format to define
these rules, I've chosen YAML because it's the format we use in all our
linters.
2019-09-11 14:03:24 +02:00
Javi Martín
d93a029ce5 Convert CofeeScript to JavaScript
Compiled using `coffee -c` with CoffeeScript 1.12.6.
2019-09-11 14:03:24 +02:00
Javi Martín
d8be18d6a9 Use double quotes in CoffeeScript
We accidentally added some single quotes recently.
2019-09-11 03:14:17 +02:00
Javi Martín
86e704d8a4 Use strict mode in JavaScript
Strict mode is supported by 98% of the browsers, including Internet
Explorer 10, and it helps developers avoid common JavaScript pitfalls.
2019-09-11 03:14:17 +02:00
Javi Martín
f28a5cc49b Remove unused piwik-related code
This code requires the variable `_paq` to be set somewhere, but we never
set it.

In the past Decide Madrid added some custom JavaScript using this code.
However, in CONSUL we're using Ahoy to track events, and we don't have
any documentation about adding custom JavaScript to use piwik nor we've
got any other piwik integration.
2019-09-11 01:56:27 +02:00
Javi Martín
a9d28bee15 Remove unused code in App.Cookies
The `removeCookie` function is never called, and the `initialize`
function doesn't do anything. The only functions we use here are
`getCookie` and `saveCookie`.
2019-09-11 01:56:27 +02:00
Javi Martín
bf20c93e99 Remove legacy annotations JavaScript file
This code isn't used since commit 54e59a8a.
2019-09-11 01:56:27 +02:00
lalo
23d36835d7 Add Admin changes to create Poll:Questions with votation type 2019-06-12 19:44:14 +02:00
German Galia
74083df10f Add historic fields to participatory budget 2019-06-12 18:03:53 +02:00
Raimond Garcia
259e05c3e0 Merge pull request #3410 from LextrendIT/report_generation
Report generation, download CSV
2019-06-12 11:45:59 +02:00
German Galia
9d1ca3bfd4 Report generation. Download csv 2019-06-12 10:17:31 +02:00
lalo
4740aeaddf Add columns selector JS component and change Rails view to use it 2019-06-11 14:33:40 +02:00
voodoorai2000
24dde9c35e Delete valuation 2019-05-31 15:43:06 +02:00
Javi Martín
b4a1f0db51 Rename file to initialize Foundation
Naming it "Dropdown" was misleading.
2019-05-21 13:50:16 +02:00
Javi Martín
8094417828 Remove best_in_place
It was only used in one place, so it's best to remove it and use the
patterns we use everywhere else.
2019-04-29 12:37:28 -05:00
decabeza
5bbf325c1f Remove copy link on dashboard polls 2019-04-24 14:01:08 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Senén Rodero Rodríguez
b417e9db31 Initialize new question answers coccon callback
After adding new question we need to initialize new answers
sets.
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
045c950c3b Add poll question answers script for nested fields
Set poll questions answers given_order value dinamically with JS to
allow to create multiple answers with correct given_order.
2019-03-21 14:51:17 +01:00
Julian Herrero
1ece761beb Render map properly when changing between setting tabs 2019-03-19 18:14:57 +01:00
Julian Herrero
d9eaea4ea0 Use double quotes in app/assets 2019-03-15 09:26:00 +01:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
Juan Salvador Pérez García
488e7e081f Merge branch 'dashboard' into rebase_consul_master 2018-09-27 09:18:27 +02:00
Alberto
fb19aafee7 Merge pull request #2778 from wairbut-m2c/backport/investments-moderation
Allow budget investments to be moderated
2018-07-27 12:34:17 +02:00
Bertocq
f695a7faf3 Add AdminNotification management at admin panel
In the same fashion Newsletters is managed, with the only difference that
the preview is using the notification partial in the same way the index
of notifications.
2018-07-25 18:33:45 +02:00
Angel Perez
1990092fdf Allow moderators to hide inappropriate investments 2018-07-20 18:42:33 -04:00
Juan Salvador Pérez García
f439fc7371 Fixes #218
Added check in poll card that allows setting the value of
results_enabled flag.

Access to stats/results now is controlled with abilities.

Polls related to proposals will be accessible to the proposal author
like they were administrators.
2018-07-17 17:59:12 +02:00
Juan Salvador Pérez García
889a15a9bf Poll view redesigned for the dashboard.
Poll view has been redesigned. Now polls are shown like cards. There is
a link that allow sharing the poll.
2018-07-17 17:58:22 +02:00
iagirre
88a8aaa083 Add hide button in the user interface
The little menu with the hide notification link and block user link
has been added to each proposal notification.

JS for adding the fade efect has also been added.
2018-07-02 18:19:08 +02:00
rgarcia
f7486b9238 Add Globalize to Milestones 2018-05-09 16:05:44 +02:00
iagirre
3a62fc9bda Add UI to let manager change users password
A submenu has been added to the side menu's
'Edit user account' option. This submenu has
two options:

- Reset password via email: an email is send
so that the user can change their password by
themselves.
- Reset password manually: the manager has to
write the password manually (or generate a random
one).

The passwords generated by the random password
generator don't contain characters like $ or !.
It uses some capital letters, some other lower
case letters and some numbers. Ambiguous
characters like 1, l, I has been removed.
2018-04-02 09:43:24 +02:00
María Checa
d786284ce9 Added newsletter custom stylesheets and js alert 2018-02-14 16:06:02 +01:00
María Checa
4e5c8f4903 Added js file for alert 2018-01-17 19:11:46 +01:00
iagirre
5a3e701e8d Polls' stats migrated from Madrid's fork and sortable functions added for tables 2017-10-23 13:19:22 +02:00
iagirre
2b10b59e2a Order in the admin page using jquery-ui sortable widget. 2017-10-10 16:38:29 +02:00
María Checa
bcfd1a844a Poll voter token 2017-10-06 20:44:47 +02:00
BertoCQ
121109f967 Merge branch 'master' into feature/1924#poll_shifts_creation 2017-09-28 13:03:34 +02:00
María Checa
08cdf93ecc Switch date selects for shift tasks 2017-09-28 10:40:48 +02:00
Senén Rodero Rodríguez
6c1d1c2cde Add map settings to backend. Install leaflet assets to render maps. 2017-09-27 14:46:02 +02:00
Senén Rodero Rodríguez
966ff4dc03 User new direct uploads controllers action on imageable. 2017-09-26 13:56:06 +02:00
Senén Rodero Rodríguez
824dd26d5a User new direct uploads controllers action on documentable. Skipped spec. 2017-09-26 13:55:51 +02:00
Senén Rodero Rodríguez
826385f659 Extract ajax upload and destroy_upload actions from images and documents controllers and place them at new controllers to manage direct uploads 2017-09-26 13:55:28 +02:00
Senén Rodero Rodríguez
6f71da07ee Duplicate documentable code and rename for imageable 2017-09-26 13:55:03 +02:00
BertoCQ
73c47dcd0e Merge pull request #1905 from wairbut-m2c/iagirre-autocomplete-tags
Iagirre autocomplete tags
2017-09-26 10:19:34 +02:00
Carlos Ruiz
cf2dff1013 Small class names and html refactor 2017-09-19 20:11:06 +02:00
iagirre
049967649e Selection of multiple tags separated by ',' works for hardcoded array of tags. 2017-09-19 17:37:31 +02:00
Carlos Ruiz
12d34a3ea1 Switch flag/unflag buttons on use via ajax 2017-09-18 19:07:45 +02:00
Senén Rodero Rodríguez
9a0b34fffe Install jquery-file-upload assets for rails. 2017-08-25 18:34:51 +02:00
Senén Rodero Rodríguez
c9a6630c94 Remove popup on follow buttons and remove uneeded code. 2017-07-19 17:51:45 +02:00
Senén Rodero Rodríguez
a7aef0a9fb Initialize App js modules after followable update. 2017-07-07 13:38:53 +02:00