golden hour
/var/www/html/wp-content/plugins/the-events-calendar/common/src/resources/js
⬆️ Go Up
Upload
File/Folder
Size
Actions
admin
-
Del
OK
admin-date-preview.js
1.13 KB
Del
OK
admin-date-preview.min.js
349 B
Del
OK
admin-log-controls.js
4.13 KB
Del
OK
admin-log-controls.min.js
1.3 KB
Del
OK
app
-
Del
OK
app-shop.js
268 B
Del
OK
app-shop.min.js
182 B
Del
OK
bumpdown.js
8.25 KB
Del
OK
bumpdown.min.js
4.15 KB
Del
OK
buttonset.js
2.4 KB
Del
OK
buttonset.min.js
1.29 KB
Del
OK
dependency.js
10.48 KB
Del
OK
dependency.min.js
4.55 KB
Del
OK
dialog.js
1.7 KB
Del
OK
dialog.min.js
939 B
Del
OK
dropdowns.js
14.99 KB
Del
OK
dropdowns.min.js
6.43 KB
Del
OK
notice-dismiss.js
1.04 KB
Del
OK
notice-dismiss.min.js
519 B
Del
OK
pue-notices.js
887 B
Del
OK
pue-notices.min.js
382 B
Del
OK
select2-after.js
1.46 KB
Del
OK
select2-after.min.js
816 B
Del
OK
timepicker.js
2.71 KB
Del
OK
timepicker.min.js
1.38 KB
Del
OK
tooltip.js
1.4 KB
Del
OK
tooltip.min.js
689 B
Del
OK
tribe-common.js
803 B
Del
OK
tribe-common.min.js
321 B
Del
OK
tribe-datatables.js
4.76 KB
Del
OK
tribe-datatables.min.js
2.82 KB
Del
OK
underscore-after.js
920 B
Del
OK
underscore-after.min.js
127 B
Del
OK
underscore-before.js
1.25 KB
Del
OK
underscore-before.min.js
265 B
Del
OK
utils
-
Del
OK
utils-camelcase.js
2.4 KB
Del
OK
utils-camelcase.min.js
778 B
Del
OK
validation.js
20.06 KB
Del
OK
validation.min.js
6.85 KB
Del
OK
Edit: bumpdown.js
(function( $, _ ) { 'use strict'; // Configure on Document ready for the default trigger $( function() { $( '.tribe-bumpdown-trigger' ).bumpdown(); } ); $.fn.bumpdown = function() { var $document = $( document ), selectors = { // A template for the ID if we don't have one already ID: 'tribe-bumpdown-', data_trigger: function( ID ) { return '[data-trigger="' + ID + '"]'; }, bumpdown: '.tribe-bumpdown', content: '.tribe-bumpdown-content', trigger: '.tribe-bumpdown-trigger', hover_trigger: '.tribe-bumpdown-trigger:not(.tribe-bumpdown-nohover)', close: '.tribe-bumpdown-close', permanent: '.tribe-bumpdown-permanent', active: '.tribe-bumpdown-active', }, methods = { open: function( $bumpdown ) { var data = $bumpdown.data( 'bumpdown' ), width_rule = data.$trigger.data( 'width-rule' ); if ( $bumpdown.is( ':visible' ) ) { return; } // Adds a Class to signal it's active data.$trigger.addClass( selectors.active.replace( '.', '' ) ); var $content = $bumpdown.find( selectors.content ); if ( 'string' === typeof width_rule && 'all-triggers' === width_rule ) { var min_width = 600; var trigger_position = 0; $( selectors.trigger ).each( function() { var $el = $( this ); // only attempt to align items with a width rule if ( ! $el.data( 'width-rule' ) ) { return; } var position = $el.position(); if ( position.left > trigger_position ) { trigger_position = position.left; } } ); if ( trigger_position ) { trigger_position = trigger_position > min_width ? trigger_position : min_width; $content.css( 'max-width', trigger_position + 'px' ); } } $content.prepend( '<a class="tribe-bumpdown-close" title="Close"><i class="dashicons dashicons-no"></i></a>' ); $content.prepend( '<span class="tribe-bumpdown-arrow"></span>' ); methods.arrow( $bumpdown ); $bumpdown.data( 'preventClose', true ); $bumpdown.slideDown( 'fast', function() { $bumpdown.data( 'preventClose', false ); } ); }, close: function( $bumpdown ) { var data = $bumpdown.data( 'bumpdown' ); if ( ! $bumpdown.is( ':visible' ) || $bumpdown.data( 'preventClose' ) ) { return; } // When we close we reset the flag about hoverintent $( this ).removeData( 'is_hoverintent_queued' ); $bumpdown.find( '.tribe-bumpdown-close, .tribe-bumpdown-arrow' ).remove(); $bumpdown.not( '.tribe-bumpdown-trigger' ).slideUp( 'fast' ); data.$trigger.removeClass( selectors.active.replace( '.', '' ) ); }, arrow: function( $bumpdown ) { var data = $bumpdown.data( 'bumpdown' ), arrow; arrow = Math.ceil( data.$trigger.position().left - ( 'block' === data.type ? data.$parent.offset().left : 0 ) ); data.$bumpdown.find( '.tribe-bumpdown-arrow' ).css( 'left', arrow ); } }; $( window ).on( { 'resize.bumpdown': function() { $document.find( selectors.active ).each( function() { methods.arrow( $( this ) ); } ); } } ); if ( 'function' === typeof $.fn.hoverIntent ) { $document // Use hoverIntent to make sure we are not opening Bumpdown on a fast hover .hoverIntent( { over: function() { var data = $( this ).data( 'bumpdown' ); // Flags that it's open data.$trigger.data( 'is_hoverintent_queued', false ); // Actually opens data.$bumpdown.trigger( 'open.bumpdown' ); }, out: function() {}, // Prevents Notice on JS selector: selectors.hover_trigger, interval: 200, } ); } $document // Setup Events on Trigger .on( { mouseenter: function() { if ( $( this ).data( 'is_hoverintent_queued' ) === undefined ) { // Flags that hoverIntent will take care of the $( this ).data( 'is_hoverintent_queued', true ); } }, click: function( e ) { var data = $( this ).data( 'bumpdown' ); e.preventDefault(); e.stopPropagation(); if ( data.$bumpdown.is( ':visible' ) ) { // Makes sure we are not dealing with the first enter of the mouse if ( data.$trigger.data( 'is_hoverintent_queued' ) ) { // On double click it will close, kinda like forcing the closing return data.$trigger.data( 'is_hoverintent_queued', false ); } data.$bumpdown.trigger( 'close.bumpdown' ); } else { data.$bumpdown.trigger( 'open.bumpdown' ); } }, 'open.bumpdown': function() { methods.open( $( this ) ); }, 'close.bumpdown': function() { methods.close( $( this ) ); } }, selectors.trigger ) // Setup Events on Trigger .on( { click: function( e ) { var data = $( this ).parents( selectors.bumpdown ).first().data( 'bumpdown' ); e.preventDefault(); e.stopPropagation(); if ( 'undefined' === typeof data ) { return; } if ( 'undefined' === typeof data.$bumpdown ) { return; } data.$bumpdown.trigger( 'close.bumpdown' ); }, }, selectors.close ) // Triggers closing when clicking on the document .on( 'click', function( e ) { var $target = $( e.target ), is_bumpdown = $target.is( selectors.bumpdown ) || 0 !== $target.parents( selectors.bumpdown ).length; if ( is_bumpdown ) { return; } $( selectors.trigger ).not( selectors.permanent ).trigger( 'close.bumpdown' ); } ) // Creates actions on the actual bumpdown .on( { 'open.bumpdown': function() { methods.open( $( this ) ); }, 'close.bumpdown': function() { methods.close( $( this ) ); } }, selectors.bumpdown ); // Configure all the fields return this.each( function() { var data = { // Store the jQuery Elements $trigger: $( this ), $parent: null, $bumpdown: null, // Store other Variables ID: null, html: null, type: 'block', // Flags is_permanent: false, }; // We need a ID for this Bumpdown data.ID = data.$trigger.attr( 'id' ); // If we currently don't have the ID, set it up if ( ! data.ID ) { data.ID = _.uniqueId( selectors.ID ); // Apply the given ID to data.$trigger.attr( 'id', data.ID ); } // We fetch from `[data-bumpdown]` attr the possible HTML for this Bumpdown data.html = data.$trigger.attr( 'data-bumpdown' ); data.html = '<div class="tribe-bumpdown-content">' + data.html + '</div>'; // We fetch from `[data-bumpdown-class]` attr the possible class(es) for this Bumpdown data.class = data.$trigger.attr( 'data-bumpdown-class' ); // Flags about if this bumpdown is permanent, meaning it only closes when clicking on the close button or the trigger data.is_permanent = data.$trigger.is( selectors.permanent ); // Fetch the first Block-Level parent data.$parent = data.$trigger.parents().filter( function() { return -1 < $.inArray( $( this ).css( 'display' ), [ 'block', 'table', 'table-cell', 'table-row' ] ); }).first(); if ( ! data.html ) { data.$bumpdown = $( selectors.data_trigger( data.ID ) ); data.type = 'block'; } else { data.type = data.$parent.is( 'td, tr, td, table' ) ? 'table' : 'block'; if ( 'table' === data.type ) { data.$bumpdown = $( '<td>' ).attr( { colspan: 2 } ).addClass( 'tribe-bumpdown-cell' ).html( data.html ); var classes = data.class ? 'tribe-bumpdown-row ' + data.class : 'tribe-bumpdown-row', $row = $( '<tr>' ).append( data.$bumpdown ).addClass( classes ); data.$parent = data.$trigger.parents( 'tr' ).first(); data.$parent.after( $row ); } else { data.$bumpdown = $( '<div>' ).addClass( 'tribe-bumpdown-block' ).html( data.html ); data.$trigger.after( data.$bumpdown ); } } // Setup data on trigger data.$trigger .data( 'bumpdown', data ) // Mark this as the trigger .addClass( selectors.trigger.replace( '.', '' ) ); // Setup data on actual bumpdown data.$bumpdown .data( 'bumpdown', data ) // Mark it as the Bumpdown .addClass( selectors.bumpdown.replace( '.', '' ) ); // support our dependency library if ( data.$trigger.data( 'depends' ) ) { var field_ids = data.$trigger.data( 'depends' ); $( document ).on( 'change', field_ids, function() { methods.close( data.$bumpdown ); } ); } }); }; }( jQuery, window.underscore || window._ ) );
Save