style for front end

This commit is contained in:
Fu Matthew committed 2013-03-11 18:21:17 +08:00
1 parent e53ad9f5d1
commit 311d741f92
5 files changed
+64 -55

No files matched your search

+15 -2
View File
@@ -33,15 +33,20 @@ module OrbitApp
end
def to_module_app_format #For ModuleApp to fetch data
@frontend_pages.collect{|t| [t.get_i18n,t.name]}
result = {}
@frontend_pages.collect do |t|
result[t.name] = {:i18n=>t.get_i18n,:style=>t.get_style}
end
result
end
end
class AppPage
attr_reader :name
attr_reader :style
def initialize(name,&block)
@style
@name = name
@frontend_i18n = 'rulingcom.errors.init.app_page_noname'
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
@@ -59,6 +64,14 @@ module OrbitApp
end
def get_style
@style
end
def style(ary)# []
@style = ary
end
protected
end# of AppPage