From 26f0fca6753ada811f143c7439e2b7ddf1af3412 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 11:18:24 +0100 Subject: [PATCH] Fix #1376. --- css/style.css | 4 ++-- src/Miscellaneous/FileInfo.coffee | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/css/style.css b/css/style.css index 4d4347ff1..21fb6dc8c 100644 --- a/css/style.css +++ b/css/style.css @@ -540,8 +540,8 @@ a.hide-announcement { } /* File */ -.fileText:hover .fntrunc, -.fileText:not(:hover) .fnfull, +.file-info:hover .fntrunc, +.file-info:not(:hover) .fnfull, .expanded-image > .post > .file > .fileThumb > img[data-md5], :not(.expanded-image) > .post > .file > .fileThumb > .full-image { display: none; diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 89d694313..e58f9faef 100644 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -8,7 +8,7 @@ FileInfo = cb: @node node: -> return if !@file or @isClone - @file.text.innerHTML = FileInfo.funk FileInfo, @ + @file.text.innerHTML = "#{FileInfo.funk FileInfo, @}" createFunc: (format) -> code = format.replace /%(.)/g, (s, c) -> if c of FileInfo.formatters @@ -21,11 +21,10 @@ FileInfo = return "#{size.toFixed()} Bytes" i = 1 + ['KB', 'MB'].indexOf unit size /= 1024 while i-- - size = - if unit is 'MB' - Math.round(size * 100) / 100 - else - size.toFixed() + size = if unit is 'MB' + Math.round(size * 100) / 100 + else + size.toFixed() "#{size} #{unit}" escape: (name) -> name.replace /<|>/g, (c) ->