Why? Because I can.
This commit is contained in:
parent
a420859a97
commit
92ffb4ff8c
@ -204,7 +204,8 @@
|
||||
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
||||
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
|
||||
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
|
||||
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.']
|
||||
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'],
|
||||
'Dump List Before Comment': [false, 'Position of the QR\'s Dump List.']
|
||||
},
|
||||
'Quote Links': {
|
||||
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
||||
@ -8043,7 +8044,7 @@
|
||||
title: 'Verification',
|
||||
autocomplete: 'off',
|
||||
spellcheck: false,
|
||||
tabIndex: 55
|
||||
tabIndex: 45
|
||||
});
|
||||
this.nodes = {
|
||||
challenge: $.id('recaptcha_challenge_field_holder'),
|
||||
@ -8072,7 +8073,7 @@
|
||||
$.on(input, 'blur', QR.focusout);
|
||||
$.on(input, 'focus', QR.focusin);
|
||||
$.addClass(QR.nodes.el, 'has-captcha');
|
||||
return $.after(QR.nodes.dumpList.parentElement, [imgContainer, input]);
|
||||
return $.after(QR.nodes.com.parentElement, [imgContainer, input]);
|
||||
},
|
||||
sync: function(captchas) {
|
||||
QR.captcha.captchas = captchas;
|
||||
@ -8183,45 +8184,46 @@
|
||||
}
|
||||
},
|
||||
dialog: function() {
|
||||
var dialog, elm, mimeTypes, name, nodes, thread, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
|
||||
var check, dialog, elm, key, mimeTypes, name, nodes, thread, value, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3;
|
||||
|
||||
dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>");
|
||||
QR.nodes = nodes = {
|
||||
el: dialog,
|
||||
move: $('.move', dialog),
|
||||
autohide: $('#autohide', dialog),
|
||||
thread: $('select', dialog),
|
||||
threadPar: $('#qr-thread-select', 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),
|
||||
dumpList: $('#dump-list', dialog),
|
||||
addPost: $('#add-post', dialog),
|
||||
charCount: $('#char-count', dialog),
|
||||
fileSubmit: $('#file-n-submit', dialog),
|
||||
filename: $('#qr-filename', dialog),
|
||||
fileRM: $('#qr-filerm', dialog),
|
||||
fileExtras: $('#qr-extras-container', dialog),
|
||||
spoiler: $('#qr-file-spoiler', dialog),
|
||||
spoilerPar: $('#qr-spoiler-label', dialog),
|
||||
status: $('[type=submit]', dialog),
|
||||
fileInput: $('[type=file]', dialog)
|
||||
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
||||
};
|
||||
_ref = {
|
||||
move: '.move',
|
||||
autohide: '#autohide',
|
||||
thread: 'select',
|
||||
threadPar: '#qr-thread-select',
|
||||
close: '.close',
|
||||
form: 'form',
|
||||
dumpButton: '#dump-button',
|
||||
name: '[data-name=name]',
|
||||
email: '[data-name=email]',
|
||||
sub: '[data-name=sub]',
|
||||
com: '[data-name=com]',
|
||||
dumpList: '#dump-list',
|
||||
addPost: '#add-post',
|
||||
charCount: '#char-count',
|
||||
fileSubmit: '#file-n-submit',
|
||||
filename: '#qr-filename',
|
||||
fileRM: '#qr-filerm',
|
||||
fileExtras: '#qr-extras-container',
|
||||
spoiler: '#qr-file-spoiler',
|
||||
spoilerPar: '#qr-spoiler-label',
|
||||
status: '[type=submit]',
|
||||
fileInput: '[type=file]'
|
||||
};
|
||||
for (key in _ref) {
|
||||
value = _ref[key];
|
||||
nodes[key] = $(value, dialog);
|
||||
}
|
||||
check = {
|
||||
jpg: 'image/jpeg',
|
||||
pdf: 'application/pdf',
|
||||
swf: 'application/x-shockwave-flash'
|
||||
};
|
||||
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) {
|
||||
switch (type) {
|
||||
case 'jpg':
|
||||
return 'image/jpeg';
|
||||
case 'pdf':
|
||||
return 'application/pdf';
|
||||
case 'swf':
|
||||
return 'application/x-shockwave-flash';
|
||||
default:
|
||||
return "image/" + type;
|
||||
}
|
||||
return check[type] || ("image/" + type);
|
||||
});
|
||||
QR.mimeTypes = mimeTypes.split(', ');
|
||||
QR.mimeTypes.push('');
|
||||
@ -8232,6 +8234,10 @@
|
||||
} else {
|
||||
nodes.spoiler.parentElement.hidden = true;
|
||||
}
|
||||
if (Conf['Dump List Before Comment']) {
|
||||
$.after(nodes.name.parentElement, nodes.dumpList.parentElement);
|
||||
nodes.addPost.tabIndex = 35;
|
||||
}
|
||||
if (g.BOARD.ID === 'f') {
|
||||
nodes.flashTag = $.el('select', {
|
||||
name: 'filetag',
|
||||
@ -8246,9 +8252,9 @@
|
||||
}));
|
||||
}
|
||||
$.on(nodes.filename.parentNode, 'click keyup', QR.openFileInput);
|
||||
_ref = $$('*', QR.nodes.el);
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
elm = _ref[_i];
|
||||
_ref1 = $$('*', QR.nodes.el);
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
elm = _ref1[_i];
|
||||
$.on(elm, 'blur', QR.focusout);
|
||||
$.on(elm, 'focus', QR.focusin);
|
||||
}
|
||||
@ -8273,14 +8279,14 @@
|
||||
return QR.selected.nodes.spoiler.click();
|
||||
});
|
||||
$.on(nodes.fileInput, 'change', QR.fileInput);
|
||||
_ref1 = ['spoilerPar', 'dumpButton', 'fileRM'];
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
name = _ref1[_j];
|
||||
_ref2 = ['spoilerPar', 'dumpButton', 'fileRM'];
|
||||
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
|
||||
name = _ref2[_j];
|
||||
$.on(nodes[name], 'mouseover', QR.mouseover);
|
||||
}
|
||||
_ref2 = ['name', 'email', 'sub', 'com'];
|
||||
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
|
||||
name = _ref2[_k];
|
||||
_ref3 = ['name', 'email', 'sub', 'com'];
|
||||
for (_k = 0, _len2 = _ref3.length; _k < _len2; _k++) {
|
||||
name = _ref3[_k];
|
||||
$.on(nodes[name], 'input', function() {
|
||||
return QR.selected.save(this);
|
||||
});
|
||||
|
||||
@ -187,7 +187,8 @@
|
||||
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
||||
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.'],
|
||||
'Posting Success Notifications': [true, 'Show notifications on successful post creation or file uploading.'],
|
||||
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.']
|
||||
'Captcha Warning Notifications': [true, 'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'],
|
||||
'Dump List Before Comment': [false, 'Position of the QR\'s Dump List.']
|
||||
},
|
||||
'Quote Links': {
|
||||
'Quote Backlinks': [true, 'Add quote backlinks.'],
|
||||
@ -8045,7 +8046,7 @@
|
||||
title: 'Verification',
|
||||
autocomplete: 'off',
|
||||
spellcheck: false,
|
||||
tabIndex: 55
|
||||
tabIndex: 45
|
||||
});
|
||||
this.nodes = {
|
||||
challenge: $.id('recaptcha_challenge_field_holder'),
|
||||
@ -8072,7 +8073,7 @@
|
||||
$.sync('captchas', this.sync);
|
||||
this.reload();
|
||||
$.addClass(QR.nodes.el, 'has-captcha');
|
||||
return $.after(QR.nodes.dumpList.parentElement, [imgContainer, input]);
|
||||
return $.after(QR.nodes.com.parentElement, [imgContainer, input]);
|
||||
},
|
||||
sync: function(captchas) {
|
||||
QR.captcha.captchas = captchas;
|
||||
@ -8183,45 +8184,46 @@
|
||||
}
|
||||
},
|
||||
dialog: function() {
|
||||
var dialog, mimeTypes, name, nodes, thread, _i, _j, _len, _len1, _ref, _ref1;
|
||||
var check, dialog, key, mimeTypes, name, nodes, thread, value, _i, _j, _len, _len1, _ref, _ref1, _ref2;
|
||||
|
||||
dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>");
|
||||
QR.nodes = nodes = {
|
||||
el: dialog,
|
||||
move: $('.move', dialog),
|
||||
autohide: $('#autohide', dialog),
|
||||
thread: $('select', dialog),
|
||||
threadPar: $('#qr-thread-select', 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),
|
||||
dumpList: $('#dump-list', dialog),
|
||||
addPost: $('#add-post', dialog),
|
||||
charCount: $('#char-count', dialog),
|
||||
fileSubmit: $('#file-n-submit', dialog),
|
||||
filename: $('#qr-filename', dialog),
|
||||
fileRM: $('#qr-filerm', dialog),
|
||||
fileExtras: $('#qr-extras-container', dialog),
|
||||
spoiler: $('#qr-file-spoiler', dialog),
|
||||
spoilerPar: $('#qr-spoiler-label', dialog),
|
||||
status: $('[type=submit]', dialog),
|
||||
fileInput: $('[type=file]', dialog)
|
||||
el: dialog = UI.dialog('qr', 'top:0;right:0;', "<div id=qrtab class=move><input type=checkbox id=autohide title=Auto-hide><div id=qr-thread-select><select data-name=thread title='Create a new thread / Reply'><option value=new>New thread</option></select></div><a href=javascript:; class=close title=Close>✖</a></div><form><div class=persona><input name=name data-name=name list=\"list-name\" placeholder=Name class=field size=1 tabindex=10><input name=email data-name=email list=\"list-email\" placeholder=E-mail class=field size=1 tabindex=20><input name=sub data-name=sub list=\"list-sub\" placeholder=Subject class=field size=1 tabindex=30></div><div class=textarea><textarea data-name=com placeholder=Comment class=field tabindex=40></textarea><span id=char-count></span></div><div id=dump-list-container><div id=dump-list></div><a id=add-post href=javascript:; title=\"Add a post\" tabindex=50>+</a></div><div id=file-n-submit><span id=qr-filename-container class=field tabindex=60><span id=qr-no-file>No selected file</span><span id=qr-filename></span><span id=qr-extras-container><label id=qr-spoiler-label><input type=checkbox id=qr-file-spoiler title='Spoiler image' tabindex=70></label><span class=description>Spoiler</span><a id=dump-button title='Dump list'>+</a><span class=description>Dump</span><a id=qr-filerm href=javascript:; title='Remove file'>✖</a><span class=description>Remove File</span></span></span><input type=submit tabindex=80></div><input type=file multiple></form><datalist id=\"list-name\"></datalist><datalist id=\"list-email\"></datalist><datalist id=\"list-sub\"></datalist>")
|
||||
};
|
||||
_ref = {
|
||||
move: '.move',
|
||||
autohide: '#autohide',
|
||||
thread: 'select',
|
||||
threadPar: '#qr-thread-select',
|
||||
close: '.close',
|
||||
form: 'form',
|
||||
dumpButton: '#dump-button',
|
||||
name: '[data-name=name]',
|
||||
email: '[data-name=email]',
|
||||
sub: '[data-name=sub]',
|
||||
com: '[data-name=com]',
|
||||
dumpList: '#dump-list',
|
||||
addPost: '#add-post',
|
||||
charCount: '#char-count',
|
||||
fileSubmit: '#file-n-submit',
|
||||
filename: '#qr-filename',
|
||||
fileRM: '#qr-filerm',
|
||||
fileExtras: '#qr-extras-container',
|
||||
spoiler: '#qr-file-spoiler',
|
||||
spoilerPar: '#qr-spoiler-label',
|
||||
status: '[type=submit]',
|
||||
fileInput: '[type=file]'
|
||||
};
|
||||
for (key in _ref) {
|
||||
value = _ref[key];
|
||||
nodes[key] = $(value, dialog);
|
||||
}
|
||||
check = {
|
||||
jpg: 'image/jpeg',
|
||||
pdf: 'application/pdf',
|
||||
swf: 'application/x-shockwave-flash'
|
||||
};
|
||||
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace(/\w+/g, function(type) {
|
||||
switch (type) {
|
||||
case 'jpg':
|
||||
return 'image/jpeg';
|
||||
case 'pdf':
|
||||
return 'application/pdf';
|
||||
case 'swf':
|
||||
return 'application/x-shockwave-flash';
|
||||
default:
|
||||
return "image/" + type;
|
||||
}
|
||||
return check[type] || ("image/" + type);
|
||||
});
|
||||
QR.mimeTypes = mimeTypes.split(', ');
|
||||
QR.mimeTypes.push('');
|
||||
@ -8232,6 +8234,10 @@
|
||||
} else {
|
||||
nodes.spoiler.parentElement.hidden = true;
|
||||
}
|
||||
if (Conf['Dump List Before Comment']) {
|
||||
$.after(nodes.name.parentElement, nodes.dumpList.parentElement);
|
||||
nodes.addPost.tabIndex = 35;
|
||||
}
|
||||
if (g.BOARD.ID === 'f') {
|
||||
nodes.flashTag = $.el('select', {
|
||||
name: 'filetag',
|
||||
@ -8267,14 +8273,14 @@
|
||||
return QR.selected.nodes.spoiler.click();
|
||||
});
|
||||
$.on(nodes.fileInput, 'change', QR.fileInput);
|
||||
_ref = ['spoilerPar', 'dumpButton', 'fileRM'];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
name = _ref[_i];
|
||||
_ref1 = ['spoilerPar', 'dumpButton', 'fileRM'];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
name = _ref1[_i];
|
||||
$.on(nodes[name], 'mouseover', QR.mouseover);
|
||||
}
|
||||
_ref1 = ['name', 'email', 'sub', 'com'];
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
name = _ref1[_j];
|
||||
_ref2 = ['name', 'email', 'sub', 'com'];
|
||||
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
|
||||
name = _ref2[_j];
|
||||
$.on(nodes[name], 'input', function() {
|
||||
return QR.selected.save(this);
|
||||
});
|
||||
|
||||
@ -297,6 +297,10 @@ Config =
|
||||
true
|
||||
'When disabled, shows a red border on the CAPTCHA input until a key is pressed instead of a notification.'
|
||||
]
|
||||
'Dump List Before Comment': [
|
||||
false
|
||||
'Position of the QR\'s Dump List.'
|
||||
]
|
||||
|
||||
'Quote Links':
|
||||
'Quote Backlinks': [
|
||||
|
||||
@ -45,8 +45,8 @@ QR =
|
||||
initReady: ->
|
||||
QR.postingIsEnabled = !!$.id 'postForm'
|
||||
unless QR.postingIsEnabled
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
$.on d, 'QRGetSelectedPost', ({detail: cb}) ->
|
||||
cb QR.selected
|
||||
$.on d, 'QRAddPreSubmitHook', ({detail: cb}) ->
|
||||
@ -757,7 +757,7 @@ QR =
|
||||
title: 'Verification'
|
||||
autocomplete: 'off'
|
||||
spellcheck: false
|
||||
tabIndex: 55
|
||||
tabIndex: 45
|
||||
@nodes =
|
||||
challenge: $.id 'recaptcha_challenge_field_holder'
|
||||
img: imgContainer.firstChild
|
||||
@ -785,7 +785,7 @@ QR =
|
||||
<% } %>
|
||||
|
||||
$.addClass QR.nodes.el, 'has-captcha'
|
||||
$.after QR.nodes.dumpList.parentElement, [imgContainer, input]
|
||||
$.after QR.nodes.com.parentElement, [imgContainer, input]
|
||||
|
||||
sync: (captchas) ->
|
||||
QR.captcha.captchas = captchas
|
||||
@ -864,46 +864,44 @@ QR =
|
||||
e.preventDefault()
|
||||
|
||||
dialog: ->
|
||||
dialog = UI.dialog 'qr', 'top:0;right:0;', """
|
||||
<%= grunt.file.read('src/General/html/Features/QuickReply.html').replace(/>\s+</g, '><').trim() %>
|
||||
"""
|
||||
|
||||
QR.nodes = nodes =
|
||||
el: dialog
|
||||
move: $ '.move', dialog
|
||||
autohide: $ '#autohide', dialog
|
||||
thread: $ 'select', dialog
|
||||
threadPar: $ '#qr-thread-select', 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
|
||||
dumpList: $ '#dump-list', dialog
|
||||
addPost: $ '#add-post', dialog
|
||||
charCount: $ '#char-count', dialog
|
||||
fileSubmit: $ '#file-n-submit', dialog
|
||||
filename: $ '#qr-filename', dialog
|
||||
fileRM: $ '#qr-filerm', dialog
|
||||
fileExtras: $ '#qr-extras-container', dialog
|
||||
spoiler: $ '#qr-file-spoiler', dialog
|
||||
spoilerPar: $ '#qr-spoiler-label', dialog
|
||||
status: $ '[type=submit]', dialog
|
||||
fileInput: $ '[type=file]', dialog
|
||||
el:
|
||||
dialog = UI.dialog 'qr', 'top:0;right:0;', """<%= grunt.file.read('src/General/html/Features/QuickReply.html').replace(/>\s+</g, '><').trim() %>"""
|
||||
|
||||
nodes[key] = $ value, dialog for key, value of {
|
||||
move: '.move'
|
||||
autohide: '#autohide'
|
||||
thread: 'select'
|
||||
threadPar: '#qr-thread-select'
|
||||
close: '.close'
|
||||
form: 'form'
|
||||
dumpButton: '#dump-button'
|
||||
name: '[data-name=name]'
|
||||
email: '[data-name=email]'
|
||||
sub: '[data-name=sub]'
|
||||
com: '[data-name=com]'
|
||||
dumpList: '#dump-list'
|
||||
addPost: '#add-post'
|
||||
charCount: '#char-count'
|
||||
fileSubmit: '#file-n-submit'
|
||||
filename: '#qr-filename'
|
||||
fileRM: '#qr-filerm'
|
||||
fileExtras: '#qr-extras-container'
|
||||
spoiler: '#qr-file-spoiler'
|
||||
spoilerPar: '#qr-spoiler-label'
|
||||
status: '[type=submit]'
|
||||
fileInput: '[type=file]'
|
||||
}
|
||||
|
||||
check =
|
||||
jpg: 'image/jpeg'
|
||||
pdf: 'application/pdf'
|
||||
swf: 'application/x-shockwave-flash'
|
||||
|
||||
# Allow only this board's supported files.
|
||||
mimeTypes = $('ul.rules > li').textContent.trim().match(/: (.+)/)[1].toLowerCase().replace /\w+/g, (type) ->
|
||||
switch type
|
||||
when 'jpg'
|
||||
'image/jpeg'
|
||||
when 'pdf'
|
||||
'application/pdf'
|
||||
when 'swf'
|
||||
'application/x-shockwave-flash'
|
||||
else
|
||||
"image/#{type}"
|
||||
check[type] or "image/#{type}"
|
||||
|
||||
QR.mimeTypes = mimeTypes.split ', '
|
||||
# Add empty mimeType to avoid errors with URLs selected in Window's file dialog.
|
||||
QR.mimeTypes.push ''
|
||||
@ -915,6 +913,10 @@ QR =
|
||||
else
|
||||
nodes.spoiler.parentElement.hidden = true
|
||||
|
||||
if Conf['Dump List Before Comment']
|
||||
$.after nodes.name.parentElement, nodes.dumpList.parentElement
|
||||
nodes.addPost.tabIndex = 35
|
||||
|
||||
if g.BOARD.ID is 'f'
|
||||
nodes.flashTag = $.el 'select',
|
||||
name: 'filetag'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user