check order by and code for menu cats:

This commit is contained in:
phyusin
2017-12-22 14:43:59 +06:30
parent 9094d46209
commit 7d8fddbdeb
3 changed files with 23 additions and 8 deletions

View File

@@ -15,8 +15,8 @@
<%= f.input :api_settings %>
<%= f.input :page_width %>
<%= f.input :page_height %>
<%= f.input :print_copies, input_html: { min: '1', step: '1', :onkeypress => "return isNumberKey(event);", :onkeyup => "greaterThanOne(this.value);" } %>
<%= f.input :precision %>
<%= f.input :print_copies, input_html: { min: 1, step: '1', :onkeypress => "return isNumberKey(event);", :onkeyup => "greaterThanOne(this.value);" } %>
<%= f.input :precision, input_html: { min: 0, max: 2, :onkeypress => "return isNumberKey(event);", :onkeyup => "greaterThanThree(this.value);" } %>
<%= f.input :delimiter %>
<%= f.input :heading_space %>
</div>
@@ -73,4 +73,8 @@
function greaterThanOne(val){
if(parseInt(val)==0) $("#print_setting_print_copies").val(1);
}
function greaterThanThree(val){
if(parseInt(val)>2) $("#print_setting_precision").val(2);
}
</script>