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