From 053144dfa4f8870ead82b7f2563029b948039be2 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 11 Dec 2013 19:37:39 +0800 Subject: [PATCH] widget count fixed for new widgets in page widget settings --- app/views/admin/page_parts/edit.html.erb | 2 +- app/views/admin/page_parts/get_display_style.js.erb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/admin/page_parts/edit.html.erb b/app/views/admin/page_parts/edit.html.erb index cdf49624..fb7881ce 100644 --- a/app/views/admin/page_parts/edit.html.erb +++ b/app/views/admin/page_parts/edit.html.erb @@ -129,7 +129,7 @@
<%= render @partial if @partial %>
-
+
<%= f.label :widget_data_count, t(:widget_data_count), class: "control-label muted" %>
<%= f.select :widget_data_count, options_for_select(@data_count, @part.widget_data_count), {}, class: "input-mini", id: "page_count" %> diff --git a/app/views/admin/page_parts/get_display_style.js.erb b/app/views/admin/page_parts/get_display_style.js.erb index d6ea61c2..9cb1e087 100644 --- a/app/views/admin/page_parts/get_display_style.js.erb +++ b/app/views/admin/page_parts/get_display_style.js.erb @@ -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 %> \ No newline at end of file