fix widget and fronted setting interface. checked with Spen
This commit is contained in:
1 parent
dc5f24ab22
commit
425a320c02
9 files changed
+20
-17
No files matched your search
@@ -31,7 +31,7 @@ class Admin::PagePartsController < OrbitBackendController
|
||||
|
||||
@selected={
|
||||
:module_app=> @part.module_app ? @part.module_app : nil,
|
||||
:app_frontend_url=> @part.widget_path, #@module_apps.first
|
||||
:app_frontend_url=> @part.widget_path || "default_widget", #@module_apps.first
|
||||
:category=>nil, #fetch by method: get_categories_and_tags
|
||||
:tag=>nil, #fetch by method: get_categories_and_tags
|
||||
:page_frontend_data_count=>nil,
|
||||
|
||||
@@ -121,7 +121,7 @@ include Admin::FrontendWidgetInterface
|
||||
@index = params[:field_seri].to_i
|
||||
@item = Page.find(params[:id]) rescue Page.new
|
||||
@selected = {
|
||||
:module_app=> (@item.module_app || ModuleApp.find(params[:module_app_id]) ),
|
||||
:module_app=> (ModuleApp.find(params[:module_app_id]) || @item.module_app ),
|
||||
:default_widget_field=>params[:widget_field_value]
|
||||
}
|
||||
# @choosen_field = params[:widget_field_value]
|
||||
@@ -160,7 +160,6 @@ include Admin::FrontendWidgetInterface
|
||||
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
if @item.update_attributes(params[:page])
|
||||
flash[:notice] = t('update.success.page')
|
||||
respond_to do |format|
|
||||
|
||||
Reference in new issue
Block a user