diff --git a/fields/ref.py b/fields/ref.py index 03d35d6..6e2e4e1 100644 --- a/fields/ref.py +++ b/fields/ref.py @@ -289,10 +289,12 @@ class Ref(Field): onchange=":field.getOnChange(zobj, layoutType)" multiple=":isMultiple"> - + (uid in uids)" value=":uid" + title=":title">:ztool.truncateValue(title, field.swidth) ''') pxSearch = Px(''' @@ -798,14 +800,12 @@ class Ref(Field): value = self.xhtmlToText.sub(' ', value) elif type(value) in sutils.sequenceTypes: value = ', '.join(value) - prefix = '' - if res: - prefix = ' | ' + prefix = res and ' | ' or '' res += prefix + value if unlimited: return res maxWidth = self.width or 30 if len(res) > maxWidth: - res = res[:maxWidth-2] + '...' + res = refObject.tool.o.truncateValue(res, maxWidth) return res def getIndexOf(self, obj, refObj):