Fix bugs in design.

The static js were loaded after the page js.
parser_back_end.rb wasn't changed for the new routes.
The themes weren't parsed and saved correctly.
This commit is contained in:
Christophe Vilayphiou committed 2012-01-31 16:38:25 +08:00
1 parent 4906894fb5
commit ccbde122df
3 files changed
+6 -22

No files matched your search

+1 -17
View File
@@ -70,26 +70,10 @@ class Design
end
if (self.default_css && self.default_css.changed)
self.default_css.parse_urls
attrs = self.default_css.attributes
file = self.default_css.file
file_orig = self.default_css.file_orig
self.default_css.destroy
d = self.build_default_css(attrs)
d.file = file
d.file_orig = file_orig
d.save
end
self.themes.each do |theme|
if theme.changed
if theme.changed?
theme.parse_urls
attrs = theme.attributes
file = theme.file
file_orig = theme.file_orig
theme.destroy
t = self.themes.build(attrs)
t.file = file
t.file_orig = file_orig
t.save
end
end
end