Fix #1376.
This commit is contained in:
parent
0f259b488d
commit
26f0fca675
@ -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;
|
||||||
|
|||||||
@ -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) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user