demo site widget
This commit is contained in:
1 parent
f223e4bb1e
commit
c0cac812c5
19 files changed
+312
-593
No files matched your search
@@ -26,6 +26,10 @@ class Admin::PagePartsController < ApplicationController
|
||||
@module_app = @part.module_app ? @part.module_app : @module_apps[0]
|
||||
@r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag
|
||||
@tag_objects = @r_tag.classify.constantize.all rescue nil
|
||||
|
||||
@widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0]
|
||||
@widget_style = @module_app.widgets[@widget_path]
|
||||
|
||||
case @module_app.key
|
||||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
@@ -69,8 +73,12 @@ class Admin::PagePartsController < ApplicationController
|
||||
|
||||
def reload_widgets
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
|
||||
@widget_path = @module_app.widgets.keys[0]
|
||||
@widget_style = @module_app.widgets[@widget_path]
|
||||
case @module_app.key
|
||||
when 'announcement'
|
||||
# @widget_style = @module_app.widgets['index']
|
||||
@categories = BulletinCategory.all
|
||||
@tags = AnnouncementTag.all
|
||||
when 'news'
|
||||
@@ -84,6 +92,16 @@ class Admin::PagePartsController < ApplicationController
|
||||
format.js {}
|
||||
end
|
||||
end
|
||||
|
||||
def reload_widget_styles
|
||||
@module_app = ModuleApp.find(params[:module_app_id])
|
||||
|
||||
@widget_style = @module_app.widgets[params[:id]]
|
||||
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
end
|
||||
end
|
||||
|
||||
def reload_r_tag_options
|
||||
@r_tag = (ModuleApp.find(params[:id]) rescue nil) || params[:id]
|
||||
|
||||
Reference in new issue
Block a user