parent
60d23cf4d2
commit
f1fe3090fd
@ -1173,17 +1173,6 @@ input[name="Default Volume"] {
|
|||||||
-webkit-flex-direction: row;
|
-webkit-flex-direction: row;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
#url-button, #custom-cooldown-button, #dump-button {
|
|
||||||
width: 10%;
|
|
||||||
margin: 0;
|
|
||||||
margin-right: 4px;
|
|
||||||
font: 13px sans-serif;
|
|
||||||
padding: 1px 0px 2px;
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
#custom-cooldown-button.disabled {
|
|
||||||
opacity: 0.27;
|
|
||||||
}
|
|
||||||
.persona .field {
|
.persona .field {
|
||||||
-webkit-flex: 1;
|
-webkit-flex: 1;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@ -1208,6 +1197,7 @@ input.field.tripped:not(:hover):not(:focus) {
|
|||||||
#qr textarea {
|
#qr textarea {
|
||||||
resize: both;
|
resize: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Noscript Recaptcha */
|
/* Noscript Recaptcha */
|
||||||
.captcha-img {
|
.captcha-img {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
@ -1227,6 +1217,7 @@ input.field.tripped:not(:hover):not(:focus) {
|
|||||||
#qr-captcha-iframe {
|
#qr-captcha-iframe {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Recaptcha v2 */
|
/* Recaptcha v2 */
|
||||||
#qr .captcha-root {
|
#qr .captcha-root {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -1259,81 +1250,59 @@ input.field.tripped:not(:hover):not(:focus) {
|
|||||||
#qr textarea {
|
#qr textarea {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
}
|
}
|
||||||
#qr [type="submit"] {
|
|
||||||
width: 25%;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
:root.webkit #qr [type="submit"] {
|
|
||||||
height: 24px;
|
|
||||||
}
|
|
||||||
#qr label input[type="checkbox"] {
|
#qr label input[type="checkbox"] {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fake File Input */
|
/* Fake File Input */
|
||||||
|
#file-n-submit {
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
input#qr-filename {
|
input#qr-filename {
|
||||||
border: none !important;
|
border: none !important;
|
||||||
width: 80%;
|
|
||||||
padding: 0px 4px;
|
|
||||||
position: relative;
|
|
||||||
bottom: 1px;
|
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
input#qr-filename:not(.edit) {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
#qr-filename,
|
#qr-filename,
|
||||||
#qr-filesize,
|
|
||||||
.has-file #qr-no-file {
|
.has-file #qr-no-file {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#qr-no-file,
|
#qr-no-file,
|
||||||
.has-file #qr-filename,
|
.has-file #qr-filename {
|
||||||
.has-file #qr-filesize {
|
-webkit-flex: 1 1 auto;
|
||||||
|
flex: 1 1 auto;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 0 2px;
|
padding: 0px 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
vertical-align: top;
|
|
||||||
}
|
}
|
||||||
#qr-no-file {
|
#qr-no-file {
|
||||||
color: #AAA;
|
color: #AAA;
|
||||||
padding: 1px 4px;
|
|
||||||
}
|
|
||||||
#qr-filename-container {
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
width: 100px;
|
|
||||||
min-width: 74.6%;
|
|
||||||
max-width: 74.6%;
|
|
||||||
margin-right: 0.4%;
|
|
||||||
margin-top: 1px;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 2px 1px 0;
|
|
||||||
height: 22px;
|
|
||||||
}
|
|
||||||
#qr-filename-container:hover {
|
|
||||||
cursor: text;
|
|
||||||
}
|
|
||||||
#qr-extras-container {
|
|
||||||
position: absolute;
|
|
||||||
right: 0px;
|
|
||||||
}
|
|
||||||
#qr-filerm {
|
|
||||||
margin-right: 3px;
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
#file-n-submit {
|
|
||||||
height: 23px;
|
|
||||||
}
|
|
||||||
#file-n-submit:not(.custom-cooldown) #custom-cooldown-button {
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
#qr input[type="file"] {
|
#qr input[type="file"] {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* QR Icons */
|
||||||
|
#file-n-submit > a {
|
||||||
|
margin: 0;
|
||||||
|
margin-right: 4px;
|
||||||
|
font: 13px sans-serif;
|
||||||
|
}
|
||||||
|
#url-button, #custom-cooldown-button, #dump-button {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
#custom-cooldown-button.disabled {
|
||||||
|
opacity: 0.27;
|
||||||
|
}
|
||||||
|
#file-n-submit:not(.custom-cooldown) #custom-cooldown-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* Thread Select / Spoiler Label */
|
/* Thread Select / Spoiler Label */
|
||||||
#qr select[data-name="thread"] {
|
#qr select[data-name="thread"] {
|
||||||
float: right;
|
float: right;
|
||||||
@ -1349,14 +1318,11 @@ input#qr-filename:not(.edit) {
|
|||||||
#qr.has-spoiler #file-n-submit:not(.has-file) #qr-spoiler-label {
|
#qr.has-spoiler #file-n-submit:not(.has-file) #qr-spoiler-label {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#qr.has-spoiler .has-file #qr-filename-container {
|
|
||||||
max-width: 67.9%;
|
|
||||||
min-width: 67.9%;
|
|
||||||
}
|
|
||||||
#qr-spoiler-label input {
|
#qr-spoiler-label input {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dumping UI */
|
/* Dumping UI */
|
||||||
.dump #dump-list-container {
|
.dump #dump-list-container {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@ -23,16 +23,13 @@
|
|||||||
<a id=add-post href=javascript:; title="Add a post">+</a>
|
<a id=add-post href=javascript:; title="Add a post">+</a>
|
||||||
</div>
|
</div>
|
||||||
<div id=file-n-submit>
|
<div id=file-n-submit>
|
||||||
<span id=qr-filename-container class=field tabindex=0>
|
<input type="button" id="qr-file-button" value="Choose files">
|
||||||
<span id=qr-no-file>No selected file</span>
|
<span id="qr-no-file">No selected file</span>
|
||||||
<input id="qr-filename" data-name="filename" spellcheck="false">
|
<input id="qr-filename" data-name="filename" spellcheck="false">
|
||||||
<span id="qr-extras-container">
|
<a href="javascript:;" id="qr-filerm" title="Remove file"><i class="fa fa-times-circle"></i></a>
|
||||||
<a href="javascript:;" id="qr-filerm" title="Remove file"><i class="fa fa-times-circle"></i></a>
|
<a href="javascript:;" id="url-button" title="Post from url"><i class="fa fa-link"></i></a>
|
||||||
<a href="javascript:;" id="url-button" title="Post from url"><i class="fa fa-link"></i></a>
|
<a href="javascript:;" id="custom-cooldown-button" title="Toggle custom cooldown" class="disabled"><i class="fa fa-clock-o"></i></a>
|
||||||
<a href="javascript:;" id="custom-cooldown-button" title="Toggle custom cooldown" class="disabled"><i class="fa fa-clock-o"></i></a>
|
<a href="javascript:;" id="dump-button" title="Dump list"><i class="fa fa-plus-square"></i></a>
|
||||||
<a href="javascript:;" id="dump-button" title="Dump list"><i class="fa fa-plus-square"></i></a>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<label id=qr-spoiler-label>
|
<label id=qr-spoiler-label>
|
||||||
<input type=checkbox id=qr-file-spoiler title='Spoiler image'>
|
<input type=checkbox id=qr-file-spoiler title='Spoiler image'>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@ -426,15 +426,7 @@ QR =
|
|||||||
else
|
else
|
||||||
cb true, null
|
cb true, null
|
||||||
|
|
||||||
openFileInput: (e) ->
|
openFileInput: ->
|
||||||
e.stopPropagation()
|
|
||||||
if e.shiftKey and e.type is 'click'
|
|
||||||
return QR.selected.rmFile()
|
|
||||||
if (e.ctrlKey or e.metaKey) and e.type is 'click'
|
|
||||||
$.addClass QR.nodes.filename, 'edit'
|
|
||||||
QR.nodes.filename.focus()
|
|
||||||
return if e.target.nodeName is 'INPUT' or (e.keyCode and e.keyCode not in [32, 13]) or e.ctrlKey
|
|
||||||
e.preventDefault()
|
|
||||||
QR.nodes.fileInput.click()
|
QR.nodes.fileInput.click()
|
||||||
|
|
||||||
generatePostableThreadsList: ->
|
generatePostableThreadsList: ->
|
||||||
@ -481,10 +473,9 @@ QR =
|
|||||||
setNode 'addPost', '#add-post'
|
setNode 'addPost', '#add-post'
|
||||||
setNode 'charCount', '#char-count'
|
setNode 'charCount', '#char-count'
|
||||||
setNode 'fileSubmit', '#file-n-submit'
|
setNode 'fileSubmit', '#file-n-submit'
|
||||||
|
setNode 'fileButton', '#qr-file-button'
|
||||||
setNode 'filename', '#qr-filename'
|
setNode 'filename', '#qr-filename'
|
||||||
setNode 'fileContainer', '#qr-filename-container'
|
|
||||||
setNode 'fileRM', '#qr-filerm'
|
setNode 'fileRM', '#qr-filerm'
|
||||||
setNode 'fileExtras', '#qr-extras-container'
|
|
||||||
setNode 'spoiler', '#qr-file-spoiler'
|
setNode 'spoiler', '#qr-file-spoiler'
|
||||||
setNode 'spoilerPar', '#qr-spoiler-label'
|
setNode 'spoilerPar', '#qr-spoiler-label'
|
||||||
setNode 'status', '[type=submit]'
|
setNode 'status', '[type=submit]'
|
||||||
@ -550,17 +541,14 @@ QR =
|
|||||||
nodes.flashTag.dataset.default = '4'
|
nodes.flashTag.dataset.default = '4'
|
||||||
$.add nodes.form, nodes.flashTag
|
$.add nodes.form, nodes.flashTag
|
||||||
|
|
||||||
$.on nodes.filename.parentNode, 'click keydown', QR.openFileInput
|
$.on nodes.fileButton, 'click', QR.openFileInput
|
||||||
|
|
||||||
$.on nodes.autohide, 'change', QR.toggleHide
|
$.on nodes.autohide, 'change', QR.toggleHide
|
||||||
$.on nodes.close, 'click', QR.close
|
$.on nodes.close, 'click', QR.close
|
||||||
$.on nodes.dumpButton, 'click', -> nodes.el.classList.toggle 'dump'
|
$.on nodes.dumpButton, 'click', -> nodes.el.classList.toggle 'dump'
|
||||||
$.on nodes.urlButton, 'click', QR.handleUrl
|
$.on nodes.urlButton, 'click', QR.handleUrl
|
||||||
$.on nodes.addPost, 'click', -> new QR.post true
|
$.on nodes.addPost, 'click', -> new QR.post true
|
||||||
$.on nodes.form, 'submit', QR.submit
|
$.on nodes.form, 'submit', QR.submit
|
||||||
$.on nodes.filename, 'blur', -> $.rmClass @, 'edit'
|
|
||||||
$.on nodes.fileRM, 'click', -> QR.selected.rmFile()
|
$.on nodes.fileRM, 'click', -> QR.selected.rmFile()
|
||||||
$.on nodes.fileExtras, 'click', (e) -> e.stopPropagation()
|
|
||||||
$.on nodes.spoiler, 'change', -> QR.selected.nodes.spoiler.click()
|
$.on nodes.spoiler, 'change', -> QR.selected.nodes.spoiler.click()
|
||||||
$.on nodes.fileInput, 'change', QR.handleFiles
|
$.on nodes.fileInput, 'change', QR.handleFiles
|
||||||
$.on nodes.customCooldown, 'click', QR.toggleCustomCooldown
|
$.on nodes.customCooldown, 'click', QR.toggleCustomCooldown
|
||||||
|
|||||||
@ -206,17 +206,17 @@ QR.post = class
|
|||||||
delete @filename
|
delete @filename
|
||||||
delete @filesize
|
delete @filesize
|
||||||
@nodes.el.title = null
|
@nodes.el.title = null
|
||||||
QR.nodes.fileContainer.title = ''
|
QR.nodes.filename.title = ''
|
||||||
@nodes.el.style.backgroundImage = null
|
@nodes.el.style.backgroundImage = null
|
||||||
@nodes.label.hidden = true if QR.spoiler
|
@nodes.label.hidden = true if QR.spoiler
|
||||||
@showFileData()
|
@showFileData()
|
||||||
URL.revokeObjectURL @URL
|
URL.revokeObjectURL @URL
|
||||||
|
|
||||||
updateFilename: ->
|
updateFilename: ->
|
||||||
long = "#{@filename} (#{@filesize})\nCtrl/\u2318+click to edit filename. Shift+click to clear."
|
long = "#{@filename} (#{@filesize})"
|
||||||
@nodes.el.title = long
|
@nodes.el.title = long
|
||||||
return unless @ is QR.selected
|
return unless @ is QR.selected
|
||||||
QR.nodes.fileContainer.title = long
|
QR.nodes.filename.title = long
|
||||||
|
|
||||||
showFileData: ->
|
showFileData: ->
|
||||||
if @file
|
if @file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user