1/** 2 *------------------------------------------------------------------------------ 3 * @package T3 Framework for Joomla! 4 *------------------------------------------------------------------------------ 5 * @copyright Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved. 6 * @license GNU General Public License version 2 or later; see LICENSE.txt 7 * @authors JoomlArt, JoomlaBamboo, (contribute to this project at github 8 * & Google group to become co-author) 9 * @Google group: https://groups.google.com/forum/#!forum/t3fw 10 * @Link: http://t3-framework.org 11 *------------------------------------------------------------------------------ 12 */ 13 14!function($){ 15 16 // legacy for $.browser to detect IE 17 if ($.browser == undefined || $.browser.msie == undefined) { 18 $.browser={msie:false,version:0}; 19 if (match = navigator.userAgent.match (/MSIE ([0-9]{1,}[\.0-9]{0,})/) || navigator.userAgent.match (/Trident.*rv:([0-9]{1,}[\.0-9]{0,})/)) { 20 $.browser.msie=true; 21 $.browser.version=match[1]; 22 } 23 } 24 // add ie version to html tag 25 if ($.browser.msie) { 26 $('html').addClass('ie'+ Math.floor($.browser.version)); 27 } 28 29 // Detect grid-float-breakpoint value and put to $(body) data 30 $(document).ready(function(){ 31 if (!window.getComputedStyle) { 32 window.getComputedStyle = function(el, pseudo) { 33 this.el = el; 34 this.getPropertyValue = function(prop) { 35 var re = /(\-([a-z]){1})/g; 36 if (prop == 'float') prop = 'styleFloat'; 37 if (re.test(prop)) { 38 prop = prop.replace(re, function () { 39 return arguments[2].toUpperCase(); 40 }); 41 } 42 return el.currentStyle[prop] ? el.currentStyle[prop] : null; 43 } 44 return this; 45 } 46 } 47 var fromClass = 'body-data-holder', 48 prop = 'content', 49 $inspector = $('<div>').css('display', 'none').addClass(fromClass).appendTo($('body')); 50 51 try { 52 53 var computedStyle = window.getComputedStyle( 54 $inspector[0], ':before' 55 ); 56 if (computedStyle) { 57 var attrs = computedStyle.getPropertyValue(prop); 58 if(attrs){ 59 var matches = attrs.match(/([\da-z\-]+)/gi), 60 data = {}; 61 if (matches && matches.length) { 62 for (var i=0; i<matches.length; i++) { 63 data[matches[i++]] = i<matches.length ? matches[i] : null; 64 } 65 } 66 $('body').data (data); 67 } 68 } 69 } finally { 70 $inspector.remove(); // and remove from DOM 71 } 72 }); 73 74 75 //detect transform (https://github.com/cubiq/) 76 (function(){ 77 $.support.t3transform = (function () { 78 var style = document.createElement('div').style, 79 vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT'], 80 transform, i = 0, l = vendors.length; 81 82 for ( ; i < l; i++ ) { 83 transform = vendors[i] + 'ransform'; 84 if ( transform in style ) { 85 return transform; 86 } 87 } 88 89 return false; 90 })(); 91 92 })(); 93 94 //basic detect touch 95 (function(){ 96 $('html').addClass('ontouchstart' in window ? 'touch' : 'no-touch'); 97 })(); 98 99 //document ready 100 $(document).ready(function(){ 101 102 //remove conflict of mootools more show/hide function of element 103 (function(){ 104 if(window.MooTools && window.MooTools.More && Element && Element.implement){ 105 106 var mthide = Element.prototype.hide, 107 mtshow = Element.prototype.show, 108 mtslide = Element.prototype.slide; 109 110 Element.implement({ 111 show: function(args){ 112 if(arguments.callee && 113 arguments.callee.caller && 114 arguments.callee.caller.toString().indexOf('isPropagationStopped') !== -1){ //jquery mark 115 return this; 116 } 117 118 return $.isFunction(mtshow) && mtshow.apply(this, args); 119 }, 120 121 hide: function(){ 122 if(arguments.callee && 123 arguments.callee.caller && 124 arguments.callee.caller.toString().indexOf('isPropagationStopped') !== -1){ //jquery mark 125 return this; 126 } 127 128 return $.isFunction(mthide) && mthide.apply(this, arguments); 129 }, 130 131 slide: function(args){ 132 if(arguments.callee && 133 arguments.callee.caller && 134 arguments.callee.caller.toString().indexOf('isPropagationStopped') !== -1){ //jquery mark 135 return this; 136 } 137 138 return $.isFunction(mtslide) && mtslide.apply(this, args); 139 } 140 }) 141 } 142 })(); 143 144 // overwrite default tooltip/popover behavior (same as Joomla 3.1.5) 145 $.fn.tooltip.Constructor && $.fn.tooltip.Constructor.DEFAULTS && ($.fn.tooltip.Constructor.DEFAULTS.html = true); 146 $.fn.popover.Constructor && $.fn.popover.Constructor.DEFAULTS && ($.fn.popover.Constructor.DEFAULTS.html = true); 147 $.fn.tooltip.defaults && ($.fn.tooltip.defaults.html = true); 148 $.fn.popover.defaults && ($.fn.popover.defaults.html = true); 149 150 //fix JomSocial navbar-collapse toggle 151 (function(){ 152 if(window.jomsQuery && jomsQuery.fn.collapse){ 153 154 $('[data-toggle="collapse"]').on('click', function(e){ 155 156 //toggle manual 157 $($(this).attr('data-target')).eq(0).collapse('toggle'); 158 159 //stop 160 e.stopPropagation(); 161 162 return false;
163 }); 164 165 //remove conflict on touch screen 166 jomsQuery('html, body').off('touchstart.dropdown.data-api'); 167 } 168 })(); 169 170 171 //fix chosen select 172 (function(){ 173 if($.fn.chosen && $(document.documentElement).attr('dir') == 'rtl'){ 174 $('select').addClass('chzn-rtl'); 175 } 176 })(); 177 178 }); 179 180 $(window).on('load',function(){ 181 182 //fix animation for navbar-collapse-fixed-top||bottom 183 if(!$(document.documentElement).hasClass('off-canvas-ready') && 184 ($('.navbar-collapse-fixed-top').length || 185 $('.navbar-collapse-fixed-bottom').length)){ 186 187 var btn = $('.btn-navbar[data-toggle="collapse"]'); 188 if (!btn.length){ 189 return; 190 } 191 192 if(btn.data('target')){ 193 var nav = $(btn.data('target')); 194 if(!nav.length){ 195 return; 196 } 197 198 var fixedtop = nav.closest('.navbar-collapse-fixed-top').length; 199 200 btn.on('click', function(){ 201 202 var wheight = (window.innerHeight || $(window).height()); 203 204 if(!$.support.transition){ 205 nav.parent().css('height', !btn.hasClass('collapsed') && btn.data('t3-clicked') ? '' : wheight); 206 btn.data('t3-clicked', 1); 207 } 208 209 nav 210 .addClass('animate') 211 .css('max-height', wheight - 212 (fixedtop ? (parseFloat(nav.css('top')) || 0) : (parseFloat(nav.css('bottom')) || 0))); 213 }); 214 nav.on('shown hidden', function(){ 215 nav.removeClass('animate'); 216 }); 217 } 218 } 219 220 }); 221 222}(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.