[jira] [Commented] (OFBIZ-6036) Return <strong> tag for Autocomplete Dropdown highlight

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-6036) Return <strong> tag for Autocomplete Dropdown highlight

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-6036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14300759#comment-14300759 ]

Jacques Le Roux commented on OFBIZ-6036:
----------------------------------------

A possible fix is this

{code}
Index: framework/images/webapp/images/selectall.js
===================================================================
--- framework/images/webapp/images/selectall.js (revision 1656366)
+++ framework/images/webapp/images/selectall.js (working copy)
@@ -519,12 +519,7 @@
                             var text = jQuery( this ).text();
                             if ( this.value && ( !request.term || matcher.test(text) ) )
                                 return {
-                                    label: text.replace(
-                                        new RegExp(
-                                            "(?![^&;]+;)(?!<[^<>]*)(" +
-                                            jQuery.ui.autocomplete.escapeRegex(request.term) +
-                                            ")(?![^<>]*>)(?![^&;]+;)", "gi"
-                                        ), "<strong>$1</strong>" ),
+                                    label: text,
                                     value: text,
                                     option: this
                                 };
{code}

But
# we still loose the ""Show All Items" button. To be checked also
# I guess we can do better, but tonight for me...

> Return <strong> tag for Autocomplete Dropdown highlight
> -------------------------------------------------------
>
>                 Key: OFBIZ-6036
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6036
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Wei Zhang
>            Assignee: Jacques Le Roux
>
> I got the highlight text like <strong>US</strong> for Autocomplete Dropdown. See http://demo-trunk-ofbiz.apache.org/example/control/FormWidgetExamples



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)