Touchups.

This commit is contained in:
Zixaphir 2013-04-09 12:48:13 -07:00
parent 96b63abc6b
commit 63e0d44af2
8 changed files with 91 additions and 89 deletions

File diff suppressed because one or more lines are too long

View File

@ -1434,8 +1434,6 @@ a:only-of-type > .remove {
.sections-list > a { .sections-list > a {
cursor: pointer; cursor: pointer;
#{if _conf["Rounded Edges"] then "border-radius: 3px 3px 0 0;" else ""} #{if _conf["Rounded Edges"] then "border-radius: 3px 3px 0 0;" else ""}
}
.sections-list > a {
position: relative; position: relative;
padding: 0 4px; padding: 0 4px;
z-index: 1; z-index: 1;
@ -1479,10 +1477,12 @@ article li {
.rice + .optionlabel { .rice + .optionlabel {
padding-left: 0; padding-left: 0;
} }
#appchanx-settings .section-style fieldset, .section-style fieldset,
#appchanx-settings .section-main fieldset { .section-main fieldset {
vertical-align: top; vertical-align: top;
#{if _conf["Single Column Mode"] then "margin: 0 auto 6px;" else "margin: 0 3px 6px;\n display: inline-block;"} #{if _conf["Single Column Mode"] then "margin: 0 auto 6px;" else "margin: 0 3px 6px;\n display: inline-block;"}
padding: 0;
border: 0;
} }
.section-main fieldset > div, .section-main fieldset > div,
.styleoption { .styleoption {

View File

@ -56,7 +56,7 @@ html {
border: 1px solid #{theme["Reply Border"]}; border: 1px solid #{theme["Reply Border"]};
padding: 5px; padding: 5px;
} }
.tab-selected { .sections-list > a.tab-selected {
background: #{backgroundC}; background: #{backgroundC};
border-color: #{theme["Reply Border"]}; border-color: #{theme["Reply Border"]};
border-style: solid; border-style: solid;

View File

@ -189,7 +189,6 @@ UI = do ->
@parseEntry subEntry @parseEntry subEntry
return return
dragstart = (e) -> dragstart = (e) ->
return if e.type is 'mousedown' and e.button isnt 0 # not LMB return if e.type is 'mousedown' and e.button isnt 0 # not LMB
# prevent text selection # prevent text selection
@ -223,11 +222,13 @@ UI = do ->
o.up = dragend.bind o o.up = dragend.bind o
$.on d, 'mousemove', o.move $.on d, 'mousemove', o.move
$.on d, 'mouseup', o.up $.on d, 'mouseup', o.up
touchmove = (e) -> touchmove = (e) ->
for touch in e.changedTouches for touch in e.changedTouches
if touch.identifier is @identifier if touch.identifier is @identifier
drag.call @, touch drag.call @, touch
return return
drag = (e) -> drag = (e) ->
{clientX, clientY} = e {clientX, clientY} = e
@ -261,11 +262,13 @@ UI = do ->
style.right = right style.right = right
style.top = top style.top = top
style.bottom = bottom style.bottom = bottom
touchend = (e) -> touchend = (e) ->
for touch in e.changedTouches for touch in e.changedTouches
if touch.identifier is @identifier if touch.identifier is @identifier
dragend.call @ dragend.call @
return return
dragend = -> dragend = ->
if @isTouching if @isTouching
$.off d, 'touchmove', @move $.off d, 'touchmove', @move
@ -275,12 +278,13 @@ UI = do ->
$.off d, 'mouseup', @up $.off d, 'mouseup', @up
localStorage.setItem "#{g.NAMESPACE}#{@id}.position", @style.cssText localStorage.setItem "#{g.NAMESPACE}#{@id}.position", @style.cssText
hoverstart = ({root, el, latestEvent, endEvents, asapTest, cb}) -> hoverstart = ({root, el, latestEvent, endEvents, asapTest, cb, close}) ->
o = { o = {
root: root root: root
el: el el: el
style: el.style style: el.style
cb: cb cb: cb
close: close
endEvents: endEvents endEvents: endEvents
latestEvent: latestEvent latestEvent: latestEvent
clientHeight: doc.clientHeight clientHeight: doc.clientHeight
@ -296,12 +300,13 @@ UI = do ->
$.on root, endEvents, o.hoverend $.on root, endEvents, o.hoverend
$.on root, 'mousemove', o.hover $.on root, 'mousemove', o.hover
hover = (e) -> hover = (e) ->
@latestEvent = e @latestEvent = e
height = @el.offsetHeight height = @el.offsetHeight
{clientX, clientY} = e {clientX, clientY} = e
top = clientY - 120 top = clientY + (if close then 0 else -120)
top = if @clientHeight <= height or top <= 0 top = if @clientHeight <= height or top <= 0
0 0
else if top + height >= @clientHeight else if top + height >= @clientHeight
@ -310,7 +315,7 @@ UI = do ->
top top
[left, right] = if clientX <= @clientWidth - 400 [left, right] = if clientX <= @clientWidth - 400
[clientX + 45 + 'px', null] [clientX + (if @close then 15 else 45) + 'px', null]
else else
[null, @clientWidth - clientX + 45 + 'px'] [null, @clientWidth - clientX + 45 + 'px']
@ -318,6 +323,7 @@ UI = do ->
style.top = top + 'px' style.top = top + 'px'
style.left = left style.left = left
style.right = right style.right = right
hoverend = -> hoverend = ->
$.rm @el $.rm @el
$.off @root, @endEvents, @hoverend $.off @root, @endEvents, @hoverend

View File

@ -485,10 +485,6 @@ Config =
false false
'Make checkboxes circular.' 'Make checkboxes circular.'
] ]
'Custom CSS': [
false
'Add (more) custom CSS to Appchan X'
]
'Emoji': [ 'Emoji': [
'enabled' 'enabled'
'Enable emoji' 'Enable emoji'
@ -724,7 +720,30 @@ http://iqdb.org/?url=%TURL
favicon: 'ferongr' favicon: 'ferongr'
usercss: '' usercss: """
/* Tripcode Italics: */
/*
span.postertrip {
font-style: italic;
}
*/
/* Add a rounded border to thumbnails (but not expanded images): */
/*
.fileThumb > img:first-child {
border: solid 2px rgba(0,0,100,0.5);
border-radius: 10px;
}
*/
/* Make highlighted posts look inset on the page: */
/*
div.post:target,
div.post.highlight {
box-shadow: inset 2px 2px 2px rgba(0,0,0,0.2);
}
*/
"""
hotkeys: hotkeys:
# QR & Options # QR & Options

View File

@ -245,12 +245,15 @@ CustomCSS =
init: -> init: ->
return unless Conf['Custom CSS'] return unless Conf['Custom CSS']
@addStyle() @addStyle()
addStyle: -> addStyle: ->
@style = $.addStyle Conf['usercss'] @style = $.addStyle Conf['usercss']
rmStyle: -> rmStyle: ->
if @style if @style
$.rm @style $.rm @style
delete @style delete @style
update: -> update: ->
unless @style unless @style
@addStyle() @addStyle()

View File

@ -1159,7 +1159,7 @@ a.pointer{
margin-top:-16px !important; margin-top:-16px !important;
padding-left:150px !important; padding-left:150px !important;
} }
.file{ .file {
margin-top: 2px; margin-top: 2px;
} }
a.backlink{ a.backlink{

View File

@ -517,6 +517,7 @@ Settings =
<img src=#{Favicon.unreadNSFW}> <img src=#{Favicon.unreadNSFW}>
<img src=#{Favicon.unreadDead}> <img src=#{Favicon.unreadDead}>
""" """
togglecss: -> togglecss: ->
if $('textarea', @parentNode.parentNode).disabled = !@checked if $('textarea', @parentNode.parentNode).disabled = !@checked
CustomCSS.rmStyle() CustomCSS.rmStyle()
@ -582,12 +583,12 @@ Settings =
if type is 'text' if type is 'text'
div.innerHTML = "<div class=option><span class=optionlabel>#{key}</span><div style=display: none>#{description}</div></div><div class=option><input name='#{key}' style=width: 100%></div>" div.innerHTML = "<div class=option><span class=optionlabel>#{key}</span></div><div style='display:none;'>#{description}</div><div class=option><input name='#{key}' style=width: 100%></div>"
input = $ "input[name='#{key}']", div input = $ "input[name='#{key}']", div
else else
html = "<label><span class=optionlabel>#{key}</span><div style=display: none>#{description}</div></div><div class=option><select name='#{key}'></label>" html = "<div class=option><span class=optionlabel>#{key}</span></div><div style='display:none;'>#{description}</div><div class=option><select name='#{key}'></div>"
for name, val in type for name, val in type
html += "<option value='#{val}'>#{name}</option>" html += "<option value='#{val}'>#{name}</option>"
html += "</select>" html += "</select>"
@ -597,11 +598,13 @@ Settings =
else else
inputtype = 'checked' inputtype = 'checked'
div.innerHTML = "<label><input type=checkbox name='#{key}'>#{key}</label><span class=description>: #{description}</span>" div.innerHTML = "<div class=option><label><input type=checkbox name='#{key}'>#{key}</label></div><span style='display:none;'>#{description}</span>"
input = $ 'input', div input = $ 'input', div
Settings.sandbox input, key, value, inputtype Settings.sandbox input, key, value, inputtype
$.on $('.option', div), 'mouseover', Settings.mouseover
$.on input, 'change', -> $.on input, 'change', ->
$.cb[inputtype].call @ $.cb[inputtype].call @
Style.addStyle() Style.addStyle()
@ -827,33 +830,20 @@ Settings =
Style.addStyle() Style.addStyle()
mouseover: (e) -> mouseover: (e) ->
if mouseover = $.id 'mouseover' mouseover = $.el 'div',
if children = mouseover.childNodes id: 'mouseover'
for child in children className: 'dialog'
$.rm child
else $.add Header.hover, mouseover
mouseover = $.el 'div',
id: 'mouseover'
className: 'dialog'
$.add d.body, mouseover
mouseover.innerHTML = @nextElementSibling.innerHTML mouseover.innerHTML = @nextElementSibling.innerHTML
UI.el = mouseover UI.hover
root: @
el: mouseover
latestEvent: e
endEvents: 'mouseout'
asapTest: -> true
close: true
$.on @, 'mousemove', Settings.hover return
$.on @, 'mouseout', Settings.mouseout
return
hover: (e) ->
UI.hover e, "menu"
mouseout: (e) ->
mouseover = UI.el
for child in mouseover.childNodes
$.rm child
delete UI.el
$.off @, 'mousemove', Settings.hover