mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-29 15:35:23 -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)) {
|
if (Discourse.Utilities.isAnImage(upload.original_filename)) {
|
||||||
return '<img src="' + upload.url + '" width="' + upload.width + '" height="' + upload.height + '">';
|
return '<img src="' + upload.url + '" width="' + upload.width + '" height="' + upload.height + '">';
|
||||||
} else {
|
} 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) + ')';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -455,7 +455,7 @@ iframe {
|
||||||
a:not(.badge-category) {margin-left: -10px;}
|
a:not(.badge-category) {margin-left: -10px;}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a.star {
|
a.star {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
|
@ -737,7 +737,7 @@ blockquote {
|
||||||
.row:after {clear: both;}
|
.row:after {clear: both;}
|
||||||
.embedded-posts {
|
.embedded-posts {
|
||||||
h1, h2, h3 {margin: 10px 0;}
|
h1, h2, h3 {margin: 10px 0;}
|
||||||
&.bottom {
|
&.bottom {
|
||||||
&.hidden {display: block; opacity: 0; }
|
&.hidden {display: block; opacity: 0; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -766,7 +766,7 @@ button.show-replies {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.bottom-round button.show-replies {
|
&.bottom-round button.show-replies {
|
||||||
|
@ -775,7 +775,7 @@ button.show-replies {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
|
|
||||||
|
|
||||||
&:hover {background: #ddd;
|
&:hover {background: #ddd;
|
||||||
.badge-posts {color: #888;}
|
.badge-posts {color: #888;}
|
||||||
|
|
||||||
|
@ -953,3 +953,9 @@ clear: both;
|
||||||
|
|
||||||
input#edit-title {margin-left: 10px;}
|
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() {
|
test("getUploadMarkdown", function() {
|
||||||
ok(getUploadMarkdown("lolcat.gif") === '<img src="/uploads/123/abcdef.ext" width="100" height="200">');
|
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() {
|
test("isAnImage", function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue