mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Image uploading component was missing a class
This commit is contained in:
parent
0362c50698
commit
5148c48170
@ -1,12 +1,13 @@
|
||||
import UploadMixin from 'discourse/mixins/upload';
|
||||
|
||||
export default Em.Component.extend(UploadMixin, {
|
||||
classNames: ['image-uploader'],
|
||||
|
||||
backgroundStyle: function() {
|
||||
var imageUrl = this.get('imageUrl');
|
||||
const imageUrl = this.get('imageUrl');
|
||||
if (Em.isNone(imageUrl)) { return; }
|
||||
|
||||
return "background-image: url(" + imageUrl + ")";
|
||||
return ("background-image: url(" + imageUrl + ")").htmlSafe();
|
||||
}.property('imageUrl'),
|
||||
|
||||
uploadDone: function(data) {
|
||||
@ -14,7 +15,7 @@ export default Em.Component.extend(UploadMixin, {
|
||||
},
|
||||
|
||||
actions: {
|
||||
trash: function() {
|
||||
trash() {
|
||||
this.set('imageUrl', null);
|
||||
|
||||
// Do we want to signal the delete to the server right away?
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="uploaded-image-preview" class="input-xxlarge" {{bind-attr style="backgroundStyle"}}>
|
||||
<div class="uploaded-image-preview input-xxlarge" style={{backgroundStyle}}>
|
||||
<div class="image-upload-controls">
|
||||
<label class="btn pad-left no-text {{if uploading 'disabled'}}">
|
||||
{{fa-icon "picture-o"}}
|
||||
|
Loading…
Reference in New Issue
Block a user