PageSourceSearch

https://sarcoma.org.uk/wp-content/plugins/tooltips-pro/js/jdirectory/jquery.directory.js?ver=7.1.2

js sarcoma.org.uk collected 2026-10-02 02:46:32 UTC 10,253 bytes, 282 lines download raw bytes

1/*!
2 * jQuery.Directory. The jQuery directory plugin
3 *
4 * Copyright (c) 2014 - 2021 Tomas Zhu
5 * http://tomas.zhu.bz
6 * Support: http://tomas.zhu.bz/jquery-directory-plugin.html
7 * Licensed under GPLv3 licenses
8 * http://www.gnu.org/licenses/gpl.html
9 *
10 * Launch  : June 2014
11 * Version : 14.3.4
12 * Released: 10 June, 2014 - 00:00
13 * Copyright 2011 - 2021 Tomas Zhu https://tooltips.org/
14    This program comes with ABSOLUTELY NO WARRANTY;
15    https://www.gnu.org/licenses/gpl-3.0.html
16    https://www.gnu.org/licenses/quick-guide-gplv3.html
17 */
18(function($)
19{
20	$.fn.directory = function(options)
21	{
22		if ( options['language'] == 'sv' ) 
23		{
24			if ( options['number'] == 'yes' )
25			{
26				$.fn.directory.defaults.navigation = 
27					['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'å', 'ä', 'ö']				
28			}
29			if ( options['number'] == 'no' )
30			{
31				$.fn.directory.defaults.navigation = 
32					['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'å', 'ä', 'ö']				
33			}
34		};
35		
36		if ( options['language'] == 'en' )
37		{
38			if ( options['number'] == 'yes' )
39			{
40				$.fn.directory.defaults.navigation = 
41					['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']				
42			}
43
44			if ( options['number'] == 'no' )
45			{
46				$.fn.directory.defaults.navigation = 
47					['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']				
48			}
49		}
50		
51		if ( options['language'] == 'de' )
52		{
53			if ( options['number'] == 'yes' )
54			{
55				$.fn.directory.defaults.navigation = 
56					['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'ä', 'ö', 'ü', 'ß']
57			}
58			if ( options['number'] == 'no' )
59			{
60				$.fn.directory.defaults.navigation = 
61					['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'ä', 'ö', 'ü', 'ß']
62			}
63		}
64		if ( options['language'] == 'fr' )
65		{
66			if ( options['number'] == 'yes' )
67			{
68				$.fn.directory.defaults.navigation = 
69					['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'é', 'è', 'ç', 'ë', 'ò', 'ô', 'ö', 'ù', 'à', 'â']				
70			}
71			if ( options['number'] == 'no' )
72			{
73				$.fn.directory.defaults.navigation = 
74					['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'é', 'è', 'ç', 'ë', 'ò', 'ô', 'ö', 'ù', 'à', 'â']				
75			}								
76		}
77		if ( options['language'] == 'es' )
78		{
79			if ( options['number'] == 'yes' )
80			{
81				$.fn.directory.defaults.navigation = 
82					['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'ñ', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']				
83			}
84			if ( options['number'] == 'no' )
85			{
86				$.fn.directory.defaults.navigation = 
87					['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'ñ', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']				
88			}
89		}
90		if ( options['language'] == 'fi' )
91		{
92			if ( options['number'] == 'yes' )
93			{
94				$.fn.directory.defaults.navigation = 
95					['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 'š', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'ž', 'å', 'ä', 'ö']								
96			}
97			if ( options['number'] == 'no' )
98			{
99				$.fn.directory.defaults.navigation = 
100					['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 'š', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'ž', 'å', 'ä', 'ö']								
101			}			
102		}
103		
104		if ( options['language'] == 'ru' )
105		{
106			if ( options['number'] == 'yes' )
107			{
108				$.fn.directory.defaults.navigation = 
109					['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'б', 'в', 'г', 'д', 'е', 'ё', 'ж', 'з', 'и', 'й', 'k', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', 'ъ', 'ы', 'ь', 'э', 'ю','я']								
110			}
111			if ( options['number'] == 'no' )
112			{
113				$.fn.directory.defaults.navigation = 
114					['a', 'б', 'в', 'г', 'д', 'е', 'ё', 'ж', 'з', 'и', 'й', 'k', 'л', 'м', 'н', 'о', 'п', 'р', 'с', 'т', 'у', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', 'ъ', 'ы', 'ь', 'э', 'ю','я']								
115			}			
116		}
117
118		if ( options['language'] == 'custom' )
119		{
120			if ( options['number'] == 'yes' )
121			{
122				if (options['numberletters'] == undefined)
123				{
124					options['numberletters'] = '0,1,2,3,4,5,6,7,8,9';
125				}
126				if (options['alphabetletters'] == undefined)
127				{
128					options['alphabetletters'] = 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z';
129				}
130				
131				var customizedalphabetletters = options['numberletters'] + ',' + options['alphabetletters'];
132				var customizedalphabetlettersarray = customizedalphabetletters.split(',');
133				$.fn.directory.defaults.navigation = customizedalphabetlettersarray;
134			}
135			if ( options['number'] == 'no' )
136			{
137				if (options['alphabetletters'] == undefined)
138				{
139					options['alphabetletters'] = 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z';
140				}
141				
142				var customizedalphabetletters =  options['alphabetletters'];
143				var customizedalphabetlettersarray = customizedalphabetletters.split(',');
144				$.fn.directory.defaults.navigation = customizedalphabetlettersarray;
145			}
146		}
147		
148		
149		if ( options['language'] == 'custom' )
150		{
151			if (options['alphabetletters'] == undefined)
152			{
153				options['alphabetletters'] = 'ALL';
154			}
155			var customizedwordofselectall = $.trim(options['wordofselectall']);
156		}
157		else
158		{
159			var customizedwordofselectall = 'ALL';
160		}
161		
162		
163		var opts = $.extend($.fn.directory.defaults, options || {});
164		$('.navitem').css('font-size',$.fn.directory.defaults.navitemdefaultsize);
165
166		
167		var tooltipsShowNav = function(tooltipsNavBar)
168		{
169			var currentThis = $(tooltipsNavBar);
170
171			$(currentThis).find('span').each(function()
172			{
173				var currentString = $.trim($(this).text()).toLowerCase();
174				var firstAlpha = currentString.charAt(0);
175
176				$(this).data('alpha',firstAlpha);
177			});
178			
179			var navbar = '<a navname="navnameall" class="navitem allDirectory" href="#navnameall">'+customizedwordofselectall+'</a>';
180			var navname = '';
181			$.each($.fn.directory.defaults.navigation, function(i,val)
182			{
183				var directorySelectors = $.fn.directory.defaults.selectors
184				var ttt = $(directorySelectors);
185				var countStore = 0;
186				$.each(ttt,function()
187				{
188					var nowVal = $(this);
189					var alphacount = $(nowVal).data('alpha');
190					if (val == alphacount)
191					{
192						countStore = countStore + 1;
193					}
194				}
195				)
196				
197				var navname = 'navname' + val;
198				var navnamehref = 'navnameall';
199				var displayvalclass = navname; //14.3.4
200				if (countStore == 0 ) 
201				{
202					if ( $.fn.directory.defaults.hidezeronumberitem == 'yes' )
203					{
204						navbar = navbar + '<a name="' + navname + '" class="navitem navitemhidden '+displayvalclass+'" data-counter='+countStore+' href="#' + n
204avnamehref + '">'+val.toUpperCase()+'</a>';
205					}
206					else
207					{
208						navbar = navbar + '<a name = "' + navname + '" class="navitem  '+displayvalclass+'" data-counter='+countStore+' href="#' + navnamehref + '">'+val.toUpperCase()+'</a>';
209					}
210						
211				}
212				else 
213				{
214						navbar = navbar + '<a name = "' + navname + '" class="navitem '+displayvalclass+'" href="#' + navnamehref +'">'+val.toUpperCase()+'<span class="tooltiplist_count">'+countStore+'</span></a>';
215				}
216  			});
217  			navbar = '<div class="navitems">' + navbar + '</div>';
218			currentThis.prepend(navbar);
219
220			$('.navitem').css('color',$.fn.directory.defaults.navitembackground);
221			$('.navitem').click(function()
222			{
223				$('.navitem').removeClass('selecteddirectory');
224				$('.navitem').css('font-size',$.fn.directory.defaults.navitemdefaultsize);
225				$(this).addClass('selecteddirectory'); 
226				$(this).css('font-size',$.fn.directory.defaults.navitemselectedsize);
227				$('.navitem').css('background','#fff');
228
229				$(this).css('background',$.fn.directory.defaults.navitembackground);
230				$('.navitem').css('color',$.fn.directory.defaults.navitembackground);
231				$(this).css('color','#fff');
232				var currentCheck = $(this);
233				var clickedAlpha = $.trim(currentCheck.text()).toLowerCase();
234				var clickedAlphaFirst = clickedAlpha.charAt(0);
235
236				$(currentThis).find('.tooltips_list>span').each(function()
237				{
238					var alpha = $(this).data('alpha');
239					
240					if (clickedAlphaFirst == alpha)
241					{
242						$(this).parent().css('display','block');
243						$('.tooltiplist_count').css('display','inline-block');
244					}
245					else
246					{
247						$(this).parent().css('display','none');
248						$('.tooltiplist_count').css('display','inline-block');
249					}
250
251					var customizedwordofselectalllow = customizedwordofselectall.toLowerCase()
252					if (clickedAlpha == customizedwordofselectalllow)
253					{
254						$(this).parent().css('display','block');
255					}
256				});
257  			});			
258		}		
259		
260		var tooltipsResults = this.each(function () 
261		{
262			tooltipsShowNav(this);
263		});
264		return tooltipsResults;
265		
266   };
267   
268   $.fn.directory.defaults = {
269			navigation: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],				
270			frontground: 'red',
271			navitembackground: '#007DBD',
272			methods:	'list',
273			navitemdefaultsize:'16px',
274			navitemselectedsize:'25px',
275			number:'yes',
276			numberletters:'0,1,2,3,4,5,6,7,8,9',
277			alphabetletters:'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z',
278			wordofselectall:'ALL',
279			hidezeronumberitem:'no',
280			selectors:	'.tooltips_list > span'
281			};
282})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.