Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
Conflicts: app/views/statistics/_form.html.erb
This commit is contained in:
commit
2aa424f356
|
@ -20,7 +20,7 @@
|
|||
<div class="field line_field">
|
||||
<label><span>*</span>数据分类:</label>
|
||||
<%= f.select :main_category_id, (@main_categories.collect { |mc| [mc.name, mc.id] }),
|
||||
{:no_label => true}, :onchange => "get_sub_category(this.options[this.options.selectedIndex].value)",
|
||||
{:no_label => true}, :onchange => 'getSubCategory(this.options[this.options.selectedIndex].value)',
|
||||
:class => "w150" %>
|
||||
<%#= f.text_field :description %>
|
||||
<!--<div class="fl pr wb20 change_sort">-->
|
||||
|
@ -84,10 +84,9 @@
|
|||
$("#new_statistic").submit();
|
||||
}
|
||||
// 获取子类别
|
||||
function get_sub_category(id){
|
||||
alert(id);
|
||||
function getSubCategory(id){
|
||||
$.ajax({
|
||||
url: <%= get_sub_category_statistics_path %>,
|
||||
url: '<%= get_sub_category_statistics_path %>',
|
||||
type: 'get',
|
||||
data: {main_category_id: id}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue