Fixup attachment preview
This commit is contained in:
parent
11d07c5263
commit
79b4c89ce4
3 changed files with 46 additions and 5 deletions
|
@ -85,7 +85,8 @@ var Whisper = Whisper || {};
|
||||||
this.thumb.remove();
|
this.thumb.remove();
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteFiles: function() {
|
deleteFiles: function(e) {
|
||||||
|
if (e) { e.stopPropagation(); }
|
||||||
this.clearForm();
|
this.clearForm();
|
||||||
this.$input.wrap('<form>').parent('form').trigger('reset');
|
this.$input.wrap('<form>').parent('form').trigger('reset');
|
||||||
this.$input.unwrap();
|
this.$input.unwrap();
|
||||||
|
|
|
@ -151,13 +151,13 @@ button {
|
||||||
background: transparent; }
|
background: transparent; }
|
||||||
.bottom-bar .attachments {
|
.bottom-bar .attachments {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
float: left;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 36px;
|
width: 36px;
|
||||||
float: left; }
|
margin-right: 10px; }
|
||||||
.bottom-bar .attachments .paperclip {
|
.bottom-bar .attachments .paperclip {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
opacity: 0.5;
|
|
||||||
background: url("/images/paperclip.png") no-repeat;
|
background: url("/images/paperclip.png") no-repeat;
|
||||||
background-size: 90%;
|
background-size: 90%;
|
||||||
background-position: center 6px; }
|
background-position: center 6px; }
|
||||||
|
@ -171,6 +171,23 @@ button {
|
||||||
left: 0;
|
left: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 1; }
|
z-index: 1; }
|
||||||
|
.bottom-bar .attachments img.preview {
|
||||||
|
max-width: 100%; }
|
||||||
|
.bottom-bar .attachments .close {
|
||||||
|
font-family: sans-serif;
|
||||||
|
color: white;
|
||||||
|
position: absolute;
|
||||||
|
top: -10px;
|
||||||
|
left: 20px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: default;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
padding: 0px;
|
||||||
|
background: #666;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center; }
|
||||||
.bottom-bar .send-btn {
|
.bottom-bar .send-btn {
|
||||||
float: right;
|
float: right;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -208,17 +208,19 @@ button {
|
||||||
|
|
||||||
.attachments {
|
.attachments {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
float: left;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 36px;
|
width: 36px;
|
||||||
|
margin-right: 10px;
|
||||||
|
|
||||||
.paperclip {
|
.paperclip {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
opacity: 0.5;
|
|
||||||
background: url('/images/paperclip.png') no-repeat;
|
background: url('/images/paperclip.png') no-repeat;
|
||||||
background-size: 90%;
|
background-size: 90%;
|
||||||
background-position: center 6px;
|
background-position: center 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=file] {
|
input[type=file] {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -231,7 +233,28 @@ button {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
float: left;
|
img.preview {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
font-family: sans-serif;
|
||||||
|
color: white;
|
||||||
|
position: absolute;
|
||||||
|
top: -10px;
|
||||||
|
left: 20px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: default;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
padding: 0px;
|
||||||
|
|
||||||
|
background: #666;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.send-btn {
|
.send-btn {
|
||||||
|
|
Loading…
Reference in a new issue