mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-29 23:43:55 -04:00
bring back attachment icons
This commit is contained in:
parent
08c08a3bc6
commit
a12a1bcc66
3 changed files with 12 additions and 6 deletions
app/assets
test/javascripts/components
|
@ -245,7 +245,7 @@ Discourse.Utilities = {
|
|||
if (Discourse.Utilities.isAnImage(upload.original_filename)) {
|
||||
return '<img src="' + upload.url + '" width="' + upload.width + '" height="' + upload.height + '">';
|
||||
} else {
|
||||
return '<a class="attachment" href="' + upload.url + '">' + upload.original_filename + '</a><span class="size">(' + I18n.toHumanSize(upload.filesize) + ')</span>';
|
||||
return '<a class="attachment" href="' + upload.url + '">' + upload.original_filename + '</a> (' + I18n.toHumanSize(upload.filesize) + ')';
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -953,3 +953,9 @@ clear: both;
|
|||
|
||||
input#edit-title {margin-left: 10px;}
|
||||
|
||||
a.attachment:before {
|
||||
display: inline-block;
|
||||
margin-right: 4px;
|
||||
font-family: "FontAwesome";
|
||||
content: "\f019";
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ var getUploadMarkdown = function(filename) {
|
|||
|
||||
test("getUploadMarkdown", function() {
|
||||
ok(getUploadMarkdown("lolcat.gif") === '<img src="/uploads/123/abcdef.ext" width="100" height="200">');
|
||||
ok(getUploadMarkdown("important.txt") === '<a class="attachment" href="/uploads/123/abcdef.ext">important.txt</a><span class="size">(42 Bytes)</span>');
|
||||
ok(getUploadMarkdown("important.txt") === '<a class="attachment" href="/uploads/123/abcdef.ext">important.txt</a> (42 Bytes)');
|
||||
});
|
||||
|
||||
test("isAnImage", function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue