fix error for sort announcements because of get nil by call enable_manually_sort
This commit is contained in:
parent
4043dfed5c
commit
b3dbabef5b
|
@ -1,4 +1,6 @@
|
|||
module AnnouncementsHelper
|
||||
extend self
|
||||
|
||||
def data_to_human_type(a,set_tag_ids=nil,tmp_enable_annc_dept=false,annc_depts=[])
|
||||
tmp_enable_annc_dept = @tmp_enable_annc_dept if @tmp_enable_annc_dept
|
||||
annc_depts = @annc_depts if @annc_depts
|
||||
|
@ -464,7 +466,6 @@ module AnnouncementsHelper
|
|||
</div>").html_safe
|
||||
end
|
||||
|
||||
class << self
|
||||
def complementaryColor(my_hex)
|
||||
if my_hex[0] == '#'
|
||||
my_hex = my_hex[1..-1]
|
||||
|
@ -473,6 +474,7 @@ module AnnouncementsHelper
|
|||
comp = rgb.map{|a| (255 - a.to_i(16)).to_s(16).rjust(2,'0')}
|
||||
'#'+comp.join
|
||||
end
|
||||
|
||||
def lighten_color(my_hex,percent)
|
||||
if my_hex[0] == '#'
|
||||
my_hex = my_hex[1..-1]
|
||||
|
@ -486,6 +488,7 @@ module AnnouncementsHelper
|
|||
end
|
||||
'#'+comp.join
|
||||
end
|
||||
|
||||
def enable_manually_sort
|
||||
if defined?(OrbitHelper::SharedHash) && OrbitHelper::SharedHash
|
||||
OrbitHelper::SharedHash['announcement'][:enable_manually_sort]
|
||||
|
@ -494,4 +497,3 @@ module AnnouncementsHelper
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue