Start cleaning up options' html before reorganization.
This commit is contained in:
parent
e35a574829
commit
e028d30361
@ -932,16 +932,11 @@
|
||||
for (name in conf) {
|
||||
title = conf[name][1];
|
||||
checked = $.config(name) ? "checked" : "";
|
||||
html += "<div><label title=\"" + title + "\">" + name + "<input name=\"" + name + "\" " + checked + " type=checkbox></label></div>";
|
||||
html += "<div><label title='" + title + "'>" + name + "<input name='" + name + "' " + checked + " type=checkbox></label></div>";
|
||||
}
|
||||
html += "<div><a name=flavors>Flavors</a></div>";
|
||||
html += "<div><textarea style=\"display: none;\" name=flavors>" + ($.config('flavors')) + "</textarea></div>";
|
||||
hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {});
|
||||
hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length;
|
||||
html += "<div><input type=\"button\" value=\"hidden: " + hiddenNum + "\"></div>";
|
||||
html += "<hr>";
|
||||
html += "<div><a href=\"http://chat.now.im/x/aeos\">support throd</a></div>";
|
||||
html += '<div><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2DBVZBUAM4DHC&lc=US&item_name=Aeosynth¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted"><img alt="Donate" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"/></a></div>';
|
||||
html += " <div><a name=flavors>Flavors</a></div> <div><textarea style='display: none;' name=flavors>" + ($.config('flavors')) + "</textarea></div> <div><input type=button value='hidden: " + hiddenNum + "'></div> <hr> <div><a href=http://chat.now.im/x/aeos>support throd</a></div> <div><a href=https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2DBVZBUAM4DHC&lc=US&item_name=Aeosynth¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted><img alt=Donate src=https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif></a></div> ";
|
||||
dialog = ui.dialog('options', {
|
||||
top: '25%',
|
||||
left: '50%'
|
||||
|
||||
@ -706,26 +706,31 @@ options =
|
||||
options.dialog()
|
||||
|
||||
dialog: ->
|
||||
html = "<div class=move>Options <a name=close>X</a></div>"
|
||||
html = "<div class=move>Options <a name=close>X</a></div>"
|
||||
|
||||
conf = config.main.checkbox
|
||||
for name of conf
|
||||
title = conf[name][1]
|
||||
checked = if $.config name then "checked" else ""
|
||||
html += "<div><label title=\"#{title}\">#{name}<input name=\"#{name}\" #{checked} type=checkbox></label></div>"
|
||||
html += "<div><a name=flavors>Flavors</a></div>"
|
||||
html += "<div><textarea style=\"display: none;\" name=flavors>#{$.config 'flavors'}</textarea></div>"
|
||||
html += "<div><label title='#{title}'>#{name}<input name='#{name}' #{checked} type=checkbox></label></div>"
|
||||
|
||||
hiddenThreads = $.getValue "hiddenThreads/#{g.BOARD}/", {}
|
||||
hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length
|
||||
html += "<div><input type=\"button\" value=\"hidden: #{hiddenNum}\"></div>"
|
||||
|
||||
html += "<hr>"
|
||||
html += "<div><a href=\"http://chat.now.im/x/aeos\">support throd</a></div>"
|
||||
html += '<div><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2DBVZBUAM4DHC&lc=US&item_name=Aeosynth¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted"><img alt="Donate" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif"/></a></div>'
|
||||
html += "
|
||||
<div><a name=flavors>Flavors</a></div>
|
||||
<div><textarea style='display: none;' name=flavors>#{$.config 'flavors'}</textarea></div>
|
||||
<div><input type=button value='hidden: #{hiddenNum}'></div>
|
||||
<hr>
|
||||
<div><a href=http://chat.now.im/x/aeos>support throd</a></div>
|
||||
<div><a href=https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=2DBVZBUAM4DHC&lc=US&item_name=Aeosynth¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted><img alt=Donate src=https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif></a></div>
|
||||
"
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user