Gravatar for erkan.yildiz@avanade.com

Question by erkany, Jan 9, 2015 10:03 AM

Minor UI issue on Coveo Search View

Hi,

When there is 1 result the Coveo results number display has a minor UI issue. There is no spacing between "1" and "of". See : http://imgur.com/rKgcp6F

Is there a way to fix this without modifying core Coveo JS files?

1 Reply
Gravatar for cgagnon@coveo.com

Answer by cgagnon, Jan 9, 2015 2:12 PM

Hi erkany,

As a workaround you could try to add a padding by selecting Coveo.$('.CoveoQuerySummary span :first-child') and set a padding.

This is indeed a bug and we will fix it soon.

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Jan 9, 2015 2:23 PM

Hi,

Where do I put this to make sure it happens after search is complete?

Gravatar for cgagnon@coveo.com

Comment by cgagnon, Jan 9, 2015 2:40 PM

You can put it inside a querySuccess event attachment, documented here https://developers.coveo.com/display/public/JsSearch/Events#Events-querySuccess, after the initialisation of the Javascript Search Framework, $('#search').coveo('init');, documented here https://developers.coveo.com/display/public/JsSearch/Getting+Started+with+the+JavaScript+Search+Framework

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Jan 9, 2015 4:32 PM

Hi,

Below did not work for me:

Coveo.$('#search').on('querySuccess', function (e, args) {

            if(args.results.totalCount==1){ //padding issue fix
                Coveo.$('.CoveoQuerySummary span :first-child').addClass('CoveoPaddingFix');
            }
        });

Can you verify if the selector works and provide us a working version?

Thanks

Gravatar for cgagnon@coveo.com

Comment by cgagnon, Jan 9, 2015 4:47 PM

Hi, what version of Coveo for Sitecore do you have?

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Jan 9, 2015 5:30 PM

Hi,

I have 7.5. I see the code is hitting the line where I try to set the CSS. But the line I have does not add the css class I want.

Gravatar for cgagnon@coveo.com

Comment by cgagnon, Jan 12, 2015 9:24 AM

Hi, I mean the Coveo for Sitecore package you installed on you Sitecore version. Our latest release is 3.0.891. What is yours?

Gravatar for cgagnon@coveo.com

Comment by cgagnon, Jan 15, 2015 10:04 AM

Hi,

Were you able to implement the workaround or still need help?

Ask a question