Version Description
Download this release
Release Info
Developer | barry.hughes |
Plugin | Event Tickets |
Version | 4.0.5 |
Comparing to | |
See all releases |
Code changes from version 4.0.4 to 4.0.5
- common/src/Tribe/Date_Utils.php +17 -0
- common/src/Tribe/Main.php +1 -1
- common/src/Tribe/Settings_Manager.php +2 -2
- common/src/functions/template-tags/general.php +21 -2
- common/tests/wpunit/Tribe/Events/common/Date_UtilsTest.php +99 -22
- common/tribe-common.php +1 -1
- event-tickets.php +1 -1
- readme.txt +6 -2
- src/Tribe/Main.php +1 -1
- src/admin-views/attendees-email.php +1 -0
- src/resources/js/tickets-attendees.js +2 -1
- src/resources/js/tickets-attendees.min.js +1 -1
common/src/Tribe/Date_Utils.php
CHANGED
@@ -782,6 +782,23 @@ if ( ! class_exists( 'Tribe__Date_Utils' ) ) {
|
|
782 |
return mktime( 0, 0, 0, $month, $startday + $offset, $year );
|
783 |
}
|
784 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
785 |
// @codingStandardsIgnoreEnd
|
786 |
}
|
787 |
|
782 |
return mktime( 0, 0, 0, $month, $startday + $offset, $year );
|
783 |
}
|
784 |
|
785 |
+
/**
|
786 |
+
* Unescapes date format strings to be used in functions like `date`.
|
787 |
+
*
|
788 |
+
* Double escaping happens when storing a date format in the database.
|
789 |
+
*
|
790 |
+
* @param mixed $date_format A date format string.
|
791 |
+
*
|
792 |
+
* @return mixed Either the original input or an unescaped date format string.
|
793 |
+
*/
|
794 |
+
public static function unescape_date_format( $date_format ) {
|
795 |
+
if ( ! is_string( $date_format ) ) {
|
796 |
+
return $date_format;
|
797 |
+
}
|
798 |
+
|
799 |
+
// Why so simple? Let's handle other cases as those come up. We have tests in place!
|
800 |
+
return str_replace( '\\\\', '\\', $date_format );
|
801 |
+
}
|
802 |
// @codingStandardsIgnoreEnd
|
803 |
}
|
804 |
|
common/src/Tribe/Main.php
CHANGED
@@ -17,7 +17,7 @@ class Tribe__Main {
|
|
17 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
18 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
19 |
|
20 |
-
const VERSION = '4.0.
|
21 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
22 |
|
23 |
protected $plugin_context;
|
17 |
const OPTIONNAME = 'tribe_events_calendar_options';
|
18 |
const OPTIONNAMENETWORK = 'tribe_events_calendar_network_options';
|
19 |
|
20 |
+
const VERSION = '4.0.6';
|
21 |
const FEED_URL = 'https://theeventscalendar.com/feed/';
|
22 |
|
23 |
protected $plugin_context;
|
common/src/Tribe/Settings_Manager.php
CHANGED
@@ -234,12 +234,12 @@ class Tribe__Settings_Manager {
|
|
234 |
* only if premium addons are detected.
|
235 |
*/
|
236 |
protected function do_licenses_tab() {
|
237 |
-
$show_tab = ( current_user_can( '
|
238 |
|
239 |
/**
|
240 |
* Provides an oppotunity to override the decision to show or hide the licenses tab
|
241 |
*
|
242 |
-
* Normally it will only show if the current user has the "
|
243 |
* and there are some currently-activated premium plugins.
|
244 |
*
|
245 |
* @var bool
|
234 |
* only if premium addons are detected.
|
235 |
*/
|
236 |
protected function do_licenses_tab() {
|
237 |
+
$show_tab = ( current_user_can( 'activate_plugins' ) && $this->have_addons() );
|
238 |
|
239 |
/**
|
240 |
* Provides an oppotunity to override the decision to show or hide the licenses tab
|
241 |
*
|
242 |
+
* Normally it will only show if the current user has the "activate_plugins" capability
|
243 |
* and there are some currently-activated premium plugins.
|
244 |
*
|
245 |
* @var bool
|
common/src/functions/template-tags/general.php
CHANGED
@@ -153,9 +153,9 @@ if ( ! function_exists( 'tribe_get_date_format' ) ) {
|
|
153 |
*/
|
154 |
function tribe_get_date_format( $with_year = false ) {
|
155 |
if ( $with_year ) {
|
156 |
-
$format =
|
157 |
} else {
|
158 |
-
$format =
|
159 |
}
|
160 |
|
161 |
// Strip slashes - otherwise the slashes for escaped characters will themselves be escaped
|
@@ -436,3 +436,22 @@ if ( ! function_exists( 'tribe_format_currency' ) ) {
|
|
436 |
|
437 |
}
|
438 |
}//end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
*/
|
154 |
function tribe_get_date_format( $with_year = false ) {
|
155 |
if ( $with_year ) {
|
156 |
+
$format = tribe_get_date_option( 'dateWithYearFormat', get_option( 'date_format' ) );
|
157 |
} else {
|
158 |
+
$format = tribe_get_date_option( 'dateWithoutYearFormat', 'F j' );
|
159 |
}
|
160 |
|
161 |
// Strip slashes - otherwise the slashes for escaped characters will themselves be escaped
|
436 |
|
437 |
}
|
438 |
}//end if
|
439 |
+
|
440 |
+
if ( ! function_exists( 'tribe_get_date_option' ) ) {
|
441 |
+
/**
|
442 |
+
* Get a date option.
|
443 |
+
*
|
444 |
+
* Retrieve an option value taking care to escape it to preserve date format slashes.
|
445 |
+
*
|
446 |
+
* @category Events
|
447 |
+
* @param string $optionName Name of the option to retrieve.
|
448 |
+
* @param string $default Value to return if no such option is found.
|
449 |
+
*
|
450 |
+
* @return mixed Value of the option if found
|
451 |
+
*/
|
452 |
+
function tribe_get_date_option( $optionName, $default = '' ) {
|
453 |
+
$value = tribe_get_option( $optionName, $default );
|
454 |
+
|
455 |
+
return Tribe__Date_Utils::unescape_date_format($value);
|
456 |
+
}
|
457 |
+
}
|
common/tests/wpunit/Tribe/Events/common/Date_UtilsTest.php
CHANGED
@@ -41,10 +41,16 @@ class Date_UtilsTest extends \Codeception\TestCase\WPTestCase {
|
|
41 |
public function bad_argument_formats() {
|
42 |
return array_map( function ( $arr ) {
|
43 |
return [ $arr ];
|
44 |
-
},
|
45 |
-
[
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -71,9 +77,12 @@ class Date_UtilsTest extends \Codeception\TestCase\WPTestCase {
|
|
71 |
*/
|
72 |
public function test_get_weekday_timestamp_returns_right_timestamp_in_etc_natural_direction( $expected, $args ) {
|
73 |
date_default_timezone_set( 'Etc/GMT+0' );
|
74 |
-
$this->assertEquals( $expected,
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
/**
|
@@ -84,9 +93,12 @@ class Date_UtilsTest extends \Codeception\TestCase\WPTestCase {
|
|
84 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_minus_9_in_natural_direction( $expected, $args ) {
|
85 |
date_default_timezone_set( 'Etc/GMT-9' );
|
86 |
$nine_hours = 60 * 60 * 9;
|
87 |
-
$this->assertEquals( $expected - $nine_hours,
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
/**
|
@@ -97,9 +109,12 @@ class Date_UtilsTest extends \Codeception\TestCase\WPTestCase {
|
|
97 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_plus_9_in_natural_direction( $expected, $args ) {
|
98 |
date_default_timezone_set( 'Etc/GMT+9' );
|
99 |
$nine_hours = 60 * 60 * 9;
|
100 |
-
$this->assertEquals( $expected + $nine_hours,
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
103 |
}
|
104 |
|
105 |
public function etc_reverse_direction_expected_timestamps() {
|
@@ -118,9 +133,12 @@ class Date_UtilsTest extends \Codeception\TestCase\WPTestCase {
|
|
118 |
*/
|
119 |
public function test_get_weekday_timestamp_returns_right_timestamp_in_etc_reverse_direction( $expected, $args ) {
|
120 |
date_default_timezone_set( 'Etc/GMT+0' );
|
121 |
-
$this->assertEquals( $expected,
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
/**
|
@@ -131,9 +149,12 @@ class Date_UtilsTest extends \Codeception\TestCase\WPTestCase {
|
|
131 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_minus_9_in_reverse_direction( $expected, $args ) {
|
132 |
date_default_timezone_set( 'Etc/GMT-9' );
|
133 |
$nine_hours = 60 * 60 * 9;
|
134 |
-
$this->assertEquals( $expected - $nine_hours,
|
135 |
-
|
136 |
-
|
|
|
|
|
|
|
137 |
}
|
138 |
|
139 |
/**
|
@@ -144,8 +165,64 @@ class Date_UtilsTest extends \Codeception\TestCase\WPTestCase {
|
|
144 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_plus_9_in_reverse_direction( $expected, $args ) {
|
145 |
date_default_timezone_set( 'Etc/GMT+9' );
|
146 |
$nine_hours = 60 * 60 * 9;
|
147 |
-
$this->assertEquals( $expected + $nine_hours,
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
151 |
}
|
41 |
public function bad_argument_formats() {
|
42 |
return array_map( function ( $arr ) {
|
43 |
return [ $arr ];
|
44 |
+
},
|
45 |
+
[
|
46 |
+
[ 'day', 2, 3, 2012, 1 ],
|
47 |
+
[ 2, 'week', 3, 2012, 1 ],
|
48 |
+
[ 2, 2, 'month', 2012, 1 ],
|
49 |
+
[ 2, 2, 3, 'year', 1 ],
|
50 |
+
[ 2, 2, 3, 2012, 'direction' ],
|
51 |
+
[ 2, 2, 3, 2012, 23 ],
|
52 |
+
[ 2, 2, 3, 2012, - 2 ],
|
53 |
+
] );
|
54 |
}
|
55 |
|
56 |
/**
|
77 |
*/
|
78 |
public function test_get_weekday_timestamp_returns_right_timestamp_in_etc_natural_direction( $expected, $args ) {
|
79 |
date_default_timezone_set( 'Etc/GMT+0' );
|
80 |
+
$this->assertEquals( $expected,
|
81 |
+
call_user_func_array( [
|
82 |
+
'Tribe__Date_Utils',
|
83 |
+
'get_weekday_timestamp'
|
84 |
+
],
|
85 |
+
$args ) );
|
86 |
}
|
87 |
|
88 |
/**
|
93 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_minus_9_in_natural_direction( $expected, $args ) {
|
94 |
date_default_timezone_set( 'Etc/GMT-9' );
|
95 |
$nine_hours = 60 * 60 * 9;
|
96 |
+
$this->assertEquals( $expected - $nine_hours,
|
97 |
+
call_user_func_array( [
|
98 |
+
'Tribe__Date_Utils',
|
99 |
+
'get_weekday_timestamp'
|
100 |
+
],
|
101 |
+
$args ) );
|
102 |
}
|
103 |
|
104 |
/**
|
109 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_plus_9_in_natural_direction( $expected, $args ) {
|
110 |
date_default_timezone_set( 'Etc/GMT+9' );
|
111 |
$nine_hours = 60 * 60 * 9;
|
112 |
+
$this->assertEquals( $expected + $nine_hours,
|
113 |
+
call_user_func_array( [
|
114 |
+
'Tribe__Date_Utils',
|
115 |
+
'get_weekday_timestamp'
|
116 |
+
],
|
117 |
+
$args ) );
|
118 |
}
|
119 |
|
120 |
public function etc_reverse_direction_expected_timestamps() {
|
133 |
*/
|
134 |
public function test_get_weekday_timestamp_returns_right_timestamp_in_etc_reverse_direction( $expected, $args ) {
|
135 |
date_default_timezone_set( 'Etc/GMT+0' );
|
136 |
+
$this->assertEquals( $expected,
|
137 |
+
call_user_func_array( [
|
138 |
+
'Tribe__Date_Utils',
|
139 |
+
'get_weekday_timestamp'
|
140 |
+
],
|
141 |
+
$args ) );
|
142 |
}
|
143 |
|
144 |
/**
|
149 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_minus_9_in_reverse_direction( $expected, $args ) {
|
150 |
date_default_timezone_set( 'Etc/GMT-9' );
|
151 |
$nine_hours = 60 * 60 * 9;
|
152 |
+
$this->assertEquals( $expected - $nine_hours,
|
153 |
+
call_user_func_array( [
|
154 |
+
'Tribe__Date_Utils',
|
155 |
+
'get_weekday_timestamp'
|
156 |
+
],
|
157 |
+
$args ) );
|
158 |
}
|
159 |
|
160 |
/**
|
165 |
public function test_get_weekday_timestamp_returns_right_timestamp_etc_plus_9_in_reverse_direction( $expected, $args ) {
|
166 |
date_default_timezone_set( 'Etc/GMT+9' );
|
167 |
$nine_hours = 60 * 60 * 9;
|
168 |
+
$this->assertEquals( $expected + $nine_hours,
|
169 |
+
call_user_func_array( [
|
170 |
+
'Tribe__Date_Utils',
|
171 |
+
'get_weekday_timestamp'
|
172 |
+
],
|
173 |
+
$args ) );
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* unescape_date_format will return input if not a string
|
178 |
+
*/
|
179 |
+
public function test_unescape_date_format_will_return_input_if_not_a_string() {
|
180 |
+
$bad_input = array( 23 );
|
181 |
+
$this->assertEquals( $bad_input, Date_Utils::unescape_date_format( $bad_input ) );
|
182 |
+
}
|
183 |
+
|
184 |
+
public function date_formats_not_to_escape() {
|
185 |
+
return [
|
186 |
+
[ 'tribe', 'tribe' ],
|
187 |
+
[ 'j \d\e F', 'j \d\e F' ],
|
188 |
+
[ 'F, \e\l j' , 'F, \e\l j' ],
|
189 |
+
[ '\hH', '\hH' ],
|
190 |
+
[ 'i\m, s\s', 'i\m, s\s' ],
|
191 |
+
[ '\T\Z: T ', '\T\Z: T' ],
|
192 |
+
];
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* unescape_date_format will return same string when nothing to escape
|
197 |
+
*
|
198 |
+
* @dataProvider date_formats_not_to_escape
|
199 |
+
*/
|
200 |
+
public function test_unescape_date_format_will_return_same_string_when_nothing_to_escape( $in ) {
|
201 |
+
$out = Date_Utils::unescape_date_format( $in );
|
202 |
+
$this->assertEquals( $in, $out );
|
203 |
+
}
|
204 |
+
|
205 |
+
public function date_formats_to_escape() {
|
206 |
+
return [
|
207 |
+
[ 'j \\d\\e F', 'j \d\e F' ],
|
208 |
+
[ 'F, \\e\\l j' , 'F, \e\l j' ],
|
209 |
+
[ '\\hH', '\hH' ],
|
210 |
+
[ 'i\\m, s\\s', 'i\m, s\s' ],
|
211 |
+
[ '\\T\\Z: T', '\T\Z: T' ],
|
212 |
+
[ 'j \d\\e F', 'j \d\e F' ],
|
213 |
+
[ 'F, \e\\l j' , 'F, \e\l j' ],
|
214 |
+
[ 'i\m, s\\s', 'i\m, s\s' ],
|
215 |
+
[ '\T\\Z: T' , '\T\Z: T' ],
|
216 |
+
];
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* unescape_date_format will return escaped date format
|
221 |
+
*
|
222 |
+
* @dataProvider date_formats_to_escape
|
223 |
+
*/
|
224 |
+
public function test_unescape_date_format_will_return_escaped_date_format( $in, $expected_out ) {
|
225 |
+
$out = Date_Utils::unescape_date_format( $in );
|
226 |
+
$this->assertEquals( $expected_out, $out );
|
227 |
}
|
228 |
}
|
common/tribe-common.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Description: An event settings framework for managing shared options
|
4 |
-
Version: 4.0.
|
5 |
Author: Modern Tribe, Inc.
|
6 |
Author URI: http://m.tri.be/1x
|
7 |
Text Domain: tribe-common
|
1 |
<?php
|
2 |
/*
|
3 |
Description: An event settings framework for managing shared options
|
4 |
+
Version: 4.0.6
|
5 |
Author: Modern Tribe, Inc.
|
6 |
Author URI: http://m.tri.be/1x
|
7 |
Text Domain: tribe-common
|
event-tickets.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Event Tickets
|
4 |
Description: Event Tickets allows you to sell tickets to events
|
5 |
-
Version: 4.0.
|
6 |
Author: Modern Tribe, Inc.
|
7 |
Author URI: http://m.tri.be/28
|
8 |
License: GPLv2 or later
|
2 |
/*
|
3 |
Plugin Name: Event Tickets
|
4 |
Description: Event Tickets allows you to sell tickets to events
|
5 |
+
Version: 4.0.5
|
6 |
Author: Modern Tribe, Inc.
|
7 |
Author URI: http://m.tri.be/28
|
8 |
License: GPLv2 or later
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Event Tickets ===
|
2 |
|
3 |
-
Contributors: ModernTribe, borkweb, zbtirrell, barry.hughes, bordoni, brianjessee, brook-tribe, faction23, geoffgraham, ggwicz, jazbek, jbrinley, joshlimecuda, leahkoerper, lucatume, mastromktg, neillmcshea, nicosantos, peterchester, reid.peifer, roblagatta, shane.pearlman, thatdudebutch
|
4 |
Tags: events, add-on, ticket sales, tickets, calendar, community, registration, api, dates, date, posts, workshop, conference, meeting, seminar, concert, summit, The Events Calendar, Events Calendar PRO, ticket integration, event ticketing, RSVP, Event Tickets, Event Tickets Plus
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 4.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -179,6 +179,10 @@ Our Premium Plugins:
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
|
|
182 |
= [4.0.4] 2015-12-23 =
|
183 |
|
184 |
* Fix - Resolved issue with stock calculations on the Attendees report
|
1 |
=== Event Tickets ===
|
2 |
|
3 |
+
Contributors: ModernTribe, borkweb, zbtirrell, barry.hughes, bordoni, brianjessee, brook-tribe, faction23, geoffgraham, ggwicz, jazbek, jbrinley, joshlimecuda, leahkoerper, lucatume, mastromktg, neillmcshea, nicosantos, peterchester, reid.peifer, roblagatta, shane.pearlman, thatdudebutch, joinfof, cliffpaulick, GeoffBel
|
4 |
Tags: events, add-on, ticket sales, tickets, calendar, community, registration, api, dates, date, posts, workshop, conference, meeting, seminar, concert, summit, The Events Calendar, Events Calendar PRO, ticket integration, event ticketing, RSVP, Event Tickets, Event Tickets Plus
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 4.0.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= [4.0.5] 2016-02-17 =
|
183 |
+
|
184 |
+
* Add - Add a loading graphic after clicking send email for the attendee's report
|
185 |
+
|
186 |
= [4.0.4] 2015-12-23 =
|
187 |
|
188 |
* Fix - Resolved issue with stock calculations on the Attendees report
|
src/Tribe/Main.php
CHANGED
@@ -9,7 +9,7 @@ class Tribe__Tickets__Main {
|
|
9 |
/**
|
10 |
* Current version of this plugin
|
11 |
*/
|
12 |
-
const VERSION = '4.0.
|
13 |
|
14 |
/**
|
15 |
* Min required The Events Calendar version
|
9 |
/**
|
10 |
* Current version of this plugin
|
11 |
*/
|
12 |
+
const VERSION = '4.0.5';
|
13 |
|
14 |
/**
|
15 |
* Min required The Events Calendar version
|
src/admin-views/attendees-email.php
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<form method="POST" class="tribe-attendees-email">
|
2 |
<div id="plugin-information-title">
|
3 |
<?php esc_html_e( 'Send the attendee list by email', 'event-tickets' ); ?>
|
1 |
+
<div id="tribe-loading"><span></span></div>
|
2 |
<form method="POST" class="tribe-attendees-email">
|
3 |
<div id="plugin-information-title">
|
4 |
<?php esc_html_e( 'Send the attendee list by email', 'event-tickets' ); ?>
|
src/resources/js/tickets-attendees.js
CHANGED
@@ -72,7 +72,8 @@ jQuery( document ).ready( function( $ ) {
|
|
72 |
|
73 |
$( '.tribe-attendees-email' ).on({
|
74 |
'submit': function( event ) {
|
75 |
-
$( '
|
|
|
76 |
}
|
77 |
});
|
78 |
|
72 |
|
73 |
$( '.tribe-attendees-email' ).on({
|
74 |
'submit': function( event ) {
|
75 |
+
$( '.tribe-attendees-email' ).hide();
|
76 |
+
$( document.getElementById( 'tribe-loading' ) ).show();
|
77 |
}
|
78 |
});
|
79 |
|
src/resources/js/tickets-attendees.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(a){
|
1 |
+
jQuery(document).ready(function(a){if(AttendeesPointer){options=a.extend(AttendeesPointer.options,{close:function(){a.post(ajaxurl,{pointer:AttendeesPointer.pointer_id,action:"dismiss-wp-pointer"})},open:function(a,b){b.pointer.css({top:parseInt(b.pointer.css("top").replace("px",""),10)+5}).find(".wp-pointer-arrow").css({right:"50px",left:"auto"}),b.element.on({click:function(){b.element.pointer("close")}})}});a(AttendeesPointer.target).pointer(options).pointer("open").pointer("widget")}a("input.print").on("click",function(a){window.print()});var b=a(document.getElementById("filter_attendee"));b.on("keydown",function(a){return 13===a.keyCode?!1:void 0}),b.on("keyup paste",function(){var b=jQuery(this).val().toLowerCase();a("#the-list").find("tr").each(function(c,d){var e=a(d),f=e.children("td.order_id").children("a").text(),g=e.children("td.attendee_id").text(),h=e.children("td.security").text(),i=0===g.indexOf(b)||0===f.indexOf(b)||0===h.indexOf(b),j=e.children("td.purchaser_name").text().toLowerCase(),k=0===j.indexOf(b)||j.indexOf(" "+b)>1;i||k?e.show():e.hide()})}),a(".tribe-attendees-email").on({submit:function(b){a(".tribe-attendees-email").hide(),a(document.getElementById("tribe-loading")).show()}}),a(".tickets_checkin").click(function(b){var c=jQuery(this),d={action:"tribe-ticket-checkin-"+c.attr("data-provider"),provider:c.attr("data-provider"),order_ID:c.attr("data-attendee-id"),nonce:Attendees.checkin_nonce};a.post(ajaxurl,d,function(b){b.success&&(c.parent("td").parent("tr").addClass("tickets_checked"),a("#total_checkedin").text(parseInt(a("#total_checkedin").text())+1))},"json"),b.preventDefault()}),a(".tickets_uncheckin").click(function(b){var c=jQuery(this),d={action:"tribe-ticket-uncheckin-"+c.attr("data-provider"),provider:c.attr("data-provider"),order_ID:c.attr("data-attendee-id"),nonce:Attendees.uncheckin_nonce};a.post(ajaxurl,d,function(b){b.success&&(c.parent("span").parent("td").parent("tr").removeClass("tickets_checked"),a("#total_checkedin").text(parseInt(a("#total_checkedin").text())-1))},"json"),b.preventDefault()})});
|