fix sidebar icon for page.

fix i18n on sidebar
make sidebar sortable by changing db value. Need interface
This commit is contained in:
Fu Matthew authored and chris committed 2013-02-19 14:21:53 +08:00
1 parent 9771d42587
commit fcb49723b4
5 files changed
+18 -7

No files matched your search

+11
View File
@@ -24,6 +24,11 @@ module OrbitApp
def all
return @@side_bars
end
def all_get_ordered!
@@side_bars.sort! {|x,y| x.get_sidebar_order! <=> y.get_sidebar_order! }
end
end
extend ClassMethods
@@ -52,12 +57,18 @@ module OrbitApp
@app_base_path = ''
@module_app_key = key
@get_module_app = get_module_app
@sidebar_order = 0
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
# setup_module_app(module_app_key)
finalize!
SideBarRegisition.add(self)
SideBarRegisition.all_get_ordered!
end
def get_sidebar_order!
@sidebar_order = get_module_app.sidebar_order
end
def get_module_app
@get_module_app.call
end