widget count fixed for new widgets in page widget settings

This commit is contained in:
Harry Bomrah 2013-12-11 19:37:39 +08:00
parent 0671d0b126
commit 053144dfa4
2 changed files with 7 additions and 1 deletions

View File

@ -129,7 +129,7 @@
<div class="display-mode">
<%= render @partial if @partial %>
</div>
<div class="control-group input-content <%= 'hide' if @module_app.blank? || !@module_app.enable_widget_data_count %>">
<div class="control-group input-content widget_count <%= 'hide' if @module_app.blank? || !@module_app.enable_widget_data_count %>">
<%= f.label :widget_data_count, t(:widget_data_count), class: "control-label muted" %>
<div class="controls">
<%= f.select :widget_data_count, options_for_select(@data_count, @part.widget_data_count), {}, class: "input-mini", id: "page_count" %>

View File

@ -2,4 +2,10 @@
$("#module_widget .display-mode").html("<%= j render @partial %>")
<% else %>
$("#module_widget .display-mode").html('')
<% end %>
<% if !@module_app.enable_widget_data_count %>
$(".widget_count").addClass('hide');
<% else %>
$(".widget_count").removeClass('hide');
<% end %>