This commit is contained in:
James Campos 2011-09-02 23:46:13 -07:00
parent ebcfc8e7b0
commit d751784a14
2 changed files with 11 additions and 2 deletions

View File

@ -1255,6 +1255,7 @@
}
});
QR.accept = "'" + accept + "'";
QR.spoiler = $('.postarea label') ? ' <label>[<input type=checkbox name=spoiler>Spoiler Image?]</label>' : '';
if (conf['Persistent QR']) {
QR.dialog();
if (conf['Auto Hide QR']) {
@ -1370,7 +1371,7 @@
QR.el = el = ui.dialog('qr', {
top: '0',
left: '0'
}, " <a class=close title=close>X</a><input type=checkbox id=autohide title=autohide> <div class=move><input placeholder=Name name=name form=qr_form>Quick Reply</div> <form enctype=multipart/form-data method=post action=http://sys.4chan.org/" + g.BOARD + "/post target=iframe id=qr_form> <input type=hidden name=resto value=" + g.THREAD_ID + "> <input type=hidden name=mode value=regist> <input type=hidden name=recaptcha_challenge_field id=challenge> <input type=hidden name=recaptcha_response_field id=response> <div><input placeholder=Email name=email></div> <div><input placeholder=Subject name=sub><button>Submit</button><label>auto<input id=auto type=checkbox></label></div> <div><textarea placeholder=Comment name=com>" + text + "</textarea></div> <div><img src=http://www.google.com/recaptcha/api/image?c=" + QR.captcha.challenge + "></div> <div><input placeholder=Verification autocomplete=off id=recaptcha_response_field><span id=cl>" + ($.get('captchas', []).length) + " captchas</span></div> <div><input name=upfile type=file accept=" + QR.accept + "></div> </form> <div id=files></div> <div><input placeholder=Password name=pwd type=password><a id=attach>attach another file</a></div> <a class=error></a> ");
}, " <a class=close title=close>X</a><input type=checkbox id=autohide title=autohide> <div class=move><input placeholder=Name name=name form=qr_form>Quick Reply</div> <form enctype=multipart/form-data method=post action=http://sys.4chan.org/" + g.BOARD + "/post target=iframe id=qr_form> <input type=hidden name=resto value=" + g.THREAD_ID + "> <input type=hidden name=mode value=regist> <input type=hidden name=recaptcha_challenge_field id=challenge> <input type=hidden name=recaptcha_response_field id=response> <div><input placeholder=Email name=email>" + QR.spoiler + "</div> <div><input placeholder=Subject name=sub><button>Submit</button><label>auto<input id=auto type=checkbox></label></div> <div><textarea placeholder=Comment name=com>" + text + "</textarea></div> <div><img src=http://www.google.com/recaptcha/api/image?c=" + QR.captcha.challenge + "></div> <div><input placeholder=Verification autocomplete=off id=recaptcha_response_field><span id=cl>" + ($.get('captchas', []).length) + " captchas</span></div> <div><input name=upfile type=file accept=" + QR.accept + "></div> </form> <div id=files></div> <div><input placeholder=Password name=pwd type=password><a id=attach>attach another file</a></div> <a class=error></a> ");
if (conf['Cooldown']) {
QR.cooldown;
}
@ -1439,6 +1440,12 @@
}
},
reset: function() {
var _ref;
if (!conf['Remember Spoiler']) {
if ((_ref = $('[name=spoiler]', QR.el)) != null) {
_ref.checked = false;
}
}
$('textarea', QR.el).value = '';
return QR.attachNext();
},

View File

@ -984,6 +984,7 @@ QR =
else
'image/' + type
QR.accept = "'#{accept}'"
QR.spoiler = if $('.postarea label') then ' <label>[<input type=checkbox name=spoiler>Spoiler Image?]</label>' else ''
if conf['Persistent QR']
QR.dialog()
if conf['Auto Hide QR']
@ -1065,7 +1066,7 @@ QR =
<input type=hidden name=mode value=regist>
<input type=hidden name=recaptcha_challenge_field id=challenge>
<input type=hidden name=recaptcha_response_field id=response>
<div><input placeholder=Email name=email></div>
<div><input placeholder=Email name=email>#{QR.spoiler}</div>
<div><input placeholder=Subject name=sub><button>Submit</button><label>auto<input id=auto type=checkbox></label></div>
<div><textarea placeholder=Comment name=com>#{text}</textarea></div>
<div><img src=http://www.google.com/recaptcha/api/image?c=#{QR.captcha.challenge}></div>
@ -1126,6 +1127,7 @@ QR =
$.set "cooldown/#{g.BOARD}", cooldown
QR.cooldown()
reset: ->
$('[name=spoiler]', QR.el)?.checked = false unless conf['Remember Spoiler']
$('textarea', QR.el).value = ''
QR.attachNext()
submit: (e) ->