2013-04-01 09:06:10 +00:00
|
|
|
<% if @selected[:module_app] %>
|
2013-03-28 10:29:24 +00:00
|
|
|
$('#app_page_category').html("<%= j render :partial => 'admin/page_parts/widget_data_source_category' ,:locals=>{:object=>@item}%>");
|
|
|
|
$('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@item} %>");
|
|
|
|
$("#data_count").html("<%= j render :partial => 'admin/pages/data_count_field',:locals=>{:field_name=>'page[frontend_data_count]',:field_value=>(@item.frontend_data_count rescue nil)} %>");
|
2013-02-23 10:29:50 +00:00
|
|
|
|
2013-04-01 09:06:10 +00:00
|
|
|
<% if !@selected[:module_app].app_pages.blank? or @selected[:module_app].has_default_widget? %>
|
|
|
|
$('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', options_for_select(@app_frontend_urls, @selected[:app_frontend_url]),{},{:rel => reload_after_list_changed_admin_pages_path}) %>");
|
2013-03-28 10:29:24 +00:00
|
|
|
<% else %>
|
|
|
|
$('#app_page_url').html("<div class='well'><%= t('default_widget.no_support_setting')%></div>");
|
2013-01-23 10:51:18 +00:00
|
|
|
<% end %>
|
2013-01-21 08:56:37 +00:00
|
|
|
|
2013-01-23 10:51:18 +00:00
|
|
|
<% if @app_frontend_urls.first =='default_widget' %>
|
2013-04-01 09:06:10 +00:00
|
|
|
$('#app_page_frontend_style').html("<%= escape_javascript(select 'page', 'frontend_style', @selected[:module_app].widgets[@selected[:app_frontend_url]]) %>");
|
2013-01-23 10:51:18 +00:00
|
|
|
<% else %>
|
|
|
|
$('#app_page_frontend_style').html("<%= t('default_widget.no_support_setting')%>");
|
|
|
|
<% end %>
|
2013-01-21 08:56:37 +00:00
|
|
|
|
2013-01-23 10:51:18 +00:00
|
|
|
<% if show_default_widget_setting_panel %>
|
2013-04-02 10:39:46 +00:00
|
|
|
$('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@item} %>");
|
2013-01-21 08:56:37 +00:00
|
|
|
|
2013-04-02 10:39:46 +00:00
|
|
|
$('#frontend_setting').html("<%= j render :partial => 'admin/page_parts/default_widget_style_panel',:locals=>{:object=>@item} %>");
|
|
|
|
$('#frontend_setting').append("<%= j render :partial => 'admin/page_parts/default_widget_setting',:locals=>{:object=>@item} %>");
|
2013-01-23 10:51:18 +00:00
|
|
|
<% else %>
|
|
|
|
$('#frontend_setting').html("<%= j render :partial => 'custom_frontend_setting' %>");
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
2013-01-21 08:56:37 +00:00
|
|
|
|
2013-01-23 10:51:18 +00:00
|
|
|
$('#app_page_url').html("<%= t('default_widget.no_support_setting')%>");
|
|
|
|
$('#app_page_category').find("div.well.controls").html("<%= t('default_widget.no_support_setting')%>");
|
|
|
|
$('#app_page_tag').find("div.well.controls").html("<%= t('default_widget.no_support_setting')%>");
|
|
|
|
|
|
|
|
$('#app_page_url').html("<%= t('default_widget.no_support_setting')%>");
|
|
|
|
$('#frontend_setting').html("<%= j render :partial => 'custom_frontend_setting' %>");
|
|
|
|
<% end %>
|
2013-02-23 03:34:47 +00:00
|
|
|
update_cates_and_tags();
|
|
|
|
rebind();
|