Commit Graph

22 Commits

Author SHA1 Message Date
Javi Martín
cc7e0d586b Reduce local variables usage in CoffeeScript
Local variables are one of the things CoffeeScript doesn't compile to
modern JavaScript automatically: it uses `var` instead of `const` or
`let`.

Besides, using `$this = $(this)` is usually done to reference the
current object in another function where the current object is a
different one. Here we were using it with no clear purpose.
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
36a557927a Remove unused variables 2019-09-11 01:56:27 +02: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
iagirre
1356ea217b Erased extra empty HTML for comments without replies. Added .gitignore rules for Netbeans projects
Cambios para hacer commit:
	modificado:    .gitignore
	modificado:    app/assets/javascripts/comments.js.coffee
	modificado:    app/views/comments/_comment.html.erb
	modificado:    spec/features/comments/debates_spec.rb
2017-09-13 13:30:37 +02:00
Alberto Garcia Cabeza
ae12848e23 adds text for screen readers on toggle comments 2016-12-05 14:26:54 +01:00
Alberto Garcia Cabeza
e3878ff437 Fixes icon animation on reply comments 2016-04-20 17:27:58 +02:00
Juanjo Bazán
3bd767e36f collapsable comments on proposals/debates 2016-02-10 19:27:15 +01:00
Sergio Arbeo
12ec1fe6f6 Update comments count when commenting on a debate or proposal 2015-10-27 01:02:39 +01:00
rgarcia
f31ed2940d adds moderation to comments and debates [#136] 2015-08-17 13:39:31 +02:00
rgarcia
a81612b226 improves consistency of error messages [#110] 2015-08-16 15:57:09 +02:00
Juanjo Bazán
7919460554 removes comment 2015-08-14 23:41:00 +02:00
David Gil
994774ec65 prevents for Comments.initialize to be called twice causing unexpected behaviour in forms, when initialize_modules is called on ajax:complete 2015-08-14 21:23:06 +02:00
Juanjo Bazán
f2ea7fd95e fixes bug that hides comment form after reply
Closes #160
2015-08-13 18:27:48 +02:00
David Gil
9d2bece0b3 Fixes #142 2015-08-11 19:33:55 +02:00
kikito
59cea45c26 Use App.Comments module in create.js.erb 2015-07-30 14:08:05 +02:00
kikito
1237f9d8ad make a comments module. Move module initializing to application.js 2015-07-30 13:19:34 +02:00
rgarcia
63cac453e6 binds js behaviour to ajax generated content [#47] 2015-07-28 21:04:58 +02:00
rgarcia
baaf9cac93 refactors duplicate form id scenario [#21] 2015-07-27 22:50:38 +02:00
rgarcia
dea2964f08 fixes duplicate id in comment form [#21] 2015-07-27 22:22:12 +02:00
rgarcia
598310c01c adds turbolinks compatibility [#21] 2015-07-27 11:24:11 +02:00
rgarcia
3cec9b98f2 adds hide/show behaviour to comment forms 2015-07-25 18:49:00 +02:00