daily commit

This commit is contained in:
Fu Matthew committed 2013-01-23 18:51:18 +08:00
1 parent 0cc616f988
commit 979df9ac80
20 files changed
+179 -132

No files matched your search

+15 -9
View File
@@ -354,6 +354,7 @@ namespace :migrate do
task :make_default_widget_work_config => :environment do
a = ModuleApp.where(:key=>'announcement').first
a.widgets[:default_widget] = ['typeA','typeC','typeB_style2','typeB_style3','typeB_style4']
a.widgets = {"index"=>["1", "2"], "default_widget"=>["typeA", "typeC", "typeB_style2", "typeB_style3", "typeB_style4"]}
a.widget_fields = [
["title","announcement.default_widget.title"],
["bulletin_category_with_title","announcement.default_widget.bulletin_category_with_title"],
@@ -392,17 +393,22 @@ namespace :migrate do
task :correct_gallery_and_web_resoure_config => :environment do
a = ModuleApp.where(:key=>'web_resource').first
a.widgets = {}
a.widgets[:web_links] = []
a.widgets[:home_list] = []
a.save
if a
a.widgets = {}
a.widgets[:web_links] = []
a.widgets[:home_list] = []
a.save
end
a = ModuleApp.where(:key=>'gallery').first
a.widgets = {}
a.widgets[:widget1] = []
a.widget_options_fields_i18n = {"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.widget_option.album"}}
a.widget_options = {"widget1"=>{"vertical"=>[1, 2], "horizontal"=>[1, 2, 3, 4, 5, 6], "album_id"=>{"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}}}
a.save
if a
a.widgets = {}
a.widgets[:widget1] = []
a.widget_options_fields_i18n = {"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.widget_option.album"}}
a.widget_options = {"widget1"=>{"vertical"=>[1, 2], "horizontal"=>[1, 2, 3, 4, 5, 6], "album_id"=>{"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}}}
a.save
end
end
end