Merge pull request #246 from seaweedchan/v3

Style and bug fixes
This commit is contained in:
Zixaphir 2013-04-18 22:23:59 -07:00
commit 97425be455
8 changed files with 84 additions and 48 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -178,7 +178,7 @@ Header =
(if hide then $.addClass else $.rmClass) Header.nav, 'autohide' (if hide then $.addClass else $.rmClass) Header.nav, 'autohide'
hashScroll: -> hashScroll: ->
return unless post = $.id @location.hash[1..] return unless post = @location.hash[1..]
return if (Get.postFromRoot post).isHidden return if (Get.postFromRoot post).isHidden
Header.scrollToPost post Header.scrollToPost post

View File

@ -132,6 +132,7 @@ Keybinds =
if quote if quote
QR.quote.call $ 'input', $('.post.highlight', thread) or thread QR.quote.call $ 'input', $('.post.highlight', thread) or thread
QR.nodes.com.focus() QR.nodes.com.focus()
$.rmClass $('.qr-shortcut'), 'disabled'
tags: (tag, ta) -> tags: (tag, ta) ->
value = ta.value value = ta.value

View File

@ -79,6 +79,7 @@ QR =
QR.cleanNotifications() QR.cleanNotifications()
d.activeElement.blur() d.activeElement.blur()
$.rmClass QR.nodes.el, 'dump' $.rmClass QR.nodes.el, 'dump'
$.toggleClass $('.qr-shortcut'), 'disabled'
for i in QR.posts for i in QR.posts
QR.posts[0].rm() QR.posts[0].rm()
QR.cooldown.auto = false QR.cooldown.auto = false
@ -293,6 +294,8 @@ QR =
QR.selected.save com QR.selected.save com
QR.selected.save thread QR.selected.save thread
$.rmClass $('.qr-shortcut'), 'disabled'
characterCount: -> characterCount: ->
counter = QR.nodes.charCount counter = QR.nodes.charCount
count = QR.nodes.com.textLength count = QR.nodes.com.textLength
@ -727,7 +730,10 @@ QR =
dialog: -> dialog: ->
dialog = UI.dialog 'qr', 'top:0;right:0;', """ dialog = UI.dialog 'qr', 'top:0;right:0;', """
<div class=move> <div class=move>
<input type=checkbox id=autohide title=Auto-hide> <label>
<input type=checkbox id=autohide title=Auto-hide>
Quick Reply
</label>
<a href=javascript:; class=close title=Close>×</a> <a href=javascript:; class=close title=Close>×</a>
<select data-name=thread title='Create a new thread / Reply'> <select data-name=thread title='Create a new thread / Reply'>
<option value=new>New thread</option> <option value=new>New thread</option>
@ -752,8 +758,8 @@ QR =
<span id=qr-filename-container class=field tabindex=60> <span id=qr-filename-container class=field tabindex=60>
<span id=qr-no-file>No selected file</span> <span id=qr-no-file>No selected file</span>
<span id=qr-filename></span> <span id=qr-filename></span>
<a id=qr-filerm href=javascript:; title='Remove file' tabindex=80>×</a>
</span> </span>
<a id=qr-filerm href=javascript:; title='Remove file' tabindex=80>×</a>
<input type=submit tabindex=70> <input type=submit tabindex=70>
</div> </div>
<input type=file multiple> <input type=file multiple>

View File

@ -20,6 +20,8 @@
.field::-moz-placeholder, .field::-moz-placeholder,
.field:hover::-moz-placeholder { .field:hover::-moz-placeholder {
color: #AAA !important; color: #AAA !important;
font-size: 13px !important;
opacity: 1.0 !important;
} }
.captch-img:hover, .captch-img:hover,
.field:hover { .field:hover {
@ -49,8 +51,6 @@ a[href="javascript:;"] {
/* 4chan style fixes */ /* 4chan style fixes */
.opContainer, .op { .opContainer, .op {
display: block !important; display: block !important;
}
.post {
overflow: visible !important; overflow: visible !important;
} }
[hidden] { [hidden] {
@ -63,10 +63,12 @@ a[href="javascript:;"] {
#qp, #ihover, #qp, #ihover,
#updater, #thread-stats, #updater, #thread-stats,
#navlinks, .fixed #boardNavDesktop, #navlinks, .fixed #boardNavDesktop,
#watcher,
#qr { #qr {
position: fixed; position: fixed;
} }
#watcher {
position: absolute;
}
#fourchanx-settings { #fourchanx-settings {
z-index: 999; z-index: 999;
} }
@ -192,6 +194,9 @@ a[href="javascript:;"] {
.expand-all-shortcut { .expand-all-shortcut {
opacity: .45; opacity: .45;
} }
#navtopright a {
text-decoration: none;
}
/* Notifications */ /* Notifications */
#notifications { #notifications {
@ -276,6 +281,7 @@ a[href="javascript:;"] {
} }
#fourchanx-settings > nav { #fourchanx-settings > nav {
padding: 2px 2px 0; padding: 2px 2px 0;
height: 15px;
} }
#fourchanx-settings > nav a { #fourchanx-settings > nav a {
text-decoration: underline; text-decoration: underline;
@ -287,10 +293,11 @@ a[href="javascript:;"] {
.section-container { .section-container {
overflow: auto; overflow: auto;
position: absolute; position: absolute;
top: 1.7em; top: 2.1em;
right: 5px; right: 5px;
bottom: 5px; bottom: 5px;
left: 5px; left: 5px;
padding-top: 10px;
} }
.sections-list { .sections-list {
padding: 0 3px; padding: 0 3px;
@ -302,14 +309,6 @@ a[href="javascript:;"] {
.tab-selected { .tab-selected {
font-weight: 700; font-weight: 700;
} }
.section-container {
overflow: auto;
position: absolute;
top: 1.7em;
right: 5px;
bottom: 5px;
left: 5px;
}
.section-sauce ul, .section-sauce ul,
.section-rice ul { .section-rice ul {
list-style: none; list-style: none;
@ -548,7 +547,9 @@ a.hide-announcement {
:root.hide-original-post-form #postForm, :root.hide-original-post-form #postForm,
:root.hide-original-post-form .postingMode, :root.hide-original-post-form .postingMode,
:root.hide-original-post-form #togglePostForm, :root.hide-original-post-form #togglePostForm,
#qr.autohide:not(.has-focus):not(:hover) > form { #qr.autohide:not(.has-focus):not(:hover) > form,
.postingMode ~ #qr select,
#file-n-submit:not(.has-file) #qr-filerm {
display: none; display: none;
} }
#qr select, #dump-button, .remove, .captcha-img { #qr select, #dump-button, .remove, .captcha-img {
@ -589,10 +590,13 @@ a.hide-announcement {
border: 1px solid #CCC; border: 1px solid #CCC;
width: 10%; width: 10%;
margin: 0; margin: 0;
font: 13px sans-serif;
padding: 1px 0px 2px;
} }
.persona input.field { .persona .field:not(#dump) {
width: 29.6%; width: 95px;
margin: 0 0 0 0.4%; min-width: 30%;
max-width: 30%;
} }
#qr textarea.field { #qr textarea.field {
height: 14.8em; height: 14.8em;
@ -608,30 +612,29 @@ input.field.tripped:not(:hover):not(:focus) {
resize: both; resize: both;
} }
.captcha-img { .captcha-img {
margin: 1px 0 0; margin: 0px;
text-align: center; text-align: center;
background-image: #fff; background-image: #fff;
font-size: 0px;
min-height: 59px;
min-width: 302px;
} }
.captcha-input { .captcha-input {
width: 100%; width: 100%;
margin: 1px 0 0; margin: 1px 0 0;
} }
.field, .field,
.selectrice, .selectrice {
button,
input:not([type=radio]) {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
font-size: 12px; margin: 0px;
height: 1.6em; padding: 2px 4px 3px;
margin: 1px 0 0;
vertical-align: bottom;
padding: 0 1px;
} }
#qr textarea { #qr textarea {
min-width: 100%; min-width: 100%;
} }
#qr [type='submit'] { #qr [type='submit'] {
width: 25%; width: 25%;
vertical-align: top;
} }
/* Fake File Input */ /* Fake File Input */
#qr-filename, #qr-filename,
@ -641,6 +644,11 @@ input:not([type=radio]) {
#qr-no-file, #qr-no-file,
.has-file #qr-filename { .has-file #qr-filename {
display: block; display: block;
padding: 0px 4px;
margin-bottom: 2px;
}
#qr-no-file {
color: #AAA;
} }
#qr-filename-container { #qr-filename-container {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
@ -650,15 +658,23 @@ input:not([type=radio]) {
min-width: 74.6%; min-width: 74.6%;
max-width: 74.6%; max-width: 74.6%;
margin-right: 0.4%; margin-right: 0.4%;
margin-top: 1px;
overflow: hidden; overflow: hidden;
padding: 2px 1px 0; padding: 2px 1px 0;
} }
#qr-filename-container:hover {
cursor: text;
}
#qr-filerm { #qr-filerm {
position: absolute; position: relative;
right: 3px; right: 14px;
top: 2px; bottom: 6px;
margin-right: -8px;
z-index: 2; z-index: 2;
} }
#file-n-submit {
height: 23px;
}
#qr input[type=file] { #qr input[type=file] {
display: none; display: none;
} }

View File

@ -77,6 +77,7 @@ $.extend $,
ajax: (url, callbacks, opts={}) -> ajax: (url, callbacks, opts={}) ->
{type, cred, headers, upCallbacks, form, sync} = opts {type, cred, headers, upCallbacks, form, sync} = opts
r = new XMLHttpRequest() r = new XMLHttpRequest()
r.overrideMimeType 'text/html'
type or= form and 'post' or 'get' type or= form and 'post' or 'get'
r.open type, url, !sync r.open type, url, !sync
for key, val of headers for key, val of headers