fix default widget link
This commit is contained in:
1 parent
8592015b1b
commit
73bca03b33
6 files changed
+11
-15
No files matched your search
@@ -54,7 +54,7 @@ class Admin::PagePartsController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
binding.pry
|
||||
|
||||
@part = PagePart.find(params[:id])
|
||||
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type],params[:page_part][:widget_field_is_link] )
|
||||
|
||||
@@ -73,7 +73,7 @@ class Admin::PagePartsController < ApplicationController
|
||||
params[:page_part][:category] = []
|
||||
end
|
||||
|
||||
|
||||
params[:page_part][:widget_field].each{|t| t[2] = (t[2]=="true" ? true : false )}
|
||||
|
||||
if @part.update_attributes(params[:page_part])
|
||||
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
|
||||
|
||||
@@ -60,15 +60,12 @@ class DefaultWidgetController< OrbitWidgetController
|
||||
when "typeA"
|
||||
@tag_class = 'default_widget_typeA'
|
||||
@partial = "typeA"
|
||||
render "typeA"
|
||||
when /typeB_/
|
||||
@tag_class = "default_widget_#{params[:type]}"
|
||||
@partial = "typeB"
|
||||
render "typeB"
|
||||
when "typeC"
|
||||
@tag_class = 'default_widget_typeC'
|
||||
@partial = "typeC"
|
||||
render "typeC"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user