Commit Graph

574 Commits

Author SHA1 Message Date
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
decabeza
f37a2bd0a8 Change js depending of window with 2019-05-22 12:42:00 +02:00
decabeza
13dfaedf06 Replace load to init sticky 2019-05-22 12:41:49 +02:00
Julian Herrero
2c45f178cb Reset sticky component before clicking back button on browser 2019-05-22 12:41:44 +02:00
Julian Herrero
eca4d773a0 Reset sticky component before leaving the page using Turbolinks 2019-05-22 12:41:38 +02:00
decabeza
8684835857 Adds sticky on proposals supports for mobile version 2019-05-22 12:40:12 +02:00
Javi Martín
f7d4507ebe Keep sticky elements after AJAX requests
Turbolinks doesn't get on well with Foundation's Sticky, and so we need
to manually trigger the event on Turbolinks' `page:load`.
2019-05-21 13:50:16 +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
71887f2911 Initialize answers 'after-insert' callback to keep answers order
Also provide a function to initialize new set of answers 'affer-insert'
callback after adding new questions.
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
Julian Herrero
87be6f302c Add default site customization pages
From now on these static pages:

`/privacy'
`/conditions'
`/accesibility'
`/help/faq'
`/welcome'

have been moved to the DB and can be modified easily by any
administrator in `/admin/site_customization/pages'
2019-03-14 18:35:51 +01:00
decabeza
528a4b6e8e Add default colours to admin banners 2019-03-13 13:17:42 +01:00
Javi Martín
b27855c1cf Use double quotes in CoffeeScript files
As we do in the rest of the application.

Note we cannot add a rule enforcing double quotes because CoffeeScript
Lint does not have such rule.
2019-03-06 11:41:21 +01:00
Javi Martín
9e80c75032 Use string interpolation in CoffeeScript
We use it in Ruby, and it will make it easier to change all quotes to
double quotes in CoffeeScript files.
2019-03-06 11:41:21 +01:00
Javi Martín
a6a6d50ac1 Remove trailing whitespaces 2019-03-05 21:50:13 +01:00
Javi Martín
5d30ea8835 Fix spacing after comma 2019-03-05 21:50:13 +01:00
Javi Martín
9deed3f39d Fix inconsistent indenation in CoffeeScript files
We always use two spaces as indentation.
2019-03-05 21:50:13 +01:00
Javi Martín
a03c68c1e5 Remove trailing newlines in CoffeeScript files 2019-03-05 21:49:32 +01:00
Javi Martín
af9dce1dcf Remove trailing semicolons in CoffeeScript files 2019-03-05 21:38:36 +01:00
Javi Martín
d963657e41 Use spaces around curly braces in CoffeeScript
Just like we do in Ruby.
2019-03-05 21:38:36 +01:00
decabeza
dfe7126ca0 Synchronize color inputs 2019-02-08 12:32:13 +01:00
decabeza
4d71a70e1e Set tags max length to 160 2019-02-05 17:40:27 +01:00
Javi Martín
1962fcc2a2 Hide locale selector for primary progress bars
These progress bars don't have any translatable attributes.
2019-01-24 17:34:55 +01:00
Javi Martín
789476e6ab Synchronize percentage for new progress bars
According to the HTML specification:

> The default value is the minimum plus half the difference between the
> minimum and the maximum, unless the maximum is less than the minimum,
> in which case the default value is the minimum.

So for new progress bars, we had a numeric value of `nil` and a range
value of `50`, meaning the input fields weren't in sync.

Manually triggering the event on the progress, while not an ideal
solution (ideally we would be able to define `0` as default), sets the
value of the numeric field.
2019-01-18 14:17:53 +01:00
Javi Martín
fff5673ec0 Simplify hiding/showing progress bar type field
With a parent element for just input and label, there aren't conflicts
with the globalize tabs code anymore.
2019-01-18 14:17:48 +01:00
Javi Martín
dfdf0b0636 Hide title field for primary progress bars
These bars don't have a title.
2019-01-18 14:17:37 +01:00
Javi Martín
4f25581636 Add progress bar polymorphic views 2019-01-18 14:17:29 +01:00
Julian Herrero
c5a7492128 add some improvements on budget headings
Show information about longitude and latitude in a budget heading
Show information about custom content in a budget heading
Fix render of map (zoom scrollable and points clickable)
Fix typo in app/models/map_location.rb
2019-01-02 10:46:46 +01:00
Javi Martín
9105ac3a69 Prefix classes used in JavaScript with "js-"
The same way it's done in the rest of the application.
2018-10-22 16:36:18 +02:00
Javi Martín
1895e2dd2f Make it easier to know destroy_field is an input
By using the input and finding it by its name, it's easier to see the
difference between this input and the delete-language link.
2018-10-22 16:36:18 +02:00
Javi Martín
dbea577062 Follow naming conventions for HTML classes and IDs
We use underscores for IDs and hyphens for classes.
2018-10-22 16:36:18 +02:00
Javi Martín
00983200d4 Update information texts translatable fields
This part used the code we deleted in order to make it easier to
refactor the rest of the translatable models. Now we add the code back.
2018-10-22 16:36:12 +02:00
Javi Martín
f70ef3ff2f Fix question options translations not being saved
If we enabled the locale and then added an option, the "add option" link
added the partial which was generated before enabling the translation,
and so it generated a field where the translation was disabled.

Enabling the translation after inserting each field solves the issue.
2018-10-22 15:46:24 +02:00
Javi Martín
6278175f57 Update legislation drafts translatable fields
Updating it required reorganizing the form so translatable fields are
together.

We also needed to add a `hint` option to the form label and input
methods so the hint wouldn't show up for every language.

Finally, the markdown editor needed to use the same globalize attributes
as inputs, labels and hints, which adds a bit of duplication.
2018-10-22 15:44:14 +02:00
Javi Martín
71601bd3f8 Validate translations in banners
This change forces us to use nested attributes for translations, instead
of using the more convenient `:"title_#{locale}"` methods.

On the other hand, we can use Rails' native `_destroy` attribute to
remove existing translations, so we don't have to use our custom
`delete_translations`, which was a bit buggy since it didn't consider
failed updates.
2018-10-22 15:43:28 +02:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
decabeza
b7c3a918e3 Updates js class name and id name 2018-10-05 18:18:42 +02:00
Juan Salvador Pérez García
2dc39e1498 Enhacements in proposal progress graph
Proposed action execution is shown with a red dot. Mouse hover event
shows a pop up for the points of the graph. Red dots will contain the
proposed acction executed for the given date.
2018-10-01 11:22:32 +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
35ebe79d26 Merge pull request #2921 from consul/custom-js
[Backport] Adds custom javascripts folder
2018-09-26 14:24:47 +02:00
Raimond Garcia
4086220ebf Merge pull request #2914 from microweb10/make_polls_translatable
Make polls translatable
2018-09-26 13:19:17 +02:00
decabeza
62490c4640 Adds custom javascripts folder 2018-09-26 12:34:16 +02:00