Remove a loop, remove unused bindings, move a binding next to its element declaration.

This commit is contained in:
Nicolas Stepien 2011-08-25 07:21:59 +02:00
parent b7ff99f20e
commit 50fb9dd522
2 changed files with 8 additions and 19 deletions

File diff suppressed because one or more lines are too long

View File

@ -879,16 +879,14 @@ options =
description = arr[1]
li = $.el 'li',
innerHTML: "<label><input type=checkbox name='#{key}' #{checked}>#{key}</label><span class=description>: #{description}</span>"
$.bind $('input', li), 'click', $.cb.checked
$.append ul, li
$.append main, ul
li = $.el 'li',
innerHTML: "<button>hidden: #{hiddenNum}</button> <span class=description>: Forget all hidden posts. Useful if you accidentally hide a post and have `show stubs` disabled."
$.append hidingul, li
$.bind $('button', li), 'click', options.clearHidden
for input in $$ '#main input', dialog
$.bind input, 'click', $.cb.checked
$.bind $('button', dialog), 'click', options.clearHidden
$.bind link, 'click', options.tab for link in $$ '#floaty a', dialog
$.bind $('textarea[name=flavors]', dialog), 'change', $.cb.value
$.bind $('input[name=time]', dialog), 'keyup', options.time
for input in $$ '#keybinds input', dialog