Ticket #40816: 40816.diff
| File 40816.diff, 841 bytes (added by , 9 years ago) |
|---|
-
src/wp-admin/js/dashboard.js
234 234 $container.on( 'click', '.community-events-toggle-location, .community-events-cancel', app.toggleLocationForm ); 235 235 236 236 $container.on( 'submit', '.community-events-form', function( event ) { 237 var location = $.trim( $( '#community-events-location' ).val() ); 238 237 239 event.preventDefault(); 238 240 241 /* 242 * Don't trigger a search if the search feild is empty or the 243 * search term was made of only spaces before being trimmed. 244 */ 245 if ( ! location ) { 246 return; 247 } 248 239 249 app.getEvents({ 240 location: $( '#community-events-location' ).val()250 location: location 241 251 }); 242 252 }); 243 253