Plugin Directory

Changeset 646914

Timestamp:
01/02/2013 11:04:32 AM (12 years ago)
Author:
stephenh1988
Message:

Fixes venue zoom, are running events past label, uses condensed jquery ui for front-end. Code refactoring and improved documentation.

Location:
event-organiser/trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • event-organiser/trunk/classes/class-eo-event-list-widget.php

    r638444 r646914  
    7474    <label for="<?php echo $this->get_field_id('template'); ?>"><?php _e('Template (leave blank for default)', 'eventorganiser'); ?>  </label>
    7575      <input  id="<?php echo $this->get_field_id('template'); ?>" class="widefat" name="<?php echo $this->get_field_name('template'); ?>" type="text" value="<?php echo esc_attr($instance['template']);?>" />
     76
    7677  </p>
    7778  <p>
  • event-organiser/trunk/classes/class-eventorganiser-shortcodes.php

    r638444 r646914  
    378378        ));
    379379
    380         if(!empty(self::$calendars) || !empty(self::$map) || !empty(self::$widget_calendars) ):             
     380        if(!empty(self::$calendars) || !empty(self::$map) || !empty(self::$widget_calendars) ):               
    381381            wp_enqueue_script( 'eo_qtip2');
    382             wp_enqueue_style('eventorganiser-jquery-ui-style',EVENT_ORGANISER_URL.'css/eventorganiser-admin-fresh.css',array());   
    383382            wp_enqueue_style('eo_calendar-style'); 
    384383            wp_enqueue_style('eo_front');   
  • event-organiser/trunk/css/eventorganiser-admin-style.css

    r638444 r646914  
    6868.ui-combobox-toggle {top: 0;bottom: 0;margin-left: -1px;padding: 0;/* adjust styles for IE 6/7 */*height: 1.7em;*top: 0.1em;}
    6969.ui-combobox-input {margin: 0;padding: 0.3em;}
    70 .eo-venue-combobox-buttons{position: absolute;width:4.4em;}
     70.eo-venue-combobox-buttons{position: absolute;width:4.em;}
    7171
    7272/*
  • event-organiser/trunk/css/eventorganiser-front-end.css

    r590659 r646914  
    1818.eo-agenda-widget li.event .meta{font-size:0.9em}
    1919
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
     135
     136
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
  • event-organiser/trunk/event-organiser-settings.php

    r638444 r646914  
    9191            case 'general':
    9292                /* General - main */
    93                 add_settings_field('supports', __('Select which features events should support','eventorganiser'), array($this,'display_event_properties'), 'eventorganiser_'.$tab_id, $tab_id,
     93                add_settings_field('supports', __('Select which features events should support','eventorganiser'), , 'eventorganiser_'.$tab_id, $tab_id,
    9494                    array(
    9595                        'label_for'=>'supports',
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
     111
     112
     113
     114
     115
    96116                ));
    97117
     
    104124                    array(
    105125                        'label_for'=>'dateformat',
    106                         'select'=> eventorganiser_get_option('dateformat'),
     126                        'selected'=> eventorganiser_get_option('dateformat'),
     127                        'name'=>'eventorganiser_options[dateformat]',
    107128                        'options'=>array(
    108129                            'dd-mm'=> __('dd-mm-yyyy','eventorganiser'),
     
    115136                    array(
    116137                        'label_for'=>'showpast',
    117                         'checked'=>  eventorganiser_get_option('showpast'),
     138                        'name'=>'eventorganiser_options[showpast]',
     139                        'options'=> 1,
     140                        'checked'=> eventorganiser_get_option('showpast'),
    118141                        'help'=> __("Display past events on calendars, event lists and archives (this can be over-ridden by shortcode attributes and widget options).",'eventorganiser')
    119142                ));
     
    122145                    array(
    123146                        'label_for'=>'group_events',
    124                         'checked'=> eventorganiser_get_option('group_events',''),
    125                         'value'=>'series',
     147                        'name'=>'eventorganiser_options[group_events]',
     148                        'options'=> 'series',
     149                        'checked'=> eventorganiser_get_option('group_events'),
    126150                        'help'=> __("If selected only one occurrence of an event will be displayed on event lists and archives (this can be over-ridden by shortcode attributes and widget options.",'eventorganiser')
    127151                ));             
     
    130154                    array(
    131155                        'label_for'=>'runningisnotpast',
    132                         'select'=> eventorganiser_get_option('runningisnotpast',0),
     156                        'name'=>'eventorganiser_options[runningisnotpast]',
     157                        'selected'=> eventorganiser_get_option('runningisnotpast',0),
    133158                        'options'=>array(
    134                             '0'=> __('Yes','eventorganiser'),
    135                             '1'=> __('No','eventorganiser'),
     159                            '0'=> __('','eventorganiser'),
     160                            '1'=> __('','eventorganiser'),
    136161                        ),
    137162                        'help'=>__("If 'no' is selected, an occurrence of an event is only past when it has finished. Otherwise, an occurrence is considered 'past' as soon as it starts.",'eventorganiser'),
     
    141166                    array(
    142167                        'label_for'=>'deleteexpired',
     168
     169
    143170                        'checked'=> eventorganiser_get_option('deleteexpired'),
    144171                        'help'=> __("If selected the event will be automatically trashed 24 hours after the last occurrence finishes.",'eventorganiser')
     
    148175                    array(
    149176                        'label_for'=>'feed',
     177
     178
    150179                        'checked'=>eventorganiser_get_option('feed'),
    151180                        'help'=>sprintf(__('If selected, visitors can subscribe to your events with the url: %s','eventorganiser'), '<code>'.eo_get_events_feed().'</code>')
     
    155184                    array(
    156185                        'label_for'=>'excludefromsearch',
     186
     187
    157188                        'checked'=>eventorganiser_get_option('excludefromsearch'),
    158189                ));
     
    161192                    array(
    162193                        'label_for'=>'templates',
    163                         'checked'=> eventorganiser_get_option('templates'),
     194                        'name'=>'eventorganiser_options[templates]',
     195                        'options'=> 1,
     196                        'checked'=>eventorganiser_get_option('templates'),
    164197                        'help'=>__("For each of the pages, the corresponding template is used. To use your own template simply give it the same name and store in your theme folder. By default, if Event Organiser cannot find a template in your theme directory, it will use its own default template. To prevent this, uncheck this option. WordPress will then decide which template from your theme's folder to use.",'eventorganiser'). sprintf("<p><strong> %s </strong><code>archive-event.php</code></p>
    165198                                            <p><strong> %s </strong><code>single-event.php</code></p>
     
    182215                    array(
    183216                        'label_for'=>'prettyurl',
     217
     218
    184219                        'checked'=>eventorganiser_get_option('prettyurl'),
    185220                        'help'=>__("If you have pretty permalinks enabled, select to have pretty premalinks for events.",'eventorganiser')
     
    190225                    array(
    191226                        'label_for'=>'url_event',
     227
    192228                        'value'=>eventorganiser_get_option('url_event'),
    193229                        'help'=>"<label><code>{$site_url}/<strong>".eventorganiser_get_option('url_event')."</strong>/[event_slug]</code></label>"
     
    197233                    array(
    198234                        'label_for'=>'url_events',
     235
    199236                        'value'=>eventorganiser_get_option('url_events'),
    200237                        'help'=>"<label><code>{$site_url}/<strong>".eventorganiser_get_option('url_events')."</strong></code></label>"
     
    204241                    array(
    205242                        'label_for'=>'url_venue',
     243
    206244                        'value'=>eventorganiser_get_option('url_venue'),
    207245                        'help'=>"<label><code>{$site_url}/<strong>".eventorganiser_get_option('url_venue')."</strong>/[venue_slug]</code></label>"
     
    211249                    array(
    212250                        'label_for'=>'url_cat',
     251
    213252                        'value'=>eventorganiser_get_option('url_cat'),
    214253                        'help'=>"<label><code>{$site_url}/<strong>".eventorganiser_get_option('url_cat')."</strong>/[event_cat_slug]</code></label>"
     
    218257                    array(
    219258                        'label_for'=>'url_tag',
     259
    220260                        'value'=>eventorganiser_get_option('url_tag'),
    221261                        'help'=>"<label><code>{$site_url}/<strong>".eventorganiser_get_option('url_tag')."</strong>/[event_tag_slug]</code></label>"
     
    242282        switch( $tab ){
    243283            case 'general':
    244                 $checkboxes  = array('showpast','templates','excludefromsearch','deleteexpired','feed','eventtag','group_events');
     284                $checkboxes  = array('showpast','templates','excludefromsearch','deleteexpired','feed','group_events');
    245285                $text = array('navtitle','dateformat','runningisnotpast','addtomenu');
    246286
     
    393433            <?php screen_icon('options-general'); ?>
    394434                <?php
    395                 settings_errors();
    396435
    397436                $active_tab = ( isset( $_GET[ 'tab' ] ) &&  isset( $this->tabs[$_GET[ 'tab' ]] ) ? $_GET[ 'tab' ] : 'general');
     
    416455                        do_settings_sections( 'eventorganiser_'.$active_tab );
    417456                        //Tab identifier - so we know which tab we are validating. See $this->validate().
     457
    418458                        printf('<input type="hidden" name="eventorganiser_options[tab]" value="%s" />',esc_attr($active_tab));
    419459                        submit_button();
     
    434474    }
    435475   
    436 
    437     function display_event_properties(){
    438         $counter=1;
    439          $supports = eventorganiser_get_option('supports');
    440 
    441         $supportables= array(
    442             'author' => __('Organiser','eventorganiser').' ('.__('Author').')',
    443             'thumbnail' =>__('Thumbnail'),
    444             'excerpt' => __('Excerpt'),
    445             'custom-fields' => __('Custom Fields'),
    446             'comments' => __('Comments'),
    447             'revisions' => __('Revisions')
    448         );
    449 
    450         echo '<table>';
    451             echo '<tr>';
    452             foreach ( $supportables as $supp => $supp_display):
    453                 printf('<td>
    454                             <input type="checkbox" name="eventorganiser_options[supports][]" value="%s"  %s/> %s
    455                         </td>',
    456                         $supp,
    457                         checked(true, in_array($supp,$supports),false),
    458                         esc_html($supp_display)
    459                 );
    460 
    461                 if($counter==4)
    462                     echo '</tr><tr>';
    463                 $counter++;
    464             endforeach;
    465 
    466             printf('<td>
    467                         <input type="checkbox" name="eventorganiser_options[eventtag]" value="1" %s /> %s
    468                     </td>',
    469                     checked(1,eventorganiser_get_option('eventtag'),false),
    470                     esc_html__("Event Tags",'eventorganiser')
    471             );
    472             echo '</tr>';
    473         echo '</table>';
    474     }
    475 
    476 
    477476    function display_permissions(){
    478477        global $wp_roles;
     
    543542
    544543            <?php printf('<input type="hidden" name ="eventorganiser_options[menu_item_db_id]" value="%d" />',eventorganiser_get_option('menu_item_db_id')); ?>
    545             <?php printf('<input type="text" name="eventorganiser_options[navtitle]" value="%s" />',eventorganiser_get_option('navtitle')); ?>
    546            
    547             <?php _e("(This may not work with some themes)",'eventorganiser');
     544            <?php printf('<input type="text" name="eventorganiser_options[navtitle]" value="%s" />',eventorganiser_get_option('navtitle'));
    548545    }
    549546
     
    553550}
    554551$settings_page = new EventOrganiser_Settings_Page();
    555 
    556 function eventorganiser_radio_field( $args ){
    557 
    558     if ( $args['label_for'] ){
    559 
    560         $current = $args['select'];
    561         $name_prefix = isset($args['name_prefix']) ?  $args['name_prefix'] : 'eventorganiser_options';
    562         printf('<fieldset %s>%s',
    563             isset($args['class']) ? 'class="'.esc_attr($args['class']).'"'  : '',
    564             isset($args['label']) ? '<legend class="screen-reader-text"><span>'.esc_html($args['label']).'</span></legend>' : ''
    565         );
    566 
    567         if( !empty($args['options']) ){
    568             foreach ($args['options'] as $value => $label ){
    569                 printf('<label for="%s"><input type="radio" id="%s" %s name="%s" value="%s"> <span> %s </span></label><br>',
    570                     esc_attr($args['label_for'].'_'.$value),
    571                     esc_attr($args['label_for'].'_'.$value),
    572                     checked($value, $current, false),
    573                     esc_attr($name_prefix.'['.$args['label_for'].']'),
    574                     esc_attr($value),
    575                     esc_html($label));
    576             }
    577         }
    578         if(!empty($args['help'])){
    579                 echo '<p class="description">'.esc_html($args['help']).'</p>';
    580         }
    581         echo '</fieldset>';
    582 
    583     }
    584 }
    585 
    586     function eventorganiser_select_field($args){
    587 
    588         if ( $args['label_for'] ){
    589             $current = $args['select'];
    590             $name_prefix = isset($args['name_prefix']) ?  $args['name_prefix'] : 'eventorganiser_options';
    591             printf('<select %s name="%s" id="%s">',
    592                 isset($args['class']) ? 'class="'.esc_attr($args['class']).'"'  : '',
    593                 esc_attr($name_prefix.'['.$args['label_for'].']'),
    594                 esc_attr($args['label_for'])
    595             );
    596        
    597             if( !empty($args['options']) ){
    598                 foreach ($args['options'] as $value => $label ){
    599                     printf('<option value="%s" %s> %s </option>',esc_attr($value), selected($current, $value, false), esc_html($label));
    600                 }
    601             }
    602             echo '</select>';
    603 
    604             if(!empty($args['help'])){
    605                 echo '<p class="description">'.esc_html($args['help']).'</p>';
    606             }
    607         }
    608     }
    609 
    610     function eventorganiser_text_field($args){
    611         if ( $args['label_for'] ){
    612             $current = $current = $args['value'];
    613             $type = isset($args['type']) ? $args['type'] : 'text';
    614             $name_prefix = isset($args['name_prefix']) ?  $args['name_prefix'] : 'eventorganiser_options';
    615 
    616             printf('<input type="%s" name="%s" class="%s regular-text ltr" id="%s" value="%s" autocomplete="off" />',
    617                 esc_attr($type),
    618                 esc_attr($name_prefix.'['.$args['label_for'].']'),
    619                 isset($args['class']) ? esc_attr($args['class'])  : '',
    620                 esc_attr($args['label_for']),
    621                 esc_attr($current)
    622             );
    623             if(!empty($args['help'])){
    624                 echo '<p class="description">'.$args['help'].'</p>';
    625             }
    626         }
    627     }
    628    
    629 
    630     function eventorganiser_checkbox_field($args=array()){
    631         if ( $args['label_for'] ){
    632 
    633             /* Backwards compatible - now accept an options array: */
    634             /* $options = array( option_id =>array('value'=>value,'checked'=>1|0,'label'=>label ) */
    635             $options =  isset($args['options']) ? $args['options'] : false;
    636             $values =  isset($args['value']) ? $args['value'] : 1;
    637             $checked =  isset($args['checked']) ? $args['checked'] : 0;
    638                        
    639             if( empty($options) && !is_array( $values ) ){
    640                 $options = array(
    641                             $args['label_for'] => array(
    642                                 'label'=>'',
    643                                 'value'=>$values,
    644                                 'checked'=>$checked,
    645                             ));
    646             }
    647 
    648             $name_prefix = isset($args['name_prefix']) ?  $args['name_prefix'] : 'eventorganiser_options';
    649 
    650             foreach( $options as $id => $checkbox ){
    651                 printf('<label for="%1$s">
    652                             <input type="checkbox" name="%2$s" id="%1$s" value="%3$s" %4$s %5$s>
    653                             %6$s </br>
    654                         </label>',
    655                         $id,
    656                         esc_attr($name_prefix.'['.$id.']'),
    657                         esc_attr($checkbox['value']),
    658                         ( $checkbox['checked'] ? 'checked="checked"' : ''),
    659                         isset($args['class']) ? 'class"'.esc_attr($args['class']).'"'  : '',
    660                          isset($checkbox['label']) ? $checkbox['label'] : ''
    661                 );
    662             }
    663 
    664             if(!empty($args['help'])){
    665                 echo '<p class="description">'.$args['help'].'</p>';
    666             }
    667         }
    668     }
    669 
    670     function eventorganiser_textarea_field($args){
    671         if ( $args['label_for'] ){
    672             $current = $args['value'];
    673             $type = isset($args['type']) ? $args['type'] : 'text';
    674             $name_prefix = isset($args['name_prefix']) ?  $args['name_prefix'] : 'eventorganiser_options';
    675 
    676             if( !empty($args['tinymce']) ){
    677                 wp_editor( $current, esc_attr($args['label_for']) ,array(
    678                     'textarea_name'=>$name_prefix.'['.$args['label_for'].']',
    679                     'media_buttons'=>false,
    680                 ));
    681 
    682             }else{
    683 
    684                 printf('<textarea cols="50" rows="4" name="%s" class="%s large-text" id="%s">%s</textarea>',
    685                     esc_attr($name_prefix.'['.$args['label_for'].']'),
    686                     isset($args['class']) ? esc_attr($args['class'])  : '',
    687                     esc_attr($args['label_for']),
    688                     esc_textarea($current)
    689                 );
    690             }
    691             if(!empty($args['help'])){
    692                 echo '<p class="description"><label for="'.$args['label_for'].'">'.$args['help'].'<label></p>';
    693             }
    694         }
    695     }
    696552?>
  • event-organiser/trunk/event-organiser.php

    r640270 r646914  
    33Plugin Name: Event Organiser
    44Plugin URI: http://www.wp-event-organiser.com
    5 Version: 1.6.1
     5Version: 1.6.
    66Description: Creates a custom post type 'events' with features such as reoccurring events, venues, Google Maps, calendar views and events and venue pages
    77Author: Stephen Harris
     
    3535 */
    3636global $eventorganiser_db_version;
    37 $eventorganiser_db_version = "1.6.1";
     37$eventorganiser_db_version = "1.6.";
    3838
    3939
     
    103103        'group_events'=>'',
    104104        'feed' => 1,
    105         'eventtag' => 1,
    106105        'deleteexpired' => 0,
    107         'supports' => array('title','editor','author','thumbnail','excerpt','custom-fields','comments'),
     106        'supports' => array('title','editor','author','thumbnail','excerpt','custom-fields','comments'),
    108107        'event_redirect' => 'events',
    109108        'dateformat'=>'dd-mm',
     
    114113        'excludefromsearch'=>0,
    115114        'showpast'=> 0,
    116         'eventtag' => 1,
    117115        'runningisnotpast' => 0,
    118116      );
    119117      $options = get_option('eventorganiser_options',$defaults);
    120118      $options = wp_parse_args( $options, $defaults );
     119
     120
     121
     122
    121123
    122124      if( !isset($options[$option]) )
  • event-organiser/trunk/includes/event-organiser-ajax.php

    r638444 r646914  
    204204        $calendar = get_transient('eo_full_calendar_admin');
    205205        $key = $_GET['start'].'--'.$_GET['end'];
    206         if( $calendar && is_array($calendar) && isset($calendar[$key]) ){
     206
     207        if( ( !defined('WP_DEBUG') || !WP_DEBUG ) && $calendar && is_array($calendar) && isset($calendar[$key]) ){
    207208            echo json_encode($calendar[$key]);
    208209            exit;
  • event-organiser/trunk/includes/event-organiser-event-functions.php

    r640270 r646914  
    177177
    178178/**
    179 * Returns the start date of occurrence of event an event, like eo_get_the_start().
     179* Returns the start date of occurrence of event an event, like .
    180180* The difference is that the occurrence ID *must* be supplied (event ID is not).
    181181* @since 1.6
     
    299299/**
    300300* Returns an array of datetimes (start and end) corresponding to the next occurrence of an event
    301 * eo_get_next_occurrence() on the other hand returns a formated datetime of the start date.
     301* {@see `eo_get_next_occurrence()`} on the other hand returns a formated datetime of the start date.
     302*
    302303* @since 1.6
    303304*
     
    599600/**
    600601* Returns the colour of a category associated with the event.
    601 * Applies the 'eventorganiser_event_color' filter.
     602* Applies the filter.
    602603* @since 1.6
    603604*
     
    634635* Adds eo-event-cat-[category slug] for each event category it bleongs to.
    635636* Adds eo-event-[future|past|running].
    636 * Applies filter eventorganiser_event_classes
     637* Applies filter
    637638* @since 1.6
    638639*
     
    677678
    678679/**
    679 * Checks if an event taxonomy archive page is being displayed. A simple wrapper for is_tax().
     680* Checks if an event taxonomy archive page is being displayed. A simple wrapper for .
    680681* @since 1.6
    681682*
     
    687688
    688689/**
    689 * Retrieves the permalink for the ICAL event feed. A simple wrapper for get_feed_link().
     690* Retrieves the permalink for the ICAL event feed. A simple wrapper for .
    690691*
    691692* Retrieve the permalink for the events feed. The returned link is the url with which visitors can subscribe
     
    755756}
    756757
    757 
    758 
     758/**
     759 * @ignore
     760*/
    759761function eo_has_event_started($id='',$occurrence=0){
    760762    $tz = eo_get_blog_timezone();
     
    765767}
    766768
     769
     770
     771
    767772function eo_has_event_finished($id='',$occurrence=0){
    768773    $tz = eo_get_blog_timezone();
     
    773778}
    774779
     780
     781
     782
    775783function eo_event_category_dropdown( $args = '' ) {
    776784    $defaults = array(
  • event-organiser/trunk/includes/event-organiser-install.php

    r638444 r646914  
    153153            eventorganiser_install();
    154154        }
     155
     156
     157
     158
     159
     160
     161
     162
    155163        update_option('eventorganiser_version', $eventorganiser_db_version);
    156164
  • event-organiser/trunk/includes/event-organiser-register.php

    r640270 r646914  
    1010function eventorganiser_register_script() {
    1111    global $wp_locale;
    12     $version = '1.6.1';
     12    $version = '1.6.';
    1313
    1414    $ext = (defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG) ? '' : '.min';
     
    5555    /* Styles */
    5656    wp_register_style('eo_calendar-style',EVENT_ORGANISER_URL.'css/fullcalendar.css',array(),$version);
    57     wp_register_style('eo_front',EVENT_ORGANISER_URL.'css/eventorganiser-front-end.css',array('eventorganiser-jquery-ui-style'),$version);
    58     wp_register_style('eventorganiser-jquery-ui-style',EVENT_ORGANISER_URL.'css/eventorganiser-admin-fresh.css',array(),$version);
     57    wp_register_style('eo_front',EVENT_ORGANISER_URL.'css/eventorganiser-front-end.css',array(),$version);
    5958}   
    6059add_action('init', 'eventorganiser_register_script');
     
    6867 */
    6968function eventorganiser_register_scripts(){
    70     $version = '1.6.1';
     69    $version = '1.6.';
    7170    $ext = (defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG) ? '' : '.min';
    7271
  • event-organiser/trunk/includes/event-organiser-utility-functions.php

    r638444 r646914  
    88/**
    99 * Formats a datetime object into a specified format and handles translations.
    10  * Used by eo_get_the_start/end/schedule_start etc.
     10 * Used by
     11 *
     12 * * {@see `eo_get_the_start()`}
     13 * * {@see `eo_get_the_end()`}
     14 * * {@see `eo_get_schedule_start()`}
     15 * * {@see `eo_get_schedule_last()`}
     16 *
    1117 * The constant DATETIMEOBJ can be passed to them to get datetime objects
    12  * Applies eventorganiser_format_datetime filter
     18 * Applies filter
    1319 *
    1420 * @since 1.2.0
     
    436442}
    437443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
     473
     474
     475
     476
     477
     478
     479
     480
     481
     482
     483
     484
     485
     486
     487
     488
     489
     490
     491
     492
     493
     494
     495
     496
     497
     498
     499
     500
     501
     502
     503
     504
     505
     506
     507
     508
     509
     510
     511
     512
     513
     514
     515
     516
     517
     518
     519
     520
     521
     522
     523
     524
     525
     526
     527
     528
     529
     530
     531
     532
     533
     534
     535
     536
     537
     538
     539
     540
     541
     542
     543
     544
     545
     546
     547
     548
     549
     550
     551
     552
     553
     554
     555
     556
     557
     558
     559
     560
     561
     562
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
     585
     586
     587
     588
     589
     590
     591
     592
     593
     594
     595
     596
     597
     598
     599
     600
     601
     602
     603
     604
     605
     606
     607
     608
     609
     610
     611
     612
     613
     614
     615
     616
     617
     618
     619
     620
     621
     622
     623
     624
     625
     626
     627
     628
     629
     630
     631
     632
     633
     634
     635
     636
     637
     638
     639
     640
     641
     642
     643
     644
     645
     646
     647
     648
     649
     650
     651
     652
     653
     654
     655
     656
     657
     658
     659
     660
     661
     662
     663
     664
     665
     666
     667
     668
     669
     670
     671
     672
     673
     674
     675
     676
     677
     678
     679
     680
     681
     682
     683
     684
     685
     686
     687
     688
     689
     690
     691
     692
     693
     694
     695
     696
     697
     698
     699
     700
     701
     702
     703
     704
     705
     706
     707
     708
     709
     710
     711
     712
     713
     714
     715
     716
     717
     718
     719
     720
     721
     722
     723
     724
     725
     726
     727
     728
     729
     730
     731
     732
     733
     734
     735
     736
     737
     738
     739
     740
     741
     742
     743
     744
     745
     746
     747
     748
     749
     750
     751
    438752?>
  • event-organiser/trunk/includes/event-organiser-venue-functions.php

    r638444 r646914  
    4040/**
    4141* Returns the slug of the venue of an event.
    42 * Can be used inside the loop to output the
    43 * venue id of the current event.
     42*
     43* When used without an argument it uses the event specified in the global $post (e.g. current event in the loop).
     44* Can be used inside the loop to output the venue id of the current event.
    4445* @since 1.0.0
    4546*
     
    7273* A utility function for getting the venue ID from a venue ID or slug.
    7374* Useful for when we don't know which is being passed to us, but we want the ID.
     75
    7476* @since 1.6
    7577*
     
    9799
    98100/**
    99  * Get all venue data from database by venue field and data. This acts as a simple wrapper for get_term_by
     101 * Get all venue data from database by venue field and data. This acts as a simple wrapper for
    100102 *
    101103 * Warning: $value is not escaped for 'name' $field. You must do it yourself, if required.
     
    123125*
    124126* Returns the name of a venue specified by it's slug or ID. If used inside the loop, it can return the name of the current post's venue. If specifying the venue by ID, **the ID must be an integer**.
    125 * This function behaves differently to `eo_get_venue_slug` which takes the event ID, rather than venue ID or slug, as an optional argument.
     127*
     128* This function behaves differently to {@see `eo_get_venue_slug()`} which takes the event ID, rather than venue ID or slug, as an optional argument.
    126129*
    127130* @since 1.0.0
     
    143146* Echos the venue of the event
    144147*
    145 * @uses eo_get_venue_name
     148* @uses eo_get_venue_name
    146149* @param (int) venue id or (string) venue slug
    147150*
     
    156159* Returns the description of the description of an event.
    157160* If used with any arguments uses the venue of the current event.
     161
     162
     163
     164
    158165* @since 1.0.0
    159166*
     
    190197* Returns an latitude-longtitude array (keys 'lat', 'lng')
    191198* If used with any arguments uses the venue of the current event.
     199
     200
     201
    192202* @since 1.0.0
    193203*
     
    204214* Returns the latitude co-ordinate of a venue.
    205215* If used with any arguments uses the venue of the current event.
     216
     217
     218
    206219* @since 1.0.0
    207220*
     
    219232* Returns the longtitude co-ordinate of a venue.
    220233* If used with any arguments uses the venue of the current event.
     234
     235
     236
    221237* @since 1.0.0
    222238*
     
    308324
    309325/**
    310  * Retrieve array of venues. Acts as a wrapper for get_terms, except hide_empty defaults to false.
    311  *
    312  * The list of arguments that $args can contain, which will overwrite the defaults:
    313  *
    314  * orderby - Default is 'name'. Can be name, count, term_group, slug or nothing
     326 * Retrieve array of venues. Acts as a wrapper for defaults to false.
     327 *
     328 * The list of arguments that can contain, which will overwrite the defaults:
     329 *
     330 * - Default is 'name'. Can be name, count, term_group, slug or nothing
    315331 * (will use venue/term ID), Passing a custom value other than these will cause it to
    316332 * order based on the custom value.
    317  *
    318  * order - Default is ASC. Can use DESC.
    319  *
    320  * hide_empty - Default is 0
    321  *
    322  * exclude - Default is an empty array. An array, comma- or space-delimited string
     333 * * **order** - Default is ASC. Can use DESC.
     334 * * **hide_empty** - Default is 0 (false)
     335 * * **exclude** - Default is an empty array. An array, comma- or space-delimited string
    323336 * of term ids to exclude from the return array. If 'include' is non-empty,
    324337 * 'exclude' is ignored.
    325  *
    326  * include - Default is an empty array. An array, comma- or space-delimited string
     338 * * **include** - Default is an empty array. An array, comma- or space-delimited string
    327339 * of term ids to include in the return array.
    328  *
    329  * number - The maximum number of terms to return. Default is to return them all.
    330  *
    331  * offset - The number by which to offset the terms query.
    332  *
    333  * fields - Default is 'all', which returns an array of term objects.
    334  * If 'fields' is 'ids' or 'names', returns an array of
    335  * integers or strings, respectively.
    336  *
    337  * slug - Returns terms whose "slug" matches this value. Default is empty string.
    338  *
    339  * search - Returned terms' names will contain the value of 'search',
    340  * case-insensitive. Default is an empty string.
    341  *
    342  * The argument 'pad_counts', if set to true will include the quantity of a term's
    343  * children in the quantity of each term's "count" object variable.
    344  *
    345  * The 'get' argument, if set to 'all' instead of its default empty string,
    346  * returns terms regardless of ancestry or whether the terms are empty.
    347  *
    348  * The 'cache_domain' argument enables a unique cache key to be produced when this query is stored
    349  * in object cache. For instance, if you are using one of this function's filters to modify the
    350  * query (such as 'terms_clauses'), setting 'cache_domain' to a unique value will not overwrite
    351  * the cache for similar queries. Default value is 'core'.
    352  *
     340 * * **number** - The maximum number of terms to return. Default is to return them all.
     341 * * **offset** - The number by which to offset the terms query.
     342 * * **fields** - Default is 'all', which returns an array of term objects.
     343 * If 'fields' is 'ids' or 'names', returns an array of integers or strings, respectively.
     344 * *  **slug** - Returns terms whose "slug" matches this value. Default is empty string.
     345 * * **search** - Returned terms' names will contain the value of 'search',
     346 * * **case-insensitive**. Default is an empty string.
    353347 * @uses get_terms()
    354348 * @link https://gist.github.com/3902494 Gist for creating an archive page of all the venues
     
    359353 */
    360354function eo_get_venues($args=array()){
    361     $args = wp_parse_args( $args, array('hide_empty'=>0 ) );
    362     return get_terms('event-venue',$args);
     355    $args = wp_parse_args( $args, array('hide_empty'=>0, 'fields'=>'all') );
     356    $venues = get_terms('event-venue',$args);
     357    if( $venues ){
     358        //Ensure IDs are cast as integers {@link https://github.com/stephenh1988/Event-Organiser/issues/21}
     359        if( $args['fields'] == 'ids' ){
     360            $venues = array_map('intval', $venues);
     361        }elseif( $args['fields'] == 'all' ){
     362            foreach( $venues as $venue)
     363                $venue->term_id = (int)$venue->term_id;
     364        }
     365    }
     366    return $venues;
    363367}
    364368
     
    367371 * Updates new venue in the database.
    368372 *
    369  * Calls wp_update_term to update the taxonomy term
     373 * Calls to update the taxonomy term
    370374 * Updates venue meta data to database (for 'core' meta keys)
    371375 *
    372  * The $args is an array - the same as that accepted by wp_update_term
     376 * The $args is an array - the same as that accepted by
    373377 * The $args array can also accept the following keys: description, address, postcode, country, latitude, longtitude
    374378 *
    375379 * @since 1.4.0
    376380 *
    377  * @uses wp_update_term to update venue (taxonomy) term
     381 * @uses wp_update_term to update venue (taxonomy) term
    378382 * @uses do_action() Calls 'eventorganiser_save_venue' hook with the venue id
    379383 *
     
    424428 * Adds a new venue to the database.
    425429 *
    426  * Calls wp_insert_term to create the taxonomy term
     430 * Calls to create the taxonomy term
    427431 * Adds venue meta data to database (for 'core' meta keys)
    428432 *
    429  * The $args is an array - the same as that accepted by wp_insert_term
    430  * The $args array can also accept the following keys:
    431  * *  description, address, postcode, country, latitude, longtitude
     433 * The $args is an array - the same as that accepted by `wp_insert_term()`
     434 * The $args array can also accept the following keys: description, address, postcode, country, latitude, longtitude
    432435 *
    433436 * @since 1.4.0
    434437 *
    435  * @uses wp_insert_term to create venue (taxonomy) term
     438 * @uses to create venue (taxonomy) term
    436439 * @uses do_action() Calls 'eventorganiser_insert_venue' hook with the venue id
    437440 * @uses do_action() Calls 'eventorganiser_save_venue' hook with the venue id
     
    481484 * Deletes a venue in the database.
    482485 *
    483  * Calls wp_delete_term to delete the taxonomy term
     486 * Calls to delete the taxonomy term
    484487 * Deletes all the venue's meta
    485488 *
     
    544547
    545548        //Cast zoom as integer
    546         $zoom = (int) $args['zoom'];
     549        $ = (int) $args['zoom'];
    547550       
    548551        //Escape attributes
     
    627630 *
    628631 * Use the $prev_value parameter to differentiate between meta fields with the
    629  * same key and venue ID. This may be used in place of `eo_add_venue_meta()` function. The first thing this function will do is make sure that `$meta_key` already exists on `$venue_id`. If it does not, `add_post_meta($venue_id, $meta_key, $meta_value)` is called instead and its result is returned. Returns meta_id if the meta doesn't exist, otherwise returns true on success and false on failure.
     632 * same key and venue ID. This may be used in place of function. The first thing this function will do is make sure that `$meta_key` already exists on `$venue_id`. If it does not, `add_post_meta($venue_id, $meta_key, $meta_value)` is called instead and its result is returned. Returns meta_id if the meta doesn't exist, otherwise returns true on success and false on failure.
    630633 *
    631634 * If the meta field for the venue does not exist, it will be added.
  • event-organiser/trunk/includes/event.php

    r640270 r646914  
    66* This functions updates a post of event type, with data given in the $post_data
    77* and event data given in $event_data. Returns the post_id.
     8
     9
    810*
    911* The event data array can contain
     
    106108* and event data given in $event_data. Returns the post ID.
    107109*
     110
     111
    108112* The event data array can contain
    109113*
     
    169173    }
    170174
    171 
    172175/**
    173176* Deletes all occurrences for an event (removes them from the eo_events table).
    174 * Triggers `eventorganiser_delete_event` (this action is used to break the caches).
     177* Triggers (this action is used to break the caches).
    175178 * @since 1.5
    176179 *
     
    184187    $del = $wpdb->get_results($wpdb->prepare("DELETE FROM $wpdb->eo_events WHERE post_id=%d",$post_id));
    185188}
    186 
    187 
    188189
    189190/**
  • event-organiser/trunk/js/admin-calendar.js

    r638444 r646914  
    66    $('.eo-dialog').dialog({
    77        autoOpen: false,
    8         width: 450,
     8        width: ,
    99        modal:true
    1010    });
     
    114114                            }
    115115                                $("#eo_event_create_cal input[name='eo_event[event_title]']").val('');
    116                                 $("#eo_event_create_cal select[name='eo_event[Venue']] option:first-child").attr("selected", 'selected');
    117116                                $("#eo_event_create_cal input.ui-autocomplete-input").val('');
    118117                                $("#eo_event_create_cal textarea[name='eo_event[event_content]']").val('');
  • event-organiser/trunk/js/admin-calendar.min.js

    r638444 r646914  
    11(function(b){b(document).ready(function(){function a(){return b("<span class='fc-header-goto'><input type='hidden' id='miniCalendar'/></span>")}function c(f){var i=f.categories,h="<select class='eo-cal-filter' id='eo-event-cat'>";h+="<option value=''>"+f.buttonText.cat+"</option>";for(f=0;f<i.length;f++)h+="<option class='cat-slug-"+i[f].slug+" cat' value='"+i[f].slug+"'>"+i[f].name+"</option>";h+="</select>";return b("<span class='fc-header-dropdown filter-category'></span>").append(h)}function d(f){var i=
    2 f.venues,h="<select class='eo-cal-filter' id='eo-event-venue'>";h+="<option value=''>"+f.buttonText.venue+"</option>";for(f=0;f<i.length;f++)h+="<option value='"+i[f].term_id+"'>"+i[f].name+"</option>";h+="</select>";return b("<span class='fc-header-dropdown filter-venue'></span>").append(h)}b("#eo-dialog-tabs").tabs();b(".eo-dialog").dialog({autoOpen:false,width:450,modal:true});b("#events-meta").parent().find(".ui-dialog-titlebar-close").appendTo(".ui-tabs-nav").closest(".ui-dialog").children(".ui-dialog-titlebar").remove();
     2f.venues,h="<select class='eo-cal-filter' id='eo-event-venue'>";h+="<option value=''>"+f.buttonText.venue+"</option>";for(f=0;f<i.length;f++)h+="<option value='"+i[f].term_id+"'>"+i[f].name+"</option>";h+="</select>";return b("<span class='fc-header-dropdown filter-venue'></span>").append(h)}b("#eo-dialog-tabs").tabs();b(".eo-dialog").dialog({autoOpen:false,width:,modal:true});b("#events-meta").parent().find(".ui-dialog-titlebar-close").appendTo(".ui-tabs-nav").closest(".ui-dialog").children(".ui-dialog-titlebar").remove();
    33var e=b("#eofc_time_format").is(":checked")?"HH:mm":"h:mmtt",g=jQuery("#eo_admin_calendar").fullCalendar({firstDay:parseInt(EO_Ajax.startday),editable:false,lazyFetching:"true",eventColor:"#21759B",theme:true,customButtons:{category:c,venue:d,"goto":a},buttonText:{today:EO_Ajax.locale.today,month:EO_Ajax.locale.month,week:EO_Ajax.locale.week,day:EO_Ajax.locale.day,cat:EO_Ajax.locale.cat,venue:EO_Ajax.locale.venue},monthNames:EO_Ajax.locale.monthNames,monthNamesShort:EO_Ajax.locale.monthAbbrev,dayNames:EO_Ajax.locale.dayNames,
    44dayNamesShort:EO_Ajax.locale.dayAbbrev,header:{left:"title",center:"category venue",right:"prev goto today next"},buttonIcons:false,buttonui:true,events:function(f,i,h){jQuery.ajax({url:EO_Ajax.ajaxurl+"?action=event-admin-cal",dataType:"JSON",data:{start:jQuery.fullCalendar.formatDate(f,"yyyy-MM-dd"),end:jQuery.fullCalendar.formatDate(i,"yyyy-MM-dd")},success:function(k){h(k)}})},categories:EO_Ajax.categories,venues:EO_Ajax.venues,selectable:true,selectHelper:true,eventRender:function(f){var i=jQuery(".filter-category .eo-cal-filter").val(),
    55h=jQuery(".filter-venue .eo-cal-filter").val();if(typeof i!=="undefined"&&i!=""&&jQuery.inArray(i,f.category)<0)return"<div></div>";if(typeof h!=="undefined"&&h!=""&&h!=f.venue)return"<div></div>"},weekMode:"variable",aspectRatio:1.5,loading:function(f){f?jQuery("#loading").show():jQuery("#loading").hide()},timeFormat:e,axisFormat:e,eventClick:function(f,i){i.preventDefault();jQuery("#eo-dialog-tabs ul li").each(function(){var h=b(this).attr("id").substring(14);jQuery("#eo-dialog-tabs #"+b(this).attr("id")+
    66"-content").html(f[h])});b("#events-meta").dialog("open")},select:function(f,i,h,k){if(EO_Ajax.perm_edit){k.preventDefault();k=jQuery(this)[0].calendar.options;var l=jQuery.fullCalendar.formatDate(f,"yyyy-MM-dd"),n=jQuery.fullCalendar.formatDate(f,"HH:mm"),m=jQuery.fullCalendar.formatDate(i,"yyyy-MM-dd"),o=jQuery.fullCalendar.formatDate(i,"HH:mm");if(h){e="ddd, dS MMMM";h=1}else{e="ddd, dS MMMM h(:mm)tt";h=0}if(l==m){f=jQuery.fullCalendar.formatDate(f,e,k);h||(f=f+" &mdash; "+jQuery.fullCalendar.formatDate(i,
    7 "h(:mm)tt",k))}else f=jQuery.fullCalendar.formatDate(f,e,k)+" &mdash; "+jQuery.fullCalendar.formatDate(i,e,k);b("#eo_event_create_cal input[name='eo_event[event_title]']").val("");b("#eo_event_create_cal select[name='eo_event[Venue']] option:first-child").attr("selected","selected");b("#eo_event_create_cal input.ui-autocomplete-input").val("");b("#eo_event_create_cal textarea[name='eo_event[event_content]']").val("");b("#eo_event_create_cal input[name='eo_event[StartDate]']").val(l);b("#eo_event_create_cal input[name='eo_event[StartTime]']").val(n);
    8 b("#eo_event_create_cal input[name='eo_event[EndDate]']").val(m);b("#eo_event_create_cal input[name='eo_event[FinishTime]']").val(o);b("#eo_event_create_cal input[name='eo_event[allday]']").val(h);b("#eo_event_create_cal td#date").html(f);b("#eo_event_create_cal").dialog("open");b("form.eo_cal input[type='submit']").removeAttr("disabled");b("form.eo_cal input#reset").click(function(){b("#eo_event_create_cal").dialog("close")})}}});b("#eofc_time_format").change(function(){e=b("#eofc_time_format").is(":checked")?
    9 "HH:mm":"h:mmtt";g.fullCalendar("option","timeFormat",e);b.post(ajaxurl,{action:"eofc-format-time",is24:b("#eofc_time_format").is(":checked")})});b(".view-button").click(function(f){f.preventDefault();b(".view-button").removeClass("active");g.fullCalendar("changeView",b(this).attr("id"));b(this).addClass("active")});b("#miniCalendar").datepicker({dateFormat:"DD, d MM, yy",firstDay:parseInt(EO_Ajax.startday),changeMonth:true,monthNamesShort:EO_Ajax.locale.monthAbbrev,dayNamesMin:EO_Ajax.locale.dayAbbrev,
    10 changeYear:true,showOn:"button",buttonText:EO_Ajax.locale.gotodate,onSelect:function(f){g.fullCalendar("gotoDate",new Date(Date.parse(f)))}});b("button.ui-datepicker-trigger").button();b(".eo-cal-filter").change(function(){g.fullCalendar("rerenderEvents")});b(".filter-venue .eo-cal-filter").selectmenu({wrapperElement:"<span class='fc-header-filter'></span>"});b(".filter-category .eo-cal-filter").selectmenu({wrapperElement:"<span class='fc-header-filter'></span>",icons:[{find:".cat"}]});var j=b("#eo-event-venue-button").width()+
    11 30;b("#eo-event-venue-button").width(j+"px");b("#eo-event-venue-menu").width(j+"px");j=b("#eo-event-cat-button").width()+30;b("#eo-event-cat-button").width(j+"px");b("#eo-event-cat-menu").width(j+"px")})})(jQuery);
     7"h(:mm)tt",k))}else f=jQuery.fullCalendar.formatDate(f,e,k)+" &mdash; "+jQuery.fullCalendar.formatDate(i,e,k);b("#eo_event_create_cal input[name='eo_event[event_title]']").val("");b("#eo_event_create_cal );
     8b("#eo_event_create_cal input[name='eo_event[
     9,
     10+
     11"px");b("#eo-event-venue-menu").width(j+"px");j=b("#eo-event-cat-button").width()+30;b("#eo-event-cat-button").width(j+"px");b("#eo-event-cat-menu").width(j+"px")})})(jQuery);
    1212(function(b){b.widget("ui.selectmenu",{options:{appendTo:"body",typeAhead:1E3,style:"dropdown",positionOptions:{my:"left top",at:"left bottom",offset:null},width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null,escapeHtml:false,bgImage:function(){}},_create:function(){var a=this,c=this.options,d=(this.element.attr("id")||"ui-selectmenu-"+Math.random().toString(16).slice(2,10)).replace(/(:|\.)/g,"");this.ids=[d,d+"-button",d+"-menu"];this._safemouseup=true;this.isOpen=false;
    1313this.newelement=b("<a />",{"class":this.widgetBaseClass+" ui-widget ui-state-default ui-corner-all",id:this.ids[1],role:"button",href:"#nogo",tabindex:this.element.attr("disabled")?1:0,"aria-haspopup":true,"aria-owns":this.ids[2]});this.newelementWrap=b("<span />").append(this.newelement).insertAfter(this.element);(d=this.element.attr("tabindex"))&&this.newelement.attr("tabindex",d);this.newelement.data("selectelement",this.element);this.selectmenuIcon=b('<span class="'+this.widgetBaseClass+'-icon ui-icon"></span>').prependTo(this.newelement);
  • event-organiser/trunk/js/event.js

    r640270 r646914  
     1
     2
     3
    14jQuery(document).ready(function($) {
    25
     
    2528}
    2629
    27     var eo_occurrences_by_rule = new Array;
    28     var eo_include_dates;
    29     var eo_exclude_dates;
    3030    if ($('#eo_occurrence_includes').length > 0) {
    3131        eo_include_dates = $('#eo_occurrence_includes').val().split(",");
  • event-organiser/trunk/js/event.min.js

    r640270 r646914  
    1 jQuery(document).ready(function(b){function B(){b("#eo_occurrence_includes").val(w.join(",\r\n"));b("#eo_occurrence_excludes").val(x.join(",\r\n"))}function v(){var g=!b("#HWSEvent_rec").prop("checked");b(".reoccurence .event-date :input").attr("disabled",g);b(".reoccurence .event-date :input").toggleClass("ui-state-disabled",g);g=!b("#eo_allday:checkbox").attr("checked");b(".eo_time").attr("disabled",!g);b(".eo_time").toggleClass("ui-state-disabled",!g);switch(b("#HWSEventInput_Req").val()){case "once":case "custom":b("#HWSEvent_freq").val("1");
    2 b(".reocurrence_row").hide();b("#dayofweekrepeat").show();b("#dayofmonthrepeat").show();b(".reocurrence_row").attr("disabled",true);break;case "weekly":b(".reocurrence_row :input").attr("disabled",false);b("#HWSEvent_freq").val()>1?b("#recpan").text(n.weeks):b("#recpan").text(n.week);b(".reocurrence_row").fadeIn(700);b("#dayofweekrepeat").fadeIn(700);b("#dayofweekrepeat :input").attr("disabled",false);b("#dayofmonthrepeat").hide();b("#dayofmonthrepeat :radio").attr("disabled",true);break;case "monthly":b(".reocurrence_row :input").attr("disabled",
    3 false);b("#HWSEvent_freq").val()>1?b("#recpan").text(n.months):b("#recpan").text(n.month);b(".reocurrence_row").fadeIn(700);b("#dayofmonthrepeat").fadeIn(700);b("#dayofmonthrepeat :input").attr("disabled",false);b("#dayofweekrepeat").hide();b("#dayofweekrepeat :input").attr("disabled",true);break;case "daily":b(".reocurrence_row :input").attr("disabled",false);b(".reocurrence_row").fadeIn(700);b("#HWSEvent_freq").val()>1?b("#recpan").text(n.days):b("#recpan").text(n.day);b("#dayofweekrepeat").hide();
    4 b("#dayofweekrepeat :input").attr("disabled",true);b("#dayofmonthrepeat").hide();b("#dayofmonthrepeat :radio").attr("disabled",true);break;case "yearly":b(".reocurrence_row :input").attr("disabled",false);b(".reocurrence_row").fadeIn(700);b("#HWSEvent_freq").val()>1?b("#recpan").text(n.years):b("#recpan").text(n.year);b("#dayofweekrepeat").hide();b("#dayofweekrepeat :input").attr("disabled",true);b("#dayofmonthrepeat").hide();b("#dayofmonthrepeat :radio").attr("disabled",true);break}b("#venue_select").val()===
    5 null&&b("tr.venue_row").hide();q()}function q(){if(b("#HWSEventInput_Req").val()=="once")b("#event_summary").html("This event will be a one-time event");else{var g=b("#from_date").datepicker("getDate"),h=EO_Ajax_Event.locale.weekDay,u=new Array("SU","MO","TU","WE","TH","FR","SA"),o={monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,monthNames:EO_Ajax_Event.locale.monthNames};b("#HWSEventInput_Req :selected").text();var i=parseInt(b("#HWSEvent_freq").val()),
    6 m=n.summary+" ";switch(b("#HWSEventInput_Req").val()){case "custom":case "daily":m+=i>1?sprintf(n.dayPlural,i):n.daySingle;break;case "weekly":m+=i>1?sprintf(n.weekPlural,i):n.weekSingle;i=b("#dayofweekrepeat :checkbox:checked");if(i.length==0){i=g.getDay();b("#dayofweekrepeat :checkbox[value='"+u[i]+"']").attr("checked",true)}i=b("#dayofweekrepeat :checkbox:checked");i.each(function(p){if(p==0)m=m+" "+h[u.indexOf(b(this).val())];if(p>0)m=m+", "+h[u.indexOf(b(this).val())]});break;case "monthly":m+=
    7 i>1?sprintf(n.monthPlural,i):n.monthSingle;if(b("#dayofmonthrepeat :radio:checked").val()=="BYMONTHDAY=")m=m+" "+g.getDate()+a(g);else{i=g.getDay()%7;g=parseInt(Math.floor((g.getDate()-1)/7));m=m+" "+n.occurrence[g]+" "+h[i]}break;case "yearly":m+=i>1?sprintf(n.yearPlural,i):n.yearSingle;m=m+" "+b.datepicker.formatDate("MM d",g,o)+a(g);break}g=b("#recend").datepicker("getDate");if(g!=null)m=m+" "+n.until+" "+b.datepicker.formatDate("MM d'"+a(g)+"' yy",g,o);b("#event_summary").html(m)}}function a(g){return["th",
    8 "st","nd","rd"][3<g.getDate()&&g.getDate()<20?0:Math.min(g.getDate()%10,4)%4]}function c(){x=[];w=[];B();f(eo_viewing_month[0],eo_viewing_month[1],{});y.datepicker("refresh")}function e(g){g=b.datepicker.formatDate("yy-mm-dd",g);if(d(g)[0])return[true,"ui-state-active",""];return[true,"ui-state-disabled",""]}function d(g){if(b.inArray(g,s)>-1){g=b.inArray(g,x);return g>-1?[false,g]:[true,-1]}else{g=b.inArray(g,w);return g>-1?[true,g]:[false,-1]}}function f(g,h){s=[];eo_viewing_month=[g,h];var u=b("#HWSEventInput_Req").val(),
    9 o=parseInt(b("#HWSEvent_freq").val()),i=b("#from_date").datepicker("getDate"),m=b("#recend").datepicker("getDate");h-=1;var p=new Date(g,h,1),z=new Date(new Date(g,h+1,1)-1);if(!(m<p||i>z)){switch(u){case "once":case "custom":g=b.datepicker.formatDate("yy-mm-dd",i);s.push(g);return;case "daily":if(i<p){var C=Math.abs((p-i)/864E5)-1;C%=o}else C=parseInt(i.getDate());h=o;var G=[],E=new Date(p);E.setDate(p.getDate()+(C-1));G.push(E);break;case "weekly":var r=p.getDay();r=b("#dayofweekrepeat :checkbox:checked");
    10 var J=new Array("SU","MO","TU","WE","TH","FR","SA");G=[];r.each(function(I){I=J.indexOf(b(this).val());E=new Date(i);E.setDate(i.getDate()+(I-i.getDay()+7)%7);if(E<p){C=Math.abs((p-i)/864E5);C-=C%(o*7);E.setDate(E.getDate()+C)}G.push(E)});h=7*o;break;case "monthly":if(((g-i.getFullYear())*12+h-(i.getMonth()+1))%o!=0)return;if(b('input[name="eo_input[schedule_meta]"]:checked').val()=="BYMONTHDAY="){var F=i.getDate();z=z.getDate();if(F<=z)r=new Date(g,h,F)}else{g=Math.ceil(i.getDate()/7);F=i.getDay();
    11 if(g>=5){r=z.getDay();z=z.getDate()+(F-r-7)%7}else{r=p.getDay();z=(F-r+7)%7+(g-1)*7+1}r=new Date(p);r.setDate(z)}if(r<=m){g=b.datepicker.formatDate("yy-mm-dd",r);s.push(g)}return;case "yearly":if((g-i.getFullYear())%o!=0)return;z=new Date(g,i.getMonth(),i.getDate());if(h==i.getMonth()&&z.getMonth()==i.getMonth()){r=new Date(i);r.setYear(g);if(r<=m){g=b.datepicker.formatDate("yy-mm-dd",r);s.push(g)}}return;default:return}for(F in G)for(r=new Date(G[F]);r<=z&&r<=m;){g=b.datepicker.formatDate("yy-mm-dd",
    12 r);s.push(g);r.setDate(r.getDate()+h)}}}function j(g){var h=d(g);if(h[0]){h=h[1];h>-1?k(h):t(g)}else{h=h[1];h>-1?A(h):l(g)}B()}function l(g){b.inArray(g,w)<0&&w.push(g)}function k(g){w.splice(g,1)}function t(g){b.inArray(g,x)<0&&x.push(g)}function A(g){x.splice(g,1)}if(!Array.prototype.indexOf)Array.prototype.indexOf=function(g,h){var u=this.length;h=Number(h)||0;h=h<0?Math.ceil(h):Math.floor(h);if(h<0)h+=u;for(;h<u;h++)if(h in this&&this[h]===g)return h;return-1};var s=[],w,x;if(b("#eo_occurrence_includes").length>
    13 0){w=b("#eo_occurrence_includes").val().split(",");x=b("#eo_occurrence_excludes").val().split(",")}b(document).ready(function(){b.widget("ui.combobox",{_create:function(){var g,h=this.element.hide(),u=h.children(":selected");u=u.val()?u.text():"";h=b("<span>").addClass("ui-combobox eo-venue-input").insertAfter(h);g=b("<input>").appendTo(h).val(u).addClass("ui-combobox-input").autocomplete({delay:0,minLength:0,source:function(o,i){b.getJSON(EO_Ajax_Event.ajaxurl+"?callback=?&action=eo-search-venue",
    14 o,function(m){m=b.map(m,function(p){p.label=p.name;return p});i(m)})},select:function(o,i){if(b("tr.venue_row").length>0){i.item.term_id==0?b("tr.venue_row").hide():b("tr.venue_row").show();b("#eventorganiser_event_detail tr.eo-add-new-venue").hide();eo_initialize_map(i.item.venue_lat,i.item.venue_lng)}b("#venue_select").removeAttr("selected");b("#venue_select").val(i.item.term_id)}}).addClass("ui-widget-content ui-corner-left");g.data("autocomplete")._renderItem=function(o,i){if(i.term_id==0)return b("<li></li>").data("item.autocomplete",
    15 i).append("<a>"+i.label+"</a>").appendTo(o);var m=[i.venue_address,i.venue_postal,i.venue_country];m=b.grep(m,function(p){return p});return b("<li></li>").data("item.autocomplete",i).append("<a>"+i.label+"</br> <span style='font-size: 0.8em'><em>"+m.join(", ")+"</span></em></a>").appendTo(o)};h=b("<span>").addClass("eo-venue-combobox-buttons").appendTo(h);b("<a style='vertical-align: top;margin: 0px -1px;padding: 0px;height: 21px;'>").attr("title","Show All Items").appendTo(h).button({icons:{primary:"ui-icon-triangle-1-s"},
    16 text:false}).removeClass("ui-corner-all").addClass("ui-corner-right ui-combobox-toggle ui-combobox-button").click(function(){if(g.autocomplete("widget").is(":visible"))g.autocomplete("close");else{b(this).blur();g.autocomplete("search","");g.focus()}});"event"==pagenow&&b("<a style='vertical-align: top;margin: 0px -1px;padding: 0px;height: 21px;'>").attr("title","Create New Venue").appendTo(h).button({icons:{primary:"ui-icon-plus"},text:false}).removeClass("ui-corner-all").addClass("ui-corner-right add-new-venue ui-combobox-button").click(function(){b("#eventorganiser_event_detail tr.eo-add-new-venue").show();
    17 b("tr.venue_row").show();b("#venue_select").removeAttr("selected").val(0);b(".eo-venue-combobox-select").hide();b(".eo-venue-input input").val("");eo_initialize_map(0,0);var o=EO_Ajax_Event.location;if(o){o=o.split("/");o=o[o.length-1];eventorganiser_code_address(o)}else map.setZoom(1);b(this).blur()})}});b("#venue_select").combobox()});b(".eo-add-new-venue-cancel").click(function(g){g.preventDefault();b(".eo-venue-combobox-select").show();b(".eo-add-new-venue input").val("");b("#eventorganiser_event_detail tr.eo-add-new-venue").hide();
    18 b("#eventorganiser_event_detail tr.venue_row ").hide()});var n=EO_Ajax_Event.locale;if(b("#eventorganiser_detail #from_date, #eventorganiser_detail #to_date").length>0){var H=b("#eventorganiser_detail #from_date, #eventorganiser_detail #to_date").datepicker({dateFormat:EO_Ajax_Event.format,changeMonth:true,changeYear:true,monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,firstDay:parseInt(EO_Ajax_Event.startday),buttonImage:"images/ui-icon-calendar.png",onSelect:function(g){var h=
    19 this.id=="from_date"?"minDate":"maxDate",u=b(this).data("datepicker");g=b.datepicker.parseDate(u.settings.dateFormat||b.datepicker._defaults.dateFormat,g,u.settings);H.not(this).datepicker("option",h,g);this.id=="from_date"&&b("#recend").datepicker("option","minDate",g);c();v()}});b("#recend").datepicker({dateFormat:EO_Ajax_Event.format,monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,changeMonth:true,changeYear:true,firstDay:parseInt(EO_Ajax_Event.startday)});
    20 b("#HWSEvent_time, #HWSEvent_time2").timepicker({showPeriodLabels:false,hourText:EO_Ajax_Event.locale.hour,minuteText:EO_Ajax_Event.locale.minute});b("#HWSEvent_rec").click(function(){v()});b(".reoccurence .event-date :input, .onetime .event-date :input").not(".eo_time").change(function(){v();b(this).attr("id")!="eo_allday"&&c()});v();var D=!b(this).prop("checked");b(".reoccurence .event-date :input").attr("disabled",D);b(".reoccurence .event-date :input").toggleClass("ui-state-disabled",D)}b(".eo_occurrence_toogle").click(function(g){g.preventDefault();
    21 g.stopPropagation();y.toggle()});D=new Date;f(D.getFullYear(),D.getMonth()+1,{});var y=b("#eo_occurrence_datepicker");y.length>0&&y.datepicker({dateFormat:"yy-mm-dd",onSelect:j,beforeShowDay:e,onChangeMonthYear:f,changeMonth:true,changeYear:true,monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,firstDay:parseInt(EO_Ajax_Event.startday)}).hide();b("html").click(function(){y.hide()});y.find(".ui-datepicker-inline").click(function(g){if(!g)g=window.event;g.cancelBubble=
    22 true;g.stopPropagation&&g.stopPropagation()})});
    23 var sprintf=function(){function b(q){return Object.prototype.toString.call(q).slice(8,-1).toLowerCase()}function B(q,a){for(var c=[];a>0;c[--a]=q);return c.join("")}var v=function(){v.cache.hasOwnProperty(arguments[0])||(v.cache[arguments[0]]=v.parse(arguments[0]));return v.format.call(null,v.cache[arguments[0]],arguments)};v.format=function(q,a){var c=1,e=q.length,d="",f=[],j,l,k,t;for(j=0;j<e;j++){d=b(q[j]);if(d==="string")f.push(q[j]);else if(d==="array"){k=q[j];if(k[2]){d=a[c];for(l=0;l<k[2].length;l++){if(!d.hasOwnProperty(k[2][l]))throw sprintf('[sprintf] property "%s" does not exist',
     1var eo_occurrences_by_rule=[],eo_include_dates,eo_exclude_dates;
     2jQuery(document).ready(function(b){function A(){b("#eo_occurrence_includes").val(eo_include_dates.join(",\r\n"));b("#eo_occurrence_excludes").val(eo_exclude_dates.join(",\r\n"))}function u(){var g=!b("#HWSEvent_rec").prop("checked");b(".reoccurence .event-date :input").attr("disabled",g);b(".reoccurence .event-date :input").toggleClass("ui-state-disabled",g);g=!b("#eo_allday:checkbox").attr("checked");b(".eo_time").attr("disabled",!g);b(".eo_time").toggleClass("ui-state-disabled",!g);switch(b("#HWSEventInput_Req").val()){case "once":case "custom":b("#HWSEvent_freq").val("1");
     3b(".reocurrence_row").hide();b("#dayofweekrepeat").show();b("#dayofmonthrepeat").show();b(".reocurrence_row").attr("disabled",true);break;case "weekly":b(".reocurrence_row :input").attr("disabled",false);b("#HWSEvent_freq").val()>1?b("#recpan").text(m.weeks):b("#recpan").text(m.week);b(".reocurrence_row").fadeIn(700);b("#dayofweekrepeat").fadeIn(700);b("#dayofweekrepeat :input").attr("disabled",false);b("#dayofmonthrepeat").hide();b("#dayofmonthrepeat :radio").attr("disabled",true);break;case "monthly":b(".reocurrence_row :input").attr("disabled",
     4false);b("#HWSEvent_freq").val()>1?b("#recpan").text(m.months):b("#recpan").text(m.month);b(".reocurrence_row").fadeIn(700);b("#dayofmonthrepeat").fadeIn(700);b("#dayofmonthrepeat :input").attr("disabled",false);b("#dayofweekrepeat").hide();b("#dayofweekrepeat :input").attr("disabled",true);break;case "daily":b(".reocurrence_row :input").attr("disabled",false);b(".reocurrence_row").fadeIn(700);b("#HWSEvent_freq").val()>1?b("#recpan").text(m.days):b("#recpan").text(m.day);b("#dayofweekrepeat").hide();
     5b("#dayofweekrepeat :input").attr("disabled",true);b("#dayofmonthrepeat").hide();b("#dayofmonthrepeat :radio").attr("disabled",true);break;case "yearly":b(".reocurrence_row :input").attr("disabled",false);b(".reocurrence_row").fadeIn(700);b("#HWSEvent_freq").val()>1?b("#recpan").text(m.years):b("#recpan").text(m.year);b("#dayofweekrepeat").hide();b("#dayofweekrepeat :input").attr("disabled",true);b("#dayofmonthrepeat").hide();b("#dayofmonthrepeat :radio").attr("disabled",true);break}b("#venue_select").val()===
     6null&&b("tr.venue_row").hide();r()}function r(){if(b("#HWSEventInput_Req").val()=="once")b("#event_summary").html("This event will be a one-time event");else{var g=b("#from_date").datepicker("getDate"),j=EO_Ajax_Event.locale.weekDay,p=new Array("SU","MO","TU","WE","TH","FR","SA"),o={monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,monthNames:EO_Ajax_Event.locale.monthNames};b("#HWSEventInput_Req :selected").text();var h=parseInt(b("#HWSEvent_freq").val()),
     7n=m.summary+" ";switch(b("#HWSEventInput_Req").val()){case "custom":case "daily":n+=h>1?sprintf(m.dayPlural,h):m.daySingle;break;case "weekly":n+=h>1?sprintf(m.weekPlural,h):m.weekSingle;h=b("#dayofweekrepeat :checkbox:checked");if(h.length==0){h=g.getDay();b("#dayofweekrepeat :checkbox[value='"+p[h]+"']").attr("checked",true)}h=b("#dayofweekrepeat :checkbox:checked");h.each(function(s){if(s==0)n=n+" "+j[p.indexOf(b(this).val())];if(s>0)n=n+", "+j[p.indexOf(b(this).val())]});break;case "monthly":n+=
     8h>1?sprintf(m.monthPlural,h):m.monthSingle;if(b("#dayofmonthrepeat :radio:checked").val()=="BYMONTHDAY=")n=n+" "+g.getDate()+a(g);else{h=g.getDay()%7;g=parseInt(Math.floor((g.getDate()-1)/7));n=n+" "+m.occurrence[g]+" "+j[h]}break;case "yearly":n+=h>1?sprintf(m.yearPlural,h):m.yearSingle;n=n+" "+b.datepicker.formatDate("MM d",g,o)+a(g);break}g=b("#recend").datepicker("getDate");if(g!=null)n=n+" "+m.until+" "+b.datepicker.formatDate("MM d'"+a(g)+"' yy",g,o);b("#event_summary").html(n)}}function a(g){return["th",
     9"st","nd","rd"][3<g.getDate()&&g.getDate()<20?0:Math.min(g.getDate()%10,4)%4]}function c(){eo_exclude_dates=[];eo_include_dates=[];A();f(eo_viewing_month[0],eo_viewing_month[1],{});y.datepicker("refresh")}function e(g){g=b.datepicker.formatDate("yy-mm-dd",g);if(d(g)[0])return[true,"ui-state-active",""];return[true,"ui-state-disabled",""]}function d(g){if(b.inArray(g,eo_occurrences_by_rule)>-1){g=b.inArray(g,eo_exclude_dates);return g>-1?[false,g]:[true,-1]}else{g=b.inArray(g,eo_include_dates);return g>
     10-1?[true,g]:[false,-1]}}function f(g,j){eo_occurrences_by_rule=[];eo_viewing_month=[g,j];var p=b("#HWSEventInput_Req").val(),o=parseInt(b("#HWSEvent_freq").val()),h=b("#from_date").datepicker("getDate"),n=b("#recend").datepicker("getDate");j-=1;var s=new Date(g,j,1),v=new Date(new Date(g,j+1,1)-1);if(!(n<s||h>v)){switch(p){case "once":case "custom":g=b.datepicker.formatDate("yy-mm-dd",h);eo_occurrences_by_rule.push(g);return;case "daily":if(h<s){var C=Math.abs((s-h)/864E5)-1;C%=o}else C=parseInt(h.getDate());
     11j=o;var D=[],B=new Date(s);B.setDate(s.getDate()+(C-1));D.push(B);break;case "weekly":var q=s.getDay();q=b("#dayofweekrepeat :checkbox:checked");var G=new Array("SU","MO","TU","WE","TH","FR","SA");D=[];q.each(function(F){F=G.indexOf(b(this).val());B=new Date(h);B.setDate(h.getDate()+(F-h.getDay()+7)%7);if(B<s){C=Math.abs((s-h)/864E5);C-=C%(o*7);B.setDate(B.getDate()+C)}D.push(B)});j=7*o;break;case "monthly":if(((g-h.getFullYear())*12+j-(h.getMonth()+1))%o!=0)return;if(b('input[name="eo_input[schedule_meta]"]:checked').val()==
     12"BYMONTHDAY="){var E=h.getDate();v=v.getDate();if(E<=v)q=new Date(g,j,E)}else{g=Math.ceil(h.getDate()/7);E=h.getDay();if(g>=5){q=v.getDay();v=v.getDate()+(E-q-7)%7}else{q=s.getDay();v=(E-q+7)%7+(g-1)*7+1}q=new Date(s);q.setDate(v)}if(q<=n){g=b.datepicker.formatDate("yy-mm-dd",q);eo_occurrences_by_rule.push(g)}return;case "yearly":if((g-h.getFullYear())%o!=0)return;v=new Date(g,h.getMonth(),h.getDate());if(j==h.getMonth()&&v.getMonth()==h.getMonth()){q=new Date(h);q.setYear(g);if(q<=n){g=b.datepicker.formatDate("yy-mm-dd",
     13q);eo_occurrences_by_rule.push(g)}}return;default:return}for(E in D)for(q=new Date(D[E]);q<=v&&q<=n;){g=b.datepicker.formatDate("yy-mm-dd",q);eo_occurrences_by_rule.push(g);q.setDate(q.getDate()+j)}}}function i(g){var j=d(g);if(j[0]){j=j[1];j>-1?k(j):t(g)}else{j=j[1];j>-1?w(j):l(g)}A()}function l(g){b.inArray(g,eo_include_dates)<0&&eo_include_dates.push(g)}function k(g){eo_include_dates.splice(g,1)}function t(g){b.inArray(g,eo_exclude_dates)<0&&eo_exclude_dates.push(g)}function w(g){eo_exclude_dates.splice(g,
     141)}if(!Array.prototype.indexOf)Array.prototype.indexOf=function(g,j){var p=this.length;j=Number(j)||0;j=j<0?Math.ceil(j):Math.floor(j);if(j<0)j+=p;for(;j<p;j++)if(j in this&&this[j]===g)return j;return-1};if(b("#eo_occurrence_includes").length>0){eo_include_dates=b("#eo_occurrence_includes").val().split(",");eo_exclude_dates=b("#eo_occurrence_excludes").val().split(",")}b(document).ready(function(){b.widget("ui.combobox",{_create:function(){var g,j=this.element.hide(),p=j.children(":selected");p=
     15p.val()?p.text():"";j=b("<span>").addClass("ui-combobox eo-venue-input").insertAfter(j);g=b("<input>").appendTo(j).val(p).addClass("ui-combobox-input").autocomplete({delay:0,minLength:0,source:function(o,h){b.getJSON(EO_Ajax_Event.ajaxurl+"?callback=?&action=eo-search-venue",o,function(n){n=b.map(n,function(s){s.label=s.name;return s});h(n)})},select:function(o,h){if(b("tr.venue_row").length>0){h.item.term_id==0?b("tr.venue_row").hide():b("tr.venue_row").show();b("#eventorganiser_event_detail tr.eo-add-new-venue").hide();
     16eo_initialize_map(h.item.venue_lat,h.item.venue_lng)}b("#venue_select").removeAttr("selected");b("#venue_select").val(h.item.term_id)}}).addClass("ui-widget-content ui-corner-left");g.data("autocomplete")._renderItem=function(o,h){if(h.term_id==0)return b("<li></li>").data("item.autocomplete",h).append("<a>"+h.label+"</a>").appendTo(o);var n=[h.venue_address,h.venue_postal,h.venue_country];n=b.grep(n,function(s){return s});return b("<li></li>").data("item.autocomplete",h).append("<a>"+h.label+"</br> <span style='font-size: 0.8em'><em>"+
     17n.join(", ")+"</span></em></a>").appendTo(o)};j=b("<span>").addClass("eo-venue-combobox-buttons").appendTo(j);b("<a style='vertical-align: top;margin: 0px -1px;padding: 0px;height: 21px;'>").attr("title","Show All Items").appendTo(j).button({icons:{primary:"ui-icon-triangle-1-s"},text:false}).removeClass("ui-corner-all").addClass("ui-corner-right ui-combobox-toggle ui-combobox-button").click(function(){if(g.autocomplete("widget").is(":visible"))g.autocomplete("close");else{b(this).blur();g.autocomplete("search",
     18"");g.focus()}});"event"==pagenow&&b("<a style='vertical-align: top;margin: 0px -1px;padding: 0px;height: 21px;'>").attr("title","Create New Venue").appendTo(j).button({icons:{primary:"ui-icon-plus"},text:false}).removeClass("ui-corner-all").addClass("ui-corner-right add-new-venue ui-combobox-button").click(function(){b("#eventorganiser_event_detail tr.eo-add-new-venue").show();b("tr.venue_row").show();b("#venue_select").removeAttr("selected").val(0);b(".eo-venue-combobox-select").hide();b(".eo-venue-input input").val("");
     19eo_initialize_map(0,0);var o=EO_Ajax_Event.location;if(o){o=o.split("/");o=o[o.length-1];eventorganiser_code_address(o)}else map.setZoom(1);b(this).blur()})}});b("#venue_select").combobox()});b(".eo-add-new-venue-cancel").click(function(g){g.preventDefault();b(".eo-venue-combobox-select").show();b(".eo-add-new-venue input").val("");b("#eventorganiser_event_detail tr.eo-add-new-venue").hide();b("#eventorganiser_event_detail tr.venue_row ").hide()});var m=EO_Ajax_Event.locale;if(b("#eventorganiser_detail #from_date, #eventorganiser_detail #to_date").length>
     200){var z=b("#eventorganiser_detail #from_date, #eventorganiser_detail #to_date").datepicker({dateFormat:EO_Ajax_Event.format,changeMonth:true,changeYear:true,monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,firstDay:parseInt(EO_Ajax_Event.startday),buttonImage:"images/ui-icon-calendar.png",onSelect:function(g){var j=this.id=="from_date"?"minDate":"maxDate",p=b(this).data("datepicker");g=b.datepicker.parseDate(p.settings.dateFormat||b.datepicker._defaults.dateFormat,
     21g,p.settings);z.not(this).datepicker("option",j,g);this.id=="from_date"&&b("#recend").datepicker("option","minDate",g);c();u()}});b("#recend").datepicker({dateFormat:EO_Ajax_Event.format,monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,changeMonth:true,changeYear:true,firstDay:parseInt(EO_Ajax_Event.startday)});b("#HWSEvent_time, #HWSEvent_time2").timepicker({showPeriodLabels:false,hourText:EO_Ajax_Event.locale.hour,minuteText:EO_Ajax_Event.locale.minute});
     22b("#HWSEvent_rec").click(function(){u()});b(".reoccurence .event-date :input, .onetime .event-date :input").not(".eo_time").change(function(){u();b(this).attr("id")!="eo_allday"&&c()});u();var x=!b(this).prop("checked");b(".reoccurence .event-date :input").attr("disabled",x);b(".reoccurence .event-date :input").toggleClass("ui-state-disabled",x)}b(".eo_occurrence_toogle").click(function(g){g.preventDefault();g.stopPropagation();y.toggle()});x=new Date;f(x.getFullYear(),x.getMonth()+1,{});var y=b("#eo_occurrence_datepicker");
     23y.length>0&&y.datepicker({dateFormat:"yy-mm-dd",onSelect:i,beforeShowDay:e,onChangeMonthYear:f,changeMonth:true,changeYear:true,monthNamesShort:EO_Ajax_Event.locale.monthAbbrev,dayNamesMin:EO_Ajax_Event.locale.dayAbbrev,firstDay:parseInt(EO_Ajax_Event.startday)}).hide();b("html").click(function(){y.hide()});y.find(".ui-datepicker-inline").click(function(g){if(!g)g=window.event;g.cancelBubble=true;g.stopPropagation&&g.stopPropagation()})});
     24var sprintf=function(){function b(r){return Object.prototype.toString.call(r).slice(8,-1).toLowerCase()}function A(r,a){for(var c=[];a>0;c[--a]=r);return c.join("")}var u=function(){u.cache.hasOwnProperty(arguments[0])||(u.cache[arguments[0]]=u.parse(arguments[0]));return u.format.call(null,u.cache[arguments[0]],arguments)};u.format=function(r,a){var c=1,e=r.length,d="",f=[],i,l,k,t;for(i=0;i<e;i++){d=b(r[i]);if(d==="string")f.push(r[i]);else if(d==="array"){k=r[i];if(k[2]){d=a[c];for(l=0;l<k[2].length;l++){if(!d.hasOwnProperty(k[2][l]))throw sprintf('[sprintf] property "%s" does not exist',
    2425k[2][l]);d=d[k[2][l]]}}else d=k[1]?a[k[1]]:a[c++];if(/[^s]/.test(k[8])&&b(d)!="number")throw sprintf("[sprintf] expecting number but found %s",b(d));switch(k[8]){case "b":d=d.toString(2);break;case "c":d=String.fromCharCode(d);break;case "d":d=parseInt(d,10);break;case "e":d=k[7]?d.toExponential(k[7]):d.toExponential();break;case "f":d=k[7]?parseFloat(d).toFixed(k[7]):parseFloat(d);break;case "o":d=d.toString(8);break;case "s":d=(d=String(d))&&k[7]?d.substring(0,k[7]):d;break;case "u":d=Math.abs(d);
    25 break;case "x":d=d.toString(16);break;case "X":d=d.toString(16).toUpperCase();break}d=/[def]/.test(k[8])&&k[3]&&d>=0?"+"+d:d;l=k[4]?k[4]=="0"?"0":k[4].charAt(1):" ";t=k[6]-String(d).length;l=k[6]?B(l,t):"";f.push(k[5]?d+l:l+d)}}return f.join("")};v.cache={};v.parse=function(q){q=q;for(var a=[],c=[],e=0;q;){if((a=/^[^\x25]+/.exec(q))!==null)c.push(a[0]);else if((a=/^\x25{2}/.exec(q))!==null)c.push("%");else if((a=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(q))!==
    26 null){if(a[2]){e|=1;var d=[],f=a[2],j=[];if((j=/^([a-z_][a-z_\d]*)/i.exec(f))!==null)for(d.push(j[1]);(f=f.substring(j[0].length))!=="";)if((j=/^\.([a-z_][a-z_\d]*)/i.exec(f))!==null)d.push(j[1]);else if((j=/^\[(\d+)\]/.exec(f))!==null)d.push(j[1]);else throw"[sprintf] huh?";else throw"[sprintf] huh?";a[2]=d}else e|=2;if(e===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";c.push(a)}else throw"[sprintf] huh?";q=q.substring(a[0].length)}return c};return v}(),vsprintf=
    27 function(b,B){B.unshift(b);return sprintf.apply(null,B)};
    28 (function(b){function B(){this._curInst=null;this._disabledInputs=[];this._inDialog=this._timepickerShowing=false;this._dialogClass="ui-timepicker-dialog";this._mainDivId="ui-timepicker-div";this._inlineClass="ui-timepicker-inline";this._currentClass="ui-timepicker-current";this._dayOverClass="ui-timepicker-days-cell-over";this.regional=[];this.regional[""]={hourText:"Hour",minuteText:"Minute",amPmText:["AM","PM"],closeButtonText:"Done",nowButtonText:"Now",deselectButtonText:"Deselect"};this._defaults=
     26break;case "x":d=d.toString(16);break;case "X":d=d.toString(16).toUpperCase();break}d=/[def]/.test(k[8])&&k[3]&&d>=0?"+"+d:d;l=k[4]?k[4]=="0"?"0":k[4].charAt(1):" ";t=k[6]-String(d).length;l=k[6]?))!==
     27null){if(a[2]){e|=1;var d=[],f=a[2],}(),vsprintf=
     28function(b,)};
     29(function(b){function (){this._curInst=null;this._disabledInputs=[];this._inDialog=this._timepickerShowing=false;this._dialogClass="ui-timepicker-dialog";this._mainDivId="ui-timepicker-div";this._inlineClass="ui-timepicker-inline";this._currentClass="ui-timepicker-current";this._dayOverClass="ui-timepicker-days-cell-over";this.regional=[];this.regional[""]={hourText:"Hour",minuteText:"Minute",amPmText:["AM","PM"],closeButtonText:"Done",nowButtonText:"Now",deselectButtonText:"Deselect"};this._defaults=
    2930{showOn:"focus",button:null,showAnim:"fadeIn",showOptions:{},appendText:"",beforeShow:null,onSelect:null,onClose:null,timeSeparator:":",periodSeparator:" ",showPeriod:false,showPeriodLabels:true,showLeadingZero:true,showMinutesLeadingZero:true,altField:"",defaultTime:"now",myPosition:"left top",atPosition:"left bottom",onHourShow:null,onMinuteShow:null,hours:{starts:0,ends:23},minutes:{starts:0,ends:55,interval:5},rows:4,showHours:true,showMinutes:true,optionalMinutes:false,showCloseButton:false,
    30 showNowButton:false,showDeselectButton:false};b.extend(this._defaults,this.regional[""]);this.tpDiv=b('<div id="'+this._mainDivId+'" class="ui-timepicker ui-widget ui-helper-clearfix ui-corner-all " style="display: none"></div>')}function v(a,c){b.extend(a,c);for(var e in c)if(c[e]==null||c[e]==undefined)a[e]=c[e];return a}b.extend(b.ui,{timepicker:{version:"0.3.1"}});var q=(new Date).getTime();b.extend(B.prototype,{markerClassName:"hasTimepicker",log:function(){},_widgetTimepicker:function(){return this.tpDiv},
    31 setDefaults:function(a){v(this._defaults,a||{});return this},_attachTimepicker:function(a,c){var e=null;for(var d in this._defaults){var f=a.getAttribute("time:"+d);if(f){e=e||{};try{e[d]=eval(f)}catch(j){e[d]=f}}}d=a.nodeName.toLowerCase();f=d=="div"||d=="span";if(!a.id){this.uuid+=1;a.id="tp"+this.uuid}var l=this._newInst(b(a),f);l.settings=b.extend({},c||{},e||{});if(d=="input"){this._connectTimepicker(a,l);this._setTimeFromField(l)}else f&&this._inlineTimepicker(a,l)},_newInst:function(a,c){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,
    32 "\\\\$1"),input:a,inline:c,tpDiv:!c?this.tpDiv:b('<div class="'+this._inlineClass+' ui-timepicker ui-widget  ui-helper-clearfix"></div>')}},_connectTimepicker:function(a,c){var e=b(a);c.append=b([]);c.trigger=b([]);if(!e.hasClass(this.markerClassName)){this._attachments(e,c);e.addClass(this.markerClassName).keydown(this._doKeyDown).keyup(this._doKeyUp).bind("setData.timepicker",function(d,f,j){c.settings[f]=j}).bind("getData.timepicker",function(d,f){return this._get(c,f)});b.data(a,"timepicker",
     31showNowButton:false,showDeselectButton:false};b.extend(this._defaults,this.regional[""]);this.tpDiv=b('<div id="'+this._mainDivId+'" class="ui-timepicker ui-widget ui-helper-clearfix ui-corner-all " style="display: none"></div>')}function .prototype,{markerClassName:"hasTimepicker",log:function(){},_widgetTimepicker:function(){return this.tpDiv},
     32setDefaults:function(a){){e[d]=f}}}d=a.nodeName.toLowerCase();f=d=="div"||d=="span";if(!a.id){this.uuid+=1;a.id="tp"+this.uuid}var l=this._newInst(b(a),f);l.settings=b.extend({},c||{},e||{});if(d=="input"){this._connectTimepicker(a,l);this._setTimeFromField(l)}else f&&this._inlineTimepicker(a,l)},_newInst:function(a,c){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,
     33"\\\\$1"),input:a,inline:c,tpDiv:!c?this.tpDiv:b('<div class="'+this._inlineClass+' ui-timepicker ui-widget  ui-helper-clearfix"></div>')}},_connectTimepicker:function(a,c){var e=b(a);c.append=b([]);c.trigger=b([]);if(!e.hasClass(this.markerClassName)){this._attachments(e,c);e.addClass(this.markerClassName).keydown(this._doKeyDown).keyup(this._doKeyUp).bind("setData.timepicker",function(d,f,}).bind("getData.timepicker",function(d,f){return this._get(c,f)});b.data(a,"timepicker",
    3334c)}},_doKeyDown:function(a){var c=b.timepicker._getInst(a.target),e=true;c._keyEvent=true;if(b.timepicker._timepickerShowing)switch(a.keyCode){case 9:b.timepicker._hideTimepicker();e=false;break;case 13:b.timepicker._updateSelectedValue(c);b.timepicker._hideTimepicker();return false;case 27:b.timepicker._hideTimepicker();break;default:e=false}else if(a.keyCode==36&&a.ctrlKey)b.timepicker._showTimepicker(this);else e=false;if(e){a.preventDefault();a.stopPropagation()}},_doKeyUp:function(a){a=b.timepicker._getInst(a.target);
    3435b.timepicker._setTimeFromField(a);b.timepicker._updateTimepicker(a)},_attachments:function(a,c){var e=this._get(c,"appendText"),d=this._get(c,"isRTL");c.append&&c.append.remove();if(e){c.append=b('<span class="'+this._appendClass+'">'+e+"</span>");a[d?"before":"after"](c.append)}a.unbind("focus.timepicker",this._showTimepicker);a.unbind("click.timepicker",this._adjustZIndex);c.trigger&&c.trigger.remove();e=this._get(c,"showOn");if(e=="focus"||e=="both"){a.bind("focus.timepicker",this._showTimepicker);
    35 a.bind("click.timepicker",this._adjustZIndex)}if(e=="button"||e=="both"){e=this._get(c,"button");b(e).bind("click.timepicker",function(){if(b.timepicker._timepickerShowing&&b.timepicker._lastInput==a[0])b.timepicker._hideTimepicker();else c.input.is(":disabled")||b.timepicker._showTimepicker(a[0]);return false})}},_inlineTimepicker:function(a,c){var e=b(a);if(!e.hasClass(this.markerClassName)){e.addClass(this.markerClassName).append(c.tpDiv).bind("setData.timepicker",function(d,f,j){c.settings[f]=
    36 j}).bind("getData.timepicker",function(d,f){return this._get(c,f)});b.data(a,"timepicker",c);this._setTimeFromField(c);this._updateTimepicker(c);c.tpDiv.show()}},_adjustZIndex:function(a){a=a.target||a;b.timepicker._getInst(a).tpDiv.css("zIndex",b.timepicker._getZIndex(a)+1)},_showTimepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.timepicker._isDisabledTimepicker(a)||b.timepicker._lastInput==a)){b.timepicker._hideTimepicker();var c=b.timepicker._getInst(a);
    37 b.timepicker._curInst&&b.timepicker._curInst!=c&&b.timepicker._curInst.tpDiv.stop(true,true);var e=b.timepicker._get(c,"beforeShow");v(c.settings,e?e.apply(a,[a,c]):{});c.lastVal=null;b.timepicker._lastInput=a;b.timepicker._setTimeFromField(c);if(b.timepicker._inDialog)a.value="";if(!b.timepicker._pos){b.timepicker._pos=b.timepicker._findPos(a);b.timepicker._pos[1]+=a.offsetHeight}var d=false;b(a).parents().each(function(){d|=b(this).css("position")=="fixed";return!d});if(d&&b.browser.opera){b.timepicker._pos[0]-=
     36a.bind("click.timepicker",this._adjustZIndex)}if(e=="button"||e=="both"){e=this._get(c,"button");b(e).bind("click.timepicker",function(){if(b.timepicker._timepickerShowing&&b.timepicker._lastInput==a[0])b.timepicker._hideTimepicker();else c.input.is(":disabled")||b.timepicker._showTimepicker(a[0]);return false})}},_inlineTimepicker:function(a,c){var e=b(a);if(!e.hasClass(this.markerClassName)){e.addClass(this.markerClassName).append(c.tpDiv).bind("setData.timepicker",function(d,f,){c.settings[f]=
     37}).bind("getData.timepicker",function(d,f){return this._get(c,f)});b.data(a,"timepicker",c);this._setTimeFromField(c);this._updateTimepicker(c);c.tpDiv.show()}},_adjustZIndex:function(a){a=a.target||a;b.timepicker._getInst(a).tpDiv.css("zIndex",b.timepicker._getZIndex(a)+1)},_showTimepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.timepicker._isDisabledTimepicker(a)||b.timepicker._lastInput==a)){b.timepicker._hideTimepicker();var c=b.timepicker._getInst(a);
     38b.timepicker._curInst&&b.timepicker._curInst!=c&&b.timepicker._curInst.tpDiv.stop(true,true);var e=b.timepicker._get(c,"beforeShow");(c.settings,e?e.apply(a,[a,c]):{});c.lastVal=null;b.timepicker._lastInput=a;b.timepicker._setTimeFromField(c);if(b.timepicker._inDialog)a.value="";if(!b.timepicker._pos){b.timepicker._pos=b.timepicker._findPos(a);b.timepicker._pos[1]+=a.offsetHeight}var d=false;b(a).parents().each(function(){d|=b(this).css("position")=="fixed";return!d});if(d&&b.browser.opera){b.timepicker._pos[0]-=
    3839document.documentElement.scrollLeft;b.timepicker._pos[1]-=document.documentElement.scrollTop}e={left:b.timepicker._pos[0],top:b.timepicker._pos[1]};b.timepicker._pos=null;c.tpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.timepicker._updateTimepicker(c);if(!c.inline&&typeof b.ui.position=="object"){c.tpDiv.position({of:c.input,my:b.timepicker._get(c,"myPosition"),at:b.timepicker._get(c,"atPosition"),collision:"flip"});e=c.tpDiv.offset();b.timepicker._pos=[e.top,e.left]}c._hoursClicked=
    39 false;c._minutesClicked=false;e=b.timepicker._checkOffset(c,e,d);c.tpDiv.css({position:b.timepicker._inDialog&&b.blockUI?"static":d?"fixed":"absolute",display:"none",left:e.left+"px",top:e.top+"px"});if(!c.inline){e=b.timepicker._get(c,"showAnim");var f=b.timepicker._get(c,"duration"),j=function(){b.timepicker._timepickerShowing=true;var l=b.timepicker._getBorders(c.tpDiv);c.tpDiv.find("iframe.ui-timepicker-cover").css({left:-l[0],top:-l[1],width:c.tpDiv.outerWidth(),height:c.tpDiv.outerHeight()})};
    40 b.timepicker._adjustZIndex(a);b.effects&&b.effects[e]?c.tpDiv.show(e,b.timepicker._get(c,"showOptions"),f,j):c.tpDiv[e||"show"](e?f:null,j);if(!e||!f)j();c.input.is(":visible")&&!c.input.is(":disabled")&&c.input.focus();b.timepicker._curInst=c}}},_getZIndex:function(a){a=b(a);for(var c;a.length&&a[0]!==document;){c=a.css("position");if(c==="absolute"||c==="relative"||c==="fixed"){c=parseInt(a.css("zIndex"),10);if(!isNaN(c)&&c!==0)return c}a=a.parent()}},_refreshTimepicker:function(a){(a=this._getInst(a))&&
     40false;c._minutesClicked=false;e=b.timepicker._checkOffset(c,e,d);c.tpDiv.css({position:b.timepicker._inDialog&&b.blockUI?"static":d?"fixed":"absolute",display:"none",left:e.left+"px",top:e.top+"px"});if(!c.inline){e=b.timepicker._get(c,"showAnim");var f=b.timepicker._get(c,"duration"),=function(){b.timepicker._timepickerShowing=true;var l=b.timepicker._getBorders(c.tpDiv);c.tpDiv.find("iframe.ui-timepicker-cover").css({left:-l[0],top:-l[1],width:c.tpDiv.outerWidth(),height:c.tpDiv.outerHeight()})};
     41b.timepicker._adjustZIndex(a);b.effects&&b.effects[e]?c.tpDiv.show(e,b.timepicker._get(c,"showOptions"),f,();c.input.is(":visible")&&!c.input.is(":disabled")&&c.input.focus();b.timepicker._curInst=c}}},_getZIndex:function(a){a=b(a);for(var c;a.length&&a[0]!==document;){c=a.css("position");if(c==="absolute"||c==="relative"||c==="fixed"){c=parseInt(a.css("zIndex"),10);if(!isNaN(c)&&c!==0)return c}a=a.parent()}},_refreshTimepicker:function(a){(a=this._getInst(a))&&
    4142this._updateTimepicker(a)},_updateTimepicker:function(a){a.tpDiv.empty().append(this._generateHTML(a));this._rebindDialogEvents(a)},_rebindDialogEvents:function(a){var c=b.timepicker._getBorders(a.tpDiv),e=this;a.tpDiv.find("iframe.ui-timepicker-cover").css({left:-c[0],top:-c[1],width:a.tpDiv.outerWidth(),height:a.tpDiv.outerHeight()}).end().find(".ui-timepicker-minute-cell").unbind().bind("click",{fromDoubleClick:false},b.proxy(b.timepicker.selectMinutes,this)).bind("dblclick",{fromDoubleClick:true},
    4243b.proxy(b.timepicker.selectMinutes,this)).end().find(".ui-timepicker-hour-cell").unbind().bind("click",{fromDoubleClick:false},b.proxy(b.timepicker.selectHours,this)).bind("dblclick",{fromDoubleClick:true},b.proxy(b.timepicker.selectHours,this)).end().find(".ui-timepicker td a").unbind().bind("mouseout",function(){b(this).removeClass("ui-state-hover");this.className.indexOf("ui-timepicker-prev")!=-1&&b(this).removeClass("ui-timepicker-prev-hover");this.className.indexOf("ui-timepicker-next")!=-1&&
    4344b(this).removeClass("ui-timepicker-next-hover")}).bind("mouseover",function(){if(!e._isDisabledTimepicker(a.inline?a.tpDiv.parent()[0]:a.input[0])){b(this).parents(".ui-timepicker-calendar").find("a").removeClass("ui-state-hover");b(this).addClass("ui-state-hover");this.className.indexOf("ui-timepicker-prev")!=-1&&b(this).addClass("ui-timepicker-prev-hover");this.className.indexOf("ui-timepicker-next")!=-1&&b(this).addClass("ui-timepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end().find(".ui-timepicker-now").bind("click",
    44 function(d){b.timepicker.selectNow(d)}).end().find(".ui-timepicker-deselect").bind("click",function(d){b.timepicker.deselectTime(d)}).end().find(".ui-timepicker-close").bind("click",function(){b.timepicker._hideTimepicker()}).end()},_generateHTML:function(a){var c,e,d,f,j=this._get(a,"showPeriod")==true,l=this._get(a,"showPeriodLabels")==true,k=this._get(a,"showLeadingZero")==true;e=this._get(a,"showHours")==true;var t=this._get(a,"showMinutes")==true,A=this._get(a,"amPmText"),s=this._get(a,"rows"),
    45 w=0,x=0,n=f=0,H=0,D=0,y=Array(),g=this._get(a,"hours");c=null;var h=0;d=this._get(a,"hourText");var u=this._get(a,"showCloseButton"),o=this._get(a,"closeButtonText"),i=this._get(a,"showNowButton"),m=this._get(a,"nowButtonText"),p=this._get(a,"showDeselectButton"),z=this._get(a,"deselectButtonText"),C=u||i||p;for(c=g.starts;c<=g.ends;c++)y.push(c);c=Math.ceil(y.length/s);if(l){for(h=0;h<y.length;h++)if(y[h]<12)f++;else n++;h=0;w=Math.floor(f/y.length*s);x=Math.floor(n/y.length*s);if(s!=w+x)if(f&&(!n||
    46 !w||x&&f/w>=n/x))w++;else x++;H=Math.min(w,1);D=w+1;c=Math.ceil(Math.max(f/w,n/x))}f='<table class="ui-timepicker-table ui-widget-content ui-corner-all"><tr>';if(e){f+='<td class="ui-timepicker-hours"><div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">'+d+'</div><table class="ui-timepicker">';for(e=1;e<=s;e++){f+="<tr>";if(e==H&&l)f+='<th rowspan="'+w.toString()+'" class="periods" scope="row">'+A[0]+"</th>";if(e==D&&l)f+='<th rowspan="'+x.toString()+'" class="periods" scope="row">'+
    47 A[1]+"</th>";for(d=1;d<=c;d++)if(l&&e<D&&y[h]>=12)f+=this._generateHTMLHourCell(a,undefined,j,k);else{f+=this._generateHTMLHourCell(a,y[h],j,k);h++}f+="</tr>"}f+="</tr></table></td>"}if(t){f+='<td class="ui-timepicker-minutes">';f+=this._generateHTMLMinutes(a);f+="</td>"}f+="</tr>";if(C){j='<tr><td colspan="3"><div class="ui-timepicker-buttonpane ui-widget-content">';if(i)j+='<button type="button" class="ui-timepicker-now ui-state-default ui-corner-all"  data-timepicker-instance-id="#'+a.id.replace(/\\\\/g,
    48 "\\")+'" >'+m+"</button>";if(p)j+='<button type="button" class="ui-timepicker-deselect ui-state-default ui-corner-all"  data-timepicker-instance-id="#'+a.id.replace(/\\\\/g,"\\")+'" >'+z+"</button>";if(u)j+='<button type="button" class="ui-timepicker-close ui-state-default ui-corner-all"  data-timepicker-instance-id="#'+a.id.replace(/\\\\/g,"\\")+'" >'+o+"</button>";f+=j+"</div></td></tr>"}f+="</table>";f+=b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-timepicker-cover" frameborder="0"></iframe>':
    49 "";return f},_updateMinuteDisplay:function(a){var c=this._generateHTMLMinutes(a);a.tpDiv.find("td.ui-timepicker-minutes").html(c);this._rebindDialogEvents(a)},_generateHTMLMinutes:function(a){var c,e,d="",f=this._get(a,"rows"),j=Array();e=this._get(a,"minutes");var l=null,k=0,t=this._get(a,"showMinutesLeadingZero")==true,A=this._get(a,"onMinuteShow"),s=this._get(a,"minuteText");if(!e.starts)e.starts=0;if(!e.ends)e.ends=59;for(c=e.starts;c<=e.ends;c+=e.interval)j.push(c);l=Math.round(j.length/f+0.49);
    50 if(A&&A.apply(a.input?a.input[0]:null,[a.hours,a.minutes])==false)for(k=0;k<j.length;k+=1){c=j[k];if(A.apply(a.input?a.input[0]:null,[a.hours,c])){a.minutes=c;break}}d+='<div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">'+s+'</div><table class="ui-timepicker">';k=0;for(e=1;e<=f;e++){for(d+="<tr>";k<e*l;){c=j[k];A="";if(c!==undefined)A=c<10&&t?"0"+c.toString():c.toString();d+=this._generateHTMLMinuteCell(a,c,A);k++}d+="</tr>"}d+="</table>";return d},_generateHTMLHourCell:function(a,
     45function(d){b.timepicker.selectNow(d)}).end().find(".ui-timepicker-deselect").bind("click",function(d){b.timepicker.deselectTime(d)}).end().find(".ui-timepicker-close").bind("click",function(){b.timepicker._hideTimepicker()}).end()},_generateHTML:function(a){var c,e,d,f,=this._get(a,"rows"),
     46||
     47!&&l)f+='<th rowspan="'+x.toString()+'" class="periods" scope="row">'+
     48+='<button type="button" class="ui-timepicker-now ui-state-default ui-corner-all"  data-timepicker-instance-id="#'+a.id.replace(/\\\\/g,
     49"\\")+'" >'++"</div></td></tr>"}f+="</table>";f+=b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-timepicker-cover" frameborder="0"></iframe>':
     50"";return f},_updateMinuteDisplay:function(a){var c=this._generateHTMLMinutes(a);a.tpDiv.find("td.ui-timepicker-minutes").html(c);this._rebindDialogEvents(a)},_generateHTMLMinutes:function(a){var c,e,d="",f=this._get(a,"rows"),.length/f+0.49);
     51if();k++}d+="</tr>"}d+="</table>";return d},_generateHTMLHourCell:function(a,
    5152c,e,d){var f=c;if(c>12&&e)f=c-12;if(f==0&&e)f=12;if(f<10&&d)f="0"+f;e="";e=true;d=this._get(a,"onHourShow");if(c==undefined)return e='<td><span class="ui-state-default ui-state-disabled">&nbsp;</span></td>';if(d)e=d.apply(a.input?a.input[0]:null,[c]);return e=e?'<td class="ui-timepicker-hour-cell" data-timepicker-instance-id="#'+a.id.replace(/\\\\/g,"\\")+'" data-hour="'+c.toString()+'"><a class="ui-state-default '+(c==a.hours?"ui-state-active":"")+'">'+f.toString()+"</a></td>":'<td><span class="ui-state-default ui-state-disabled '+
    5253(c==a.hours?" ui-state-active ":" ")+'">'+f.toString()+"</span></td>"},_generateHTMLMinuteCell:function(a,c,e){var d="";d=true;var f=this._get(a,"onMinuteShow");if(f)d=f.apply(a.input?a.input[0]:null,[a.hours,c]);if(c==undefined)return d='<td><span class="ui-state-default ui-state-disabled">&nbsp;</span></td>';return d=d?'<td class="ui-timepicker-minute-cell" data-timepicker-instance-id="#'+a.id.replace(/\\\\/g,"\\")+'" data-minute="'+c.toString()+'" ><a class="ui-state-default '+(c==a.minutes?"ui-state-active":
    5354"")+'" >'+e+"</a></td>":'<td><span class="ui-state-default ui-state-disabled" >'+e+"</span></td>"},_destroyTimepicker:function(a){var c=b(a),e=b.data(a,"timepicker");if(c.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();b.removeData(a,"timepicker");if(d=="input"){e.append.remove();e.trigger.remove();c.removeClass(this.markerClassName).unbind("focus.timepicker",this._showTimepicker).unbind("click.timepicker",this._adjustZIndex)}else if(d=="div"||d=="span")c.removeClass(this.markerClassName).empty()}},
    5455_enableTimepicker:function(a){var c=b(a),e=c.attr("id"),d=b.data(a,"timepicker");if(c.hasClass(this.markerClassName)){var f=a.nodeName.toLowerCase();if(f=="input"){a.disabled=false;a=this._get(d,"button");b(a).removeClass("ui-state-disabled").disabled=false;d.trigger.filter("button").each(function(){this.disabled=false}).end()}else if(f=="div"||f=="span"){d=c.children("."+this._inlineClass);d.children().removeClass("ui-state-disabled");d.find("button").each(function(){this.disabled=false})}this._disabledInputs=
    55 b.map(this._disabledInputs,function(j){return j==e?null:j})}},_disableTimepicker:function(a){var c=b(a),e=b.data(a,"timepicker");if(c.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if(d=="input"){d=this._get(e,"button");b(d).addClass("ui-state-disabled").disabled=true;a.disabled=true;e.trigger.filter("button").each(function(){this.disabled=true}).end()}else if(d=="div"||d=="span"){e=c.children("."+this._inlineClass);e.children().addClass("ui-state-disabled");e.find("button").each(function(){this.disabled=
    56 true})}this._disabledInputs=b.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=c.attr("id")}},_isDisabledTimepicker:function(a){if(!a)return false;for(var c=0;c<this._disabledInputs.length;c++)if(this._disabledInputs[c]==a)return true;return false},_checkOffset:function(a,c,e){var d=a.tpDiv.outerWidth(),f=a.tpDiv.outerHeight(),j=a.input?a.input.outerWidth():0,l=a.input?a.input.outerHeight():0,k=document.documentElement.clientWidth+b(document).scrollLeft(),
    57 t=document.documentElement.clientHeight+b(document).scrollTop();c.left-=this._get(a,"isRTL")?d-j:0;c.left-=e&&c.left==a.input.offset().left?b(document).scrollLeft():0;c.top-=e&&c.top==a.input.offset().top+l?b(document).scrollTop():0;c.left-=Math.min(c.left,c.left+d>k&&k>d?Math.abs(c.left+d-k):0);c.top-=Math.min(c.top,c.top+f>t&&t>f?Math.abs(f+l):0);return c},_findPos:function(a){for(var c=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[c?"previousSibling":"nextSibling"];
     56b.map(this._disabledInputs,function(})}},_disableTimepicker:function(a){var c=b(a),e=b.data(a,"timepicker");if(c.hasClass(this.markerClassName)){var d=a.nodeName.toLowerCase();if(d=="input"){d=this._get(e,"button");b(d).addClass("ui-state-disabled").disabled=true;a.disabled=true;e.trigger.filter("button").each(function(){this.disabled=true}).end()}else if(d=="div"||d=="span"){e=c.children("."+this._inlineClass);e.children().addClass("ui-state-disabled");e.find("button").each(function(){this.disabled=
     57true})}this._disabledInputs=b.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=c.attr("id")}},_isDisabledTimepicker:function(a){if(!a)return false;for(var c=0;c<this._disabledInputs.length;c++)if(this._disabledInputs[c]==a)return true;return false},_checkOffset:function(a,c,e){var d=a.tpDiv.outerWidth(),f=a.tpDiv.outerHeight(),=a.input?a.input.outerWidth():0,l=a.input?a.input.outerHeight():0,k=document.documentElement.clientWidth+b(document).scrollLeft(),
     58t=document.documentElement.clientHeight+b(document).scrollTop();c.left-=this._get(a,"isRTL")?d-:0;c.left-=e&&c.left==a.input.offset().left?b(document).scrollLeft():0;c.top-=e&&c.top==a.input.offset().top+l?b(document).scrollTop():0;c.left-=Math.min(c.left,c.left+d>k&&k>d?Math.abs(c.left+d-k):0);c.top-=Math.min(c.top,c.top+f>t&&t>f?Math.abs(f+l):0);return c},_findPos:function(a){for(var c=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[c?"previousSibling":"nextSibling"];
    5859a=b(a).offset();return[a.left,a.top]},_getBorders:function(a){var c=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(c(a.css("border-left-width"))),parseFloat(c(a.css("border-top-width")))]},_checkExternalClick:function(a){if(b.timepicker._curInst){a=b(a.target);a[0].id!=b.timepicker._mainDivId&&a.parents("#"+b.timepicker._mainDivId).length==0&&!a.hasClass(b.timepicker.markerClassName)&&!a.hasClass(b.timepicker._triggerClass)&&b.timepicker._timepickerShowing&&!(b.timepicker._inDialog&&
    5960b.blockUI)&&b.timepicker._hideTimepicker()}},_hideTimepicker:function(a){var c=this._curInst;if(!(!c||a&&c!=b.data(a,"timepicker")))if(this._timepickerShowing){a=this._get(c,"showAnim");var e=this._get(c,"duration"),d=function(){b.timepicker._tidyDialog(c);this._curInst=null};b.effects&&b.effects[a]?c.tpDiv.hide(a,b.timepicker._get(c,"showOptions"),e,d):c.tpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?e:null,d);a||d();this._timepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",
    6061left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.tpDiv)}}this._inDialog=false;if(a=this._get(c,"onClose"))a.apply(c.input?c.input[0]:null,[c.input?c.input.val():"",c])}},_tidyDialog:function(a){a.tpDiv.removeClass(this._dialogClass).unbind(".ui-timepicker")},_getInst:function(a){try{return b.data(a,"timepicker")}catch(c){throw"Missing instance data for this timepicker";}},_get:function(a,c){return a.settings[c]!==undefined?a.settings[c]:this._defaults[c]},_setTimeFromField:function(a){if(a.input.val()!=
    6162a.lastVal){var c=this._get(a,"defaultTime");c=c=="now"?this._getCurrentTimeRounded(a):c;if(a.inline==false&&a.input.val()!="")c=a.input.val();if(c instanceof Date){a.hours=c.getHours();a.minutes=c.getMinutes()}else{var e=a.lastVal=c;if(c==""){a.hours=-1;a.minutes=-1}else{c=this.parseTime(a,e);a.hours=c.hours;a.minutes=c.minutes}}b.timepicker._updateTimepicker(a)}},_optionTimepicker:function(a,c,e){var d=this._getInst(a);if(arguments.length==2&&typeof c=="string")return c=="defaults"?b.extend({},b.timepicker._defaults):
    62 d?c=="all"?b.extend({},d.settings):this._get(d,c):null;var f=c||{};if(typeof c=="string"){f={};f[c]=e}if(d){this._curInst==d&&this._hideTimepicker();v(d.settings,f);this._updateTimepicker(d)}},_setTimeTimepicker:function(a,c){if(a=this._getInst(a)){this._setTime(a,c);this._updateTimepicker(a);this._updateAlternate(a,c)}},_setTime:function(a,c,e){var d=a.hours,f=a.minutes;c=this.parseTime(a,c);a.hours=c.hours;a.minutes=c.minutes;if((d!=a.hours||f!=a.minuts)&&!e)a.input.trigger("change");this._updateTimepicker(a);
    63 this._updateSelectedValue(a)},_getCurrentTimeRounded:function(){var a=new Date,c=a.getMinutes();c=Math.round(c/5)*5;a.setMinutes(c);return a},parseTime:function(a,c){var e={};e.hours=-1;e.minutes=-1;var d=this._get(a,"timeSeparator"),f=this._get(a,"amPmText"),j=this._get(a,"showHours"),l=this._get(a,"showMinutes"),k=this._get(a,"optionalMinutes");a=this._get(a,"showPeriod")==true;d=c.indexOf(d);if(d!=-1){e.hours=parseInt(c.substr(0,d),10);e.minutes=parseInt(c.substr(d+1),10)}else if(j&&(!l||k))e.hours=
    64 parseInt(c,10);else if(!j&&l)e.minutes=parseInt(c,10);if(j){c=c.toUpperCase();if(e.hours<12&&a&&c.indexOf(f[1].toUpperCase())!=-1)e.hours+=12;if(e.hours==12&&a&&c.indexOf(f[0].toUpperCase())!=-1)e.hours=0}return e},selectNow:function(a){a=b(a.target).attr("data-timepicker-instance-id");a=this._getInst(b(a)[0]);var c=new Date;a.hours=c.getHours();a.minutes=c.getMinutes();this._updateSelectedValue(a);this._updateTimepicker(a);this._hideTimepicker()},deselectTime:function(a){a=b(a.target).attr("data-timepicker-instance-id");
    65 a=this._getInst(b(a)[0]);a.hours=-1;a.minutes=-1;this._updateSelectedValue(a);this._hideTimepicker()},selectHours:function(a){var c=b(a.currentTarget),e=c.attr("data-timepicker-instance-id"),d=parseInt(c.attr("data-hour"));a=a.data.fromDoubleClick;e=b(e);var f=this._getInst(e[0]),j=this._get(f,"showMinutes")==true;if(b.timepicker._isDisabledTimepicker(e.attr("id")))return false;c.parents(".ui-timepicker-hours:first").find("a").removeClass("ui-state-active");c.children("a").addClass("ui-state-active");
    66 f.hours=d;this._get(f,"onMinuteShow")&&this._updateMinuteDisplay(f);this._updateSelectedValue(f);f._hoursClicked=true;if(f._minutesClicked||a||j==false)b.timepicker._hideTimepicker();return false},selectMinutes:function(a){var c=b(a.currentTarget),e=c.attr("data-timepicker-instance-id"),d=parseInt(c.attr("data-minute"));a=a.data.fromDoubleClick;e=b(e);var f=this._getInst(e[0]),j=this._get(f,"showHours")==true;if(b.timepicker._isDisabledTimepicker(e.attr("id")))return false;c.parents(".ui-timepicker-minutes:first").find("a").removeClass("ui-state-active");
    67 c.children("a").addClass("ui-state-active");f.minutes=d;this._updateSelectedValue(f);f._minutesClicked=true;if(f._hoursClicked||a||j==false){b.timepicker._hideTimepicker();return false}return false},_updateSelectedValue:function(a){var c=this._getParsedTime(a);if(a.input){a.input.val(c);a.input.trigger("change")}var e=this._get(a,"onSelect");if(e)e.apply(a.input?a.input[0]:null,[c,a]);this._updateAlternate(a,c);return c},_getParsedTime:function(a){if(a.hours==-1&&a.minutes==-1)return"";if(a.hours<
    68 a.hours.starts||a.hours>a.hours.ends)a.hours=0;if(a.minutes<a.minutes.starts||a.minutes>a.minutes.ends)a.minutes=0;var c="",e=this._get(a,"showPeriod")==true,d=this._get(a,"showLeadingZero")==true,f=this._get(a,"showHours")==true,j=this._get(a,"showMinutes")==true,l=this._get(a,"optionalMinutes")==true,k=this._get(a,"amPmText"),t=a.hours?a.hours:0,A=a.minutes?a.minutes:0,s=t?t:0;t="";if(e){if(a.hours==0)s=12;if(a.hours<12)c=k[0];else{c=k[1];if(s>12)s-=12}}e=s.toString();if(d&&s<10)e="0"+e;d=A.toString();
    69 if(A<10)d="0"+d;if(f)t+=e;if(f&&j&&(!l||d!=0))t+=this._get(a,"timeSeparator");if(j&&(!l||d!=0))t+=d;if(f)if(c.length>0)t+=this._get(a,"periodSeparator")+c;return t},_updateAlternate:function(a,c){(a=this._get(a,"altField"))&&b(a).each(function(e,d){b(d).val(c)})},_getTimeTimepicker:function(a){return this._getParsedTime(this._getInst(a))},_getHourTimepicker:function(a){a=this._getInst(a);if(a==undefined)return-1;return a.hours},_getMinuteTimepicker:function(a){a=this._getInst(a);if(a==undefined)return-1;
     63d?c=="all"?b.extend({},d.settings):this._get(d,c):null;var f=c||{};if(typeof c=="string"){f={};f[c]=e}if(d){this._curInst==d&&this._hideTimepicker();(d.settings,f);this._updateTimepicker(d)}},_setTimeTimepicker:function(a,c){if(a=this._getInst(a)){this._setTime(a,c);this._updateTimepicker(a);this._updateAlternate(a,c)}},_setTime:function(a,c,e){var d=a.hours,f=a.minutes;c=this.parseTime(a,c);a.hours=c.hours;a.minutes=c.minutes;if((d!=a.hours||f!=a.minuts)&&!e)a.input.trigger("change");this._updateTimepicker(a);
     64this._updateSelectedValue(a)},_getCurrentTimeRounded:function(){var a=new Date,c=a.getMinutes();c=Math.round(c/5)*5;a.setMinutes(c);return a},parseTime:function(a,c){var e={};e.hours=-1;e.minutes=-1;var d=this._get(a,"timeSeparator"),f=this._get(a,"amPmText"),&&(!l||k))e.hours=
     65parseInt(c,10);else if(!){c=c.toUpperCase();if(e.hours<12&&a&&c.indexOf(f[1].toUpperCase())!=-1)e.hours+=12;if(e.hours==12&&a&&c.indexOf(f[0].toUpperCase())!=-1)e.hours=0}return e},selectNow:function(a){a=b(a.target).attr("data-timepicker-instance-id");a=this._getInst(b(a)[0]);var c=new Date;a.hours=c.getHours();a.minutes=c.getMinutes();this._updateSelectedValue(a);this._updateTimepicker(a);this._hideTimepicker()},deselectTime:function(a){a=b(a.target).attr("data-timepicker-instance-id");
     66a=this._getInst(b(a)[0]);a.hours=-1;a.minutes=-1;this._updateSelectedValue(a);this._hideTimepicker()},selectHours:function(a){var c=b(a.currentTarget),e=c.attr("data-timepicker-instance-id"),d=parseInt(c.attr("data-hour"));a=a.data.fromDoubleClick;e=b(e);var f=this._getInst(e[0]),=this._get(f,"showMinutes")==true;if(b.timepicker._isDisabledTimepicker(e.attr("id")))return false;c.parents(".ui-timepicker-hours:first").find("a").removeClass("ui-state-active");c.children("a").addClass("ui-state-active");
     67f.hours=d;this._get(f,"onMinuteShow")&&this._updateMinuteDisplay(f);this._updateSelectedValue(f);f._hoursClicked=true;if(f._minutesClicked||a||=this._get(f,"showHours")==true;if(b.timepicker._isDisabledTimepicker(e.attr("id")))return false;c.parents(".ui-timepicker-minutes:first").find("a").removeClass("ui-state-active");
     68c.children("a").addClass("ui-state-active");f.minutes=d;this._updateSelectedValue(f);f._minutesClicked=true;if(f._hoursClicked||a||==false){b.timepicker._hideTimepicker();return false}return false},_updateSelectedValue:function(a){var c=this._getParsedTime(a);if(a.input){a.input.val(c);a.input.trigger("change")}var e=this._get(a,"onSelect");if(e)e.apply(a.input?a.input[0]:null,[c,a]);this._updateAlternate(a,c);return c},_getParsedTime:function(a){if(a.hours==-1&&a.minutes==-1)return"";if(a.hours<
     69a.hours.starts||a.hours>a.hours.ends)a.hours=0;if(a.minutes<a.minutes.starts||a.minutes>a.minutes.ends)a.minutes=0;var c="",e=this._get(a,"showPeriod")==true,d=this._get(a,"showLeadingZero")==true,f=this._get(a,"showHours")==true,.toString();
     70if(&&(!l||d!=0))t+=d;if(f)if(c.length>0)t+=this._get(a,"periodSeparator")+c;return t},_updateAlternate:function(a,c){(a=this._get(a,"altField"))&&b(a).each(function(e,d){b(d).val(c)})},_getTimeTimepicker:function(a){return this._getParsedTime(this._getInst(a))},_getHourTimepicker:function(a){a=this._getInst(a);if(a==undefined)return-1;return a.hours},_getMinuteTimepicker:function(a){a=this._getInst(a);if(a==undefined)return-1;
    7071return a.minutes}});b.fn.timepicker=function(a){if(!b.timepicker.initialized){b(document).mousedown(b.timepicker._checkExternalClick).find("body").append(b.timepicker.tpDiv);b.timepicker.initialized=true}var c=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="getTime"||a=="getHour"||a=="getMinute"))return b.timepicker["_"+a+"Timepicker"].apply(b.timepicker,[this[0]].concat(c));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return b.timepicker["_"+a+"Timepicker"].apply(b.timepicker,
    71 [this[0]].concat(c));return this.each(function(){typeof a=="string"?b.timepicker["_"+a+"Timepicker"].apply(b.timepicker,[this].concat(c)):b.timepicker._attachTimepicker(this,a)})};b.timepicker=new B;b.timepicker.initialized=false;b.timepicker.uuid=(new Date).getTime();b.timepicker.version="0.3.1";window["TP_jQuery_"+q]=b})(jQuery);
     72[this[0]].concat(c));return this.each(function(){typeof a=="string"?b.timepicker["_"+a+"Timepicker"].apply(b.timepicker,[this].concat(c)):b.timepicker._attachTimepicker(this,a)})};b.timepicker=new ]=b})(jQuery);
  • event-organiser/trunk/js/frontend.js

    r638444 r646914  
    1919
    2020    function eventorganiser_mini_calendar(){
    21         var element = $("<span class='fc-header-goto'><input type='hidden' id='miniCalendar'/></span>");
     21        var element = $("<span class='fc-header-goto'><input type='hidden' alendar'/></span>");
    2222        return element;
    2323    }
     
    194194    }
    195195
    196         $('.miniCalendar').datepicker({
     196        $('.alendar').datepicker({
    197197            dateFormat: 'DD, d MM, yy',
    198198            changeMonth: true,
    199199            changeYear: true,
     200
     201
     202
     203
     204
    200205            showOn: 'button',
    201                     buttonText: 'Go to Date'
     206            onSelect: function (dateText, dp) {
     207                var cal_id = $(this).parents('div.eo-fullcalendar').attr('id');
     208                $('#'+cal_id).fullCalendar('gotoDate', new Date(Date.parse(dateText)));
     209                    }
    202210            });
    203211
  • event-organiser/trunk/js/frontend.min.js

    r638444 r646914  
    1 (function(a){jQuery(document).ready(function(){function f(b){var d=b.categories,g="<select class='eo-cal-filter' id='eo-event-cat'>";g+="<option value=''>"+b.buttonText.cat+"</option>";for(b=0;b<d.length;b++)g+="<option class='cat-colour-"+d[b].colour+" cat' value='"+d[b].slug+"'>"+d[b].name+"</option>";g+="</select>";d=a("<span class='fc-header-dropdown filter-category'></span>");d.append(g);return d}function j(){return a("<span class='fc-header-goto'><input type='hidden' id='miniCalendar'/></span>")}
     1(function(a){jQuery(document).ready(function(){function f(b){var d=b.categories,g="<select class='eo-cal-filter' id='eo-event-cat'>";g+="<option value=''>"+b.buttonText.cat+"</option>";for(b=0;b<d.length;b++)g+="<option class='cat-colour-"+d[b].colour+" cat' value='"+d[b].slug+"'>"+d[b].name+"</option>";g+="</select>";d=a("<span class='fc-header-dropdown filter-category'></span>");d.append(g);return d}function j(){return a("<span class='fc-header-goto'><input type='hidden' alendar'/></span>")}
    22function k(b){var d=b.venues,g="<select class='eo-cal-filter' id='eo-event-venue'>";g+="<option value=''>"+b.buttonText.venue+"</option>";for(b=0;b<d.length;b++)g+="<option value='"+d[b].term_id+"'>"+d[b].name+"</option>";g+="</select>";d=a("<span class='fc-header-dropdown filter-venue'></span>");d.append(g);return d}if(a(".eo-venue-map").length>0)if(EOAjax.map!==undefined){var e=document.createElement("script");e.type="text/javascript";e.src="http://maps.googleapis.com/maps/api/js?sensor=false&callback=eo_load_map";
    33document.body.appendChild(e)}if(a(".eo-fullcalendar").length>0){e=EOAjax.calendars;for(var l,c=0;c<e.length;c++){var n="#eo_fullcalendar_"+(c+1);if(typeof e[c].category==="undefined")e[c].category="";if(typeof e[c].venue==="undefined")e[c].venue="";a(n).fullCalendar({id:n,category:e[c].category,venue:e[c].venue,customButtons:{category:f,venue:k,"goto":j},theme:true,categories:EOAjax.fullcal.categories,venues:EOAjax.fullcal.venues,timeFormatphp:e[c].timeformatphp,timeFormat:e[c].timeformat,editable:false,
     
    55if(typeof h!=="undefined"&&h!=""&&a.inArray(h,b.category)<0)return"<div></div>";if(typeof i!=="undefined"&&i!=""&&i!=b.venue)return"<div></div>";g.calendar.options.tooltip&&a(d).qtip({content:{text:b.description,button:"x",title:b.title},position:{my:"top center",at:"bottom center"},hide:{fixed:true,delay:500,effect:function(){a(this).fadeOut("50")}},border:{radius:4,width:3},style:{classes:"ui-tooltip-shadow",widget:true,tip:"topMiddle"}})},buttonText:{today:EOAjaxFront.locale.today,month:EOAjaxFront.locale.month,
    66week:EOAjaxFront.locale.week,day:EOAjaxFront.locale.day,cat:EOAjaxFront.locale.cat,venue:EOAjaxFront.locale.venue},monthNames:EOAjaxFront.locale.monthNames,monthNamesShort:EOAjaxFront.locale.monthAbbrev,dayNames:EOAjaxFront.locale.dayNames,dayNamesShort:EOAjaxFront.locale.dayAbbrev,eventColor:"#21759B",defaultView:e[c].defaultview,lazyFetching:"true",events:function(b,d,g,h){b={start:jQuery.fullCalendar.formatDate(b,"yyyy-MM-dd"),end:jQuery.fullCalendar.formatDate(d,"yyyy-MM-dd"),timeformat:h.timeFormatphp};
    7 if(typeof h.category!=="undefined"&&h.category!="")b.category=h.category;if(typeof h.venue!=="undefined"&&h.venue!="")b.venue=h.venue;jQuery.ajax({url:EOAjax.ajaxurl+"?action=eventorganiser-fullcal",dataType:"JSON",data:b,success:g})},selectable:false,weekMode:"variable",aspectRatio:1.5,loading:function(b){var d=a("#"+a(this).attr("id")+"_loading");if(b){window.clearTimeout(l);l=window.setTimeout(function(){d.show()},1E3)}else{window.clearTimeout(l);d.hide()}}})}a(".eo-cal-filter").change(function(){a(".eo-fullcalendar").fullCalendar("rerenderEvents")})}a(".miniCalendar").datepicker({dateFormat:"DD, d MM, yy",
    8 changeMonth:true,changeYear:true,showOn:"button",buttonText:"Go to Date"});if(a(".eo_widget_calendar").length>0){a(".eo_widget_calendar tfoot").unbind("click");a(".eo_widget_calendar tfoot a").die("click").live("click",function(b){b.preventDefault();var d=a(this).closest(".eo_widget_calendar").attr("id");b={showpastevents:1};if(typeof EOAjax!=="undefined"&&typeof EOAjax.widget_calendars!=="undefined")b=EOAjax.widget_calendars[d];if(typeof eo_widget_cal!=="undefined")b=eo_widget_cal[d];b.eo_month=
    9 eveorg_getParameterByName("eo_month",a(this).attr("href"));a.getJSON(EOAjaxFront.adminajax+"?action=eo_widget_cal",b,function(g){a("#"+d+"_content").html(g)})})}if(a(".eo-agenda-widget").length>0){function o(b,d){a.ajax({url:EOAjaxFront.adminajax,dataType:"JSON",data:{action:"eo_widget_agenda",instance_number:d.number,direction:b,start:d.StartDate,end:d.EndDate},success:function(g){if(!jQuery.isArray(g)||!g[0])return false;else{d.StartDate=g[0].StartDate;d.EndDate=g[g.length-1].StartDate;r(g,d)}}})}
    10 function r(b,d){var g=a("#"+d.id+"_container"),h=g.find("ul.dates"),i=h.find("li");a(i).remove();i="";for(c=0;c<b.length;c++){if(i==""||i!=b[c].StartDate&&d.mode=="day"){i=b[c].StartDate;var p=a('<li class="date" >'+b[c].display+'<ul class="a-date"></ul></li>');h.append(p)}var q=a('<li class="event"></li>').append('<span class="cat"></span><span><strong>'+b[c].time+": </strong></span>"+b[c].post_title).append('<div class="meta" style="display:none;"><span>'+b[c].link+"</span><span> \u00a0 </span><span>"+
    11 b[c].Glink+"</span></div>");q.find("span.cat").css({background:b[c].color});p.append(q)}i=h.find("li");g.find("ul li.event").on("click",function(){a(this).find(".meta").toggle("400")})}for(var m in eo_widget_agenda){m=eo_widget_agenda[m];m.StartDate=a.fullCalendar.formatDate(new Date,"yyyy-MM-dd");m.EndDate=m.StartDate;o(1,m)}a(".eo-agenda-widget .agenda-nav span.button").click(function(b){var d=a(this).parents(".eo-agenda-widget").attr("id");m=eo_widget_agenda[d];b.preventDefault();b=a(this).hasClass("next")?
    12 "+1":a(this).hasClass("prev")?"-1":a(this).parent().hasClass("prev")?"-1":"+1";o(b,m)})}})})(jQuery);function eveorg_getParameterByName(a,f){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=(new RegExp("[\\?&]"+a+"=([^&#]*)")).exec(f);return a==null?"":decodeURIComponent(a[1].replace(/\+/g," "))}
     7if(typeof h.category!=="undefined"&&h.category!="")b.category=h.category;if(typeof h.venue!=="undefined"&&h.venue!="")b.venue=h.venue;jQuery.ajax({url:EOAjax.ajaxurl+"?action=eventorganiser-fullcal",dataType:"JSON",data:b,success:g})},selectable:false,weekMode:"variable",aspectRatio:1.5,loading:function(b){var d=a("#"+a(this).attr("id")+"_loading");if(b){window.clearTimeout(l);l=window.setTimeout(function(){d.show()},1E3)}else{window.clearTimeout(l);d.hide()}}})}a(".eo-cal-filter").change(function(){a(".eo-fullcalendar").fullCalendar("rerenderEvents")})}a(".eo-mini-calendar").datepicker({dateFormat:"DD, d MM, yy",
     8changeMonth:true,changeYear:true,dateFormat:"DD, d MM, yy",firstDay:parseInt(EOAjax.fullcal.firstDay),buttonText:EOAjaxFront.locale.gotodate,monthNamesShort:EOAjaxFront.locale.monthAbbrev,dayNamesMin:EOAjaxFront.locale.dayAbbrev,showOn:"button",onSelect:function(b){var d=a(this).parents("div.eo-fullcalendar").attr("id");a("#"+d).fullCalendar("gotoDate",new Date(Date.parse(b)))}});if(a(".eo_widget_calendar").length>0){a(".eo_widget_calendar tfoot").unbind("click");a(".eo_widget_calendar tfoot a").die("click").live("click",
     9function(b){b.preventDefault();var d=a(this).closest(".eo_widget_calendar").attr("id");b={showpastevents:1};if(typeof EOAjax!=="undefined"&&typeof EOAjax.widget_calendars!=="undefined")b=EOAjax.widget_calendars[d];if(typeof eo_widget_cal!=="undefined")b=eo_widget_cal[d];b.eo_month=eveorg_getParameterByName("eo_month",a(this).attr("href"));a.getJSON(EOAjaxFront.adminajax+"?action=eo_widget_cal",b,function(g){a("#"+d+"_content").html(g)})})}if(a(".eo-agenda-widget").length>0){function o(b,d){a.ajax({url:EOAjaxFront.adminajax,
     10dataType:"JSON",data:{action:"eo_widget_agenda",instance_number:d.number,direction:b,start:d.StartDate,end:d.EndDate},success:function(g){if(!jQuery.isArray(g)||!g[0])return false;else{d.StartDate=g[0].StartDate;d.EndDate=g[g.length-1].StartDate;r(g,d)}}})}function r(b,d){var g=a("#"+d.id+"_container"),h=g.find("ul.dates"),i=h.find("li");a(i).remove();i="";for(c=0;c<b.length;c++){if(i==""||i!=b[c].StartDate&&d.mode=="day"){i=b[c].StartDate;var p=a('<li class="date" >'+b[c].display+'<ul class="a-date"></ul></li>');
     11h.append(p)}var q=a('<li class="event"></li>').append('<span class="cat"></span><span><strong>'+b[c].time+": </strong></span>"+b[c].post_title).append('<div class="meta" style="display:none;"><span>'+b[c].link+"</span><span> \u00a0 </span><span>"+b[c].Glink+"</span></div>");q.find("span.cat").css({background:b[c].color});p.append(q)}i=h.find("li");g.find("ul li.event").on("click",function(){a(this).find(".meta").toggle("400")})}for(var m in eo_widget_agenda){m=eo_widget_agenda[m];m.StartDate=a.fullCalendar.formatDate(new Date,
     12"yyyy-MM-dd");m.EndDate=m.StartDate;o(1,m)}a(".eo-agenda-widget .agenda-nav span.button").click(function(b){var d=a(this).parents(".eo-agenda-widget").attr("id");m=eo_widget_agenda[d];b.preventDefault();b=a(this).hasClass("next")?"+1":a(this).hasClass("prev")?"-1":a(this).parent().hasClass("prev")?"-1":"+1";o(b,m)})}})})(jQuery);
     13function eveorg_getParameterByName(a,f){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=(new RegExp("[\\?&]"+a+"=([^&#]*)")).exec(f);return a==null?"":decodeURIComponent(a[1].replace(/\+/g," "))}
    1314function eo_load_map(){for(var a=EOAjax.map,f=0;f<a.length;f++){var j=a[f].locations,k={zoom:a[f].zoom,scrollwheel:a[f].scrollwheel,zoomControl:a[f].zoomcontrol,rotateControl:a[f].rotatecontrol,panControl:a[f].pancontrol,overviewMapControl:a[f].overviewmapcontrol,streetViewControl:a[f].streetviewcontrol,draggable:a[f].draggable,mapTypeControl:a[f].maptypecontrol,mapTypeId:google.maps.MapTypeId[a[f].maptypeid]};k=new google.maps.Map(document.getElementById("eo_venue_map-"+(f+1)),k);for(var e=new google.maps.LatLngBounds,
    1415l=[],c=0;c<j.length;c++){var n=j[c].lat,o=j[c].lng;if(n!==undefined&&o!=undefined){l.push(new google.maps.LatLng(n,o));e.extend(l[c]);n=new google.maps.Marker({position:l[c],map:k,content:j[c].tooltipContent});"false"!=a[f].tooltip&&google.maps.event.addListener(n,"click",eventorganiser_venue_tooltip)}}j.length>1?k.fitBounds(e):k.setCenter(l[0])}}
  • event-organiser/trunk/readme.txt

    r640270 r646914  
    11=== Event Organiser ===
    22Contributors: stephenh1988
    3 Donate link: http://www.wp-event-organiser.com
     3Donate link: http://www.wp-event-organiser.com
    44Tags: events, event, event categories, event organiser, event calendar, events calendar, event management, ical, locations, google map, widget, venues, maps, gigs, shows,
    55Requires at least: 3.3
    66Tested up to: 3.5
    7 Stable tag: 1.6.1
     7Stable tag: 1.6.
    88
    99Create and maintain events, including complex reoccurring patterns, venue management (with Google maps), calendars and customisable event lists
     
    145145== Changelog ==
    146146
     147
     148
     149
     150
     151
     152
     153
     154
    147155= 1.6.1 =
    148156* Fixes js bug for weekly events (see [https://github.com/stephenh1988/Event-Organiser/issues/17](https://github.com/stephenh1988/Event-Organiser/issues/17)).
Note: See TracChangeset for help on using the changeset viewer.