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(); 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 'display-dropdown' module according to mainmenu class suffixes 52 JSNTemplate.setModuleDropdown(); 53 54 // Setup event to update megamenu submenu position 55 try { 56 JSNMegamenu.setMegamenuSubmenuPosition(_templateParams.enableRTL); 57 JSNMegamenu.setMegamenuSubmenuStyle(); 58 } 59 catch(err) { 60 } 61 }, 62 63 setModuleDropdown: function() 64 { 65 if ($$('ul.menu-mainmenu') == undefined) return false; 66 67 var ddMenu = $$('ul.menu-mainmenu').getProperty('class')[0].replace(/^\s+|\s+$/g, '').split(' '); 68 var count = ddMenu.length; 69 if(count) 70 { 71 for(var i = 0 ; i < count; i++) 72 { 73 if (ddMenu[i] == 'menu-richmenu') 74 { 75 $$('#jsn-menu div.jsn-modulecontainer.display-dropdown').addClass('richmenu'); 76 $$('#jsn-menu div.jsn-modulecontainer.display-inline').addClass('richmenu'); 77 } 78 if (ddMenu[i] == 'menu-iconmenu') 79 { 80 $$('#jsn-menu div.jsn-modulecontainer.display-dropdown').addClass('iconmenu'); 81 $$('#jsn-menu div.jsn-modulecontainer.display-inline').addClass('iconmenu'); 82 } 83 } 84 } 85 }, 86 87 initOnLoad: function() 88 { 89 // Setup event to update submenu position 90 JSNUtils.setSubmenuPosition(_templateParams.enableRTL); 91 92 // Stick positions layout setup 93 JSNUtils.setVerticalPosition("jsn-pos-stick-leftmiddle", 'middle'); 94 JSNUtils.setVerticalPosition("jsn-pos-stick-rightmiddle", 'middle'); 95 }, 96 97 initTemplate: function(templateParams) 98 { 99 // Store template parameters 100 _templateParams = templateParams; 101 102 // Init template on "domready" event 103 window.addEvent('domready', JSNTemplate.initOnDomReady); 104 window.addEvent('load', JSNTemplate.initOnLoad); 105 } 106 }; // 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.