Changeset 9634
- Timestamp:
- 03/25/2020 07:08:17 PM (6 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events
- Files:
-
- 3 edited
-
official-events-online.js (modified) (4 diffs)
-
official-wordpress-events.css (modified) (1 diff)
-
template-events-online.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-events-online.js
r9633 r9634 5 5 */ 6 6 function getSortedEvents( events ) { 7 const timezone = wp.date.format( '(\\U\\T\\CP)' ); 7 8 const sortedEvents = {}; 8 9 events.forEach( function( event ) { … … 10 11 const key = wp.date.format( 'Y-m-d', d ); 11 12 // Inject a human-readable start time. 12 event.startTime = wp.date.format( 'g:i a ', d ); 13 event.startTime = wp.date.format( 'g:i a', d ); 14 event.timezone = timezone; 13 15 if ( sortedEvents.hasOwnProperty( key ) ) { 14 16 sortedEvents[ key ].push( event ); … … 21 23 22 24 jQuery( function( $ ) { 23 var templateTZ = wp.template( 'owe-timezone' );24 25 var templateList = wp.template( 'official-events' ); 25 26 var templateEvent = wp.template( 'official-event' ); … … 36 37 ).join( '' ); 37 38 38 var timezone = templateTZ( wp.date.format( '\\U\\T\\CP' ) ); 39 40 $( '#official-online-events' ).html( timezone + list ); 39 $( '#official-online-events' ).html( list ); 41 40 }); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.css
r9633 r9634 12 12 13 13 .owe-timezone { 14 font-style: italic;14 color: #767676; 15 15 } 16 16 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/template-events-online.php
r9633 r9634 1 <script type="text/template" id="tmpl-owe-timezone">2 <p class="owe-timezone">3 All times displayed in {{ data }}4 </p>5 </script>6 7 1 <script type="text/template" id="tmpl-official-events"> 8 2 <h3> … … 22 16 <span class="owe-separator"></span> 23 17 {{ data.startTime }} 18 <span class="owe-timezone">{{ data.timezone }}</span> 24 19 </li> 25 20 </script>
Note: See TracChangeset
for help on using the changeset viewer.