Merge branch 'testing'
This commit is contained in:
commit
ab74ca72a9
@ -35,12 +35,9 @@ PostHiding =
|
|||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
$.on apply, 'click', PostHiding.menu.hide
|
$.on apply, 'click', PostHiding.menu.hide
|
||||||
|
|
||||||
thisPost = $.el 'label',
|
thisPost = UI.checkbox 'thisPost', ' This post', true
|
||||||
innerHTML: '<input type=checkbox name=thisPost checked> This post'
|
replies = UI.checkbox 'replies', ' Hide replies', Conf['Recursive Hiding']
|
||||||
replies = $.el 'label',
|
makeStub = UI.checkbox 'makeStub', ' Make stub', Conf['Stubs']
|
||||||
innerHTML: "<input type=checkbox name=replies #{if Conf['Recursive Hiding'] then 'checked' else ''}> Hide replies"
|
|
||||||
makeStub = $.el 'label',
|
|
||||||
innerHTML: "<input type=checkbox name=makeStub #{if Conf['Stubs'] then 'checked' else ''}> Make stub"
|
|
||||||
|
|
||||||
$.event 'AddMenuEntry',
|
$.event 'AddMenuEntry',
|
||||||
type: 'post'
|
type: 'post'
|
||||||
@ -71,10 +68,8 @@ PostHiding =
|
|||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
$.on apply, 'click', PostHiding.menu.show
|
$.on apply, 'click', PostHiding.menu.show
|
||||||
|
|
||||||
thisPost = $.el 'label',
|
thisPost = UI.checkbox 'thisPost', ' This post', false
|
||||||
innerHTML: '<input type=checkbox name=thisPost> This post'
|
replies = UI.checkbox 'replies', ' Show replies', false
|
||||||
replies = $.el 'label',
|
|
||||||
innerHTML: "<input type=checkbox name=replies> Show replies"
|
|
||||||
hideStubLink = $.el 'a',
|
hideStubLink = $.el 'a',
|
||||||
textContent: 'Hide stub'
|
textContent: 'Hide stub'
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
|
|||||||
@ -80,8 +80,7 @@ ThreadHiding =
|
|||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
$.on apply, 'click', ThreadHiding.menu.hide
|
$.on apply, 'click', ThreadHiding.menu.hide
|
||||||
|
|
||||||
makeStub = $.el 'label',
|
makeStub = UI.checkbox 'Stubs', ' Make stub'
|
||||||
innerHTML: "<input type=checkbox #{if Conf['Stubs'] then 'checked' else ''}> Make stub"
|
|
||||||
|
|
||||||
$.event 'AddMenuEntry',
|
$.event 'AddMenuEntry',
|
||||||
type: 'post'
|
type: 'post'
|
||||||
|
|||||||
@ -6,22 +6,14 @@ Header =
|
|||||||
className: 'menu-button'
|
className: 'menu-button'
|
||||||
innerHTML: '<i></i>'
|
innerHTML: '<i></i>'
|
||||||
|
|
||||||
barFixedToggler = $.el 'label',
|
barFixedToggler = UI.checkbox 'Fixed Header', ' Fixed Header'
|
||||||
innerHTML: '<input type=checkbox name="Fixed Header"> Fixed Header'
|
headerToggler = UI.checkbox 'Header auto-hide', ' Auto-hide header'
|
||||||
headerToggler = $.el 'label',
|
scrollHeaderToggler = UI.checkbox 'Header auto-hide on scroll', ' Auto-hide header on scroll'
|
||||||
innerHTML: '<input type=checkbox name="Header auto-hide"> Auto-hide header'
|
barPositionToggler = UI.checkbox 'Bottom Header', ' Bottom header'
|
||||||
scrollHeaderToggler = $.el 'label',
|
linkJustifyToggler = UI.checkbox 'Centered links', ' Centered links'
|
||||||
innerHTML: '<input type=checkbox name="Header auto-hide on scroll"> Auto-hide header on scroll'
|
customNavToggler = UI.checkbox 'Custom Board Navigation', ' Custom board navigation'
|
||||||
barPositionToggler = $.el 'label',
|
footerToggler = UI.checkbox 'Bottom Board List', ' Hide bottom board list'
|
||||||
innerHTML: '<input type=checkbox name="Bottom Header"> Bottom header'
|
shortcutToggler = UI.checkbox 'Shortcut Icons', ' Shortcut Icons'
|
||||||
linkJustifyToggler = $.el 'label',
|
|
||||||
innerHTML: "<input type=checkbox #{if Conf['Centered links'] then 'checked' else ''}> Centered links"
|
|
||||||
customNavToggler = $.el 'label',
|
|
||||||
innerHTML: '<input type=checkbox name="Custom Board Navigation"> Custom board navigation'
|
|
||||||
footerToggler = $.el 'label',
|
|
||||||
innerHTML: "<input type=checkbox #{unless Conf['Bottom Board List'] then 'checked' else ''}> Hide bottom board list"
|
|
||||||
shortcutToggler = $.el 'label',
|
|
||||||
innerHTML: "<input type=checkbox #{unless Conf['Shortcut Icons'] then 'checked' else ''}> Shortcut Icons"
|
|
||||||
editCustomNav = $.el 'a',
|
editCustomNav = $.el 'a',
|
||||||
textContent: 'Edit custom board navigation'
|
textContent: 'Edit custom board navigation'
|
||||||
href: 'javascript:;'
|
href: 'javascript:;'
|
||||||
|
|||||||
@ -40,21 +40,14 @@ Index =
|
|||||||
$.on input, 'change', $.cb.value
|
$.on input, 'change', $.cb.value
|
||||||
$.on input, 'change', @cb.sort
|
$.on input, 'change', @cb.sort
|
||||||
|
|
||||||
repliesEntry =
|
repliesEntry = el: UI.checkbox 'Show Replies', ' Show replies'
|
||||||
el: $.el 'label',
|
anchorEntry = el: UI.checkbox 'Anchor Hidden Threads', ' Anchor hidden threads'
|
||||||
innerHTML: '<input type=checkbox name="Show Replies"> Show replies'
|
refNavEntry = el: UI.checkbox 'Refreshed Navigation', ' Refreshed navigation'
|
||||||
anchorEntry =
|
anchorEntry.el.title = 'Move hidden threads at the end of the index.'
|
||||||
el: $.el 'label',
|
refNavEntry.el.title = 'Refresh index when navigating through pages.'
|
||||||
innerHTML: '<input type=checkbox name="Anchor Hidden Threads"> Anchor hidden threads'
|
|
||||||
title: 'Move hidden threads at the end of the index.'
|
|
||||||
refNavEntry =
|
|
||||||
el: $.el 'label',
|
|
||||||
innerHTML: '<input type=checkbox name="Refreshed Navigation"> Refreshed navigation'
|
|
||||||
title: 'Refresh index when navigating through pages.'
|
|
||||||
for label in [repliesEntry, anchorEntry, refNavEntry]
|
for label in [repliesEntry, anchorEntry, refNavEntry]
|
||||||
input = label.el.firstChild
|
input = label.el.firstChild
|
||||||
{name} = input
|
{name} = input
|
||||||
input.checked = Conf[name]
|
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
switch name
|
switch name
|
||||||
when 'Show Replies'
|
when 'Show Replies'
|
||||||
|
|||||||
@ -95,8 +95,11 @@ Settings =
|
|||||||
innerHTML: "<legend>#{key}</legend>"
|
innerHTML: "<legend>#{key}</legend>"
|
||||||
for key, arr of obj
|
for key, arr of obj
|
||||||
description = arr[1]
|
description = arr[1]
|
||||||
div = $.el 'div',
|
div = $.el 'div'
|
||||||
innerHTML: "<label><input type=checkbox name=\"#{key}\">#{key}</label><span class=description>: #{description}</span>"
|
$.add div, [
|
||||||
|
UI.checkbox key, key, false
|
||||||
|
$.el 'span', class: 'description', textContent: ": #{description}"
|
||||||
|
]
|
||||||
input = $ 'input', div
|
input = $ 'input', div
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
items[key] = Conf[key]
|
items[key] = Conf[key]
|
||||||
|
|||||||
@ -373,9 +373,17 @@ UI = do ->
|
|||||||
<% } %>
|
<% } %>
|
||||||
@cb.call @ if @cb
|
@cb.call @ if @cb
|
||||||
|
|
||||||
|
checkbox = (name, text, checked) ->
|
||||||
|
checked = Conf[name] unless checked?
|
||||||
|
label = $.el 'label'
|
||||||
|
input = $.el 'input', {type: 'checkbox', name, checked}
|
||||||
|
$.add label, [input, $.tn text]
|
||||||
|
label
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dialog: dialog
|
dialog: dialog
|
||||||
Menu: Menu
|
Menu: Menu
|
||||||
hover: hoverstart
|
hover: hoverstart
|
||||||
|
checkbox: checkbox
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,9 +4,8 @@ FappeTyme =
|
|||||||
|
|
||||||
for type in ["Fappe", "Werk"] when Conf["#{type} Tyme"]
|
for type in ["Fappe", "Werk"] when Conf["#{type} Tyme"]
|
||||||
lc = type.toLowerCase()
|
lc = type.toLowerCase()
|
||||||
el = $.el 'label',
|
el = UI.checkbox lc, " #{type} Tyme", false
|
||||||
innerHTML: "<input type=checkbox name=#{lc}> #{type} Tyme"
|
el.title = "#{type} Tyme"
|
||||||
title: "#{type} Tyme"
|
|
||||||
|
|
||||||
FappeTyme[lc] = input = el.firstElementChild
|
FappeTyme[lc] = input = el.firstElementChild
|
||||||
$.on input, 'change', FappeTyme.cb.toggle.bind input
|
$.on input, 'change', FappeTyme.cb.toggle.bind input
|
||||||
@ -34,4 +33,4 @@ FappeTyme =
|
|||||||
toggle: ->
|
toggle: ->
|
||||||
Conf[@name] = !Conf[@name]
|
Conf[@name] = !Conf[@name]
|
||||||
FappeTyme.cb.set @name
|
FappeTyme.cb.set @name
|
||||||
$.cb.checked.call FappeTyme[@name]
|
$.cb.checked.call FappeTyme[@name]
|
||||||
|
|||||||
@ -258,12 +258,10 @@ Gallery =
|
|||||||
subEntries: subEntries
|
subEntries: subEntries
|
||||||
|
|
||||||
createSubEntry: (name) ->
|
createSubEntry: (name) ->
|
||||||
label = $.el 'label',
|
label = UI.checkbox name, " #{name}"
|
||||||
innerHTML: "<input type=checkbox name='#{name}'> #{name}"
|
|
||||||
input = label.firstElementChild
|
input = label.firstElementChild
|
||||||
if name in ['Fit Width', 'Fit Height', 'Hide Thumbnails']
|
if name in ['Fit Width', 'Fit Height', 'Hide Thumbnails']
|
||||||
$.on input, 'change', Gallery.cb.setFitness
|
$.on input, 'change', Gallery.cb.setFitness
|
||||||
input.checked = Conf[name]
|
|
||||||
$.event 'change', null, input
|
$.event 'change', null, input
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
el: label
|
el: label
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
CatalogLinks =
|
CatalogLinks =
|
||||||
init: ->
|
init: ->
|
||||||
return unless Conf['Catalog Links']
|
return unless Conf['Catalog Links']
|
||||||
CatalogLinks.el = el = $.el 'label',
|
CatalogLinks.el = el = UI.checkbox 'Header catalog links', ' Catalog Links'
|
||||||
id: 'toggleCatalog'
|
el.id = 'toggleCatalog'
|
||||||
href: 'javascript:;'
|
|
||||||
innerHTML: "<input type=checkbox #{if Conf['Header catalog links'] then 'checked' else ''}> Catalog Links"
|
|
||||||
|
|
||||||
input = $ 'input', el
|
input = $ 'input', el
|
||||||
$.on input, 'change', @toggle
|
$.on input, 'change', @toggle
|
||||||
|
|||||||
@ -27,10 +27,8 @@ ThreadUpdater =
|
|||||||
|
|
||||||
subEntries = []
|
subEntries = []
|
||||||
for name, conf of Config.updater.checkbox
|
for name, conf of Config.updater.checkbox
|
||||||
checked = if Conf[name] then 'checked' else ''
|
el = UI.checkbox name, " #{name}"
|
||||||
el = $.el 'label',
|
el.title = conf[1]
|
||||||
title: "#{conf[1]}"
|
|
||||||
innerHTML: "<input name='#{name}' type=checkbox #{checked}> #{name}"
|
|
||||||
input = el.firstElementChild
|
input = el.firstElementChild
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
if input.name is 'Scroll BG'
|
if input.name is 'Scroll BG'
|
||||||
|
|||||||
@ -302,11 +302,9 @@ ThreadWatcher =
|
|||||||
createSubEntry: (name, desc) ->
|
createSubEntry: (name, desc) ->
|
||||||
entry =
|
entry =
|
||||||
type: 'thread watcher'
|
type: 'thread watcher'
|
||||||
el: $.el 'label',
|
el: UI.checkbox name, " #{name}"
|
||||||
innerHTML: "<input type=checkbox name='#{name}'> #{name}"
|
entry.el.title = desc
|
||||||
title: desc
|
|
||||||
input = entry.el.firstElementChild
|
input = entry.el.firstElementChild
|
||||||
input.checked = Conf[name]
|
|
||||||
$.on input, 'change', $.cb.checked
|
$.on input, 'change', $.cb.checked
|
||||||
$.on input, 'change', ThreadWatcher.refresh if name is 'Current Board'
|
$.on input, 'change', ThreadWatcher.refresh if name is 'Current Board'
|
||||||
entry
|
entry
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user