1/*jshint -W054 */ 2if ( typeof EO_SCRIPT_DEBUG === 'undefined') { EO_SCRIPT_DEBUG = true;} 3 4var eventorganiser = eventorganiser || {}; 5 6(function ($) { 7jQuery(document).ready(function () { 8 9 function _eventorganiser_get_where( collection, field, value ) { 10 var object; 11 for ( object in collection ){ 12 if ( collection[field] == value ) { 13 return object; 14 } 15 } 16 return false; 17 } 18 19 /* Fullcalendar */ 20 function eventorganiser_filter_markup( options ){ 21 22 //Are we whitelisting categories 23 var whitelist = ( typeof options.whitelist !== "undefined" && options.whitelist ? options.whitelist.trim().split(/\s*,\s*/) : false ); 24 25 var html="<select class='eo-fc-filter eo-fc-filter-"+options.type+"' data-filter-type='"+options.type+"'>"; 26 html+="<option value=''>"+options.select_none+"</option>"; 27 28 var term; 29 for ( var term_id in options.terms ){ 30 31 term = options.terms[term_id]; 32 33 //If whitelist check term (or ancestor of) belongs to white list. 34 if( whitelist ){ 35 var include_in_dropdown = false; 36 37 if( $.inArray( term.slug, whitelist ) !== -1 ){ 38 include_in_dropdown = true; 39 } 40 41 //Check ancestors 42 var parent = term; 43 while( !include_in_dropdown && parent.parent > 0 ){ 44 parent = _eventorganiser_get_where( options.terms, 'term_id', parent.parent ); 45 if( $.inArray( parent.slug, whitelist ) !== -1 ){ 46 include_in_dropdown = true; 47 } 48 } 49 50 if( !include_in_dropdown ){ 51 continue; 52 } 53 } 54 55 html+= "<option value='"+term.slug+"'>"+term.name+"</option>"; 56 } 57 html+="</select>"; 58 59 var element = $("<span class='fc-header-dropdown filter-"+options.type+"'></span>"); 60 element.append(html); 61 return element; 62 } 63 64 function eventorganiser_organiser_filter_markup( options ){ 65 var whitelist = ( typeof options.whitelist !== "undefined" && options.whitelist.length > 0 ? options.whitelist : false ); 66 var html="<select class='eo-fc-filter eo-fc-filter-organiser' data-filter-type='organiser'>"; 67 html+="<option value=''>"+options.select_none+"</option>"; 68 69 var display_name; 70 for ( var user_id in options.users ){ 71 display_name = options.users[user_id]; 72 if ( whitelist && $.inArray( parseInt(user_id,10), whitelist ) == -1 ) { 73 continue; 74 } 75 html+= "<option value='"+user_id+"'>"+display_name+"</option>"; 76 } 77 html+="</select>"; 78 79 var element = $("<span class='fc-header-dropdown filter-organiser'></span>"); 80 element.append(html); 81 return element; 82 } 83 84 85 $(".eo-fullcalendar").on( 'change', '.eo-fc-filter', function () { 86 $(".eo-fullcalendar").fullCalendar( 'rerenderEvents' ); 87 }); 88 89 function eventorganiser_mini_calendar(){ 90 return $("<span class='fc-header-goto'><input type='hidden' class='eo-mini-calendar'/></span>"); 91 } 92 93 if ($(".eo-fullcalendar").length > 0) { 94 var loadingTimeOut; 95 var calendars = eventorganiser.calendars; 96 var _eoResponsiveViewMap; 97 _eoResponsiveViewMap = { 98 'agendaDay': 'listDay', 99 'basicDay': 'listDay', 100 'listDay': 'listDay', 101 'agendaWeek': 'listWeek', 102 'basicWeek': 'listWeek', 103 'listWeek' : 'listWeek', 104 'month': 'listMonth', 105 'listMonth': 'listMonth', 106 }; 107 for (var i = 0; i < calendars.length; i++) { 108 var calendar = "#eo_fullcalendar_" + (i + 1); 109 if (typeof calendars[i].category === "undefined") { 110 calendars[i].category =''; 111 } 112 if (typeof calendars[i].venue === "undefined") { 113 calendars[i].venue =''; 114 } 115 116 var args = { 117 id: calendar, 118 119 defaultDate: calendars[i].defaultdate ? calendars[i].defaultdate : undefined, 120 121 category: calendars[i].event_category, 122 venue: calendars[i].event_venue, 123 tag: calendars[i].event_tag, 124 organiser: calendars[i].event_organiser, 125 event_series: calendars[i].event_series, 126 127 customButtons:{ 128 category: function(){ 129 return eventorganiser_filter_markup( { 130 terms: eventorganiser.fullcal.categories, 131 select_none: EOAjaxFront.locale.cat, 132 whitelist: calendars[i].event_category, 133 type: 'category' 134 }); 135 }, 136 venue: function(){ 137 return eventorganiser_filter_markup( { 138 terms: eventorganiser.fullcal.venues, 139 select_none: EOAjaxFront.locale.venue, 140 whitelist: calendars[i].event_venue, 141 type: 'venue' 142 }); 143 }, 144 tag: function(){ 145 return eventorganiser_filter_markup( { 146 terms: eventorganiser.fullcal.tags, 147 select_none: EOAjaxFront.locale.tag, 148 whitelist: '', 149 type: 'tag' 150 }); 151 }, 152 organiser: function(){ 153 return eventorganiser_organiser_filter_markup( { 154 users: eventorganiser.fullcal.users, 155 select_none: EOAjaxFront.locale.view_all_organisers, 156 whitelist: calendars[i].event_organiser, 157 }); 158 }, 159 'goto': eventorganiser_mini_calendar 160 }, 161 162 theme: calendars[i].theme, 163 isRTL: calendars[i].isrtl, 164 editable: false, 165 selectable: false, 166 weekMode: "variable", 167 tooltip: calendars[i].tooltip, 168 firstDay: parseInt( eventorganiser.fullcal.firstDay, 10 ), 169 weekends: calendars[i].weekends, 170 hiddenDays: calendars[i].hiddendays, 171 slotDuration: calendars[i].slotduration, 172 allDaySlot: calendars[i].alldayslot, 173 allDayText: calendars[i].alldaytext, 174 axisFormat: calendars[i].axisformat, 175 minTime: calendars[i].mintime, 176 maxTime:calendars[i].maxtime, 177 weekNumbers: calendars[i].weeknumbers, 178 weekNumbersWithinDays: calendars[i].weeknumberswithindays, 179 eventColor: "#1e8cbe", 180 181 timeFormatphp: calendars[i].timeformatphp, 182 timeFormat: calendars[i].timeformat, 183 columnFormat: { 184 month: calendars[i].columnformatmonth, 185 week: calendars[i].columnformatweek, 186 day: calendars[i].columnformatday 187 }, 188 titleFormat: { 189 month: calendars[i].titleformatmonth, 190 week: calendars[i].titleformatweek, 191 day: calendars[i].titleformatday 192 }, 193 194 header: { 195 left: calendars[i].headerleft, 196 center: calendars[i].headercenter, 197 right: calendars[i].headerright 198 }, 199 200 eventRender: function ( event, element, view ) { 201 202 var category = $(view.calendar.options.id).find(".eo-fc-filter-category").val(); 203 var venue = $(view.calendar.options.id).find(".eo-fc-filter-venue").val(); 204 var tag = $(view.calendar.options.id).find(".eo-fc-filter-tag").val(); 205 var organiser= $(view.calendar.options.id).find(".eo-fc-filter-organiser").val(); 206 var render = true; 207 208 if (typeof category !== "undefined" && category !== "" && $.inArray( category, event.category) < 0 ) { 209 render = false;
210 } 211 212 if (typeof venue != "undefined" && venue !== "" && venue !== event.venue_slug) { 213 render = false; 214 } 215 216 if (typeof tag !== "undefined" && tag !== "" && $.inArray(tag, event.tags) < 0 ) { 217 render = false; 218 } 219 if (typeof organiser !== "undefined" && organiser !== "" && parseInt(organiser,10) !== event.organiser) { 220 render = false; 221 } 222 223 render = wp.hooks.applyFilters( 'eventorganiser.fullcalendar_render_event', render, event, element, view ); 224 225 if ( ! render ) { 226 return false; 227 } 228 229 if ( ! view.calendar.options.tooltip ) { 230 return; 231 } 232 233 $(element).qtip({ 234 content: { 235 text: event.description, 236 button: false, 237 title: event.title 238 }, 239 position: { 240 my: "top center", 241 at: "bottom center", 242 viewport: $(window), 243 adjust: { 244 method: 'shift none' 245 } 246 }, 247 hide: { 248 fixed: true, 249 delay: 500, 250 effect: function (a) {$(this).fadeOut("50");} 251 }, 252 border: { 253 radius: 4, 254 width: 3 255 }, 256 style: { 257 classes: "eo-event-toolip qtip-eo", 258 ///widget: true, 259 tip: "topMiddle" 260 } 261 }); 262 }, 263 264 buttonText: { 265 today: EOAjaxFront.locale.today, 266 month: EOAjaxFront.locale.month, 267 week: EOAjaxFront.locale.week, 268 day: EOAjaxFront.locale.day 269 }, 270 monthNames: EOAjaxFront.locale.monthNames, 271 monthNamesShort: EOAjaxFront.locale.monthAbbrev, 272 dayNames: EOAjaxFront.locale.dayNames, 273 dayNamesShort: EOAjaxFront.locale.dayAbbrev, 274 height: calendars[i].aspectratio ? false : 'auto', 275 aspectRatio: calendars[i].aspectratio ? calendars[i].aspectratio : false, 276 responsive: calendars[i].responsive, 277 responsiveBreakpoint: calendars[i].responsivebreakpoint, 278 defaultView: ( $(window).width() < calendars[i].responsivebreakpoint && calendars[i].responsive ) ? _eoResponsiveViewMap[calendars[i].defaultview] : calendars[i].defaultview, 279 previousView: calendars[i].defaultview, 280 nextDayThreshold: calendars[i].nextdaythreshold, 281 windowResize: function(view) { 282 if( view.calendar.options.responsive && $(window).width() < view.calendar.options.responsiveBreakpoint ){ 283 $(this).fullCalendar( 'changeView', _eoResponsiveViewMap[view.calendar.options.previousView] ); 284 } else { 285 $(this).fullCalendar( 'changeView', view.calendar.options.previousView ); 286 } 287 }, 288 289 lazyFetching: "true", 290 events: 291 function (start, end, timezone, callback) { 292 var options = this.options; 293 var request = { 294 start: start.format( "YYYY-MM-DD" ), 295 end: end.format( "YYYY-MM-DD" ), 296 timeformat: options.timeFormatphp, 297 users_events: options.users_events, 298 }; 299 300 if (typeof options.category !== "undefined" && options.category !== "") { 301 request.category = options.category; 302 } 303 if (typeof options.venue !== "undefined" && options.venue !== "") { 304 request.venue = options.venue; 305 } 306 if (typeof options.tag !== "undefined" && options.tag !== "") { 307 request.tag = options.tag; 308 } 309 if (typeof options.organiser !== "undefined" && options.organiser !== 0) { 310 request.organiser = options.organiser; 311 } 312 if (options.event_series) { 313 request.event_series = options.event_series; 314 } 315 316 request = wp.hooks.applyFilters( 'eventorganiser.fullcalendar_request', request, start, end, timezone, options ); 317 318 $.ajax({ 319 url: eventorganiser.ajaxurl + "?action=eventorganiser-fullcal", 320 dataType: "JSON", 321 data: request, 322 complete: function( r, status ){ 323 if ( EO_SCRIPT_DEBUG ) { 324 if( status == "error" ){ 325 326 }else if( status == "parsererror" ){ 327 if( window.console ){
328 console.log( "Response is not valid JSON. This is usually caused by error notices from WordPress or other plug-ins" ); 329 console.log( "Response reads: " + r.responseText ); 330 } 331 alert( "An error has occurred in parsing the response. Please inspect console log for details" ); 332 } 333 } 334 }, 335 success: callback, 336 }); 337 }, 338 339 loading: function ( is_loading ) { 340 var loading = $("#" + $(this).attr("id") + "_loading"); 341 if ( is_loading ) { 342 window.clearTimeout(loadingTimeOut); 343 loadingTimeOut = window.setTimeout(function () {loading.show();}, 1e3); 344 } else { 345 window.clearTimeout(loadingTimeOut); 346 loading.hide(); 347 } 348 }, 349 }; 350 args = wp.hooks.applyFilters( 'eventorganiser.fullcalendar_options', args, calendars[i] ); 351 352 $(calendar).fullCalendar(args); 353 } 354 } 355 356 if ( typeof eventorganiser.fullcal !== 'undefined' ) { 357 $('.eo-mini-calendar').datepicker({ 358 dateFormat: 'DD, d MM, yy', 359 changeMonth: true, 360 changeYear: true, 361 firstDay: parseInt( eventorganiser.fullcal.firstDay, 10 ), 362 buttonText: EOAjaxFront.locale.gotodate, 363 monthNamesShort: EOAjaxFront.locale.monthAbbrev, 364 dayNamesMin: EOAjaxFront.locale.dayAbbrev, 365 nextText: EOAjaxFront.locale.nextText, 366 prevText: EOAjaxFront.locale.prevText, 367 showOn: 'button', 368 beforeShow: function(input, inst) { 369 if( inst.hasOwnProperty( 'dpDiv' ) ){ 370 inst.dpDiv.addClass('eo-datepicker eo-fc-mini-calendar eo-fc-datepicker'); 371 }else{ 372 $('#ui-datepicker-div').addClass('eo-datepicker eo-fc-mini-calendar eo-fc-datepicker'); 373 } 374 }, 375 onSelect: function (dateText, dp) { 376 var cal_id = $(this).parents('div.eo-fullcalendar').attr('id'); 377 $('#'+cal_id).fullCalendar('gotoDate', new Date(Date.parse(dateText))); 378 } 379 }); 380 } 381 382 /* Upcoming dates */ 383 $('#eo-upcoming-dates, .eo-upcoming-dates').each(function(index, value){ 384 var list = {el: $(this)}; 385 if (list.el.find('li:gt(4)').length > 0 ){ 386 var eobloc = 5, 387 locale = { more : EOAjaxFront.locale.ShowMore, less : EOAjaxFront.locale.ShowLess}; 388 list.less = $('<a class="eo-upcoming-dates-show-less" href="#"></a>').text( locale.less ); 389 list.pipe = $('<span class="eo-upcoming-dates-pipe">|</span>'); 390 list.more = $('<a class="eo-upcoming-dates-show-more" href="#"></a>').text( locale.more ); 391 list.el.find('li:gt('+(eobloc-1)+')').hide().end().after( list.less, list.pipe, list.more); 392 list.pipe.hide(); 393 394 list.less.hide().on('click',function(e){ 395 e.preventDefault(); 396 var index = Math.floor( (list.el.find('li:visible').length -1) / eobloc)*eobloc -1; 397 list.el.find('li:gt('+index+')').hide(); 398 list.more.show(); 399 list.pipe.show(); 400 if( list.el.find('li:visible').length <= eobloc ){ 401 list.less.hide(); 402 list.pipe.hide(); 403 } 404 }); 405 list.more.on('click', function(e){ 406 e.preventDefault(); 407 list.less.show(); 408 list.pipe.show(); 409 list.el.find('li:hidden:lt('+eobloc+')').show(); 410 var offset = list.pipe.offset(); 411 $('html, body').animate({ 412 scrollTop: Math.max( offset.top + 40 - $(window).height(),$(window).scrollTop()) 413 }); 414 if( list.el.find('li:hidden').length === 0 ){ 415 list.more.hide(); 416 list.pipe.hide(); 417 } 418 }); 419 } 420 }); 421 422 if ($(".eo-widget-cal-wrap").length > 0 ) { 423 424 $(".eo-widget-cal-wrap").on("click", 'tfoot a', function (a) { 425 a.preventDefault(); 426 427 if ( $(this).data('eo-widget-cal-disabled' ) ) { 428 return; 429 } 430 431 var $calEl = $(this).closest(".eo-widget-cal-wrap"); 432 var calID = $calEl.data("eo-widget-cal-id"); 433 434 $calEl.find( 'tfoot a').data('eo-widget-cal-disabled',1); 435 436 //Defaults 437 var cal = {showpastevents: 1, 'show-long': 0, 'link-to-single': 0 }; 438 439 //Shortcode widget calendar 440 if( typeof eventorganiser.widget_calendars !== "undefined" && typeof eventorganiser.widget_calendars[calID] !== "undefined" ){ 441 cal = eventorganiser.widget_calendars[calID]; 442 } 443 //Widget calendar 444 if( typeof eo_widget_cal !== "undefined" && typeof eo_widget_cal[calID] !== "undefined" ){ 445 cal = eo_widget_cal[calID]; 446 } 447 448 //Set month 449 cal.eo_month = eveorg_getParameterByName("eo_month", $(this).attr("href")); 450 451 $calEl.addClass( 'eo-widget-cal-loading' ); 452 $("#" + calID + "_overlay").remove(); 453 $("#" + calID + "_content").prepend( '<div class="eo-widget-cal-overlay" id="' + calID + '_overlay"><div class="eo-widget-cal-spinner"/></div>' ); 454 455 $.getJSON( 456 eventorganiser.add_query_arg( 'action', 'eo_widget_cal', EOAjaxFront.adminajax ), 457 cal, 458 function (a) { 459 $("#" + calID + "_content").html(a); 460 $calEl.removeClass( 'eo-widget-cal-loading' ); 461 }); 462 }); 463 } 464 465}); 466 467eventorganiser.add_query_arg = function( key, value, uri ){ 468 var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); 469 var separator = uri.indexOf('?') !== -1 ? "&" : "?"; 470 if (uri.match(re)) { 471 return uri.replace(re, '$1' + key + "=" + value + '$2'); 472 }else { 473 return uri + separator + key + "=" + value; 474 } 475}; 476 477 /** 478 * Lifted from underscore.js 479 * @see http://underscorejs.org/ 480 * @license MIT 481 */ 482 eventorganiser.template = function( text, data, settings ){ 483 484 var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; 485 486 settings = typeof settings !== 'undefined' ? settings : {}; 487 488 settings = $.extend( true, { 489 evaluate: /<#([\s\S]+?)#>/g, 490 interpolate: /\{\{\{([\s\S]+?)\}\}\}/g, 491 escape :/\{\{([^\}]+?)\}\}(?!\})/g 492 }, settings ); 493 494 var escapes = { 495 "'": "'", 496 '\\': '\\', 497 '\r': 'r', 498 '\n': 'n', 499 '\t': 't', 500 '\u2028': 'u2028', 501 '\u2029': 'u2029' 502 }; 503 504 var render; 505 506 //Combine delimiters into one regular expression via alternation. 507 var matcher = new RegExp([
508 (settings.escape ).source, 509 (settings.interpolate ).source, 510 (settings.evaluate ).source 511 ].join('|') + '|$', 'g'); 512 513 //Compile the template source, escaping string literals appropriately. 514 var index = 0; 515 var source = "__p+='"; 516 text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { 517 source += text.slice(index, offset).replace(escaper, function(match) { return '\\' + escapes[match]; }); 518 519 if (escape) { 520 source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; 521 } 522 if (interpolate) { 523 source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; 524 } 525 if (evaluate) { 526 source += "';\n" + evaluate + "\n__p+='"; 527 } 528 index = offset + match.length; 529 return match; 530 }); 531 source += "';\n"; 532 533 //If a variable is not specified, place data values in local scope. 534 if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; 535 536 source = "var __t,__p='',__j=Array.prototype.join," + 537 "print=function(){__p+=__j.call(arguments,'');};\n" + 538 source + "return __p;\n"; 539 540 try { 541 render = new Function(settings.variable || 'obj', '_', source); 542 } catch (e) { 543 e.source = source; 544 throw e; 545 } 546 547 if ( data ) return render( data ); 548 549 var template = function( data ) { 550 return render.call( this, data ); 551 }; 552 553 return template; 554 }; 555 556 eventorganiser.agenda_widget = function( param ){ 557 this.param = param; 558 moment.locale( EOAjaxFront.locale.locale, { 559 months: EOAjaxFront.locale.monthNames, 560 monthsShort: EOAjaxFront.locale.monthAbbrev, 561 weekdays: EOAjaxFront.locale.dayNames, 562 weekdaysShort: EOAjaxFront.locale.dayAbbrev, 563 weekdaysMin: EOAjaxFront.locale.dayInitial 564 }); 565 566 //use yesterday as starting point as when we first fetch events will be looking for the 567 //first day with events after that point (and we want to include 'today' in that scope) 568 this.start = moment().add(-1, 'days'); 569 this.end = moment().add(-1, 'days'); 570 this.$el = $( '#' + this.param.id + '_container' ); 571 this.direction = 1; 572 573 this.eventTemplate = eventorganiser.template( $('#eo-tmpl-agenda-widget-item').html(), null, {variable: 'event'} ); 574 this.groupTemplate = eventorganiser.template( $('#eo-tmpl-agenda-widget-group').html(), null, {variable: 'group'} ); 575 }; 576 577 eventorganiser.agenda_widget.prototype.group_change = function( previous, current ){ 578 579 if( previous === false ){ 580 return true; 581 } 582 583 if( this.param.mode !== 'day' ){ 584 return false; 585 } 586 587 return previous.format( 'YYYY-MM-DD' ) !== current.format( 'YYYY-MM-DD' ); 588 }; 589 590 eventorganiser.agenda_widget.prototype.init = function(){ 591 592 this.$el.html( eventorganiser.template( $('#eo-tmpl-agenda-widget').html(), {}, {variable: 'data'} ) ); 593 this.$datesEl = this.$el.find( '.dates' ); 594 this.load_events(); 595 596 //Actions 597 if( this.param.add_to_google ){ 598 this.$el.on( "click", '.event', function(){ 599 $(this).find(".meta").toggle("400"); 600 }); 601 } 602 603 var self = this; 604 this.$el.on( "click", '.eo-agenda-widget-nav-prev,.eo-agenda-widget-nav-next', function(){ 605 if( $(this).hasClass( 'eo-agenda-widget-nav-prev' ) ){ 606 self.direction = -1; 607 }else{ 608 self.direction = 1; 609 } 610 self.load_events(); 611 }); 612 613 }; 614 615 eventorganiser.agenda_widget.prototype.load_events = function(){ 616 var self = this; 617 $.ajax({ 618 url: EOAjaxFront.adminajax, 619 dataType: "JSON", 620 data: { 621 action: "eo_widget_agenda", 622 instance_number: this.param.number, 623 direction: this.direction, 624 start: this.start.format("YYYY-MM-DD"), 625 end: this.end.format("YYYY-MM-DD") 626 }, 627 success: function( events ) { 628 var numberEvents = events.length; 629 630 if ( numberEvents === 0 ) { 631 return; 632 } 633 634 for( var i=0; i< numberEvents; i++ ){ 635 events[i].start = moment( events[i].start ); 636 events[i].end = moment( events[i].end ); 637 } 638 self.start = events[0].start; 639 self.end = events[numberEvents-1].start; 640 self.insert_events( events ); 641 } 642 }); 643 }; 644 645 eventorganiser.agenda_widget.prototype.insert_events = function( events ){ 646 this.$datesEl.html( "" ); 647 648 var numberEvents = events.length; 649 var previous = false, $group = false, $events = false;
650 651 for( var i=0; i< numberEvents; i++ ){ 652 653 if( this.group_change( previous, events[i].start ) ){ 654 this.$datesEl.append( $group ); 655 var group = { 656 start: events[i].start, 657 }; 658 $group = $( this.groupTemplate( group ) ); 659 $events = $group.find( '.a-date' ); 660 } 661 662 $events.append( this.eventTemplate( events[i] ) ); 663 664 previous = events[i].start; 665 } 666 667 this.$datesEl.append( $group ); 668 }; 669 670 jQuery(document).ready(function($){ 671 if( $('.eo-agenda-widget').length > 0 ) { 672 for (var agenda in eo_widget_agenda) { 673 agendaWidget = new eventorganiser.agenda_widget( eo_widget_agenda[agenda] ); 674 agendaWidget.init(); 675 } 676 } 677 }); 678 679})(jQuery); 680 681 682function eveorg_getParameterByName(a, b) { 683 a = a.replace(/[\[]/, "\\[") 684 .replace(/[\]]/, "\\]"); 685 var c = "[\\?&]" + a + "=([^&#]*)"; 686 var d = new RegExp(c); 687 var e = d.exec(b); 688 if (e === null) return ""; 689 else return decodeURIComponent(e[1].replace(/\+/g, " ")); 690} 691 692jQuery(document).ready(function(){ 693 694 if ( ! ( 'map' in eventorganiser ) ) { 695 return; 696 } 697 698 var maps = eventorganiser.map; 699 for (var i = 0; i < maps.length; i++) { 700 701 if ( null === document.getElementById( "eo_venue_map-" + (i + 1) ) ) { 702 continue; 703 } 704 705 var param = maps[i]; 706 var map = new eventorganiserMapsAdapter.provider.map( "eo_venue_map-" + (i + 1), param ); 707 for (var j=0; j < param.locations.length; j++ ) { 708 param.locations[j].position = { 709 lat: param.locations[j].lat, 710 lng: param.locations[j].lng 711 }; 712 map.addMarker(param.locations[j]); 713 } 714 715 } 716});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.