update to fix search for flag dropdown
Dieser Commit ist enthalten in:
Ursprung
fc602db262
Commit
7e0c2b37f4
1 geänderte Dateien mit 7 neuen und 10 gelöschten Zeilen
13
lib/flags.rb
13
lib/flags.rb
|
@ -1,8 +1,7 @@
|
||||||
class CustomWizard::Flag
|
class CustomWizard::Flag
|
||||||
def initialize(id, name, value)
|
def initialize(id, name)
|
||||||
@id = id
|
@id = id
|
||||||
@name = name
|
@name = name
|
||||||
@value = value
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def id
|
def id
|
||||||
|
@ -12,10 +11,6 @@ class CustomWizard::Flag
|
||||||
def name
|
def name
|
||||||
@name
|
@name
|
||||||
end
|
end
|
||||||
|
|
||||||
def value
|
|
||||||
@value
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class CustomWizard::Flags
|
class CustomWizard::Flags
|
||||||
|
@ -25,8 +20,10 @@ class CustomWizard::Flags
|
||||||
|
|
||||||
flagscollection = []
|
flagscollection = []
|
||||||
|
|
||||||
raw_flags.map do |name, code|
|
raw_flags.map do |name, pic|
|
||||||
flagscollection << CustomWizard::Flag.new(name, name, code)
|
# This is super hacky. Adding the trailing space actually stops search breaking in the dropdown! (and doesn't compromise the view!)
|
||||||
|
# Feeding just name, name will break search
|
||||||
|
flagscollection << CustomWizard::Flag.new(name, "#{name} ")
|
||||||
end
|
end
|
||||||
|
|
||||||
flagscollection
|
flagscollection
|
||||||
|
|
Laden …
In neuem Issue referenzieren