fix widget.
This commit is contained in:
		
							parent
							
								
									41bcbdd2f0
								
							
						
					
					
						commit
						47a63e3dab
					
				|  | @ -102,9 +102,19 @@ module ParserFrontEnd | |||
|         when 'text' | ||||
|           ret << part.content_translations[locale.to_s] rescue '' | ||||
|         when 'module_widget' | ||||
|           url = "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" | ||||
|           # url = "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" | ||||
|           # options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}" | ||||
|           # ret << "<orbit_front path='#{url + options}' part_id=#{part.id}></div>" | ||||
|                     url = case part.widget_path | ||||
|                     when 'default_widget' | ||||
|                         "/panel/orbit_app/widget/\#{part.widget_style}?inner=true" | ||||
|                       else | ||||
|                         "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" | ||||
|                     end | ||||
|            | ||||
|           options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}" | ||||
|           ret << "<orbit_front path='#{url + options}' part_id=#{part.id}></div>" | ||||
|           ret << "<orbit_front path='#{url + options}' part_id=#{part.id} class='dymanic_load widget'></orbit_front>" | ||||
|            | ||||
|         when 'public_r_tag' | ||||
|           ret << send("generate_#{part.public_r_tag}s", part.public_r_tag_object_id, page) | ||||
|         else | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue