2013-04-01 09:06:10 +00:00
|
|
|
<% if @selected[:module_app]%>
|
2013-04-02 10:39:46 +00:00
|
|
|
$('#widget_list select').html("<%= j options_for_select(@selected[:module_app].widgets.collect{|k,v| [I18n.t(v['i18n']),k]},@selected[:app_frontend_url]) %>");
|
2013-01-23 10:51:18 +00:00
|
|
|
$("#widget_data_source_category").html("<%= j render :partial => 'widget_data_source_category',:locals=>{:object=>@part} %>");
|
|
|
|
$("#widget_data_source_tag").html("<%= j render :partial => 'widget_data_source_tag',:locals=>{:object=>@part} %>");
|
2013-02-23 10:29:50 +00:00
|
|
|
$("#data_count").html("<%= j render :partial => 'admin/pages/data_count_field',:locals=>{:field_name=>'page_part[widget_data_count]',:field_value=>@part.widget_data_count } %>");
|
2013-01-23 10:51:18 +00:00
|
|
|
<% if @part %>
|
|
|
|
<% if show_default_widget_setting_panel %>
|
2013-04-02 10:39:46 +00:00
|
|
|
$('#widget_setting').html("<%= j render :partial => 'default_widget_style_panel',:locals=>{:object=>@part} %>");
|
2013-01-23 10:51:18 +00:00
|
|
|
$('#widget_setting').append("<%= j render :partial => 'default_widget_setting',:locals=>{:object=>@part} %>");
|
|
|
|
<% elsif show_custom_widget_setting_panel %>
|
|
|
|
$('#widget_setting').html("<%= j render :partial => 'custom_widget_setting' %>");
|
|
|
|
<% end %>
|
2013-01-14 10:49:23 +00:00
|
|
|
<% end %>
|
2013-01-23 10:51:18 +00:00
|
|
|
<% else %>
|
|
|
|
$('#widget_option').find("div.well.controls").html("<%= t('default_widget.no_support_setting')%>");
|
|
|
|
$('#widget_setting').html("<%=j render :partial=> 'reset',:locals=>{:label_i18n=>'default_widget.select_widget_style'}%>");
|
|
|
|
$('#widget_list select').html("<%= j options_for_select([]) %>");
|
2013-01-14 10:49:23 +00:00
|
|
|
<% end %>
|
2013-02-23 03:34:47 +00:00
|
|
|
update_cates_and_tags();
|
|
|
|
rebind();
|