1/** 2 * SMFtooltip, Basic JQuery function to provide styled tooltips 3 * 4 * - will use the hoverintent plugin if available 5 * - shows the tooltip in a div with the class defined in tooltipClass 6 * - moves all selector titles to a hidden div and removes the title attribute to 7 * prevent any default browser actions 8 * - attempts to keep the tooltip on screen 9 * 10 * Simple Machines Forum (SMF) 11 * 12 * @package SMF 13 * @author Simple Machines http://www.simplemachines.org 14 * @copyright 2019 Simple Machines and individual contributors 15 * @license http://www.simplemachines.org/about/smf/license.php BSD 16 * 17 * @version 2.1 RC2 18 * 19 */ 20 21(function($) { 22 $.fn.SMFtooltip = function(oInstanceSettings) { 23 $.fn.SMFtooltip.oDefaultsSettings = { 24 followMouse: 1, 25 hoverIntent: {sensitivity: 10, interval: 300, timeout: 50}, 26 positionTop: 12, 27 positionLeft: 12, 28 tooltipID: 'smf_tooltip', // ID used on the outer div 29 tooltipTextID: 'smf_tooltipText', // as above but on the inner div holding the text 30 tooltipClass: 'tooltip', // The class applied to the outer div (that displays on hover), use this in your css 31 tooltipSwapClass: 'smf_swaptip', // a class only used internally, change only if you have a conflict 32 tooltipContent: 'html' // display captured title text as html or text 33 }; 34 35 // account for any user options 36 var oSettings = $.extend({}, $.fn.SMFtooltip.oDefaultsSettings , oInstanceSettings || {}); 37 38 // move passed selector titles to a hidden span, then remove the selector title to prevent any default browser actions 39 $(this).each(function() 40 { 41 var sTitle = $('<span class="' + oSettings.tooltipSwapClass + '">' + htmlspecialchars(this.title) + '</span>').hide(); 42 $(this).append(sTitle).attr('title', ''); 43 }); 44 45 // determine where we are going to place the tooltip, while trying to keep it on screen 46 var positionTooltip = function(event) 47 { 48 var iPosx = 0; 49 var iPosy = 0; 50 51 if (!event) 52 var event = window.event; 53 54 if (event.pageX || event.pageY) 55 { 56 iPosx = event.pageX; 57 iPosy = event.pageY; 58 } 59 else if (event.clientX || event.clientY) 60 { 61 iPosx = event.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; 62 iPosy = event.clientY + document.body.scrollTop + document.documentElement.scrollTop; 63 } 64 65 // Position of the tooltip top left corner and its size 66 var oPosition = { 67 x: iPosx + oSettings.positionLeft, 68 y: iPosy + oSettings.positionTop, 69 w: $('#' + oSettings.tooltipID).width(), 70 h: $('#' + oSettings.tooltipID).height() 71 } 72 73 // Display limits and window scroll postion 74 var oLimits = { 75 x: $(window).scrollLeft(), 76 y: $(window).scrollTop(), 77 w: $(window).width() - 24, 78 h: $(window).height() - 24 79 }; 80 81 // don't go off screen with our tooltop 82 if ((oPosition.y + oPosition.h > oLimits.y + oLimits.h) && (oPosition.x + oPosition.w >
82 oLimits.x + oLimits.w)) 83 { 84 oPosition.x = (oPosition.x - oPosition.w) - 45; 85 oPosition.y = (oPosition.y - oPosition.h) - 45; 86 } 87 else if ((oPosition.x + oPosition.w) > (oLimits.x + oLimits.w)) 88 { 89 oPosition.x = oPosition.x - (((oPosition.x + oPosition.w) - (oLimits.x + oLimits.w)) + 24); 90 } 91 else if (oPosition.y + oPosition.h > oLimits.y + oLimits.h) 92 { 93 oPosition.y = oPosition.y - (((oPosition.y + oPosition.h) - (oLimits.y + oLimits.h)) + 24); 94 } 95 96 // finally set the position we determined 97 $('#' + oSettings.tooltipID).css({'left': oPosition.x + 'px', 'top': oPosition.y + 'px'}); 98 } 99 100 // used to show a tooltip 101 var showTooltip = function(){ 102 $('#' + oSettings.tooltipID + ' #' + oSettings.tooltipTextID).show(); 103 } 104 105 // used to hide a tooltip 106 var hideTooltip = function(valueOfThis){ 107 $('#' + oSettings.tooltipID).fadeOut('slow').trigger("unload").remove(); 108 } 109 110 // used to keep html encoded 111 function htmlspecialchars(string) 112 { 113 return $('<span>').text(string).html(); 114 } 115 116 // for all of the elements that match the selector on the page, lets set up some actions 117 return this.each(function(index) 118 { 119 // if we find hoverIntent use it 120 if ($.fn.hoverIntent) 121 { 122 $(this).hoverIntent({ 123 sensitivity: oSettings.hoverIntent.sensitivity, 124 interval: oSettings.hoverIntent.interval, 125 over: smf_tooltip_on, 126 timeout: oSettings.hoverIntent.timeout, 127 out: smf_tooltip_off 128 }); 129 } 130 else 131 { 132 // plain old hover it is 133 $(this).hover(smf_tooltip_on, smf_tooltip_off); 134 } 135 136 // create the on tip action 137 function smf_tooltip_on(event) 138 { 139 // If we have text in the hidden span element we created on page load 140 if ($(this).children('.' + oSettings.tooltipSwapClass).text()) 141 { 142 // create a ID'ed div with our style class that holds the tooltip info, hidden for now 143 $('body').append('<div id="' + oSettings.tooltipID + '" class="' + oSettings.tooltipClass + '"><div id="' + oSettings.tooltipTextID + '" style="display:none;"></div></div>'); 144 145 // load information in to our newly created div 146 var tt = $('#' + oSettings.tooltipID); 147 var ttContent = $('#' + oSettings.tooltipID + ' #' + oSettings.tooltipTextID); 148 149 if (oSettings.tooltipContent == 'html') 150 ttContent.html($(this).children('.' + oSettings.tooltipSwapClass).html()); 151 else 152 ttContent.text($(this).children('.' + oSettings.tooltipSwapClass).text()); 153 154 // show, then position, or it may position off screen 155 tt.show(); 156 showTooltip(); 157 positionTooltip(event); 158 } 159 160 return false; 161 }; 162 163 // create the Bye bye tip 164 function smf_tooltip_off(event) 165 { 166 hideTooltip(this); 167 return false; 168 }; 169 170 // create the tip move with the cursor 171 if (oSettings.followMouse) 172 { 173 $(this).on("mousemove", function(event){ 174 positionTooltip(event); 175 return false; 176 }); 177 } 178 179 // clear the tip on a click 180 $(this).on("click", function(event){ 181 hideTooltip(this); 182 return true; 183 }); 184 }); 185 }; 186 187 // A simple plugin for deleting an element from the DOM. 188 $.fn.fadeOutAndRemove = function(speed){ 189 $(this).fadeOut(speed,function(){ 190 $(this).remove(); 191 }); 192 }; 193 194 // Range to percent. 195 $.fn.rangeToPercent = function(number, min, max){ 196 return ((number - min) / (max - min)); 197 }; 198 199 // Percent to range. 200 $.fn.percentToRange = function(percent, min, max){ 201 return((max - min) * percent + min); 202 }; 203 204})(jQuery); 205 206/** 207 * AnimaDrag 208 * Animated jQuery Drag and Drop Plugin 209 * Version 0.5.1 beta 210 * Author Abel Mohler 211 * Released with the MIT License: https://opensource.org/licenses/mit-license.php 212 */ 213(function($){ 214 $.fn.animaDrag = function(o, callback) { 215 var defaults = { 216 speed: 400, 217 interval: 300, 218 easing: null, 219 cursor: 'move', 220 boundary: document.body, 221 grip: null, 222 overlay: true, 223 after: function(e) {}, 224 during: function(e) {}, 225 before: function(e) {}, 226 afterEachAnimation: function(e) {} 227 } 228 if(typeof callback == 'function') { 229 defaults.after = callback; 230 } 231 o = $.extend(defaults, o || {}); 232 return this.each(function() { 233 var id, startX, startY, draggableStartX, draggableStartY, dragging = false, Ev, draggable = this, 234 grip = ($(this).find(o.grip).length > 0) ? $(this).find(o.grip) : $(this); 235 if(o.boundary) { 236 var limitTop = $(o.boundary).offset().top, limitLeft = $(o.boundary).offset().left, 237 limitBottom = limitTop + $(o.boundary).innerHeight(), limitRight = limitLeft + $(o.boundary).innerWidth(); 238 } 239 grip.mousedown(function(e) { 240 o.before.call(draggable, e); 241 242 var lastX, lastY; 243 dragging = true; 244 245 Ev = e; 246 247 startX = lastX = e.pageX; 248 startY = lastY = e.pageY; 249 draggableStartX = $(draggable).offset().left; 250 draggableStartY = $(draggable).offset().top; 251 252 $(draggable).css({ 253 position: 'absolute', 254 left: draggableStartX + 'px', 255 top: draggableStartY + 'px', 256 cursor: o.cursor, 257 zIndex: '1010' 258 }).addClass('anima-drag').appendTo(document.body); 259 if(o.overlay && $('#anima-drag-overlay').length == 0) { 260 $('<div id="anima-drag-overlay"></div>').css({ 261 position: 'absolute', 262 top: '0', 263 left: '0', 264 zIndex: '1000', 265 width: $(document.body).outerWidth() + 'px', 266 height: $(document.body).outerHeight() + 'px' 267 }).appendTo(document.body); 268 } 269 else if(o.overlay) { 270 $('#anima-drag-overlay').show(); 271 } 272 id = setInterval(function() { 273 if(lastX != Ev.pageX || lastY != Ev.pageY) { 274 var positionX = draggableStartX - (startX - Ev.pageX), positionY = draggableStartY - (startY - Ev.pageY); 275 if(positionX < limitLeft && o.boundary) { 276 positionX = limitLeft; 277 } 278 else if(positionX + $(draggable).innerWidth() > limitRight && o.boundary) { 279 positionX = limitRight - $(draggable).outerWidth(); 280 } 281 if(positionY < limitTop && o.boundary) { 282 positionY = limitTop; 283 } 284 else if(positionY + $(draggable).innerHeight() > limitBottom && o.boundary) { 285 positionY = limitBottom - $(draggable).outerHeight(); 286 } 287 $(draggable).stop().animate({ 288 left: positionX + 'px', 289 top: positionY + 'px' 290 }
290, o.speed, o.easing, function(){o.afterEachAnimation.call(draggable, Ev)}); 291 } 292 lastX = Ev.pageX; 293 lastY = Ev.pageY; 294 }, o.interval); 295 ($.browser.safari || e.preventDefault()); 296 }); 297 $(document).mousemove(function(e) { 298 if(dragging) { 299 Ev = e; 300 o.during.call(draggable, e); 301 } 302 }); 303 $(document).mouseup(function(e) { 304 if(dragging) { 305 $(draggable).css({ 306 cursor: '', 307 zIndex: '990' 308 }).removeClass('anima-drag'); 309 $('#anima-drag-overlay').hide().appendTo(document.body); 310 clearInterval(id); 311 o.after.call(draggable, e); 312 dragging = false; 313 } 314 }); 315 }); 316 } 317})(jQuery); 318 319/* 320 * jQuery Superfish Menu Plugin - v1.7.7 321 * Copyright (c) 2015 322 * 323 * Dual licensed under the MIT and GPL licenses: 324 * https://opensource.org/licenses/mit-license.php 325 * https://www.gnu.org/licenses/gpl.html 326 */ 327 328;(function ($, w) { 329 "use strict"; 330 331 var methods = (function () { 332 // private properties and methods go here 333 var c = { 334 bcClass: 'sf-breadcrumb', 335 menuClass: 'sf-js-enabled', 336 anchorClass: 'sf-with-ul', 337 menuArrowClass: 'sf-arrows' 338 }, 339 ios = (function () { 340 var ios = /^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent); 341 if (ios) { 342 // tap anywhere on iOS to unfocus a submenu 343 $('html').css('cursor', 'pointer').on('click', $.noop); 344 } 345 return ios; 346 })(), 347 wp7 = (function () { 348 var style = document.documentElement.style; 349 return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent)); 350 })(), 351 unprefixedPointerEvents = (function () { 352 return (!!w.PointerEvent); 353 })(), 354 toggleMenuClasses = function ($menu, o) { 355 var classes = c.menuClass; 356 if (o.cssArrows) { 357 classes += ' ' + c.menuArrowClass; 358 } 359 $menu.toggleClass(classes); 360 }, 361 setPathToCurrent = function ($menu, o) { 362 return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) 363 .addClass(o.hoverClass + ' ' + c.bcClass) 364 .filter(function () { 365 return ($(this).children(o.popUpSelector).hide().show().length); 366 }).removeClass(o.pathClass); 367 }, 368 toggleAnchorClass = function ($li) { 369 $li.children('a').toggleClass(c.anchorClass); 370 }, 371 toggleTouchAction = function ($menu) { 372 var msTouchAction = $menu.css('ms-touch-action'); 373 var touchAction = $menu.css('touch-action'); 374 touchAction = touchAction || msTouchAction; 375 touchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y'; 376 $menu.css({ 377 'ms-touch-action': touchAction, 378 'touch-action': touchAction 379 }); 380 }, 381 applyHandlers = function ($menu, o) { 382 var targets = 'li:has(' + o.popUpSelector + ')'; 383 if ($.fn.hoverIntent && !o.disableHI) { 384 $menu.hoverIntent(over, out, targets); 385 } 386 else { 387 $menu 388 .on('mouseenter.superfish', targets, over) 389 .on('mouseleave.superfish', targets, out); 390 } 391 var touchevent = 'MSPointerDown.superfish'; 392 if (unprefixedPointerEvents) { 393 touchevent = 'pointerdown.superfish'; 394 } 395 if (!ios) { 396 touchevent += ' touchend.superfish'; 397 } 398 if (wp7) { 399 touchevent += ' mousedown.superfish'; 400 } 401 $menu 402 .on('focusin.superfish', 'li', over) 403 .on('focusout.superfish', 'li', out) 404 .on(touchevent, 'a', o, touchHandler); 405 }, 406 touchHandler = function (e) { 407 var $this = $(this), 408 o = getOptions($this), 409 $ul = $this.siblings(e.data.popUpSelector); 410 411 if (o.onHandleTouch.call($ul) === false) { 412 return this; 413 } 414 415 if ($ul.length > 0 && $ul.is(':hidden')) { 416 $this.one('click.superfish', false); 417 if (e.type === 'MSPointerDown' || e.type === 'pointerdown') { 418 $this.trigger('focus'); 419 } else { 420 $.proxy(over, $this.parent('li'))(); 421 } 422 } 423 }, 424 over = function () { 425 var $this = $(this), 426 o = getOptions($this); 427 clearTimeout(o.sfTimer); 428 $this.siblings().superfish('hide').end().superfish('show'); 429 }, 430 out = function () { 431 var $this = $(this), 432 o = getOptions($this); 433 if (ios) { 434 $.proxy(close, $this, o)(); 435 } 436 else { 437 clearTimeout(o.sfTimer); 438 o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay); 439 } 440 }, 441 close = function (o) { 442 o.retainPath = ($.inArray(this[0], o.$path) > -1); 443 this.superfish('hide'); 444 445 if (!this.parents('.' + o.hoverClass).length) { 446 o.onIdle.call(getMenu(this)); 447 if (o.$path.length) { 448 $.proxy(over, o.$path)(); 449 } 450 } 451 }, 452 getMenu = function ($el) { 453 return $el.closest('.' + c.menuClass); 454 }, 455 getOptions = function ($el) { 456 return getMenu($el).data('sf-options'); 457 }; 458 459 return { 460 // public methods 461 hide: function (instant) { 462 if (this.length) { 463 var $this = this, 464 o = getOptions($this); 465 if (!o) { 466 return this; 467 } 468 var not = (o.retainPath === true) ? o.$path : '', 469 $ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), 470 speed = o.speedOut; 471 472 if (instant) { 473 $ul.show(); 474 speed = 0; 475 } 476 o.retainPath = false;
vendor: 4,358 bytes, lines 477-632
477 478 if (o.onBeforeHide.call($ul) === false) { 479 return this; 480 } 481 482 $ul.stop(true, true).animate(o.animationOut, speed, function () { 483 var $this = $(this); 484 o.onHide.call($this); 485 }); 486 } 487 return this; 488 }, 489 show: function () { 490 var o = getOptions(this); 491 if (!o) { 492 return this; 493 } 494 var $this = this.addClass(o.hoverClass), 495 $ul = $this.children(o.popUpSelector); 496 497 if (o.onBeforeShow.call($ul) === false) { 498 return this; 499 } 500 501 $ul.stop(true, true).animate(o.animation, o.speed, function () { 502 o.onShow.call($ul); 503 }); 504 return this; 505 }, 506 destroy: function () { 507 return this.each(function () { 508 var $this = $(this), 509 o = $this.data('sf-options'), 510 $hasPopUp; 511 if (!o) { 512 return false; 513 } 514 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 515 clearTimeout(o.sfTimer); 516 toggleMenuClasses($this, o); 517 toggleAnchorClass($hasPopUp); 518 toggleTouchAction($this); 519 // remove event handlers 520 $this.off('.superfish').off('.hoverIntent'); 521 // clear animation's inline display style 522 $hasPopUp.children(o.popUpSelector).attr('style', function (i, style) { 523 return style.replace(/display[^;]+;?/g, ''); 524 }); 525 // reset 'current' path classes 526 o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); 527 $this.find('.' + o.hoverClass).removeClass(o.hoverClass); 528 o.onDestroy.call($this); 529 $this.removeData('sf-options'); 530 }); 531 }, 532 init: function (op) { 533 return this.each(function () { 534 var $this = $(this); 535 if ($this.data('sf-options')) { 536 return false; 537 } 538 var o = $.extend({}, $.fn.superfish.defaults, op), 539 $hasPopUp = $this.find(o.popUpSelector).parent('li'); 540 o.$path = setPathToCurrent($this, o); 541 542 $this.data('sf-options', o); 543 544 toggleMenuClasses($this, o); 545 toggleAnchorClass($hasPopUp); 546 toggleTouchAction($this); 547 applyHandlers($this, o); 548 549 $hasPopUp.not('.' + c.bcClass).superfish('hide', true); 550 551 o.onInit.call(this); 552 }); 553 } 554 }; 555 })(); 556 557 $.fn.superfish = function (method, args) { 558 if (methods[method]) { 559 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 560 } 561 else if (typeof method === 'object' || ! method) { 562 return methods.init.apply(this, arguments); 563 } 564 else { 565 return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); 566 } 567 }; 568 569 $.fn.superfish.defaults = { 570 popUpSelector: 'ul,.sf-mega', // within menu context 571 hoverClass: 'sfHover', 572 pathClass: 'overrideThisToUse', 573 pathLevels: 1, 574 delay: 800, 575 animation: {opacity: 'show'}, 576 animationOut: {opacity: 'hide'}, 577 speed: 'normal', 578 speedOut: 'fast', 579 cssArrows: true, 580 disableHI: false, 581 onInit: $.noop, 582 onBeforeShow: $.noop, 583 onShow: $.noop, 584 onBeforeHide: $.noop, 585 onHide: $.noop, 586 onIdle: $.noop, 587 onDestroy: $.noop, 588 onHandleTouch: $.noop 589 }; 590 591})(jQuery, window); 592 593/** 594 * hoverIntent is similar to jQuery's built-in "hover" method except that 595 * instead of firing the handlerIn function immediately, hoverIntent checks 596 * to see if the user's mouse has slowed down (beneath the sensitivity 597 * threshold) before firing the event. The handlerOut function is only 598 * called after a matching handlerIn. 599 * 600 * hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+ 601 * http://cherne.net/brian/resources/jquery.hoverIntent.html 602 * 603 * You may use hoverIntent under the terms of the MIT license. Basically that 604 * means you are free to use hoverIntent as long as this header is left intact. 605 * Copyright 2007, 2013 Brian Cherne 606 * 607 * // basic usage ... just like .hover() 608 * .hoverIntent( handlerIn, handlerOut ) 609 * .hoverIntent( handlerInOut ) 610 * 611 * // basic usage ... with event delegation! 612 * .hoverIntent( handlerIn, handlerOut, selector ) 613 * .hoverIntent( handlerInOut, selector ) 614 * 615 * // using a basic configuration object 616 * .hoverIntent( config ) 617 * 618 * @param handlerIn function OR configuration object 619 * @param handlerOut function OR selector for delegation OR undefined 620 * @param selector selector OR undefined 621 * @author Brian Cherne <brian(at)cherne(dot)net> 622 **/ 623(function($) { 624 $.fn.hoverIntent = function(handlerIn,handlerOut,selector) { 625 626 // default configuration values 627 var cfg = { 628 interval: 100, 629 sensitivity: 7, 630 timeout: 0 631 }; 632
633 if ( typeof handlerIn === "object" ) { 634 cfg = $.extend(cfg, handlerIn ); 635 } else if ($.isFunction(handlerOut)) { 636 cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); 637 } else { 638 cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); 639 } 640 641 // instantiate variables 642 // cX, cY = current X and Y position of mouse, updated by mousemove event 643 // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval 644 var cX, cY, pX, pY; 645 646 // A private function for getting mouse position 647 var track = function(ev) { 648 cX = ev.pageX; 649 cY = ev.pageY; 650 }; 651 652 // A private function for comparing current and previous mouse position 653 var compare = function(ev,ob) { 654 ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); 655 // compare mouse positions to see if they've crossed the threshold 656 if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) { 657 $(ob).off("mousemove.hoverIntent",track); 658 // set hoverIntent state to true (so mouseOut can be called) 659 ob.hoverIntent_s = 1; 660 return cfg.over.apply(ob,[ev]); 661 } else { 662 // set previous coordinates for next time 663 pX = cX; pY = cY; 664 // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) 665 ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval ); 666 } 667 }; 668 669 // A private function for delaying the mouseOut function 670 var delay = function(ev,ob) { 671 ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); 672 ob.hoverIntent_s = 0; 673 return cfg.out.apply(ob,[ev]); 674 }; 675 676 // A private function for handling mouse 'hovering' 677 var handleHover = function(e) { 678 // copy objects to be passed into t (required for event object to be passed in IE) 679 var ev = jQuery.extend({},e); 680 var ob = this; 681 682 // cancel hoverIntent timer if it exists 683 if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } 684 685 // if e.type == "mouseenter" 686 if (e.type == "mouseenter") { 687 // set "previous" X and Y position based on initial entry point 688 pX = ev.pageX; pY = ev.pageY; 689 // update "current" X and Y position based on mousemove 690 $(ob).on("mousemove.hoverIntent",track); 691 // start polling interval (self-calling timeout) to compare mouse coordinates over time 692 if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );} 693 694 // else e.type == "mouseleave" 695 } else { 696 // unbind expensive mousemove event 697 $(ob).off("mousemove.hoverIntent",track); 698 // if hoverIntent state is true, then call the mouseOut function after the specified delay 699 if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );} 700 } 701 }; 702 703 // listen for mouseenter and mouseleave 704 return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); 705 }; 706})(jQuery); 707 708/* Takes every category header available and adds a collapse option */ 709$(function() { 710 if (smf_member_id > 0) 711 $('div.boardindex_table div.cat_bar').each(function(index, el) 712 { 713 var catid = el.id.replace('category_', ''); 714 new smc_Toggle({ 715 bToggleEnabled: true, 716 bCurrentlyCollapsed: $('#category_' + catid + '_upshrink').data('collapsed'), 717 aHeader: $('#category_' + catid), 718 aSwappableContainers: [ 719 'category_' + catid + '_boards' 720 ], 721 aSwapImages: [ 722 { 723 sId: 'category_' + catid + '_upshrink', 724 msgExpanded: '', 725 msgCollapsed: '' 726 } 727 ], 728 oThemeOptions: { 729 bUseThemeSettings: true, 730 sOptionName: 'collapse_category_' + catid, 731 sSessionVar: smf_session_var, 732 sSessionId: smf_session_id 733 } 734 }); 735 }); 736}); 737 738/* Mobile Pop */ 739$(function() { 740 $( '.mobile_act' ).click(function() { 741 $( '#mobile_action' ).show(); 742 }); 743 $( '.hide_popup' ).click(function() { 744 $( '#mobile_action' ).hide(); 745 }); 746 $( '.mobile_mod' ).click(function() { 747 $( '#mobile_moderation' ).show(); 748 }); 749 $( '.hide_popup' ).click(function() { 750 $( '#mobile_moderation' ).hide(); 751 }); 752 $( '.mobile_user_menu' ).click(function() { 753 $( '#mobile_user_menu' ).show(); 754 }); 755 $( '.hide_popup' ).click(function() { 756 $( '#mobile_user_menu' ).hide(); 757 }); 758});
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.