This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/pages/reload_frontend_pages.js.erb

34 lines
1.9 KiB
Plaintext
Raw Normal View History

2013-01-23 10:51:18 +00:00
<% if @module_app %>
$('#app_page_category').html("<%= j render :partial => 'admin/page_parts/widget_data_source_category' ,:locals=>{:object=>@page}%>");
$('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@page} %>");
2013-01-21 08:56:37 +00:00
2013-01-23 10:51:18 +00:00
<% if !@module_app.app_pages.blank? %>
$('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', options_for_select(@app_frontend_urls, @app_frontend_urls.first)) %>");
<%else %>
$('#app_page_url').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 @app_frontend_urls.first =='default_widget' %>
$('#app_page_frontend_style').html("<%= escape_javascript(select 'page', 'frontend_style', @module_app.widgets[@frontend_path]) if !@frontend_path.blank? %>");
<% 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 %>
$('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@page} %>");
2013-01-21 08:56:37 +00:00
2013-01-23 10:51:18 +00:00
$('#frontend_setting').html("<%= j render :partial => 'admin/page_parts/default_widget_style_panel',:locals=>{:object=>@page} %>");
$('#frontend_setting').append("<%= j render :partial => 'admin/page_parts/default_widget_setting',:locals=>{:object=>@page} %>");
<% 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 %>