UX: Lightbox support for image uploader. (#7034)

This commit is contained in:
Guo Xiang Tan
2019-02-21 10:13:37 +08:00
committed by GitHub
parent 3cb676bf42
commit 58b0e945bd
12 changed files with 160 additions and 55 deletions

View File

@ -6,8 +6,6 @@ require_dependency 'pretty_text'
require_dependency 'quote_comparer'
class CookedPostProcessor
include ActionView::Helpers::NumberHelper
INLINE_ONEBOX_LOADING_CSS_CLASS = "inline-onebox-loading"
INLINE_ONEBOX_CSS_CLASS = "inline-onebox"
LOADING_SIZE = 10
@ -422,7 +420,7 @@ class CookedPostProcessor
filename = get_filename(upload, img["src"])
informations = "#{original_width}×#{original_height}"
informations << " #{number_to_human_size(upload.filesize)}" if upload
informations << " #{upload.human_filesize}" if upload
a["title"] = CGI.escapeHTML(img["title"] || filename)