Commit Graph

601 Commits

Author SHA1 Message Date
Juan Salvador Pérez García
e7b3965991 Fixes #212
Vertical lines appear only for executed resources
Labels for daily graph do not include the year in the x-axis.
2018-07-17 17:59:12 +02:00
Juan Salvador Pérez García
762c4faef6 Fixes #141
Adds ideal progress to progress graph
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
8bc3b9e67e Fixed y axis
Y axis was showing 0 - 10% of max value
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
0a790b4479 Fixes #191
Shows goals in progress graphic
2018-07-17 17:59:11 +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
Juan Salvador Pérez García
fa86d27381 Blank files removal 2018-07-17 17:53:18 +02:00
Juan Salvador Pérez García
5236fba47e Fixed locales
Fixed locale related issues
2018-07-17 17:53:18 +02:00
Juan Salvador Pérez García
f9a085a400 Implements graph for dashboard
Implements graph secion for dashboard.

Dashboard related actions have been agrupated inside a menu in the admin
section.

Minor bugfixes.
2018-07-17 17:53:18 +02:00
Juan Salvador Pérez García
8239b789fa Fixed accidentally added } 2018-07-17 17:52:47 +02:00
Juan Salvador Pérez García
89f3da25b9 Implements #138 and #139
Implements graph with supports for the given  period.
2018-07-17 17:52:47 +02:00
Juan Salvador Pérez García
1464bddfa8 Fixes #134
Adds an administration interface for the proposal dashboard actions.
2018-07-17 17:48:46 +02:00
Juan Salvador Pérez García
212c088d35 Implements #144
Creates the basic layout for the dashboard
2018-07-17 17:47:40 +02:00
iagirre
82cb8d4c52 Changes suggested in PR:
* Delete all things related to banner images and styles (in code)
* Add a new test to check that the banner is showing correctly
* Update the specs accordingly to match the changes

Update dev_seed to set a random background_color and a font_color for banners (and remove everything about image and style)
Add a rake task to migrate the banner style to backgroun_color and font_color (so that the banners have the same colors than before)
2018-07-12 10:17:24 -04:00
iagirre
3690cae458 Apply banner style to the new banners
Banner sections can be saved (one banner can appear in several sections)
If the hex color is changed in the textfield, the color of the color picker changes.
2018-07-12 10:16:47 -04:00
iagirre
6d6da8affc Add form fields to set the colours and the sections for the banner
Add migrations to store the information in the database
2018-07-12 10:16:47 -04:00
Raimond Garcia
e370069804 Merge pull request #2708 from javierv/fix_suggestions_keyup
Fix suggestions being requested with every keystroke
2018-07-12 16:05:09 +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
Javier Martín
e655c3c958 Fix suggestions keyup timeout.
The browser was generating one AJAX request per keystroke, ignoring the
timeout. The clearTimeout() function needs to be called with the ID
value returned by setTimeout().
2018-06-28 21:06:32 +02:00
Angel Perez
9575aa5a42 Fix failing specs for skipping invalid map markers 2018-05-28 11:44:53 -04:00
Angel Perez
dbed904a4e Fix typo: toogle -> toggle 2018-05-28 11:44:53 -04:00
rgarcia
994e15666e Skip invalid map markers
Why:
Sometimes the latitude or longitude it passed to the map as *********
instead of the actual latitude or longitud. The asterisks are not a
string, breaking the whole array
https://github.com/consul/consul/issues/2380

What:
This commits skips invalid markers and displays the rest

How:
- Substituting the mysterious asterisks for null
(cleanInvestmentCoordinates)

- Validating the coordinates are numbers before trying to pain
them(validCoordinates)

- Adding a numeric function to validate the latitude and longitude
(isNumeric)
https://stackoverflow.com/questions/9716468/is-there-any-function-like-i
snumeric-in-javascript-to-validate-numbers#answer-9716488
2018-05-28 11:44:53 -04:00
decabeza
5bcec351ef Improves admin content translatable ui 2018-05-10 09:01:12 +02:00
iagirre
471c9730cc Refactorings
- Cleanup Translatable module (`translation_params` method too large)
- Move globalize_helpers partial to admin folder
- Use any class for method translation_params
- Helpers in `GlobalizeHelpers` make sure all are in use and see if they can be more legible
- Review js name clases and methods see if they can be more legible
- Refactor milestone views into partials with nice spacing between attributes
2018-05-09 16:58:47 +02:00
iagirre
285e02ce96 Highlight current locale when changing locale from select
When the locale changes the corresponding tab is
highlighted automatically.
When a language is added to the milestone, the tab
is highlighted automatically.
2018-05-09 16:07:21 +02:00
iagirre
b318c2be46 Add feature to delete a translation
To delete a translation, a link has been added. This
link works for the selected language. It hides all the
things related to a language (the tab and the text_area)
and empties the text area, so that the value is blank
in the param hash. A variable called `delete_translations[]`
is changed.

e.g. If admin wants to remove English language,
delete_translations[:en] will be 1; if not, it will be 0.

When the milestone is updated, there is a before_action
callback that cleans the selected languages for deletion
(looking the delete_translations[] variable).
Because of the deleted translations are blank in param hash,
them won't be saved in DB.
2018-05-09 16:07:12 +02:00
rgarcia
f7486b9238 Add Globalize to Milestones 2018-05-09 16:05:44 +02:00
Bertocq
a44c830cd4 Fix MapLocation json_data to return mappable ids
Until we correctly make MapLocation relation with mappables a polymorphic
one... we'll need to return the investment_id and proposal_id values.

Right now it was returning the MapLocation ID, and the JS was making a
call searching for an Investment with the MapLocation ID... sometimes
finding a record with same ID but totally NOT the one associated to the
MapLocation.
2018-04-25 20:05:19 +02:00
Raimond Garcia
1692abc54a Merge pull request #2374 from wairbut-m2c/upload_documents_feature
Upload documents feature
2018-04-05 19:39:12 +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
064089926d Add ajax request for marker investment info 2018-03-27 15:26:46 +02:00
decabeza
4b381eef9b Removes unused js 2018-03-07 17:17:04 +01:00
rgarcia
7f30d0c620 Fix doble submit specs
We have a custom implementation to avoid doble submissions which causes
some custom problems 😌

This commit should fix the following three specs
spec/features/comments/legislation_annotations_spec.rb:367
spec/features/comments/legislation_questions_spec.rb:333
spec/features/custom/probe_option_comments_spec.rb:298

One of the custom problems comes from ajax:success[1] not being
triggered, instead only ajax:complete seems to be triggered

We should remove this custom implementation and use the standard
solution provided in rails[2]

[1]
https://github.com/AyuntamientoMadrid/consul/blob/master/app/assets/java
scripts/prevent_double_submission.js.coffee#L28

[2]
https://stackoverflow.com/questions/9570912/how-to-disable-a-form-submit
-button-a-l%C3%A0-ruby-on-rails-way/9572893#9572893
2018-02-20 22:33:01 +01:00
María Checa
1c458d4be3 Added emails download views 2018-02-20 22:33:01 +01:00
María Checa
d786284ce9 Added newsletter custom stylesheets and js alert 2018-02-14 16:06:02 +01:00
Vicente Mendoza
410caced3e test added for changes at documentable's view 2018-01-24 12:48:06 +01:00
BertoCQ
92eac29da7 Merge branch 'master' into budget_map 2018-01-18 00:36:43 +01:00
María Checa
4e5c8f4903 Added js file for alert 2018-01-17 19:11:46 +01:00
Vicente Mendoza
d0df965487 fix some issues about test and variables name 2018-01-17 17:10:19 +01:00
Vicente Mendoza
91e10e1897 new map on budget homepage 2018-01-17 13:15:35 +01:00
decabeza
97bf00817c fixes js class name 2018-01-15 21:21:44 +01:00
Raimond Garcia
bce0729a61 Merge pull request #1899 from xarlybovi/legislation-process-html-fixes
Legislation process minor html fixes
2018-01-08 16:00:26 +01:00
rgarcia
20dec19e89 toogles map visibility 2017-12-19 20:33:43 +01:00
María Checa
f9e65b0f80 Merge pull request #2102 from wairbut-m2c/iagirre-admin-poll-stats
Iagirre admin poll stats
2017-11-29 20:07:53 +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
Manuel Ortega
9de9a81b8c Added reference to event on the .on method('ajax:success',... 2017-10-20 14:12:31 +02:00
Raimond Garcia
1c5a1d1677 Merge pull request #2054 from wairbut-m2c/iagirre-answer-resize-reorder
Iagirre answer resize reorder
2017-10-16 10:49:35 +02:00
iagirre
2c6c320fa1 When answer 2 more info expand is clicked, it expands on top of the first one, not below. Same if the expand is clicked for the first answer 2017-10-13 14:38:30 +02:00
rgarcia
560ff7c51d does not use custom implementation to disable submit button 2017-10-13 12:40:42 +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
e127b52225 Minor fixes 2017-10-07 11:37:33 +02:00