This commit is contained in:
Mayhem 2013-12-09 11:18:24 +01:00
parent 0f259b488d
commit 26f0fca675
2 changed files with 7 additions and 8 deletions

View File

@ -540,8 +540,8 @@ a.hide-announcement {
} }
/* File */ /* File */
.fileText:hover .fntrunc, .file-info:hover .fntrunc,
.fileText:not(:hover) .fnfull, .file-info:not(:hover) .fnfull,
.expanded-image > .post > .file > .fileThumb > img[data-md5], .expanded-image > .post > .file > .fileThumb > img[data-md5],
:not(.expanded-image) > .post > .file > .fileThumb > .full-image { :not(.expanded-image) > .post > .file > .fileThumb > .full-image {
display: none; display: none;

View File

@ -8,7 +8,7 @@ FileInfo =
cb: @node cb: @node
node: -> node: ->
return if !@file or @isClone return if !@file or @isClone
@file.text.innerHTML = FileInfo.funk FileInfo, @ @file.text.innerHTML = "<span class=file-info>#{FileInfo.funk FileInfo, @}</span>"
createFunc: (format) -> createFunc: (format) ->
code = format.replace /%(.)/g, (s, c) -> code = format.replace /%(.)/g, (s, c) ->
if c of FileInfo.formatters if c of FileInfo.formatters
@ -21,11 +21,10 @@ FileInfo =
return "#{size.toFixed()} Bytes" return "#{size.toFixed()} Bytes"
i = 1 + ['KB', 'MB'].indexOf unit i = 1 + ['KB', 'MB'].indexOf unit
size /= 1024 while i-- size /= 1024 while i--
size = size = if unit is 'MB'
if unit is 'MB' Math.round(size * 100) / 100
Math.round(size * 100) / 100 else
else size.toFixed()
size.toFixed()
"#{size} #{unit}" "#{size} #{unit}"
escape: (name) -> escape: (name) ->
name.replace /<|>/g, (c) -> name.replace /<|>/g, (c) ->