From e028d30361818571d41db8ea89fef42542827d1e Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 14 May 2011 17:47:30 +0200 Subject: [PATCH] Start cleaning up options' html before reorganization. --- 4chan_x.js | 9 ++------- script.coffee | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index c67b91530..e20135b3b 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -932,16 +932,11 @@ for (name in conf) { title = conf[name][1]; checked = $.config(name) ? "checked" : ""; - html += "
"; + html += "
"; } - html += "
Flavors
"; - html += "
"; hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {}); hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length; - html += "
"; - html += "
"; - html += "
support throd
"; - html += '
Donate
'; + html += "
Flavors

support throd
Donate
"; dialog = ui.dialog('options', { top: '25%', left: '50%' diff --git a/script.coffee b/script.coffee index 5ab2639af..4094415b5 100644 --- a/script.coffee +++ b/script.coffee @@ -706,26 +706,31 @@ options = options.dialog() dialog: -> - html = "
Options X
" + html = "
Options X
" + conf = config.main.checkbox for name of conf title = conf[name][1] checked = if $.config name then "checked" else "" - html += "
" - html += "
Flavors
" - html += "
" + html += "
" hiddenThreads = $.getValue "hiddenThreads/#{g.BOARD}/", {} hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length - html += "
" - html += "
" - html += "
support throd
" - html += '
Donate
' + html += " +
Flavors
+
+
+
+
support throd
+
Donate
+ " dialog = ui.dialog 'options', top: '25%', left: '50%', html for input in $$ 'input[type=checkbox]', dialog $.bind input, 'click', $.cb.checked + + $.bind $('input[type=button]', dialog), 'click', options.cb.clearHidden $.bind $('a[name=flavors]', dialog), 'click', options.flavors $.bind $('textarea', dialog), 'change', $.cb.value