File Editor
Directories:
.. (Back)
admin
app
commerce
v2
Files:
accordion.js
accordion.min.js
move-tickets-dialog.js
move-tickets-dialog.min.js
rsvp-block.js
rsvp-block.min.js
rsvp.js
rsvp.min.js
ticket-details.js
ticket-details.min.js
tickets-attendees.js
tickets-attendees.min.js
tickets-block.js
tickets-block.min.js
tickets-provider.js
tickets-provider.min.js
tickets-registration-page.js
tickets-registration-page.min.js
tickets.js
tickets.min.js
tpp-admin.js
tpp-admin.min.js
Create New File
Create
Edit File: rsvp.min.js
/** * This JS file was auto-generated via Terser. * * Contributors should avoid editing this file, but instead edit the associated * non minified file file. For more information, check out our engineering docs * on how we handle JS minification in our engineering docs. * * @see: https://evnt.is/dev-docs-minification */ var tribe_tickets_rsvp={num_attendees:0,event:{}};!function($,my){"use strict";my.init=function(){my.$rsvp=$(".tribe-events-tickets-rsvp"),my.attendee_template=$(document.getElementById("tribe-tickets-rsvp-tmpl")).html(),my.$rsvp.on("change input keyup",".tribe-tickets-quantity",my.event.quantity_changed),my.$rsvp.closest(".cart").on("submit",my.event.handle_submission),$(".tribe-rsvp-list").on("click",".attendee-meta-row .toggle",(function(){$(this).toggleClass("on").siblings(".attendee-meta-details").slideToggle()}))},my.quantity_changed=function($quantity){const $rsvp=$quantity.closest(".tribe-events-tickets-rsvp"),$rsvpQtys=$rsvp.find(".tribe-tickets-quantity");let rsvpQty=0;$rsvpQtys.each((function(){rsvpQty+=parseInt($(this).val(),10)})),0===rsvpQty?$rsvp.removeClass("tribe-tickets-has-rsvp"):$rsvp.addClass("tribe-tickets-has-rsvp")},my.validate_rsvp_info=function($form){const $qty=$form.find("input.tribe-tickets-quantity"),$name=$form.find("input#tribe-tickets-full-name"),$email=$form.find("input#tribe-tickets-email");let rsvpQty=0;return $qty.each((function(){rsvpQty+=parseInt($(this).val(),10)})),$name.val().trim().length&&$email.val().trim().length&&rsvpQty},my.validate_meta=function($form){let isMetaValid=!0;return!!window.tribe_event_tickets_plus&&(isMetaValid=window.tribe_event_tickets_plus.meta.validate_meta($form)),isMetaValid},my.event.quantity_changed=function(){my.quantity_changed($(this))},my.event.handle_submission=function(e){const $form=$(this).closest("form"),$rsvpMessages=$form.find(".tribe-rsvp-messages, .tribe-rsvp-message-confirmation-error"),$etpMetaMessages=$form.find(".tribe-event-tickets-meta-required-message"),isRsvpInfoValid=my.validate_rsvp_info($form),isAttendeeMetaValid=my.validate_meta($form);return!(!isRsvpInfoValid||!isAttendeeMetaValid)||(isRsvpInfoValid?$rsvpMessages.hide():$rsvpMessages.show(),isAttendeeMetaValid?($etpMetaMessages.hide(),$form.removeClass("tribe-event-tickets-plus-meta-missing-required")):($form.addClass("tribe-event-tickets-plus-meta-missing-required"),$etpMetaMessages.show()),$("html, body").animate({scrollTop:$form.offset().top-100},300),!1)},$(my.init)}(jQuery,tribe_tickets_rsvp);
Save Changes
Rename File
Rename