fix javascript disable checkbox failed after cate and tags being reloaded.

This commit is contained in:
Fu Matthew 2013-02-23 11:34:47 +08:00 committed by chris
parent 99e67c8719
commit 0e6599e9b9
7 changed files with 14 additions and 6 deletions

View File

@ -11,7 +11,11 @@ function update_cates_and_tags()
});
}
function rebind(){
$("#widget_data_source_category,#widget_data_source_tag,#app_page_category,#app_page_tag").find('input').change(function(){update_cates_and_tags()});
}
$(document).ready(function(){
update_cates_and_tags();
$("#widget_data_source_category,#widget_data_source_tag,#app_page_category,#app_page_tag").find('input').change(function(){update_cates_and_tags()});
rebind();
});

View File

@ -19,3 +19,5 @@
</div>
<% end %>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>

View File

@ -6,6 +6,4 @@
<%= render 'edit' %>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
<%= render 'edit' %>

View File

@ -16,3 +16,5 @@
$('#widget_setting').html("<%=j render :partial=> 'reset',:locals=>{:label_i18n=>'default_widget.select_widget_style'}%>");
$('#widget_list select').html("<%= j options_for_select([]) %>");
<% end %>
update_cates_and_tags();
rebind();

View File

@ -109,3 +109,4 @@
</div>
</div>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>

View File

@ -3,5 +3,4 @@
<%= render 'admin/items/site_map_left_bar' %>
<% end -%>
<%= render 'edit' %>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
<%= render 'edit' %>

View File

@ -31,3 +31,5 @@
$('#app_page_url').html("<%= t('default_widget.no_support_setting')%>");
$('#frontend_setting').html("<%= j render :partial => 'custom_frontend_setting' %>");
<% end %>
update_cates_and_tags();
rebind();