Fix extra loaded js: the widgets only need to render layout when they need js.
This commit is contained in:
parent
6b2aeadde6
commit
ebf3a2eae4
|
@ -1,7 +1,7 @@
|
||||||
class ObitFrontendComponentController< ApplicationController
|
class ObitFrontendComponentController< ApplicationController
|
||||||
before_filter :setup_vars
|
before_filter :setup_vars
|
||||||
before_filter {|c| c.front_end_available(@app_title)}
|
before_filter {|c| c.front_end_available(@app_title)}
|
||||||
layout 'module_widget'
|
layout :false
|
||||||
|
|
||||||
def setup_vars
|
def setup_vars
|
||||||
@app_title = request.fullpath.split('/')[2]
|
@app_title = request.fullpath.split('/')[2]
|
||||||
|
|
|
@ -28,6 +28,7 @@ class Panel::Announcement::Widget::BulletinsController < ObitWidgetController
|
||||||
@selected_tag = AnnouncementTag.find(params[:id]) rescue @tags[0]
|
@selected_tag = AnnouncementTag.find(params[:id]) rescue @tags[0]
|
||||||
@bulletins = @selected_tag.get_visible_bulletins.page(params[:page]).per(5) rescue nil
|
@bulletins = @selected_tag.get_visible_bulletins.page(params[:page]).per(5) rescue nil
|
||||||
@web_links = WebResourceTag.first(:conditions => {:en => @selected_tag[:en]}).get_visible_links.page(params[:page]).per(5) rescue nil
|
@web_links = WebResourceTag.first(:conditions => {:en => @selected_tag[:en]}).get_visible_links.page(params[:page]).per(5) rescue nil
|
||||||
|
render :layout => 'module_widget'
|
||||||
end
|
end
|
||||||
|
|
||||||
def reload_bulletins
|
def reload_bulletins
|
||||||
|
|
Reference in New Issue