orbit-basic/app/views/admin/page_parts/reload_widgets.js.erb

14 lines
729 B
Plaintext

$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|k,v| k},@part.widget_path) %>");
$("#widget_data_source_category").html("<%= j render :partial => 'widget_data_source_category' %>");
$("#widget_data_source_tag").html("<%= j render :partial => 'widget_data_source_tag' %>");
<% if !@part.widget_path.blank? %>
<% if show_default_widget_setting_panel %>
$('#widget_setting').html("<%= j render :partial => 'default_widget_style_panel' %>");
$('#widget_setting').append("<%= j render :partial => 'default_widget_setting' %>");
<% elsif show_custom_widget_setting_panel %>
$('#widget_setting').html("<%= j render :partial => 'custom_widget_setting' %>");
<% end %>
<% end %>