Fix tabbing in the comment with Peristent QR enabled and no pass. #932

There was a conflict with 4chan's extension.
This commit is contained in:
Nicolas Stepien 2013-02-25 03:15:55 +01:00
parent abfdd2cb2b
commit 0c4eaed642
2 changed files with 26 additions and 26 deletions

View File

@ -6179,7 +6179,7 @@
_Class.prototype.save = function(input) {
var value, _ref;
value = input.value;
this[input.name] = value;
this[input.dataset.name] = value;
if (input.nodeName !== 'TEXTAREA') {
return;
}
@ -6408,7 +6408,7 @@
},
dialog: function() {
var dialog, key, mimeTypes, name, nodes, thread, threads, _i, _len, _ref, _ref1;
dialog = UI.dialog('qr', 'top:0;right:0;', "<div>\n <input type=checkbox id=autohide title=Auto-hide>\n <span class=move></span>\n <a href=javascript:; class=close title=Close>×</a>\n</div>\n<form>\n <div class=persona>\n <input id=dump-button type=button title='Dump list' value=+>\n <input name=name title=Name placeholder=Name class=field size=1>\n <input name=email title=E-mail placeholder=E-mail class=field size=1>\n <input name=sub title=Subject placeholder=Subject class=field size=1>\n </div>\n <div id=dump-list>\n <div id=dump-list-container>\n <a id=addReply href=javascript:; title=\"Add a reply\">+</a>\n </div>\n </div>\n <div class=textarea>\n <textarea name=com title=Comment placeholder=Comment class=field></textarea>\n <span id=charCount></span>\n </div>\n <div>\n <input type=file title=\"Shift+Click to remove the selected file.\" multiple size=16>\n <input type=submit>\n </div>\n <label id=spoilerLabel><input type=checkbox id=spoiler> Spoiler Image</label>\n</form>".replace(/>\s+</g, '><'));
dialog = UI.dialog('qr', 'top:0;right:0;', "<div>\n <input type=checkbox id=autohide title=Auto-hide>\n <span class=move></span>\n <a href=javascript:; class=close title=Close>×</a>\n</div>\n<form>\n <div class=persona>\n <input id=dump-button type=button title='Dump list' value=+>\n <input data-name=name title=Name placeholder=Name class=field size=1>\n <input data-name=email title=E-mail placeholder=E-mail class=field size=1>\n <input data-name=sub title=Subject placeholder=Subject class=field size=1>\n </div>\n <div id=dump-list>\n <div id=dump-list-container>\n <a id=addReply href=javascript:; title=\"Add a reply\">+</a>\n </div>\n </div>\n <div class=textarea>\n <textarea data-name=com title=Comment placeholder=Comment class=field></textarea>\n <span id=charCount></span>\n </div>\n <div>\n <input type=file title=\"Shift+Click to remove the selected file.\" multiple size=16>\n <input type=submit>\n </div>\n <label id=spoilerLabel><input type=checkbox id=spoiler> Spoiler Image</label>\n</form>".replace(/>\s+</g, '><'));
QR.nodes = nodes = {
el: dialog,
move: $('.move', dialog),
@ -6416,10 +6416,10 @@
close: $('.close', dialog),
form: $('form', dialog),
dumpButton: $('#dump-button', dialog),
name: $('[name=name]', dialog),
email: $('[name=email]', dialog),
sub: $('[name=sub]', dialog),
com: $('[name=com]', dialog),
name: $('[data-name=name]', dialog),
email: $('[data-name=email]', dialog),
sub: $('[data-name=sub]', dialog),
com: $('[data-name=com]', dialog),
addReply: $('#addReply', dialog),
charCount: $('#charCount', dialog),
fileInput: $('[type=file]', dialog),

View File

@ -449,7 +449,7 @@ QR =
QR.nodes.spoiler.checked = @spoiler
save: (input) ->
{value} = input
@[input.name] = value
@[input.dataset.name] = value
return if input.nodeName isnt 'TEXTAREA'
@nodes.span.textContent = value
QR.characterCount()
@ -610,9 +610,9 @@ QR =
<form>
<div class=persona>
<input id=dump-button type=button title='Dump list' value=+>
<input name=name title=Name placeholder=Name class=field size=1>
<input name=email title=E-mail placeholder=E-mail class=field size=1>
<input name=sub title=Subject placeholder=Subject class=field size=1>
<input data-name=name title=Name placeholder=Name class=field size=1>
<input data-name=email title=E-mail placeholder=E-mail class=field size=1>
<input data-name=sub title=Subject placeholder=Subject class=field size=1>
</div>
<div id=dump-list>
<div id=dump-list-container>
@ -620,7 +620,7 @@ QR =
</div>
</div>
<div class=textarea>
<textarea name=com title=Comment placeholder=Comment class=field></textarea>
<textarea data-name=com title=Comment placeholder=Comment class=field></textarea>
<span id=charCount></span>
</div>
<div>
@ -632,21 +632,21 @@ QR =
""".replace />\s+</g, '><' # get rid of spaces between elements
QR.nodes = nodes =
el: dialog
move: $ '.move', dialog
autohide: $ '#autohide', dialog
close: $ '.close', dialog
form: $ 'form', dialog
dumpButton: $ '#dump-button', dialog
name: $ '[name=name]', dialog
email: $ '[name=email]', dialog
sub: $ '[name=sub]', dialog
com: $ '[name=com]', dialog
addReply: $ '#addReply', dialog
charCount: $ '#charCount', dialog
fileInput: $ '[type=file]', dialog
spoiler: $ '#spoiler', dialog
status: $ '[type=submit]', dialog
el: dialog
move: $ '.move', dialog
autohide: $ '#autohide', dialog
close: $ '.close', dialog
form: $ 'form', dialog
dumpButton: $ '#dump-button', dialog
name: $ '[data-name=name]', dialog
email: $ '[data-name=email]', dialog
sub: $ '[data-name=sub]', dialog
com: $ '[data-name=com]', dialog
addReply: $ '#addReply', dialog
charCount: $ '#charCount', dialog
fileInput: $ '[type=file]', dialog
spoiler: $ '#spoiler', dialog
status: $ '[type=submit]', dialog
# Allow only this board's supported files.
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->