ntu dropdown fix list sort

This commit is contained in:
Spen authored and Matt K. Fu committed 2013-05-14 14:19:55 +08:00
1 parent b8da40b4ae
commit 5b368235e8
2 files changed
+17 -9

No files matched your search

+7
View File
@@ -184,6 +184,13 @@ class User
return ::AttributeValue.where(attribute_field_id: @AttributeField.id, :user_id => user_id).first
end
def self.get_role_member_data_by_sort(role_status_id)
a = Array.new
where(:role_status_ids=>role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,"staff","job_title")['val'], t ] }
member_data = a.sort
member_data_tmp = member_data.collect {|v| v[1] }
end
def create_dept_cache
dept_hash = {}