From: David ‘Bombe’ Roden Date: Thu, 21 Oct 2010 09:20:19 +0000 (+0200) Subject: Hide advanced settings. X-Git-Tag: 0.1-RC1~129 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=566a6be137c012ad5319e4d786d9c3a3e26dcdac Hide advanced settings. --- diff --git a/src/main/resources/templates/include/createSone.html b/src/main/resources/templates/include/createSone.html index c98c2ee..9666b27 100644 --- a/src/main/resources/templates/include/createSone.html +++ b/src/main/resources/templates/include/createSone.html @@ -7,6 +7,24 @@ /* hide all the labels. */ $("#sone #create-sone label").hide(); + + /* now hide the “advanced” section. */ + advancedSection = $("#sone #create-sone .advanced"); + advancedSection.hide(); + + /* show a checkbox instead. */ + checkboxSection = $("
"); + checkbox = $("").click(function() { + if (this.checked) { + advancedSection.show(); + $("#sone #create-sone button[name=create-random]").hide(); + } else { + advancedSection.hide(); + $("#sone #create-sone button[name=create-random]").show(); + } + }) + checkboxSection.append(checkbox).append("Show advanced settings"); + advancedSection.before(checkboxSection); }); @@ -23,15 +41,17 @@
- class="error"<%/if>> - - - - class="error"<%/if>> - - - -
- +
+ class="error"<%/if>> + + +
+ class="error"<%/if>> + + +
+
+ +