rm file buttan
This commit is contained in:
parent
86f08d491a
commit
7458f23753
@ -1248,7 +1248,7 @@
|
||||
return 'image/' + type;
|
||||
}
|
||||
});
|
||||
QR.file = "<input type=file name=upfile accept='" + accept + "'><img alt='click here'>";
|
||||
QR.file = "<input type=file name=upfile accept='" + accept + "'><img alt='click here'><a class=x>X</a>";
|
||||
QR.MAX_FILE_SIZE = $('input[name=MAX_FILE_SIZE]').value;
|
||||
QR.spoiler = $('.postarea label') ? ' <label>[<input type=checkbox name=spoiler>Spoiler Image?]</label>' : '';
|
||||
if (conf['Persistent QR']) {
|
||||
@ -1270,6 +1270,9 @@
|
||||
$.bind($('img', div), 'click', function() {
|
||||
return this.previousSibling.click();
|
||||
});
|
||||
$.bind($('.x', div), 'click', function() {
|
||||
return $.rm(this.parentNode);
|
||||
});
|
||||
$.add(files, div);
|
||||
return file.click();
|
||||
},
|
||||
@ -3496,7 +3499,6 @@
|
||||
display: none;\
|
||||
}\
|
||||
#qr #files img {\
|
||||
display: block;\
|
||||
max-height: 250px;\
|
||||
max-width: 250px;\
|
||||
}\
|
||||
|
||||
@ -980,7 +980,7 @@ QR =
|
||||
'application/' + type
|
||||
else
|
||||
'image/' + type
|
||||
QR.file = "<input type=file name=upfile accept='#{accept}'><img alt='click here'>"
|
||||
QR.file = "<input type=file name=upfile accept='#{accept}'><img alt='click here'><a class=x>X</a>"
|
||||
QR.MAX_FILE_SIZE = $('input[name=MAX_FILE_SIZE]').value
|
||||
QR.spoiler = if $('.postarea label') then ' <label>[<input type=checkbox name=spoiler>Spoiler Image?]</label>' else ''
|
||||
if conf['Persistent QR']
|
||||
@ -995,6 +995,7 @@ QR =
|
||||
file = $ 'input', div
|
||||
$.bind file, 'change', QR.change
|
||||
$.bind $('img', div), 'click', -> @previousSibling.click()
|
||||
$.bind $('.x', div), 'click', -> $.rm @parentNode
|
||||
$.add files, div
|
||||
file.click()
|
||||
attach: ->
|
||||
@ -2804,7 +2805,6 @@ main =
|
||||
display: none;
|
||||
}
|
||||
#qr #files img {
|
||||
display: block;
|
||||
max-height: 250px;
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user