Commit 7ede176ca3c79554be47033f8357b2425adc798f
1 parent
c4dcfb91
Exists in
master
and in
9 other branches
Fixing extra fields animation in use report
Showing
1 changed file
with
12 additions
and
3 deletions
Show diff stats
theme.js
... | ... | @@ -210,9 +210,21 @@ $('#link-buscar').click(function(e) { |
210 | 210 | state = 0; |
211 | 211 | arrow.attr('class', "comments-arrow-down"); |
212 | 212 | } |
213 | + animateExtraFields(); | |
213 | 214 | }); |
214 | 215 | } |
215 | 216 | |
217 | + function animateExtraFields() { | |
218 | + var fields = $('.comments-software-extra-fields'); | |
219 | + if(fields) { | |
220 | + var innerHeight = fields[0].offsetHeight; | |
221 | + if(fields.height()!==0) | |
222 | + fields.animate({height: 0}); | |
223 | + else | |
224 | + fields.animate({height: 140}); | |
225 | + } | |
226 | + } | |
227 | + | |
216 | 228 | function set_use_report_content() { |
217 | 229 | $('.make-report-block .make-report-container .button-bar a span').html('avaliar o software'); |
218 | 230 | $('.make-report-block .make-report-container .make-report-message').html('Relate sua experiência ou do órgão/empresa com relação ao software.'); |
... | ... | @@ -224,9 +236,6 @@ $('#link-buscar').click(function(e) { |
224 | 236 | $('.star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments label').html('Nome do órgão ou empresa'); |
225 | 237 | $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited label').html('Número de beneficiados'); |
226 | 238 | $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values label').html('Recursos economizados'); |
227 | - $('.star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments').addClass("animated slideInDown"); | |
228 | - $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited').addClass("animated slideInDown"); | |
229 | - $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values').addClass("animated slideInDown"); | |
230 | 239 | } |
231 | 240 | |
232 | 241 | function add_tooltips(){ | ... | ... |