Home Analyst Portal

Move to the top of the specific service offering.

Vladimir_BudyakVladimir_Budyak Customer IT Monkey ✭

Hi guys!

How can I relocate specific Service Offering on the Home Page to the TOP of Service Catalog?

It necessary for me because standard Top Requests are not multilingual.

I wrote a little JS code and placed it in the "custom.js".

<b>// MovingUP TopRequests SO</b><br>$(document).ready(function() {<br>&nbsp;&nbsp;&nbsp; if (location.pathname == "/View/02efdc70-55c7-4ba8-9804-ca01631c1a54")<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var timer = setInterval(function() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($("div.cat>div.row>div").length > 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(timer);<br>&nbsp;&nbsp;&nbsp;&nbsp;var divTopR = ($("div.cat>div.row>div>h4[id='18bfaebe-c7e6-e002-15c6-a94621ebfc98']").parent().length == 0) ? $("div.cat>div.row>div>h4[id='d343f08f-b0c6-e3ec-0375-686a9dada207']").parent() : $("div.cat>div.row>div>h4[id='18bfaebe-c7e6-e002-15c6-a94621ebfc98']").parent();<br>&nbsp;&nbsp;&nbsp;&nbsp;divTopR.insertBefore($("div.cat>div.row>div").first());<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, 100);<br>&nbsp;&nbsp;&nbsp; }<br>});<p></p><p><br></p>

Where id='18bfaebe-c7e6-e002-15c6-a94621ebfc98' - ru-RU SO

Where id='d343f08f-b0c6-e3ec-0375-686a9dada207' - en-US SO

It works, but I think there is a better way. What do you think?

Sign In or Register to comment.