1// 2// This file is part of Adaptable theme for moodle 3// 4// Moodle is free software: you can redistribute it and/or modify 5// it under the terms of the GNU General Public License as published by 6// the Free Software Foundation, either version 3 of the License, or 7// (at your option) any later version. 8// 9// Moodle is distributed in the hope that it will be useful, 10// but WITHOUT ANY WARRANTY; without even the implied warranty of 11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12// GNU General Public License for more details. 13// 14// You should have received a copy of the GNU General Public License 15// along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16// 17// 18// Adaptable main JS file 19// 20// @package theme_adaptable 21// @copyright 2015-2019 Jeremy Hopkins (Coventry University) 22// @copyright 2015-2019 Fernando Acedo (3-bits.com) 23// @copyright 2018-2019 Manoj Solanki (Coventry University) 24// 25// @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later. 26 27jQuery(document).ready(function($) { 28 // Ticker. 29 $('#ticker').tickerme(); 30 // New for every three. 31 if($('header').css("position") == "fixed") { 32 $('.outercont').css('padding-top', $('header').height()); 33 } 34 35 // Slider. 36 if ($('#main-slider').length) { 37 $('#main-slider').flexslider({ 38 namespace : "flex-", // New: {NEW} String: Prefix string attached to the class of every element generated by the plugin 39 selector : ".slides > li", // New: {NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril 40 animation : "slide", // String: Select your animation type, "fade" or "slide" 41 easing : "swing", // {NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! 42 direction : "horizontal", // String: Select the sliding direction, "horizontal" or "vertical" 43 reverse : false, // {NEW} Boolean: Reverse the animation direction 44 animationLoop : true, // Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end 45 smoothHeight : false, // {NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode 46 startAt : 0, // Integer: The slide that the slider should start on. Array notation (0 = first slide) 47 slideshow : true, // Boolean: Animate slider automatically 48 slideshowSpeed : 7000, // Integer: Set the speed of the slideshow cycling, in milliseconds 49 animationSpeed : 600, // Integer: Set the speed of animations, in milliseconds 50 initDelay : 0, // {NEW} Integer: Set an initialization delay, in milliseconds 51 randomize : false, // Boolean: Randomize slide order. 52 53 // Usability features. 54 pauseOnAction : true, // Boolean: Pause the slideshow when interacting with control elements, highly recommended. 55 pauseOnHover : false, // Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering 56 useCSS : true, // {NEW} Boolean: Slider will use CSS3 transitions if available 57 touch : true, // {NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices 58 video : false, // {NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches 59 60 // Primary Controls. 61 controlNav : true, // Boolean: Create navigation for paging control of each slide? Note! Leave true for manualControls usage 62 directionNav : true, // Boolean: Create navigation for previous / next navigation? (true/false) 63 prevText : "Previous", // String: Set the text for the "previous" directionNav item 64 nextText : "Next", // String: Set the text for the "next" directionNav item 65 66 // Secondary Navigation. 67 keyboard : true, // Boolean: Allow slider navigating via keyboard left/right keys 68 multipleKeyboard : false, // {NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present. 69 mousewheel : false, // {UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel 70 pausePlay : false, // Boolean: Create pause/play dynamic element 71 pauseText : 'Pause', // String: Set the text for the "pause" pausePlay item 72 playText : 'Play', // String: Set the text for the "play" pausePlay item 73 74 // Special properties. 75 controlsContainer : "", // {UPDATED} Selector: USE CLASS SELECTOR. Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be ".flexslider-container". Property is ignored if given element is not found. 76 manualControls : "", // Selector: Declare custom control navigation. Examples would be ".flex-control-nav li" or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs. 77 sync : "", // {NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care. 78 asNavFor : "", // {NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider 79 }); 80 81 if ($('.container.slidewrap').length) { 82 $(".container.slidewrap").on('transitionend', function() { 83 var slider1 = $('#main-slider').data('flexslider'); 84 slider1.resize(); 85 }); 86 } 87 } 88});
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.