Skip to content

Commit

Permalink
Merge branch 'release/0.11.12.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Jan 8, 2017
2 parents 33a769e + b01cb33 commit 083f05a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#= require web/members
#= require web/events
#= require web/welcome
#= require web/news
#= require feedback

window.vertical_align = ($element) ->
Expand Down
11 changes: 8 additions & 3 deletions app/assets/javascripts/web/news.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$ ->
$('article.news-info img').each ->
image = this
$('<img/>').attr('src', $(this).attr('src')).load ->
pic_real_width = this.width
pic_real_height = this.height
dimension = pic_real_width / pic_real_height
$(image).height $(image).width() / dimension

0 comments on commit 083f05a

Please sign in to comment.