<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Change specific stream icons (with adding RequireJS and jQuery to hub) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Change-specific-stream-icons-with-adding-RequireJS-and-jQuery-to/m-p/1528186#M62539</link>
    <description>&lt;P&gt;For everybody who like to do the same, here is my solution:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create following subfolder: "C:\Program Files\Qlik\Sense\Client\hub\external\jquery"&lt;/LI&gt;&lt;LI&gt;Copy "jquery.min.js" to the created folder&lt;/LI&gt;&lt;LI&gt;Edit "C:\Program Files\Qlik\Sense\Client\hub.html"&lt;UL&gt;&lt;LI&gt;Add following code&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&amp;lt;script src="../resources/hub/external/jquery/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt; 
	&amp;lt;script&amp;gt;
		var $j = jQuery.noConflict();
		var checkExist = setInterval(function() {
			if ($j( "i.lui-icon--stream" ).length) {
				console.log("Exists!");
				$j("span.lui-list__text:contains('STRING_TO_FIND')").parent().find( "i.lui-icon--stream" ).removeClass( "lui-icon--stream" ).addClass( "lui-icon--stream-mystyle" );
				clearInterval(checkExist);
			}
			}, 100);
	&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;Restart all services for changes to take effect&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my example I search for all Stream containing "STRING_TO_FIND" and remove the original CSS-class "lui-icon--stream" and add my custom class (defined in "C:\Program Files\Qlik\Sense\Client\hub\external\leonardo-ui.css")&lt;/P&gt;&lt;P&gt;Furthermore I had to include the jQuery code into a "setInterval" function to wait for the elements to get rendered before manipulating them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments and suggestions to this solution are welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Tobias&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jan 2019 08:30:53 GMT</pubDate>
    <dc:creator>sirpod90</dc:creator>
    <dc:date>2019-01-09T08:30:53Z</dc:date>
    <item>
      <title>Change specific stream icons (with adding RequireJS and jQuery to hub)</title>
      <link>https://community.qlik.com/t5/App-Development/Change-specific-stream-icons-with-adding-RequireJS-and-jQuery-to/m-p/1512801#M62538</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;we have quit a few of streams and for a better overview I would like to mark specific streams with an other icon in the hub.&lt;/P&gt;&lt;P&gt;My plan was to change the style class to a different LUIicon with a line of code of jQuery and find replace statement.&lt;/P&gt;&lt;P&gt;But the problem is QlikSense does not use jQuery in the hub. I tried to modify require.config in the hub.html to load jQuery as well, but the than the hub returns an error and does not load, or it ignores the line of code from jQuery.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;hub.html&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;script&amp;gt;require.config( {baseUrl: "../resources", urlArgs: "1234567890123"} )( ["hub/hub", "hub/external/jquery/jquery"] );&amp;lt;/script&amp;gt;&lt;BR /&gt;$( document ).ready(function() {&lt;BR /&gt; console.log( "start jQuery" );&lt;BR /&gt; $( "i" ).find( "span.lui-icon--stream:contains('TEXT')" ).css( "color", "red" );&lt;BR /&gt; });&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I get jQuery work with reqierjs?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there an other solution to this problem?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:12:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-specific-stream-icons-with-adding-RequireJS-and-jQuery-to/m-p/1512801#M62538</guid>
      <dc:creator>sirpod90</dc:creator>
      <dc:date>2024-11-16T07:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Change specific stream icons (with adding RequireJS and jQuery to hub)</title>
      <link>https://community.qlik.com/t5/App-Development/Change-specific-stream-icons-with-adding-RequireJS-and-jQuery-to/m-p/1528186#M62539</link>
      <description>&lt;P&gt;For everybody who like to do the same, here is my solution:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create following subfolder: "C:\Program Files\Qlik\Sense\Client\hub\external\jquery"&lt;/LI&gt;&lt;LI&gt;Copy "jquery.min.js" to the created folder&lt;/LI&gt;&lt;LI&gt;Edit "C:\Program Files\Qlik\Sense\Client\hub.html"&lt;UL&gt;&lt;LI&gt;Add following code&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&amp;lt;script src="../resources/hub/external/jquery/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt; 
	&amp;lt;script&amp;gt;
		var $j = jQuery.noConflict();
		var checkExist = setInterval(function() {
			if ($j( "i.lui-icon--stream" ).length) {
				console.log("Exists!");
				$j("span.lui-list__text:contains('STRING_TO_FIND')").parent().find( "i.lui-icon--stream" ).removeClass( "lui-icon--stream" ).addClass( "lui-icon--stream-mystyle" );
				clearInterval(checkExist);
			}
			}, 100);
	&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;Restart all services for changes to take effect&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my example I search for all Stream containing "STRING_TO_FIND" and remove the original CSS-class "lui-icon--stream" and add my custom class (defined in "C:\Program Files\Qlik\Sense\Client\hub\external\leonardo-ui.css")&lt;/P&gt;&lt;P&gt;Furthermore I had to include the jQuery code into a "setInterval" function to wait for the elements to get rendered before manipulating them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any comments and suggestions to this solution are welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Tobias&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 08:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-specific-stream-icons-with-adding-RequireJS-and-jQuery-to/m-p/1528186#M62539</guid>
      <dc:creator>sirpod90</dc:creator>
      <dc:date>2019-01-09T08:30:53Z</dc:date>
    </item>
  </channel>
</rss>

