1/** 2 * @version $Id$ 3 * @package SUN Framework 4 * @subpackage Layout Builder 5 * @author JoomlaShine Team <[email protected]> 6 * @copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved. 7 * @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html 8 * 9 * Websites: http://www.joomlashine.com 10 * Technical Support: Feedback - http://www.joomlashine.com/contact-us/get-support.html 11 */ 12var SunBlank = { 13 14 _templateParams: {}, 15 16 initOnDomReady: function() 17 { 18 // Setup event to update submenu position 19 (function($) { 20 21 var RtlMenu = false; 22 if($("body").hasClass("sunfw-direction-rtl")) 23 RtlMenu = true; 24 else { 25 RtlMenu = false; 26 } 27 28 SunFwUtils.setSubmenuPosition(RtlMenu,$); 29 30 })(jQuery); 31 32 // Fixed Menu Open Bootstrap 33 (function($) { 34 35 if($('.sunfw-megamenu-sub-menu .modulecontainer ul li.parent a').length > 0 ) { 36 37 $('.sunfw-megamenu-sub-menu .modulecontainer ul li.parent > a').append('<span class="caret"></span>'); 38 39 $('.sunfw-megamenu-sub-menu .modulecontainer ul li.parent a span').on("click", function(e){ 40 $(this).parent().next('ul').toggleClass('menuShow'); 41 e.stopPropagation(); 42 e.preventDefault(); 43 }); 44 } 45 46 $('ul.sunfw-megamenu-sub-menu li.parent .caret').on('click', function(e) { 47 $(this).toggleClass('open'); 48 }); 49 50 $('.sunfw-menu li.dropdown-submenu a.dropdown-toggle .caret, .sunfw-menu li.megamenu a.dropdown-toggle .caret').on("click", function(e){ 51 52 $(this).toggleClass('open'); 53 $(this).parent().next('ul').toggleClass('menuShow'); 54 e.stopPropagation(); 55 e.preventDefault(); 56 57 }); 58 59 })(jQuery); 60 61 // Animation Menu when hover 62 (function($) { 63 var timer_out; 64 timer_out = setTimeout(function() { 65 $('.sunfwMenuSlide .dropdown-submenu, .sunfwMenuSlide .megamenu').hover( 66 function() { 67 $('.sunfw-megamenu-sub-menu, .dropdown-menu', this).stop( true, true ).slideDown('fast'); 68 }, 69 function() { 70 $('.sunfw-megamenu-sub-menu, .dropdown-menu', this).stop( true, true ).slideUp('fast'); 71 } 72 ); 73 74 $('.sunfwMenuFading .dropdown-submenu, .sunfwMenuFading .megamenu').hover( 75 function() { 76 $('.sunfw-megamenu-sub-menu, .dropdown-menu', this).stop( true, true ).fadeIn('fast'); 77 }, 78 function() { 79 $('.sunfw-megamenu-sub-menu, .dropdown-menu', this).stop( true, true ).fadeOut('fast'); 80 } 81 ); 82 }, 100); 83 84 })(jQuery); 85 86 //Scroll Top 87 (function($) { 88 if($('.sunfw-scrollup').length) { 89 $(window).scroll(function() { 90 if ($(this).scrollTop() > 500) { 91 $('.sunfw-scrollup').fadeIn(); 92 } else { 93 $('.sunfw-scrollup').fadeOut(); 94 } 95 }); 96 97 $('.sunfw-scrollup').click(function(e) { 98 e.preventDefault(); 99 $("html, body").animate({ 100 scrollTop: 0 101 }, 600); 102 return false; 103 }); 104 } 105 })(jQuery); 106 //Offcanvas Menu 107 108 (function($) { 109 $('.offcanvas-content .navbar-header').remove(); 110 $('.offcanvas-content .sunfw-menu').removeClass('collapse'); 111 $('.offcanvas-content .sunfw-menu .sunfw-tpl-menu li').removeClass('sunfw-submenu-flipback'); 112 var iconCaret = $('.offcanvas-content .sunfw-menu span.caret'); 113 })(jQuery); 114 }, 115 116 initOnLoad: function() 117 { 118 //console.log('initOnLoad'); 119 }, 120 121 stickyMenu: function (element) { 122 var header = '.sunfw-sticky'; 123 var stickyNavTop = jQuery(header).offset().top; 124 125 var stickyNav = function () { 126 127 var scrollTop = jQuery(document).scrollTop(); 128 var placeholder = jQuery('.sunfw-sticky-placeholder') 129 if (scrollTop > stickyNavTop) { 130 131 jQuery(header).addClass('sunfw-sticky-open'); 132 placeholder.show(); 133 } else { 134 135 jQuery(header).removeClass('sunfw-sticky-open'); 136 placeholder.hide(); 137 } 138 }; 139 140 stickyNav(); 141 142 jQuery(window).scroll(function() { 143 stickyNav(); 144 }); 145 }, 146 setWidtSectionMenu: function () { 147 var widthBoxLayout = jQuery('.sunfw-content.boxLayout').width(); 148 jQuery('.sunfw-sticky.sunfw-section').width(widthBoxLayout); 149 }, 150 initTemplate: function(templateParams) 151 { 152 // Store template parameters 153 _templateParams = templateParams; 154 155 jQuery(document).ready(function () 156 { 157 SunBlank.initOnDomReady(); 158 // Check width box layout 159 if(jQuery('.sunfw-content.boxLayout').length > 0 && jQuery('.sunfw-sticky.sunfw-section')) { 160 SunBlank.setWidtSectionMenu(); 161 jQuery( window ).resize(function() { 162 SunBlank.setWidtSectionMenu(); 163 }); 164 } 165 }); 166 167 jQuery(window).load(function () 168 { 169 SunBlank.initOnLoad(); 170
171 // Check sticky 172 if( jQuery('.sunfw-section').hasClass('sunfw-sticky')) { 173 var stickyHeight = jQuery('.sunfw-sticky').outerHeight(); 174 jQuery('.sunfw-sticky').after('<div class="sunfw-sticky-placeholder" style="height:' + stickyHeight + 'px"></div>'); 175 SunBlank.stickyMenu(); 176 } 177 178 }); 179 } 180}
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.