solved conflict for member_new_ui

This commit is contained in:
Spen authored and saurabhbhatia committed 2013-08-12 15:40:34 +08:00
1 parent 9c7558847a
commit 6c514770bc
92 files changed
+3204 -2102

No files matched your search

+18 -6
View File
@@ -30,8 +30,14 @@ class AttributeValue
else
self.attribute_field.get_data["cross_lang"] =="true" ? self["val"] : Hash[VALID_LOCALES.collect{|lang| [lang,self[lang.to_sym]]}]
end
when 'select','date','radio_button','address'
when 'select','radio_button','address'
self["val"]
when 'date'
if !self["val"].blank? and !self["val"]['(1i)'].blank?
"#{self["val"]['(1i)']}/#{self["val"]['(2i)']}/#{self["val"]['(3i)']}"
else
self["val"]
end
when 'checkbox'
self["val"]
end #end of case self.attribute_field.markup
@@ -50,7 +56,7 @@ class AttributeValue
case self.attribute_field.add_more
when true
if self.attribute_field.locale
add_more_index.nil? ? self.value.collect{|t| t[locale]}.join(",") : self.value(add_more_index)[locale]
add_more_index.nil? ? self.value.collect{|t| t[locale.to_s]}.join(",") : self.value(add_more_index)[locale]
else
add_more_index.nil? ? self.value.join(",") : self.value(add_more_index)
end
@@ -69,8 +75,10 @@ class AttributeValue
when "date"
if self.attribute_field.date_is_range?
get_date_by_format(:from) + ' ~ ' + get_date_by_format(:to)
# self.value["from"] + ' ~ ' + self.value["to"]
else
get_date_by_format
# self.value
end
when "address"
@@ -95,13 +103,17 @@ class AttributeValue
def get_date(item = nil)
case item
when :from
data = self[:val]["from"]
# data = self[:val]["from"]
data = self.value["from"]
when :to
data = self[:val]["to"]
# data = self[:val]["to"]
data = self.value["to"]
when nil
data = self[:val]
# data = self[:val]
data = self.value
end
Date.new(data["(1i)"].to_i,data["(2i)"].to_i,data["(3i)"].to_i) rescue nil
# Date.new(data["(1i)"].to_i,data["(2i)"].to_i,data["(3i)"].to_i) rescue nil
end