solved conflicts

This commit is contained in:
Matt K. Fu committed 2013-04-17 14:14:24 +08:00
1 parent e7bffe4c0f
commit 0781779ac0
28 files changed
+316 -265

No files matched your search

@@ -4,7 +4,7 @@
</label>
<div class="controls well">
<% if @frontend_styles%>
<%= select('page', 'frontend_style', @frontend_styles) %>
<%= select('page', 'frontend_style', @frontend_styles,{:selected => @selected[:frontend_style]}) %>
<% else %>
<%= t("default_widget.no_support_setting")%>
<% end %>
@@ -2,5 +2,5 @@
<%= t("default_widget.widget_data_count") %>
</label>
<div class="controls">
<%= select_tag(field_name,options_for_select((@module_app.get_registration.get_data_count rescue []),field_value )) %>
<%= select_tag(field_name,options_for_select(@page_frontend_data_counts||[],field_value )) %>
</div>
+7 -7
View File
@@ -1,13 +1,13 @@
<%= f.error_messages %>
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
<%= f.hidden_field :id, :value => (@item.id),:id=>"object_id" %>
<div class="control-group">
<%= f.label :name, '*'+t(:name), :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text input-xlarge' %>
<span class="help-inline">請輸入數字或英文,不可使用空白</span>
<span class="help-inline"><%= I18n.t("front_page.name_field_helper") %></span>
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
</div>
</div>
@@ -27,14 +27,14 @@
<div class="control-group">
<%= f.label :name, t(:template_name), :class => 'control-label' %>
<div class="controls">
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => reload_themes_admin_pages_path} %>
<%= f.collection_select :design, @designs, :id, :title, {:selected => (@selected[:design].id rescue nil) }, {:rel => reload_themes_admin_pages_path} %>
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
</div>
</div>
<div class="control-group">
<%= f.label :name, t(:theme), :class => 'control-label' %>
<div class="controls">
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
<%= f.select :theme_id, @themes.collect { |t| [t.name.capitalize, t.id] }, {:include_blank => true, :selected=>(@selected[:theme].id rescue nil) } %>
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
</div>
</div>
@@ -42,14 +42,14 @@
<div class="control-group" id="module_app_list">
<%= f.label '',t("default_widget.select_module_app"), :class => 'control-label' %>
<div class="controls">
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, :selected => (@module_app.id rescue nil)), {:include_blank => true }, {:rel => reload_after_module_changed_admin_pages_path,:id=>"page_module_app_id"} %>
<%= f.select :module_app_id, options_from_collection_for_select(@module_apps, :id, :module_name, :selected =>(@selected[:module_app].id rescue nil)), {:include_blank => true }, {:rel => reload_after_module_changed_admin_pages_path,:id=>"page_module_app_id"} %>
</div>
</div>
<div class="control-group" id="frontend_list">
<%= f.label '', t("front_page.select_app_url"), :class => 'control-label' %>
<div class="controls" id="app_page_url">
<%= select('page','app_frontend_url', @app_frontend_urls || [],{}, {:selected => (@item.app_frontend_url || 'default_widget'),:rel => reload_after_list_changed_admin_pages_path}) rescue ''%>
<%= select('page','app_frontend_url', @app_frontend_urls || [], {:selected => @selected[:app_frontend_url],:rel => reload_after_list_changed_admin_pages_path}) rescue ''%>
</div>
</div>
@@ -67,7 +67,7 @@
</div>
<div class="control-group" id='data_count'>
<%= render :partial=>'data_count_field',:locals=>{:field_name=>"page[frontend_data_count]",:field_value=>@item.frontend_data_count} %>
<%= render :partial=>'data_count_field',:locals=>{:field_name=>"page[frontend_data_count]",:field_value=>@selected[:page_frontend_data_count]} %>
</div>
<div class="control-group">
@@ -4,7 +4,7 @@
<% @module_app.widget_fields.each_with_index do |frontend_field, i| %>
<%= i+1 %>
<%= select_tag "page[frontend_field][]",widget_field_options(i,@item) , :include_blank => true %>
<%= select_tag "page[frontend_field_type][]", widget_fiield_class_options(i,@item), :include_blank => true %> <br />
<%= select_tag "page[frontend_field_type][]", widget_field_class_options(i,@item), :include_blank => true %> <br />
<% end %>
<% end %>
@@ -1,16 +1,16 @@
<% if @module_app %>
<% if @selected[:module_app] %>
$('#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)} %>");
<% if !@module_app.app_pages.blank? or @module_app.has_default_widget? %>
$('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', options_for_select(@app_frontend_urls, (@item.app_frontend_url || 'default_widget')),{},{:rel => reload_after_list_changed_admin_pages_path}) %>");
<% 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}) %>");
<% else %>
$('#app_page_url').html("<div class='well'><%= t('default_widget.no_support_setting')%></div>");
<% end %>
<% 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? %>");
$('#app_page_frontend_style').html("<%= escape_javascript(select 'page', 'frontend_style', @selected[:module_app].widgets[@selected[:app_frontend_url]]) %>");
<% else %>
$('#app_page_frontend_style').html("<%= t('default_widget.no_support_setting')%>");
<% end %>
@@ -1 +1 @@
$("#<%= params[:dom_id] %>").parents(".rows").find(".link_switch_holder").html("<%= j link_to_field_switch(@index,'page','frontend_field',nil,@choosen_field) %>");
$("#<%= params[:dom_id] %>").parents(".rows").find(".link_switch_holder").html("<%= j link_to_field_switch(@index,'page','frontend_field',nil,@selected[:default_widget_field]) %>");