PageSourceSearch

https://hrantdink.org/templates/hafiza_merkezi/js/jsn_template.js

js hrantdink.org collected 2026-09-24 08:50:59 UTC 3,081 bytes, 100 lines download raw bytes

1/**
2* @author    JoomlaShine.com http://www.joomlashine.com
3* @copyright Copyright (C) 2008 - 2011 JoomlaShine.com. All rights reserved.
4* @license   GNU/GPL v2 http://www.gnu.org/licenses/gpl-2.0.html
5*/
6
7	var JSNTemplate = {
8		_templateParams:		{},
9
10		initOnDomReady: function()
11		{
12			// Setup HTML code for typography
13			JSNUtils.createGridLayout("DIV", "grid-layout", "grid-col", "grid-lastcol");
14			JSNUtils.createExtList("list-number-", "span", "jsn-listbullet", true);
15			JSNUtils.createExtList("list-icon", "span", "jsn-listbullet", false);
16
17			// Setup Go to top link settings
18			if (_templateParams.enableGotopLink) {
19				JSNUtils.setToTopLinkCenter(_templateParams.enableRTL, false);
20				JSNUtils.setSmoothScroll(false);
21				JSNUtils.setFadeScroll(false);
22			}
23
24			// General layout setup
25			JSNUtils.setupLayout();
26
27			// Setup mobile menu
28			JSNUtils.setMobileMenu("menu-mainmenu", _templateParams.mobileMenuEffect);
29
30			if (JSNUtils.isDesktopViewOnMobile(_templateParams)) {
31				// Setup mobile sticky
32				if (_templateParams.enableMobileMenuSticky && JSNUtils.checkMobile()) {
33					JSNUtils.setMobileSticky('jsn-header');
34				}
35			}
36			else {
37				JSNUtils.initMenuForDesktopView();
38			}
39
40			// Setup module dropdown on mobile
41			JSNUtils.setDropdownModuleEvents();
42
43			// Setup mobile sitetool
44			JSNUtils.setMobileSitetool();
45
46			// Stick main menu to top
47			if (_templateParams.enableDesktopMenuSticky) {
48				JSNUtils.setDesktopSticky('jsn-header');
49			}
50
51			// Add class to elements according to mainmenu class suffixes
52			JSNTemplate.setModuleDropdown();
53		},
54
55		setModuleDropdown: function()
56		{
57			if ($$('ul.menu-mainmenu') == undefined) return false;
58
59			var ddMenu = $$('ul.menu-mainmenu').getProperty('class')[0].replace(/^\s+|\s+$/g, '').split(' ');
60			var count =  ddMenu.length;
61			if(count)
62			{
63				for(var i = 0 ; i < count; i++)
64				{
65					if (ddMenu[i] == 'menu-richmenu')
66					{
67						$$('#jsn-menu div.jsn-modulecontainer.display-dropdown').addClass('richmenu');
68						$$('#jsn-menu div.jsn-modulecontainer.display-inline').addClass('richmenu');
69						$$('#jsn-sitetoolspanel').addClass('richmenu');
70					}
71					if (ddMenu[i] == 'menu-iconmenu')
72					{
73						$$('#jsn-menu div.jsn-modulecontainer.display-dropdown').addClass('iconmenu');
74						$$('#jsn-menu div.jsn-modulecontainer.display-inline').addClass('iconmenu');
75						$$('#jsn-sitetoolspanel').addClass('iconmenu');
76					}
77				}
78			}
79		},
80
81		initOnLoad: function()
82		{
83			// Setup event to update submenu position
84			JSNUtils.setSubmenuPosition(_templateParams.enableRTL);
85
86			// Stick positions layout setup
87			JSNUtils.setVerticalPosition("jsn-pos-stick-leftmiddle", 'middle');
88			JSNUtils.setVerticalPosition("jsn-pos-stick-rightmiddle", 'middle');
89		},
90
91		initTemplate: function(templateParams)
92		{
93			// Store template parameters
94			_templateParams = templateParams;
95
96			// Init template on "domready" event
97			window.addEvent('domready', JSNTemplate.initOnDomReady);
98			window.addEvent('load', JSNTemplate.initOnLoad);
99		}
100	}; // must have ; to prevent syntax error when compress

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.