QR.reset
This commit is contained in:
parent
b29ea64bc3
commit
8b8778f3ee
@ -1367,13 +1367,18 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
reset: function() {
|
||||
return $('textarea', QR.el).value = '';
|
||||
},
|
||||
receive: function(e) {
|
||||
var data;
|
||||
data = e.data;
|
||||
if (data) {
|
||||
return $.extend($('a.error', QR.el), JSON.parse(data));
|
||||
} else {
|
||||
if (!conf['Persistent QR']) {
|
||||
if (conf['Persistent QR']) {
|
||||
QR.reset();
|
||||
} else {
|
||||
QR.close();
|
||||
}
|
||||
if (conf['Cooldown']) {
|
||||
|
||||
@ -1072,12 +1072,17 @@ QR =
|
||||
textContent: 'Submit'
|
||||
disabled: false
|
||||
QR.autoPost() if $('#auto', QR.el).checked
|
||||
reset: ->
|
||||
$('textarea', QR.el).value = ''
|
||||
receive: (e) ->
|
||||
{data} = e
|
||||
if data
|
||||
$.extend $('a.error', QR.el), JSON.parse data
|
||||
else
|
||||
QR.close() unless conf['Persistent QR']
|
||||
if conf['Persistent QR']
|
||||
QR.reset()
|
||||
else
|
||||
QR.close()
|
||||
if conf['Cooldown']
|
||||
cooldown = Date.now() + 30*SECOND
|
||||
$.set "cooldown/#{g.BOARD}", cooldown
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user