Commit 66878f3c authored by Paul Winkler's avatar Paul Winkler

Collector 1317: added FindSupport support for cmf's SearchableText.

parent dfe6a688
...@@ -109,7 +109,6 @@ class FindSupport(ExtensionClass.Base): ...@@ -109,7 +109,6 @@ class FindSupport(ExtensionClass.Base):
if hasattr(ob, 'aq_base'): if hasattr(ob, 'aq_base'):
bs=ob.aq_base bs=ob.aq_base
else: bs=ob else: bs=ob
if ( if (
(not obj_ids or absattr(bs.getId()) in obj_ids) (not obj_ids or absattr(bs.getId()) in obj_ids)
and and
...@@ -119,7 +118,11 @@ class FindSupport(ExtensionClass.Base): ...@@ -119,7 +118,11 @@ class FindSupport(ExtensionClass.Base):
(not obj_searchterm or (not obj_searchterm or
(hasattr(ob, 'PrincipiaSearchSource') and (hasattr(ob, 'PrincipiaSearchSource') and
ob.PrincipiaSearchSource().find(str(obj_searchterm)) >= 0 ob.PrincipiaSearchSource().find(str(obj_searchterm)) >= 0
)) )
or
(hasattr(ob, 'SearchableText') and
ob.SearchableText().find(str(obj_searchterm)) >= 0)
)
and and
(not obj_expr or expr_match(ob, obj_expr)) (not obj_expr or expr_match(ob, obj_expr))
and and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment