fix javascript disable checkbox failed after cate and tags being reloaded.
This commit is contained in:
parent
9fec7beb47
commit
d6dd38744b
app
assets/javascripts/inc
views/admin
|
@ -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();
|
||||
});
|
|
@ -19,3 +19,5 @@
|
|||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
|
@ -7,5 +7,3 @@
|
|||
|
||||
|
||||
<%= render 'edit' %>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
|
@ -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();
|
|
@ -109,3 +109,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
|
@ -4,4 +4,3 @@
|
|||
<% end -%>
|
||||
|
||||
<%= render 'edit' %>
|
||||
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
|
|
@ -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();
|
Loading…
Reference in New Issue