Update merge.html.erb

This commit is contained in:
chiu 2019-11-01 20:29:45 +08:00
parent 301e9d4ac2
commit f2bac65174
1 changed files with 15 additions and 2 deletions

View File

@ -4,13 +4,26 @@
<%= stylesheet_link_tag "lib/main-list" %>
<%= stylesheet_link_tag "lib/main-form-col2" %>
<% end %>
<script>
function change_mode(){
var value = $("form[name='mode_form']").find("input[type='checkbox']")[0].checked
if (value){
$("input[name='mode']").val("strict")
}
else{
$("input[name='mode']").val("simple")
}
document.mode_form.submit()
}
</script>
<form method="get" action='?' name='mode_form'>
<nobr>
<%= '嚴格比較模式'+':' %>
<% if params['mode']!='simple' %>
<input type="checkbox" name="mode" value="simple" onchange='this.form.submit()'><span>是</span>
<input type='hidden' name='mode' value=''>
<input type="checkbox" onchange='change_mode()' checked><span>是</span>
<% else %>
<input type="checkbox" name="mode" value="strict" onchange='this.form.submit()'><span>否</span>
<input type="checkbox" onchange='change_mode()'><span>否</span>
<% end %>
</nobr>
</form>