All-in-One Event Calendar - Version 1.1

Version Description

Download this release

Release Info

Developer theseed
Plugin Icon 128x128 All-in-One Event Calendar
Version 1.1
Comparing to
See all releases

Code changes from version 1.0.9 to 1.1

Files changed (52) hide show
  1. all-in-one-event-calendar.php +8 -3
  2. app/controller/class-ai1ec-app-controller.php +20 -15
  3. app/controller/class-ai1ec-calendar-controller.php +30 -21
  4. app/controller/class-ai1ec-events-controller.php +98 -130
  5. app/controller/class-ai1ec-settings-controller.php +61 -71
  6. app/helper/class-ai1ec-app-helper.php +22 -6
  7. app/helper/class-ai1ec-calendar-helper.php +123 -48
  8. app/helper/class-ai1ec-events-helper.php +643 -55
  9. app/helper/class-ai1ec-exporter-helper.php +1 -1
  10. app/helper/class-ai1ec-importer-helper.php +6 -2
  11. app/helper/class-ai1ec-settings-helper.php +39 -6
  12. app/helper/class-ai1ec-view-helper.php +1 -1
  13. app/model/class-ai1ec-event.php +30 -46
  14. app/model/class-ai1ec-settings.php +37 -26
  15. app/view/agenda-widget-form.php +82 -1
  16. app/view/agenda-widget.php +7 -7
  17. app/view/agenda.php +6 -5
  18. app/view/box_general_settings.php +8 -4
  19. app/view/box_the_seed_studio.php +11 -9
  20. app/view/box_time_and_date.php +64 -35
  21. app/view/class-ai1ec-agenda-widget.php +71 -11
  22. app/view/month.php +1 -1
  23. app/view/on_the_select.php +0 -0
  24. app/view/row_daily.php +6 -0
  25. app/view/row_monthly.php +11 -0
  26. app/view/row_weekly.php +9 -0
  27. app/view/row_yearly.php +11 -0
  28. css/add_new_event.css +187 -4
  29. css/calendar.css +45 -1
  30. css/jquery.bsmselect.css +64 -0
  31. css/settings.css +7 -0
  32. css/widget.css +51 -0
  33. img/admin-menu.png +0 -0
  34. img/icon-close.png +0 -0
  35. img/scroll-down.png +0 -0
  36. img/scroll-up.png +0 -0
  37. js/add_new_event.js +215 -55
  38. js/calendar.js +168 -19
  39. js/jquery.blockUI.js +500 -0
  40. js/jquery.bsmselect.js +381 -0
  41. js/jquery.calendrical.js +144 -41
  42. js/jquery.inputdate.js +12 -11
  43. js/jquery.timespan.js +22 -16
  44. js/settings.js +3 -3
  45. js/widget.js +6 -0
  46. language/all-in-one-event-calendar-de_DE.mo +0 -0
  47. language/all-in-one-event-calendar-de_DE.po +816 -0
  48. language/all-in-one-event-calendar.po +2 -2
  49. language/all-in-one-event-calendar.pot +551 -353
  50. lib/helpers/SG_iCal_Freq.php +3 -0
  51. lib/helpers/SG_iCal_Recurrence.php +3 -1
  52. readme.txt +19 -5
all-in-one-event-calendar.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
3
  * Plugin Name: All-in-One Event Calendar Plugin
4
- * Plugin URI: http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/
5
  * Description: An event calendar system with month and agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
6
- * Version: 1.0.9
7
  * Author: The Seed Studio
8
- * Author URI: http://theseedstudio.com/
9
  */
10
  @set_time_limit( 0 );
11
  @ini_set( "memory_limit", "256M" );
@@ -116,6 +116,11 @@ define( 'AI1EC_JS_URL', AI1EC_URL . '/js' );
116
  // =============
117
  define( 'AI1EC_POST_TYPE', 'ai1ec_event' );
118
 
 
 
 
 
 
119
  // ======================================
120
  // = FAKE CATEGORY ID FOR CALENDAR PAGE =
121
  // ======================================
1
  <?php
2
  /**
3
  * Plugin Name: All-in-One Event Calendar Plugin
4
+ * Plugin URI: http://theseednetwork.com/software/all-in-one-event-calendar-wordpress/
5
  * Description: An event calendar system with month and agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
6
+ * Version: 1.1
7
  * Author: The Seed Studio
8
+ * Author URI: http://theseednetwork.com/
9
  */
10
  @set_time_limit( 0 );
11
  @ini_set( "memory_limit", "256M" );
116
  // =============
117
  define( 'AI1EC_POST_TYPE', 'ai1ec_event' );
118
 
119
+ // ================
120
+ // = RSS FEED URL =
121
+ // ================
122
+ define( 'AI1EC_RSS_FEED', 'http://feeds.feedburner.com/ai1ec' );
123
+
124
  // ======================================
125
  // = FAKE CATEGORY ID FOR CALENDAR PAGE =
126
  // ======================================
app/controller/class-ai1ec-app-controller.php CHANGED
@@ -22,7 +22,7 @@ class Ai1ec_App_Controller {
22
  * @var null | object
23
  **/
24
  private static $_instance = NULL;
25
-
26
  /**
27
  * _load_domain class variable
28
  *
@@ -66,6 +66,7 @@ class Ai1ec_App_Controller {
66
  global $wpdb,
67
  $ai1ec_app_helper,
68
  $ai1ec_events_controller,
 
69
  $ai1ec_importer_controller,
70
  $ai1ec_settings_controller,
71
  $ai1ec_settings;
@@ -75,10 +76,10 @@ class Ai1ec_App_Controller {
75
 
76
  // Configure MySQL to operate in GMT time
77
  $wpdb->query( "SET time_zone = '+0:00'" );
78
-
79
  // Load plugin text domain
80
  $this->load_textdomain();
81
-
82
  // Install/update database schema as necessary
83
  $this->install_schema();
84
 
@@ -99,15 +100,16 @@ class Ai1ec_App_Controller {
99
  // Register The Event Calendar importer
100
  add_action( 'admin_init', array( &$ai1ec_importer_controller, 'register_importer' ) );
101
  // add content for our custom columns
102
- add_action( "manage_posts_custom_column", array( &$ai1ec_app_helper, 'custom_columns' ), 10, 2 );
103
  // Add filtering dropdowns for event categories and tags
104
  add_action( 'restrict_manage_posts', array( &$ai1ec_app_helper, 'taxonomy_filter_restrict_manage_posts' ) );
105
  // Trigger display of page in front-end depending on request
106
  add_action( 'template_redirect', array( &$this, 'route_request' ) );
107
  // Add meta boxes to event creation/edit form
108
  add_action( 'add_meta_boxes', array( &$ai1ec_app_helper, 'add_meta_boxes' ) );
 
109
  // Save event data when post is saved
110
- add_action( 'save_post', array( &$ai1ec_events_controller, 'save_post' ) );
111
  // Delete event data when post is deleted
112
  add_action( 'delete_post', array( &$ai1ec_events_controller, 'delete_post' ) );
113
  // Cron job hook
@@ -118,9 +120,10 @@ class Ai1ec_App_Controller {
118
  add_action( 'created_events_categories', array( &$ai1ec_events_controller, 'created_events_categories' ) );
119
  add_action( 'edited_events_categories', array( &$ai1ec_events_controller, 'edited_events_categories' ) );
120
  add_action( 'admin_notices', array( &$ai1ec_app_helper, 'admin_notices' ) );
121
- add_action( 'admin_enqueue_scripts', array( &$ai1ec_settings_controller, 'admin_enqueue_scripts' ) );
122
- // Widgets
123
- add_action( 'widgets_init', create_function( '', "return register_widget( 'Ai1ec_Agenda_Widget' );" ) );
 
124
 
125
  // ===========
126
  // = FILTERS =
@@ -152,6 +155,7 @@ class Ai1ec_App_Controller {
152
  add_filter( 'plugin_action_links_' . AI1EC_PLUGIN_BASENAME, array( &$ai1ec_settings_controller, 'plugin_action_links' ) );
153
  // add a link to donate page on plugin list page
154
  add_filter( 'plugin_row_meta', array( &$ai1ec_settings_controller, 'plugin_row_meta' ), 10, 2 );
 
155
 
156
  // ========
157
  // = AJAX =
@@ -164,8 +168,11 @@ class Ai1ec_App_Controller {
164
  add_action( 'wp_ajax_ai1ec_flush_ics', array( &$ai1ec_settings_controller, 'flush_ics_feed' ) );
165
  // Update iCalendar feed
166
  add_action( 'wp_ajax_ai1ec_update_ics', array( &$ai1ec_settings_controller, 'update_ics_feed' ) );
 
 
 
167
  }
168
-
169
  /**
170
  * activation_hook function
171
  *
@@ -174,14 +181,14 @@ class Ai1ec_App_Controller {
174
  * @return void
175
  **/
176
  function activation_hook() {
177
-
178
  // load plugin text domain
179
  $this->load_textdomain();
180
-
181
  // flush rewrite rules
182
  $this->rewrite_flush();
183
  }
184
-
185
  /**
186
  * load_textdomain function
187
  *
@@ -193,6 +200,7 @@ class Ai1ec_App_Controller {
193
  if( self::$_load_domain === FALSE ) {
194
  load_plugin_textdomain( AI1EC_PLUGIN_NAME, false, AI1EC_LANGUAGE_PATH );
195
  self::$_load_domain = TRUE;
 
196
  }
197
  }
198
 
@@ -353,9 +361,6 @@ class Ai1ec_App_Controller {
353
  add_action( "load-{$ai1ec_settings->settings_page}", array( &$ai1ec_settings_helper, 'add_meta_boxes') );
354
  // Load the meta boxes
355
  add_action( "load-{$ai1ec_settings->settings_page}", array( &$ai1ec_settings_controller, 'add_meta_boxes' ) );
356
- // Use registered handlers to hook loading of styles/scripts
357
- add_action( 'admin_print_styles-' . $ai1ec_settings->settings_page, array( &$ai1ec_settings_controller, 'admin_print_styles' ) );
358
- add_action( 'admin_print_scripts-' . $ai1ec_settings->settings_page, array( &$ai1ec_settings_controller, 'admin_print_scripts' ) );
359
  }
360
 
361
 
22
  * @var null | object
23
  **/
24
  private static $_instance = NULL;
25
+
26
  /**
27
  * _load_domain class variable
28
  *
66
  global $wpdb,
67
  $ai1ec_app_helper,
68
  $ai1ec_events_controller,
69
+ $ai1ec_events_helper,
70
  $ai1ec_importer_controller,
71
  $ai1ec_settings_controller,
72
  $ai1ec_settings;
76
 
77
  // Configure MySQL to operate in GMT time
78
  $wpdb->query( "SET time_zone = '+0:00'" );
79
+
80
  // Load plugin text domain
81
  $this->load_textdomain();
82
+
83
  // Install/update database schema as necessary
84
  $this->install_schema();
85
 
100
  // Register The Event Calendar importer
101
  add_action( 'admin_init', array( &$ai1ec_importer_controller, 'register_importer' ) );
102
  // add content for our custom columns
103
+ add_action( 'manage_posts_custom_column', array( &$ai1ec_app_helper, 'custom_columns' ), 10, 2 );
104
  // Add filtering dropdowns for event categories and tags
105
  add_action( 'restrict_manage_posts', array( &$ai1ec_app_helper, 'taxonomy_filter_restrict_manage_posts' ) );
106
  // Trigger display of page in front-end depending on request
107
  add_action( 'template_redirect', array( &$this, 'route_request' ) );
108
  // Add meta boxes to event creation/edit form
109
  add_action( 'add_meta_boxes', array( &$ai1ec_app_helper, 'add_meta_boxes' ) );
110
+ add_filter( 'screen_layout_columns', array( &$ai1ec_app_helper, 'screen_layout_columns' ), 10, 2 );
111
  // Save event data when post is saved
112
+ add_action( 'save_post', array( &$ai1ec_events_controller, 'save_post' ), 10, 2 );
113
  // Delete event data when post is deleted
114
  add_action( 'delete_post', array( &$ai1ec_events_controller, 'delete_post' ) );
115
  // Cron job hook
120
  add_action( 'created_events_categories', array( &$ai1ec_events_controller, 'created_events_categories' ) );
121
  add_action( 'edited_events_categories', array( &$ai1ec_events_controller, 'edited_events_categories' ) );
122
  add_action( 'admin_notices', array( &$ai1ec_app_helper, 'admin_notices' ) );
123
+ // Scripts/styles for settings/widget screens
124
+ add_action( 'admin_enqueue_scripts', array( &$ai1ec_settings_controller, 'admin_enqueue_scripts' ) );
125
+ // Widgets
126
+ add_action( 'widgets_init', create_function( '', "return register_widget( 'Ai1ec_Agenda_Widget' );" ) );
127
 
128
  // ===========
129
  // = FILTERS =
155
  add_filter( 'plugin_action_links_' . AI1EC_PLUGIN_BASENAME, array( &$ai1ec_settings_controller, 'plugin_action_links' ) );
156
  // add a link to donate page on plugin list page
157
  add_filter( 'plugin_row_meta', array( &$ai1ec_settings_controller, 'plugin_row_meta' ), 10, 2 );
158
+ add_filter( 'post_type_link', array( &$ai1ec_events_helper, 'post_type_link' ), 10, 3 );
159
 
160
  // ========
161
  // = AJAX =
168
  add_action( 'wp_ajax_ai1ec_flush_ics', array( &$ai1ec_settings_controller, 'flush_ics_feed' ) );
169
  // Update iCalendar feed
170
  add_action( 'wp_ajax_ai1ec_update_ics', array( &$ai1ec_settings_controller, 'update_ics_feed' ) );
171
+
172
+ // RRule to Text
173
+ add_action( 'wp_ajax_ai1ec_rrule_to_text', array( &$ai1ec_events_helper, 'convert_rrule_to_text' ) );
174
  }
175
+
176
  /**
177
  * activation_hook function
178
  *
181
  * @return void
182
  **/
183
  function activation_hook() {
184
+
185
  // load plugin text domain
186
  $this->load_textdomain();
187
+
188
  // flush rewrite rules
189
  $this->rewrite_flush();
190
  }
191
+
192
  /**
193
  * load_textdomain function
194
  *
200
  if( self::$_load_domain === FALSE ) {
201
  load_plugin_textdomain( AI1EC_PLUGIN_NAME, false, AI1EC_LANGUAGE_PATH );
202
  self::$_load_domain = TRUE;
203
+
204
  }
205
  }
206
 
361
  add_action( "load-{$ai1ec_settings->settings_page}", array( &$ai1ec_settings_helper, 'add_meta_boxes') );
362
  // Load the meta boxes
363
  add_action( "load-{$ai1ec_settings->settings_page}", array( &$ai1ec_settings_controller, 'add_meta_boxes' ) );
 
 
 
364
  }
365
 
366
 
app/controller/class-ai1ec-calendar-controller.php CHANGED
@@ -70,7 +70,7 @@ class Ai1ec_Calendar_Controller {
70
  // Find out which view of the calendar page was requested, then validate
71
  // request parameters accordingly and save them to our custom request
72
  // object
73
- $this->request['action'] = $_REQUEST['action'];
74
  if( ! in_array( $this->request['action'],
75
  array( 'ai1ec_month', 'ai1ec_agenda', 'ai1ec_term_filter' ) ) )
76
  $this->request['action'] = 'ai1ec_' . $ai1ec_settings->default_calendar_view;
@@ -79,29 +79,29 @@ class Ai1ec_Calendar_Controller {
79
  {
80
  case 'ai1ec_month':
81
  $this->request['ai1ec_month_offset'] =
82
- $_REQUEST['ai1ec_month_offset'] ?
83
  intval( $_REQUEST['ai1ec_month_offset'] ) : 0;
84
  // Parse active event parameter as an integer ID
85
- $this->request['ai1ec_active_event'] = intval( $_REQUEST['ai1ec_active_event'] );
86
  // Category/tag filter parameters
87
- $this->request['ai1ec_cat_ids'] = $_REQUEST['ai1ec_cat_ids'];
88
- $this->request['ai1ec_tag_ids'] = $_REQUEST['ai1ec_tag_ids'];
89
  break;
90
 
91
  case 'ai1ec_agenda':
92
  $this->request['ai1ec_page_offset'] =
93
- $_REQUEST['ai1ec_page_offset'] ?
94
  intval( $_REQUEST['ai1ec_page_offset'] ) : 0;
95
  // Parse active event parameter as an integer ID
96
- $this->request['ai1ec_active_event'] = intval( $_REQUEST['ai1ec_active_event'] );
97
  // Category/tag filter parameters
98
- $this->request['ai1ec_cat_ids'] = $_REQUEST['ai1ec_cat_ids'];
99
- $this->request['ai1ec_tag_ids'] = $_REQUEST['ai1ec_tag_ids'];
100
  break;
101
 
102
  case 'ai1ec_term_filter':
103
- $this->request['ai1ec_post_ids'] = $_REQUEST['ai1ec_post_ids'];
104
- $this->request['ai1ec_term_ids'] = $_REQUEST['ai1ec_term_ids'];
105
  break;
106
  }
107
  }
@@ -186,7 +186,7 @@ class Ai1ec_Calendar_Controller {
186
  );
187
 
188
  // Feed month view into generic calendar view
189
- $ai1ec_view_helper->display( 'calendar.php', $args );
190
  }
191
 
192
  /**
@@ -213,6 +213,14 @@ class Ai1ec_Calendar_Controller {
213
  $ai1ec_events_helper,
214
  $ai1ec_calendar_helper;
215
 
 
 
 
 
 
 
 
 
216
  extract( $args );
217
 
218
  // Get components of localized time
@@ -231,7 +239,7 @@ class Ai1ec_Calendar_Controller {
231
  'pagination_links' => $pagination_links,
232
  'active_event' => $active_event,
233
  );
234
- return $ai1ec_view_helper->get_view( 'month.php', $view_args );
235
  }
236
 
237
  /**
@@ -277,13 +285,14 @@ class Ai1ec_Calendar_Controller {
277
 
278
  // Incorporate offset into date
279
  $args = array(
280
- 'title' => __( 'Agenda', AI1EC_PLUGIN_NAME ),
281
- 'dates' => $dates,
282
- 'page_offset' => $page_offset,
283
- 'pagination_links' => $pagination_links,
284
- 'active_event' => $active_event,
 
285
  );
286
- return $ai1ec_view_helper->get_view( 'agenda.php', $args );
287
  }
288
 
289
  /**
@@ -387,8 +396,8 @@ class Ai1ec_Calendar_Controller {
387
  $action = preg_replace( '/^ai1ec-/', '', $action );
388
 
389
  $classes[] = "ai1ec-action-$action";
390
- if( ! $this->request['ai1ec_month_offset'] &&
391
- ! $this->request['ai1ec_page_offset'] ) {
392
  $classes[] = 'ai1ec-today';
393
  }
394
  return $classes;
70
  // Find out which view of the calendar page was requested, then validate
71
  // request parameters accordingly and save them to our custom request
72
  // object
73
+ $this->request['action'] = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
74
  if( ! in_array( $this->request['action'],
75
  array( 'ai1ec_month', 'ai1ec_agenda', 'ai1ec_term_filter' ) ) )
76
  $this->request['action'] = 'ai1ec_' . $ai1ec_settings->default_calendar_view;
79
  {
80
  case 'ai1ec_month':
81
  $this->request['ai1ec_month_offset'] =
82
+ isset( $_REQUEST['ai1ec_month_offset'] ) ?
83
  intval( $_REQUEST['ai1ec_month_offset'] ) : 0;
84
  // Parse active event parameter as an integer ID
85
+ $this->request['ai1ec_active_event'] = isset( $_REQUEST['ai1ec_active_event'] ) ? intval( $_REQUEST['ai1ec_active_event'] ) : 0;
86
  // Category/tag filter parameters
87
+ $this->request['ai1ec_cat_ids'] = isset( $_REQUEST['ai1ec_cat_ids'] ) ? $_REQUEST['ai1ec_cat_ids'] : 0;
88
+ $this->request['ai1ec_tag_ids'] = isset( $_REQUEST['ai1ec_tag_ids'] ) ? $_REQUEST['ai1ec_tag_ids'] : 0;
89
  break;
90
 
91
  case 'ai1ec_agenda':
92
  $this->request['ai1ec_page_offset'] =
93
+ isset( $_REQUEST['ai1ec_page_offset'] ) ?
94
  intval( $_REQUEST['ai1ec_page_offset'] ) : 0;
95
  // Parse active event parameter as an integer ID
96
+ $this->request['ai1ec_active_event'] = isset( $_REQUEST['ai1ec_active_event'] ) ? intval( $_REQUEST['ai1ec_active_event'] ) : 0;
97
  // Category/tag filter parameters
98
+ $this->request['ai1ec_cat_ids'] = isset( $_REQUEST['ai1ec_cat_ids'] ) ? $_REQUEST['ai1ec_cat_ids'] : 0;
99
+ $this->request['ai1ec_tag_ids'] = isset( $_REQUEST['ai1ec_tag_ids'] ) ? $_REQUEST['ai1ec_tag_ids'] : 0;
100
  break;
101
 
102
  case 'ai1ec_term_filter':
103
+ $this->request['ai1ec_post_ids'] = isset( $_REQUEST['ai1ec_post_ids'] ) ? $_REQUEST['ai1ec_post_ids'] : 0;
104
+ $this->request['ai1ec_term_ids'] = isset( $_REQUEST['ai1ec_term_ids'] ) ? $_REQUEST['ai1ec_term_ids'] : 0;
105
  break;
106
  }
107
  }
186
  );
187
 
188
  // Feed month view into generic calendar view
189
+ echo apply_filters( 'ai1ec_view', $ai1ec_view_helper->get_view( 'calendar.php', $args ), $args );
190
  }
191
 
192
  /**
213
  $ai1ec_events_helper,
214
  $ai1ec_calendar_helper;
215
 
216
+ $defaults = array(
217
+ 'month_offset' => 0,
218
+ 'active_event' => 0,
219
+ 'categories' => array(),
220
+ 'tags' => array()
221
+ );
222
+ $args = wp_parse_args( $args, $defaults );
223
+
224
  extract( $args );
225
 
226
  // Get components of localized time
239
  'pagination_links' => $pagination_links,
240
  'active_event' => $active_event,
241
  );
242
+ return apply_filters( 'ai1ec_get_month_view', $ai1ec_view_helper->get_view( 'month.php', $view_args ), $view_args );
243
  }
244
 
245
  /**
285
 
286
  // Incorporate offset into date
287
  $args = array(
288
+ 'title' => __( 'Agenda', AI1EC_PLUGIN_NAME ),
289
+ 'dates' => $dates,
290
+ 'page_offset' => $page_offset,
291
+ 'pagination_links' => $pagination_links,
292
+ 'active_event' => $active_event,
293
+ 'expanded' => $ai1ec_settings->agenda_events_expanded
294
  );
295
+ return apply_filters( 'ai1ec_get_agenda_view', $ai1ec_view_helper->get_view( 'agenda.php', $args ), $args );
296
  }
297
 
298
  /**
396
  $action = preg_replace( '/^ai1ec-/', '', $action );
397
 
398
  $classes[] = "ai1ec-action-$action";
399
+ if( isset( $this->request['ai1ec_month_offset'] ) && ! $this->request['ai1ec_month_offset'] &&
400
+ isset( $this->request['ai1ec_page_offset'] ) && ! $this->request['ai1ec_page_offset'] ) {
401
  $classes[] = 'ai1ec-today';
402
  }
403
  return $classes;
app/controller/class-ai1ec-events-controller.php CHANGED
@@ -96,7 +96,7 @@ class Ai1ec_Events_Controller {
96
  **/
97
  function init()
98
  {
99
- global $ai1ec_events_helper, $ai1ec_settings;
100
 
101
  // Initialize dashboard view
102
  if( is_admin() ) {
@@ -120,15 +120,27 @@ class Ai1ec_Events_Controller {
120
  // Include jQuery Tools form elements
121
  wp_enqueue_script( 'jquery.tools-form', 'http://cdn.jquerytools.org/1.2.5/form/jquery.tools.min.js', array( 'jquery' ), '1.2.5' );
122
  // Include add new event script
123
- wp_enqueue_script( 'ai1ec-add_new_event', AI1EC_JS_URL . '/add_new_event.js', array( 'jquery', 'jquery.timespan', 'ai1ec-element-selector', 'jquery.tools-form' ) );
 
 
 
 
 
 
124
  wp_enqueue_script( 'ai1ec-color-picker', AI1EC_JS_URL . '/colorpicker.js', array( 'jquery' ) );
125
 
126
  // Supply custom value to JavaScript from PHP
127
  wp_localize_script( 'ai1ec-add_new_event', 'ai1ec_add_new_event', array(
128
  // Current time, used for date/time pickers
129
  'now' => $ai1ec_events_helper->gmt_to_local( time() ),
130
- // US input format for date pickers
131
- 'us_format' => $ai1ec_settings->input_us_format,
 
 
 
 
 
 
132
  // 24h time format for time pickers
133
  'twentyfour_hour' => $ai1ec_settings->input_24h_time,
134
  // ICS feed error messages
@@ -176,6 +188,31 @@ class Ai1ec_Events_Controller {
176
  $wpdb,
177
  $ai1ec_settings;
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  try
180
  {
181
  $event = new Ai1ec_Event( $post->ID );
@@ -183,24 +220,35 @@ class Ai1ec_Events_Controller {
183
  // Existing event was found. Initialize form values with values from
184
  // event object.
185
 
186
- $all_day_event = $event->allday ? 'checked="checked"' : '';
187
-
188
- $start_timestamp = $ai1ec_events_helper->gmt_to_local( $event->start );
189
- $end_timestamp = $ai1ec_events_helper->gmt_to_local( $event->end );
190
-
191
- $show_map = $event->show_map;
192
- $google_map = $show_map ? 'checked="checked"' : '';
193
-
194
- $venue = $event->venue;
195
- $country = $event->country;
196
- $address = $event->address;
197
- $city = $event->city;
198
- $province = $event->province;
199
- $postal_code = $event->postal_code;
200
- $contact_name = $event->contact_name;
201
- $contact_phone = $event->contact_phone;
202
- $contact_email = $event->contact_email;
203
- $cost = $event->cost;
 
 
 
 
 
 
 
 
 
 
 
204
  }
205
  catch( Ai1ec_Event_Not_Found $e ) {
206
  // Event does not exist.
@@ -208,10 +256,6 @@ class Ai1ec_Events_Controller {
208
  $event = null;
209
  }
210
 
211
- // Recurrence fields
212
- $recurrence = $ai1ec_events_helper->parse_recurrence_rules( $event );
213
- extract( $recurrence );
214
-
215
  // Time zone
216
  $timezone = get_option( 'gmt_offset' );
217
  $timezone = sprintf( '(GMT%+d:%02d)', intval( $timezone ), ( abs( $timezone ) * 60 ) % 60 );
@@ -220,16 +264,21 @@ class Ai1ec_Events_Controller {
220
  // = Display event time and date =
221
  // ===============================
222
  if( is_null( $until ) ) $until = gmmktime();
223
- $repeating_event = is_null( $repeat ) ? false : true;
224
  $args = array(
225
  'all_day_event' => $all_day_event,
226
  'start_timestamp' => $start_timestamp,
227
  'end_timestamp' => $end_timestamp,
228
- 'repeat' => $ai1ec_events_helper->create_repeat_dropdown( $repeat ),
229
- 'count' => $ai1ec_events_helper->create_count_input( $count ),
 
 
 
230
  'end' => $ai1ec_events_helper->create_end_dropdown( $end ),
231
  'until' => $until,
232
  'repeating_event' => $repeating_event,
 
 
233
  'timezone' => $timezone,
234
  'ending' => $end
235
  );
@@ -295,26 +344,27 @@ class Ai1ec_Events_Controller {
295
  *
296
  * @return void
297
  **/
298
- function save_post( $post_id ) {
299
  global $wpdb, $ai1ec_events_helper;
300
-
301
- // verify if this is not an auto save routine.
302
- if( ! defined( 'DOING_AUTOSAVE' ) && ! DOING_AUTOSAVE ) {
303
-
304
- // verify this came from the our screen and with proper authorization,
305
- // because save_post can be triggered at other times
306
- if ( ! wp_verify_nonce( $_POST[AI1EC_POST_TYPE], 'ai1ec' ) ) {
307
- return;
308
- }
309
  }
310
 
 
 
 
311
  // verify if this is not inline-editing
312
- if( $_REQUEST['action'] == 'inline-save' ) {
313
  return;
314
  }
315
 
316
  // verify that the post_type is that of an event
317
- if( $_POST['post_type'] != AI1EC_POST_TYPE ) {
318
  return;
319
  }
320
 
@@ -335,93 +385,11 @@ class Ai1ec_Events_Controller {
335
 
336
  $rrule = null;
337
 
338
- if( isset( $_POST['ai1ec_repeat'] ) && ! empty( $_POST['ai1ec_repeat'] ) && $_POST['ai1ec_repeat'] != ' ' ) {
339
- // ================================
340
- // = Repeating event, build rrule =
341
- // ================================
342
- $end = (int) $_POST['ai1ec_end'];
343
- switch( $end ) {
344
- // Never
345
- case 0:
346
- $end = '';
347
- break;
348
- // After
349
- case 1:
350
- $end = ';COUNT=' . (int) $_POST['ai1ec_count'];
351
- break;
352
- // On date
353
- case 2:
354
- $until = $_POST['ai1ec_until_time'];
355
- $until = gmdate( 'Ymd', $until );
356
- $end = ';UNTIL=' . $until;
357
- break;
358
- }
359
-
360
- switch( $_POST['ai1ec_repeat'] ) {
361
- // Daily
362
- case 'DAILY':
363
- $rrule = 'FREQ=DAILY';
364
- break;
365
- // Mondays
366
- case 'MO':
367
- $rrule = 'FREQ=DAILY;BYDAY=MO';
368
- break;
369
- // Tuesdays
370
- case 'TU':
371
- $rrule = 'FREQ=DAILY;BYDAY=TU';
372
- break;
373
- // Wednesdays
374
- case 'WE':
375
- $rrule = 'FREQ=DAILY;BYDAY=WE';
376
- break;
377
- // Thursdays
378
- case 'TH':
379
- $rrule = 'FREQ=DAILY;BYDAY=TH';
380
- break;
381
- // Fridays
382
- case 'FR':
383
- $rrule = 'FREQ=DAILY;BYDAY=FR';
384
- break;
385
- // Tuesdays and Thursdays
386
- case 'TU+TH':
387
- $rrule = 'FREQ=DAILY;BYDAY=TU,TH';
388
- break;
389
- // Mondays Wednesdays Fridays
390
- case 'MO+WE+FR':
391
- $rrule = 'FREQ=DAILY;BYDAY=MO,WE,FR';
392
- break;
393
- // Weekends
394
- case 'WEEKDAYS':
395
- $rrule = 'FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR';
396
- break;
397
- // Saturdays
398
- case 'SA':
399
- $rrule = 'FREQ=DAILY;BYDAY=SA';
400
- break;
401
- // Sundays
402
- case 'SU':
403
- $rrule = 'FREQ=DAILY;BYDAY=SU';
404
- break;
405
- // Weekends
406
- case 'WEEKENDS':
407
- $rrule = 'FREQ=DAILY;BYDAY=SA+SU';
408
- break;
409
- // Weekly
410
- case 'WEEKLY':
411
- $rrule = 'FREQ=WEEKLY';
412
- break;
413
- // Monthly
414
- case 'MONTHLY':
415
- $rrule = 'FREQ=MONTHLY';
416
- break;
417
- // Yearly
418
- case 'YEARLY':
419
- $rrule = 'FREQ=YEARLY';
420
- break;
421
- }
422
-
423
- $rrule .= $end;
424
- }
425
 
426
  $is_new = false;
427
  $event = null;
@@ -731,8 +699,8 @@ class Ai1ec_Events_Controller {
731
  function events_categories_add_form_fields() {
732
  global $ai1ec_view_helper;
733
 
734
- $args = array();
735
- $ai1ec_view_helper->display( 'event_categories-color_picker.php' );
736
  }
737
 
738
  /**
96
  **/
97
  function init()
98
  {
99
+ global $ai1ec_events_helper, $ai1ec_settings, $wp_locale;
100
 
101
  // Initialize dashboard view
102
  if( is_admin() ) {
120
  // Include jQuery Tools form elements
121
  wp_enqueue_script( 'jquery.tools-form', 'http://cdn.jquerytools.org/1.2.5/form/jquery.tools.min.js', array( 'jquery' ), '1.2.5' );
122
  // Include add new event script
123
+ wp_enqueue_script( 'ai1ec-blockui', AI1EC_JS_URL . '/jquery.blockUI.js', array( 'jquery' ) );
124
+ wp_enqueue_script( 'ai1ec-add_new_event', AI1EC_JS_URL . '/add_new_event.js', array( 'jquery',
125
+ 'jquery.timespan',
126
+ 'ai1ec-element-selector',
127
+ 'jquery.tools-form',
128
+ 'ai1ec-blockui' ) );
129
+
130
  wp_enqueue_script( 'ai1ec-color-picker', AI1EC_JS_URL . '/colorpicker.js', array( 'jquery' ) );
131
 
132
  // Supply custom value to JavaScript from PHP
133
  wp_localize_script( 'ai1ec-add_new_event', 'ai1ec_add_new_event', array(
134
  // Current time, used for date/time pickers
135
  'now' => $ai1ec_events_helper->gmt_to_local( time() ),
136
+ // Date format for date pickers
137
+ 'date_format' => $ai1ec_settings->input_date_format,
138
+ // Names for months in date picker header (escaping is done in wp_localize_script)
139
+ 'month_names' => implode( ',', $wp_locale->month ),
140
+ // Names for days in date picker header (escaping is done in wp_localize_script)
141
+ 'day_names' => implode( ',', $wp_locale->weekday_initial ),
142
+ // Start the week on this day in the date picker
143
+ 'week_start_day' => $ai1ec_settings->week_start_day,
144
  // 24h time format for time pickers
145
  'twentyfour_hour' => $ai1ec_settings->input_24h_time,
146
  // ICS feed error messages
188
  $wpdb,
189
  $ai1ec_settings;
190
 
191
+ // ==================
192
+ // = Default values =
193
+ // ==================
194
+ $all_day_event = '';
195
+ $start_timestamp = '';
196
+ $end_timestamp = '';
197
+ $show_map = false;
198
+ $google_map = '';
199
+ $venue = '';
200
+ $country = '';
201
+ $address = '';
202
+ $city = '';
203
+ $province = '';
204
+ $postal_code = '';
205
+ $contact_name = '';
206
+ $contact_phone = '';
207
+ $contact_email = '';
208
+ $cost = '';
209
+ $rrule = '';
210
+ $rrule_text = '';
211
+ $repeating_event = false;
212
+ $end = null;
213
+ $until = null;
214
+ $count = 100;
215
+
216
  try
217
  {
218
  $event = new Ai1ec_Event( $post->ID );
220
  // Existing event was found. Initialize form values with values from
221
  // event object.
222
 
223
+ $all_day_event = $event->allday ? 'checked="checked"' : '';
224
+
225
+ $start_timestamp = $ai1ec_events_helper->gmt_to_local( $event->start );
226
+ $end_timestamp = $ai1ec_events_helper->gmt_to_local( $event->end );
227
+
228
+ $show_map = $event->show_map;
229
+ $google_map = $show_map ? 'checked="checked"' : '';
230
+
231
+ $venue = $event->venue;
232
+ $country = $event->country;
233
+ $address = $event->address;
234
+ $city = $event->city;
235
+ $province = $event->province;
236
+ $postal_code = $event->postal_code;
237
+ $contact_name = $event->contact_name;
238
+ $contact_phone = $event->contact_phone;
239
+ $contact_email = $event->contact_email;
240
+ $cost = $event->cost;
241
+ $rrule = empty( $event->recurrence_rules ) ? '' : $event->recurrence_rules;
242
+ $repeating_event = empty( $rrule ) ? false : true;
243
+ if( $repeating_event ) {
244
+ $rc = new SG_iCal_Recurrence( new SG_iCal_Line( 'RRULE:' . $rrule ) );
245
+ if( $rc->getUntil() )
246
+ $until = $rc->getUntil();
247
+ else if( $rc->getCount() )
248
+ $count = $rc->getCount();
249
+ $rrule_text = $ai1ec_events_helper->rrule_to_text( $rrule );
250
+ }
251
+
252
  }
253
  catch( Ai1ec_Event_Not_Found $e ) {
254
  // Event does not exist.
256
  $event = null;
257
  }
258
 
 
 
 
 
259
  // Time zone
260
  $timezone = get_option( 'gmt_offset' );
261
  $timezone = sprintf( '(GMT%+d:%02d)', intval( $timezone ), ( abs( $timezone ) * 60 ) % 60 );
264
  // = Display event time and date =
265
  // ===============================
266
  if( is_null( $until ) ) $until = gmmktime();
267
+
268
  $args = array(
269
  'all_day_event' => $all_day_event,
270
  'start_timestamp' => $start_timestamp,
271
  'end_timestamp' => $end_timestamp,
272
+ 'row_daily' => $ai1ec_events_helper->row_daily(),
273
+ 'row_weekly' => $ai1ec_events_helper->row_weekly(),
274
+ 'row_monthly' => $ai1ec_events_helper->row_monthly(),
275
+ 'row_yearly' => $ai1ec_events_helper->row_yearly(),
276
+ 'count' => $ai1ec_events_helper->create_count_input( 'ai1ec_count', $count ) . __( 'times', AI1EC_PLUGIN_NAME ),
277
  'end' => $ai1ec_events_helper->create_end_dropdown( $end ),
278
  'until' => $until,
279
  'repeating_event' => $repeating_event,
280
+ 'rrule' => $rrule,
281
+ 'rrule_text' => $rrule_text,
282
  'timezone' => $timezone,
283
  'ending' => $end
284
  );
344
  *
345
  * @return void
346
  **/
347
+ function save_post( $post_id, $post ) {
348
  global $wpdb, $ai1ec_events_helper;
349
+
350
+ // verify this came from the our screen and with proper authorization,
351
+ // because save_post can be triggered at other times
352
+ if( isset( $_POST[AI1EC_POST_TYPE] ) && ! wp_verify_nonce( $_POST[AI1EC_POST_TYPE], 'ai1ec' ) ) {
353
+ return;
354
+ } else if( ! isset( $_POST[AI1EC_POST_TYPE] ) ) {
355
+ return;
 
 
356
  }
357
 
358
+ if( isset( $post->post_status ) && $post->post_status == 'auto-draft' )
359
+ return;
360
+
361
  // verify if this is not inline-editing
362
+ if( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'inline-save' ) {
363
  return;
364
  }
365
 
366
  // verify that the post_type is that of an event
367
+ if( isset( $_POST['post_type'] ) && $_POST['post_type'] != AI1EC_POST_TYPE ) {
368
  return;
369
  }
370
 
385
 
386
  $rrule = null;
387
 
388
+ // =================================
389
+ // = Repeating event, assing rrule =
390
+ // =================================
391
+ if( isset( $_POST['ai1ec_repeat'] ) )
392
+ $rrule = $_POST['ai1ec_rrule'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
393
 
394
  $is_new = false;
395
  $event = null;
699
  function events_categories_add_form_fields() {
700
  global $ai1ec_view_helper;
701
 
702
+ $args = array( 'edit' => false );
703
+ $ai1ec_view_helper->display( 'event_categories-color_picker.php', $args );
704
  }
705
 
706
  /**
app/controller/class-ai1ec-settings-controller.php CHANGED
@@ -118,7 +118,8 @@ class Ai1ec_Settings_Controller {
118
  'feed_url' => $_REQUEST["feed_url"],
119
  'event_category' => $feed_category->name,
120
  'tags' => $_REQUEST["feed_tags"],
121
- 'feed_id' => $feed_id
 
122
  );
123
  // display added feed row
124
  $ai1ec_view_helper->display( 'feed_row.php', $args );
@@ -149,12 +150,12 @@ class Ai1ec_Settings_Controller {
149
  {
150
  global $wpdb,
151
  $ai1ec_view_helper;
152
- $ics_id = (int) $_REQUEST['ics_id'];
153
  $table_name = $wpdb->prefix . 'ai1ec_event_feeds';
154
-
155
  if( $feed_url === false )
156
  $feed_url = $wpdb->get_var( $wpdb->prepare( "SELECT feed_url FROM $table_name WHERE feed_id = %d", $ics_id ) );
157
-
158
  if( $feed_url )
159
  {
160
  $table_name = $wpdb->prefix . 'ai1ec_events';
@@ -180,7 +181,7 @@ class Ai1ec_Settings_Controller {
180
  'message' => 'Invalid feed'
181
  );
182
  }
183
-
184
  if( $ajax )
185
  $ai1ec_view_helper->json_response( $output );
186
  }
@@ -208,7 +209,7 @@ class Ai1ec_Settings_Controller {
208
  $this->flush_ics_feed( false, $feed->feed_url );
209
  // reimport the feed
210
  $count = $ai1ec_importer_helper->parse_ics_feed( $feed );
211
-
212
  $output = array(
213
  'error' => false,
214
  'message' => sprintf( __( 'Imported %d events', AI1EC_PLUGIN_NAME ), $count ),
@@ -223,7 +224,7 @@ class Ai1ec_Settings_Controller {
223
  'message' => 'Invalid feed'
224
  );
225
  }
226
-
227
  $ai1ec_view_helper->json_response( $output );
228
  }
229
 
@@ -246,10 +247,10 @@ class Ai1ec_Settings_Controller {
246
  'error' => false,
247
  'message' => 'Request successful.'
248
  );
249
-
250
  $ai1ec_view_helper->json_response( $output );
251
  }
252
-
253
  /**
254
  * add_meta_boxes function
255
  *
@@ -260,83 +261,72 @@ class Ai1ec_Settings_Controller {
260
  function add_meta_boxes() {
261
  global $ai1ec_settings_helper,
262
  $ai1ec_settings;
263
-
264
  /* Add the 'General Settings' meta box. */
265
- add_meta_box( 'general-settings',
266
- _x( 'General Settings', 'meta box', AI1EC_PLUGIN_NAME ),
267
- array( &$ai1ec_settings_helper, 'general_settings_meta_box' ),
268
- $ai1ec_settings->settings_page,
269
- 'left-side',
270
  'default' );
 
271
  /* Add the 'The Seed Studio' meta box. */
272
- add_meta_box( 'the-seed-studio-settings',
273
- _x( 'The Seed Studio Support', 'meta box', AI1EC_PLUGIN_NAME ),
274
- array( &$ai1ec_settings_helper, 'the_seed_studio_meta_box' ),
275
- $ai1ec_settings->settings_page,
276
- 'right-side',
277
  'default' );
278
  /* Add the 'ICS Import Settings' meta box. */
279
- add_meta_box( 'ics-import-settings',
280
- _x( 'ICS Import Settings', 'meta box', AI1EC_PLUGIN_NAME ),
281
- array( &$ai1ec_settings_helper, 'ics_import_settings_meta_box' ),
282
- $ai1ec_settings->settings_page,
283
- 'left-side',
284
  'default' );
285
-
286
- }
287
-
288
- /**
289
- * admin_print_styles function
290
- *
291
- *
292
- *
293
- * @return void
294
- **/
295
- function admin_print_styles() {
296
- global $ai1ec_view_helper;
297
- $ai1ec_view_helper->display_css( 'settings.css' );
298
- }
299
-
300
- /**
301
- * admin_print_scripts function
302
- *
303
- *
304
- *
305
- * @return void
306
- **/
307
- function admin_print_scripts() {
308
- global $ai1ec_settings;
309
- ?>
310
- <script type="text/javascript">
311
- //<![CDATA[
312
- var ai1ec_settings_page = '<?php echo $ai1ec_settings->settings_page; ?>';
313
- //]]>
314
- </script>
315
- <?php
316
  }
317
-
318
  /**
319
  * admin_enqueue_scripts function
320
  *
321
- *
322
  *
323
  * @return void
324
  **/
325
  function admin_enqueue_scripts( $hook_suffix ) {
326
- global $ai1ec_settings;
327
-
328
- if( isset( $ai1ec_settings->settings_page ) && $hook_suffix == $ai1ec_settings->settings_page ) {
329
- wp_enqueue_script( 'common' );
330
- wp_enqueue_script( 'wp-lists' );
331
- wp_enqueue_script( 'postbox' );
332
- wp_enqueue_script( 'ai1ec-settings', AI1EC_JS_URL . '/settings.js', array( 'jquery' ) );
333
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
335
-
336
  /**
337
  * plugin_action_links function
338
  *
339
- * Adds a link to Settings page in plugin list page
340
  *
341
  * @return array
342
  **/
@@ -345,7 +335,7 @@ class Ai1ec_Settings_Controller {
345
  array_unshift( $links, $settings );
346
  return $links;
347
  }
348
-
349
  /**
350
  * plugin_row_meta function
351
  *
@@ -356,9 +346,9 @@ class Ai1ec_Settings_Controller {
356
  function plugin_row_meta( $links, $file ) {
357
  if( $file == AI1EC_PLUGIN_BASENAME ) :
358
  $links[] = sprintf( __( '<a href="%s" target="_blank">Donate</a>', AI1EC_PLUGIN_NAME ), 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9JJMUW48W2ED8' );
359
- $links[] = sprintf( __( '<a href="%s" target="_blank">Get Support</a>', AI1EC_PLUGIN_NAME ), 'http://theseedstudio.com/get-supported/' );
360
  endif;
361
-
362
  return $links;
363
  }
364
  }
118
  'feed_url' => $_REQUEST["feed_url"],
119
  'event_category' => $feed_category->name,
120
  'tags' => $_REQUEST["feed_tags"],
121
+ 'feed_id' => $feed_id,
122
+ 'events' => 0
123
  );
124
  // display added feed row
125
  $ai1ec_view_helper->display( 'feed_row.php', $args );
150
  {
151
  global $wpdb,
152
  $ai1ec_view_helper;
153
+ $ics_id = isset( $_REQUEST['ics_id'] ) ? (int) $_REQUEST['ics_id'] : 0;
154
  $table_name = $wpdb->prefix . 'ai1ec_event_feeds';
155
+
156
  if( $feed_url === false )
157
  $feed_url = $wpdb->get_var( $wpdb->prepare( "SELECT feed_url FROM $table_name WHERE feed_id = %d", $ics_id ) );
158
+
159
  if( $feed_url )
160
  {
161
  $table_name = $wpdb->prefix . 'ai1ec_events';
181
  'message' => 'Invalid feed'
182
  );
183
  }
184
+
185
  if( $ajax )
186
  $ai1ec_view_helper->json_response( $output );
187
  }
209
  $this->flush_ics_feed( false, $feed->feed_url );
210
  // reimport the feed
211
  $count = $ai1ec_importer_helper->parse_ics_feed( $feed );
212
+
213
  $output = array(
214
  'error' => false,
215
  'message' => sprintf( __( 'Imported %d events', AI1EC_PLUGIN_NAME ), $count ),
224
  'message' => 'Invalid feed'
225
  );
226
  }
227
+
228
  $ai1ec_view_helper->json_response( $output );
229
  }
230
 
247
  'error' => false,
248
  'message' => 'Request successful.'
249
  );
250
+
251
  $ai1ec_view_helper->json_response( $output );
252
  }
253
+
254
  /**
255
  * add_meta_boxes function
256
  *
261
  function add_meta_boxes() {
262
  global $ai1ec_settings_helper,
263
  $ai1ec_settings;
264
+
265
  /* Add the 'General Settings' meta box. */
266
+ add_meta_box( 'general-settings',
267
+ _x( 'General Settings', 'meta box', AI1EC_PLUGIN_NAME ),
268
+ array( &$ai1ec_settings_helper, 'general_settings_meta_box' ),
269
+ $ai1ec_settings->settings_page,
270
+ 'left-side',
271
  'default' );
272
+
273
  /* Add the 'The Seed Studio' meta box. */
274
+ add_meta_box( 'the-seed-studio-settings',
275
+ _x( 'The Seed Studio Support', 'meta box', AI1EC_PLUGIN_NAME ),
276
+ array( &$ai1ec_settings_helper, 'the_seed_studio_meta_box' ),
277
+ $ai1ec_settings->settings_page,
278
+ 'right-side',
279
  'default' );
280
  /* Add the 'ICS Import Settings' meta box. */
281
+ add_meta_box( 'ics-import-settings',
282
+ _x( 'ICS Import Settings', 'meta box', AI1EC_PLUGIN_NAME ),
283
+ array( &$ai1ec_settings_helper, 'ics_import_settings_meta_box' ),
284
+ $ai1ec_settings->settings_page,
285
+ 'left-side',
286
  'default' );
287
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  }
289
+
290
  /**
291
  * admin_enqueue_scripts function
292
  *
293
+ * Enqueue any scripts and styles in the admin side, depending on context.
294
  *
295
  * @return void
296
  **/
297
  function admin_enqueue_scripts( $hook_suffix ) {
298
+ global $ai1ec_settings;
299
+
300
+ if( $hook_suffix == 'widgets.php' ) {
301
+ // Scripts
302
+ wp_enqueue_script( 'jquery-bsmselect', AI1EC_JS_URL . '/jquery.bsmselect.js', array( 'jquery' ) );
303
+ wp_enqueue_script( 'ai1ec-widget', AI1EC_JS_URL . '/widget.js', array( 'jquery', 'jquery-bsmselect' ) );
304
+ // Styles
305
+ wp_enqueue_style( 'ai1ec-widget', AI1EC_CSS_URL . '/widget.css' );
306
+ wp_enqueue_style( 'bsmselect', AI1EC_CSS_URL . '/jquery.bsmselect.css' );
307
+ }
308
+
309
+ if( isset( $ai1ec_settings->settings_page ) && $hook_suffix == $ai1ec_settings->settings_page ) {
310
+ // Scripts
311
+ wp_enqueue_script( 'common' );
312
+ wp_enqueue_script( 'wp-lists' );
313
+ wp_enqueue_script( 'postbox' );
314
+
315
+ wp_enqueue_script( 'ai1ec-cycle', AI1EC_JS_URL . '/jquery.cycle.lite.js', array( 'jquery' ) );
316
+ wp_enqueue_script( 'ai1ec-settings', AI1EC_JS_URL . '/settings.js', array( 'jquery', 'ai1ec-cycle' ) );
317
+
318
+ wp_localize_script( 'ai1ec-settings', 'ai1ec_settings', array(
319
+ 'page' => $ai1ec_settings->settings_page,
320
+ ) );
321
+ // Styles
322
+ wp_enqueue_style( 'ai1ec-widget', AI1EC_CSS_URL . '/settings.css' );
323
+ }
324
  }
325
+
326
  /**
327
  * plugin_action_links function
328
  *
329
+ * Adds a link to Settings page in plugin list page
330
  *
331
  * @return array
332
  **/
335
  array_unshift( $links, $settings );
336
  return $links;
337
  }
338
+
339
  /**
340
  * plugin_row_meta function
341
  *
346
  function plugin_row_meta( $links, $file ) {
347
  if( $file == AI1EC_PLUGIN_BASENAME ) :
348
  $links[] = sprintf( __( '<a href="%s" target="_blank">Donate</a>', AI1EC_PLUGIN_NAME ), 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9JJMUW48W2ED8' );
349
+ $links[] = sprintf( __( '<a href="%s" target="_blank">Get Support</a>', AI1EC_PLUGIN_NAME ), 'http://theseednetwork.com/get-supported/' );
350
  endif;
351
+
352
  return $links;
353
  }
354
  }
app/helper/class-ai1ec-app-helper.php CHANGED
@@ -282,7 +282,7 @@ class Ai1ec_App_Helper {
282
  'taxonomy' => $tax_slug,
283
  'name' => $tax_obj->name,
284
  'orderby' => 'name',
285
- 'selected' => $_GET[$tax_slug],
286
  'hierarchical' => $tax_obj->hierarchical,
287
  'show_count' => true,
288
  'hide_if_empty' => true
@@ -397,6 +397,22 @@ class Ai1ec_App_Helper {
397
  AI1EC_POST_TYPE
398
  );
399
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
 
401
  /**
402
  * change_columns function
@@ -455,11 +471,11 @@ class Ai1ec_App_Helper {
455
  * @return mixed
456
  **/
457
  function get_param( $param, $default='' ) {
458
- return isset( $_POST[$param] )
459
- ? $_POST[$param]
460
- : isset( $_GET[$param] )
461
- ? $_GET[$param]
462
- : $default;
463
  }
464
 
465
  /**
282
  'taxonomy' => $tax_slug,
283
  'name' => $tax_obj->name,
284
  'orderby' => 'name',
285
+ 'selected' => isset( $_GET[$tax_slug] ) ? $_GET[$tax_slug] : '',
286
  'hierarchical' => $tax_obj->hierarchical,
287
  'show_count' => true,
288
  'hide_if_empty' => true
397
  AI1EC_POST_TYPE
398
  );
399
  }
400
+
401
+ /**
402
+ * screen_layout_columns function
403
+ *
404
+ * Since WordPress 2.8 we have to tell, that we support 2 columns!
405
+ *
406
+ * @return void
407
+ **/
408
+ function screen_layout_columns( $columns, $screen ) {
409
+ global $ai1ec_settings;
410
+
411
+ if( isset( $ai1ec_settings->settings_page ) && $screen == $ai1ec_settings->settings_page )
412
+ $columns[$ai1ec_settings->settings_page] = 2;
413
+
414
+ return $columns;
415
+ }
416
 
417
  /**
418
  * change_columns function
471
  * @return mixed
472
  **/
473
  function get_param( $param, $default='' ) {
474
+ if( isset( $_POST[$param] ) )
475
+ return $_POST[$param];
476
+ if( isset( $_GET[$param] ) )
477
+ return $_GET[$param];
478
+ return $default;
479
  }
480
 
481
  /**
app/helper/class-ai1ec-calendar-helper.php CHANGED
@@ -66,19 +66,29 @@ class Ai1ec_Calendar_Helper {
66
  $bits = $ai1ec_events_helper->gmgetdate( $time );
67
  $last_day = gmdate( 't', $time );
68
 
 
 
 
 
 
69
  // ==========================================
70
  // = Iterate through each date of the month =
71
  // ==========================================
72
  for( $day = 1; $day <= $last_day; $day++ )
73
  {
 
74
  $start_time = gmmktime( 0, 0, 0, $bits['mon'], $day, $bits['year'] );
75
  $end_time = gmmktime( 0, 0, 0, $bits['mon'], $day + 1, $bits['year'] );
76
-
77
- $days_events[$day] = $this->get_events_between(
78
- $start_time, $end_time, 'publish', $categories, $tags );
 
 
 
 
79
  }
80
 
81
- return $days_events;
82
  }
83
 
84
  /**
@@ -155,7 +165,7 @@ class Ai1ec_Calendar_Helper {
155
  * given end time. If there are any all-day events spanning this period,
156
  * then return those as well. All-day events are returned first.
157
  *
158
- * @param int $start_time limit to events starting after this (local) UNIX time
159
  * @param int $end_time limit to events starting before this (local) UNIX time
160
  * @param string $post_status limit to events matching this post_status
161
  * (null for no restriction)
@@ -248,19 +258,19 @@ class Ai1ec_Calendar_Helper {
248
  * negative $page_offset can be provided, which will return events *before*
249
  * the reference time, as expected.
250
  *
251
- * @param int $time limit to events starting after this (local) UNIX time
252
  * @param int $limit return a maximum of this number of items
253
  * @param int $page_offset offset the result set by $limit times this number
254
- * @param string $post_status limit to events matching this post_status
255
- * (null for no restriction)
256
- *
257
  *
258
  * @return array three-element array:
259
  * ['events'] an array of matching event objects
260
  * ['prev'] true if more previous events
261
  * ['next'] true if more next events
262
  **/
263
- function get_events_relative_to( $time, $limit = 0, $page_offset = 0, $post_status = 'publish' ) {
264
  global $wpdb, $ai1ec_events_helper, $current_user;
265
 
266
  // Figure out what the beginning of the day is to properly query all-day
@@ -280,42 +290,44 @@ class Ai1ec_Calendar_Helper {
280
 
281
  // administrators and editors can see private posts
282
  if( current_user_can( 'administrator' ) || current_user_can( 'editor' ) ) {
283
- $post_status = "AND ( post_status = %s OR post_status = %s ) ";
284
- $args[] = 'publish';
285
- $args[] = 'private';
286
- }
287
- else if( is_user_logged_in() ) {
288
- // get user info
289
- get_currentuserinfo();
290
-
291
- /**
292
- * include post_status = published
293
- * or
294
- * post_status = private and author = logged in user
295
- */
296
- $post_status = "AND " .
297
- "( " .
298
- "post_status = %s " .
299
-
300
- "OR " .
301
-
302
- "( " .
303
- "post_status = %s " .
304
-
305
- "AND " .
306
-
307
- "post_author = %d " .
308
- ") " .
309
- ") ";
310
-
311
- $args[] = 'publish';
312
- $args[] = 'private';
313
- $args[] = $current_user->ID;
314
- } else {
315
- $post_status = "AND post_status = %s ";
316
- $args[] = 'publish';
317
- }
318
 
 
 
319
  $query = $wpdb->prepare(
320
  "SELECT SQL_CALC_FOUND_ROWS p.*, e.post_id, i.id AS instance_id, " .
321
  "UNIX_TIMESTAMP( i.start ) AS start, " .
@@ -329,12 +341,14 @@ class Ai1ec_Calendar_Helper {
329
  "FROM {$wpdb->prefix}ai1ec_events e " .
330
  "INNER JOIN $wpdb->posts p ON e.post_id = p.ID " .
331
  "INNER JOIN {$wpdb->prefix}ai1ec_event_instances i ON e.post_id = i.post_id " .
 
332
  "WHERE post_type = '" . AI1EC_POST_TYPE . "' " .
333
  "AND " .
334
  ( $page_offset >= 0 ? "i.end >= FROM_UNIXTIME( %d ) "
335
  : "i.start < FROM_UNIXTIME( %d ) "
336
  ) .
337
- $post_status .
 
338
  // Reverse order when viewing negative pages, to get correct set of
339
  // records. Then reverse results later to order them properly.
340
  "ORDER BY i.start " . ( $page_offset >= 0 ? 'ASC' : 'DESC' ) .
@@ -360,12 +374,12 @@ class Ai1ec_Calendar_Helper {
360
  $next = $more;
361
  }
362
  // Navigating in the past
363
- elseif( $page_offset < 0 ) {
364
  $prev = $more;
365
  $next = true;
366
  }
367
  // Navigating from the reference time
368
- else {
369
  $query = $wpdb->prepare(
370
  "SELECT COUNT(*) " .
371
  "FROM {$wpdb->prefix}ai1ec_events e " .
@@ -612,5 +626,66 @@ class Ai1ec_Calendar_Helper {
612
 
613
  return $links;
614
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615
  }
616
  // END class
66
  $bits = $ai1ec_events_helper->gmgetdate( $time );
67
  $last_day = gmdate( 't', $time );
68
 
69
+ $start_time = gmmktime( 0, 0, 0, $bits['mon'], 1, $bits['year'] );
70
+ $end_time = gmmktime( 0, 0, 0, $bits['mon'], $last_day + 1, $bits['year'] );
71
+
72
+ $events_between = $this->get_events_between( $start_time, $end_time, 'publish', $categories, $tags );
73
+
74
  // ==========================================
75
  // = Iterate through each date of the month =
76
  // ==========================================
77
  for( $day = 1; $day <= $last_day; $day++ )
78
  {
79
+ $_events = array();
80
  $start_time = gmmktime( 0, 0, 0, $bits['mon'], $day, $bits['year'] );
81
  $end_time = gmmktime( 0, 0, 0, $bits['mon'], $day + 1, $bits['year'] );
82
+
83
+ foreach( $events_between as $event ) {
84
+ if( $ai1ec_events_helper->gmt_to_local( $event->start ) >= $start_time && $ai1ec_events_helper->gmt_to_local( $event->start ) < $end_time ) {
85
+ $_events[] = $event;
86
+ }
87
+ }
88
+ $days_events[$day] = $_events;
89
  }
90
 
91
+ return apply_filters( 'ai1ec_get_events_for_month', $days_events, $time, $categories, $tags );
92
  }
93
 
94
  /**
165
  * given end time. If there are any all-day events spanning this period,
166
  * then return those as well. All-day events are returned first.
167
  *
168
+ * @param int $start_time limit to events starting after this (local) UNIX time
169
  * @param int $end_time limit to events starting before this (local) UNIX time
170
  * @param string $post_status limit to events matching this post_status
171
  * (null for no restriction)
258
  * negative $page_offset can be provided, which will return events *before*
259
  * the reference time, as expected.
260
  *
261
+ * @param int $time limit to events starting after this (local) UNIX time
262
  * @param int $limit return a maximum of this number of items
263
  * @param int $page_offset offset the result set by $limit times this number
264
+ * @param array $filter Array of filters for the events returned.
265
+ * ['cat_ids'] => non-associatative array of category IDs
266
+ * ['tag_ids'] => non-associatative array of tag IDs
267
  *
268
  * @return array three-element array:
269
  * ['events'] an array of matching event objects
270
  * ['prev'] true if more previous events
271
  * ['next'] true if more next events
272
  **/
273
+ function get_events_relative_to( $time, $limit = 0, $page_offset = 0, $filter = array() ) {
274
  global $wpdb, $ai1ec_events_helper, $current_user;
275
 
276
  // Figure out what the beginning of the day is to properly query all-day
290
 
291
  // administrators and editors can see private posts
292
  if( current_user_can( 'administrator' ) || current_user_can( 'editor' ) ) {
293
+ $post_status = "AND ( post_status = %s OR post_status = %s ) ";
294
+ $args[] = 'publish';
295
+ $args[] = 'private';
296
+ }
297
+ else if( is_user_logged_in() ) {
298
+ // get user info
299
+ get_currentuserinfo();
300
+
301
+ /**
302
+ * include post_status = published
303
+ * or
304
+ * post_status = private and author = logged in user
305
+ */
306
+ $post_status = "AND " .
307
+ "( " .
308
+ "post_status = %s " .
309
+
310
+ "OR " .
311
+
312
+ "( " .
313
+ "post_status = %s " .
314
+
315
+ "AND " .
316
+
317
+ "post_author = %d " .
318
+ ") " .
319
+ ") ";
320
+
321
+ $args[] = 'publish';
322
+ $args[] = 'private';
323
+ $args[] = $current_user->ID;
324
+ } else {
325
+ $post_status = "AND post_status = %s ";
326
+ $args[] = 'publish';
327
+ }
328
 
329
+ // Get the Join (filter_join) and Where (filter_where) statements based on $filter elements specified
330
+ $filter = $this->_get_filter_sql( $filter );
331
  $query = $wpdb->prepare(
332
  "SELECT SQL_CALC_FOUND_ROWS p.*, e.post_id, i.id AS instance_id, " .
333
  "UNIX_TIMESTAMP( i.start ) AS start, " .
341
  "FROM {$wpdb->prefix}ai1ec_events e " .
342
  "INNER JOIN $wpdb->posts p ON e.post_id = p.ID " .
343
  "INNER JOIN {$wpdb->prefix}ai1ec_event_instances i ON e.post_id = i.post_id " .
344
+ $filter['filter_join'] .
345
  "WHERE post_type = '" . AI1EC_POST_TYPE . "' " .
346
  "AND " .
347
  ( $page_offset >= 0 ? "i.end >= FROM_UNIXTIME( %d ) "
348
  : "i.start < FROM_UNIXTIME( %d ) "
349
  ) .
350
+ $filter['filter_where'] .
351
+ $post_status .
352
  // Reverse order when viewing negative pages, to get correct set of
353
  // records. Then reverse results later to order them properly.
354
  "ORDER BY i.start " . ( $page_offset >= 0 ? 'ASC' : 'DESC' ) .
374
  $next = $more;
375
  }
376
  // Navigating in the past
377
+ elseif( $page_offset < 0 ) {
378
  $prev = $more;
379
  $next = true;
380
  }
381
  // Navigating from the reference time
382
+ else {
383
  $query = $wpdb->prepare(
384
  "SELECT COUNT(*) " .
385
  "FROM {$wpdb->prefix}ai1ec_events e " .
626
 
627
  return $links;
628
  }
629
+
630
+ /**
631
+ * _get_filter_sql function
632
+ *
633
+ * Takes an array of filtering options and turns it into JOIN and WHERE statements
634
+ * for running an SQL query limited to the specified options
635
+ *
636
+ * @param array $filter Array of filters for the events returned.
637
+ * ['cat_ids'] => non-associatative array of category IDs
638
+ * ['tag_ids'] => non-associatative array of tag IDs
639
+ * ['post_ids'] => non-associatative array of event post IDs
640
+ *
641
+ * @return array Returns the same $filter array modified to have:
642
+ * ['filter_join'] the Join statements for the SQL
643
+ * ['filter_where'] the Where statements for the SQL
644
+ **/
645
+ function _get_filter_sql( $filter ) {
646
+ global $wpdb;
647
+
648
+ // Set up the filter join and where strings
649
+ $filter['filter_join'] = '';
650
+ $filter['filter_where'] = '';
651
+
652
+ // By default open the Where with an AND ( .. ) to group all statements. Later, set it to OR to join statements together.
653
+ // TODO - make this cleaner by supporting the choice of AND/OR logic
654
+ $where_logic = ' AND (';
655
+
656
+ foreach( $filter as $filter_type => $filter_ids ) {
657
+ // If no filter elements specified, don't do anything
658
+ if( $filter_ids && is_array( $filter_ids ) ) {
659
+ switch ( $filter_type ) {
660
+ // Limit by Category IDs
661
+ case 'cat_ids':
662
+ $filter['filter_join'] .= " LEFT JOIN $wpdb->term_relationships AS trc ON e.post_id = trc.object_id ";
663
+ $filter['filter_join'] .= " LEFT JOIN $wpdb->term_taxonomy ttc ON trc.term_taxonomy_id = ttc.term_taxonomy_id AND ttc.taxonomy = 'events_categories' ";
664
+ $filter['filter_where'] .= $where_logic . " ttc.term_id IN ( " . join( ',', $filter_ids ) . " ) ";
665
+ $where_logic = ' OR ';
666
+ break;
667
+ // Limit by Tag IDs
668
+ case 'tag_ids':
669
+ $filter['filter_join'] .= " LEFT JOIN $wpdb->term_relationships AS trt ON e.post_id = trt.object_id ";
670
+ $filter['filter_join'] .= " LEFT JOIN $wpdb->term_taxonomy ttt ON trt.term_taxonomy_id = ttt.term_taxonomy_id AND ttt.taxonomy = 'events_tags' ";
671
+ $filter['filter_where'] .= $where_logic . " ttt.term_id IN ( " . join( ',', $filter_ids ) . " ) ";
672
+ $where_logic = ' OR ';
673
+ break;
674
+ // Limit by post IDs
675
+ case 'post_ids':
676
+ $filter['filter_where'] .= $where_logic . " e.post_id IN ( " . join( ',', $filter_ids ) . " ) ";
677
+ $where_logic = ' OR ';
678
+ break;
679
+ }
680
+ }
681
+ }
682
+
683
+ // Close the Where statement bracket if any Where statements were set
684
+ if( $filter['filter_where'] != '') {
685
+ $filter['filter_where'] .= ' ) ';
686
+ }
687
+
688
+ return $filter;
689
+ }
690
  }
691
  // END class
app/helper/class-ai1ec-events-helper.php CHANGED
@@ -58,7 +58,9 @@ class Ai1ec_Events_Helper {
58
  {
59
  $event = wp_cache_get( $post_id, AI1EC_POST_TYPE );
60
  if( $event === false ) {
61
- $event = new Ai1ec_Event( $post_id );
 
 
62
 
63
  if( ! $event->post_id )
64
  throw new Ai1ec_Event_Not_Found( "Event with ID '$post_id' could not be retrieved from the database." );
@@ -198,6 +200,8 @@ class Ai1ec_Events_Helper {
198
  $start = getdate( $e['start'] );
199
  $end = getdate( $e['end'] );
200
 
 
 
201
  // If event spans a day and end time is not midnight, or spans more than
202
  // a day, then create instance for each spanning day
203
  if( ( $start['mday'] != $end['mday'] &&
@@ -208,6 +212,8 @@ class Ai1ec_Events_Helper {
208
  } else {
209
  $this->insert_event_in_cache_table( $e );
210
  }
 
 
211
  }
212
  }
213
  }
@@ -310,22 +316,13 @@ class Ai1ec_Events_Helper {
310
  static $options;
311
  if( !isset( $options ) ) {
312
  $temp = array(
313
- ' ' => __( 'No repeat', AI1EC_PLUGIN_NAME ),
314
- 'DAILY' => __( 'Daily', AI1EC_PLUGIN_NAME ),
315
- 'MO' => __( 'Mondays', AI1EC_PLUGIN_NAME ),
316
- 'TU' => __( 'Tuesdays', AI1EC_PLUGIN_NAME ),
317
- 'WE' => __( 'Wednesdays', AI1EC_PLUGIN_NAME ),
318
- 'TH' => __( 'Thursdays', AI1EC_PLUGIN_NAME ),
319
- 'FR' => __( 'Fridays', AI1EC_PLUGIN_NAME ),
320
- 'SA' => __( 'Saturdays', AI1EC_PLUGIN_NAME ),
321
- 'SU' => __( 'Sundays', AI1EC_PLUGIN_NAME ),
322
- 'TU+TH' => __( 'Tuesdays & Thursdays', AI1EC_PLUGIN_NAME ),
323
- 'MO+WE+FR' => __( 'Mondays, Wednesdays & Fridays', AI1EC_PLUGIN_NAME ),
324
- 'WEEKDAYS' => __( 'Weekdays', AI1EC_PLUGIN_NAME ),
325
- 'WEEKENDS' => __( 'Weekends', AI1EC_PLUGIN_NAME ),
326
- 'WEEKLY' => __( 'Weekly', AI1EC_PLUGIN_NAME ),
327
- 'MONTHLY' => __( 'Monthly', AI1EC_PLUGIN_NAME ),
328
- 'YEARLY' => __( 'Yearly', AI1EC_PLUGIN_NAME )
329
  );
330
  $options = $temp;
331
  }
@@ -340,24 +337,16 @@ class Ai1ec_Events_Helper {
340
  * @return String Repeat dropdown
341
  */
342
  function create_repeat_dropdown( $selected = null ) {
343
- ob_start();
344
-
345
- $options = $this->get_repeat_patterns();
346
-
347
- ?>
348
- <select name="ai1ec_repeat" id="ai1ec_repeat">
349
- <?php foreach( $options as $key => $val ): ?>
350
- <option value="<?php echo $key ?>" <?php if( $key === $selected ) echo 'selected="selected"' ?>>
351
- <?php _e( $val, AI1EC_PLUGIN_NAME ) ?>
352
- </option>
353
- <?php endforeach ?>
354
- </select>
355
- <?php
356
-
357
- $output = ob_get_contents();
358
- ob_end_clean();
359
-
360
- return $output;
361
  }
362
 
363
  /**
@@ -433,19 +422,286 @@ class Ai1ec_Events_Helper {
433
  *
434
  * @return String Repeat dropdown
435
  */
436
- function create_count_input( $count = 100 ) {
437
  ob_start();
438
 
439
  if( ! $count ) $count = 100;
440
  ?>
441
- <input type="range" name="ai1ec_count" id="ai1ec_count" min="1" max="100"
442
  <?php if( $count ) echo 'value="' . $count . '"' ?> />
443
- <?php _e( 'times', AI1EC_PLUGIN_NAME ) ?>
444
  <?php
445
- $output = ob_get_contents();
446
- ob_end_clean();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
 
448
- return $output;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
449
  }
450
 
451
  /**
@@ -497,7 +753,7 @@ class Ai1ec_Events_Helper {
497
  // = Generating start date sql =
498
  // =============================
499
  if( $start !== false ) {
500
- $start_where_sql = "AND e.start >= FROM_UNIXTIME( %d )";
501
  $args[] = $start;
502
  }
503
 
@@ -505,7 +761,7 @@ class Ai1ec_Events_Helper {
505
  // = Generating end date sql =
506
  // ===========================
507
  if( $end !== false ) {
508
- $end_where_sql = "AND e.end <= FROM_UNIXTIME( %d )";
509
  $args[] = $end;
510
  }
511
 
@@ -521,14 +777,15 @@ class Ai1ec_Events_Helper {
521
  foreach( explode( ',', $categories ) as $cat )
522
  $tmp[] = (int) $cat;
523
 
524
- $categories = $tmp;
525
  } else {
526
  // prevent sql injection
527
  $categories = (int) $categories;
528
  }
529
 
530
- $c_sql = "INNER JOIN $wpdb->term_relationships AS tr ON post_id = tr.object_id ";
531
- $c_where_sql = "AND tr.term_taxonomy_id IN ( $categories ) ";
 
532
  }
533
 
534
  // =============================
@@ -543,18 +800,23 @@ class Ai1ec_Events_Helper {
543
  foreach( explode( ',', $tags ) as $tag )
544
  $tmp[] = (int) $tag;
545
 
546
- $tags = $tmp;
547
  } else {
548
  $tags = (int) $tags;
549
  }
550
-
551
- // if category sql is included then don't inner join term_relationships table
552
- if( ! empty( $c_sql ) ) {
553
- $t_where_sql = "AND tr.term_taxonomy_id IN ( $tags ) ";
 
554
  } else {
555
- $t_sql = "INNER JOIN $wpdb->term_relationships AS tr ON e.post_id = tr.object_id ";
556
- $t_where_sql = "AND tr.term_taxonomy_id IN ( $tags ) ";
 
557
  }
 
 
 
558
  }
559
 
560
  // ========================
@@ -739,7 +1001,15 @@ class Ai1ec_Events_Helper {
739
  * @return int
740
  **/
741
  function gmt_to_local( $timestamp ) {
742
- return $timestamp + get_option( 'gmt_offset' ) * 3600;
 
 
 
 
 
 
 
 
743
  }
744
 
745
  /**
@@ -752,7 +1022,40 @@ class Ai1ec_Events_Helper {
752
  * @return int
753
  **/
754
  function local_to_gmt( $timestamp ) {
755
- return $timestamp - get_option( 'gmt_offset' ) * 3600;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
756
  }
757
 
758
  /**
@@ -984,5 +1287,290 @@ class Ai1ec_Events_Helper {
984
 
985
  return $output;
986
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
987
  }
988
  // END class
58
  {
59
  $event = wp_cache_get( $post_id, AI1EC_POST_TYPE );
60
  if( $event === false ) {
61
+ // try to get the event instance id, if it is not set get the post id
62
+ $instance_id = isset( $_REQUEST["instance_id"] ) ? (int) $_REQUEST["instance_id"] : false;
63
+ $event = new Ai1ec_Event( $post_id, $instance_id );
64
 
65
  if( ! $event->post_id )
66
  throw new Ai1ec_Event_Not_Found( "Event with ID '$post_id' could not be retrieved from the database." );
200
  $start = getdate( $e['start'] );
201
  $end = getdate( $e['end'] );
202
 
203
+ /*
204
+ // Commented out for now
205
  // If event spans a day and end time is not midnight, or spans more than
206
  // a day, then create instance for each spanning day
207
  if( ( $start['mday'] != $end['mday'] &&
212
  } else {
213
  $this->insert_event_in_cache_table( $e );
214
  }
215
+ */
216
+ $this->insert_event_in_cache_table( $e );
217
  }
218
  }
219
  }
316
  static $options;
317
  if( !isset( $options ) ) {
318
  $temp = array(
319
+ ' ' => __( 'No repeat', AI1EC_PLUGIN_NAME ),
320
+ '1' => __( 'Every day', AI1EC_PLUGIN_NAME ),
321
+ '2' => __( 'Every week', AI1EC_PLUGIN_NAME ),
322
+ '3' => __( 'Every month', AI1EC_PLUGIN_NAME ),
323
+ '4' => __( 'Every year', AI1EC_PLUGIN_NAME ),
324
+ '5' => __( '-----------', AI1EC_PLUGIN_NAME ),
325
+ '6' => __( 'Custom...', AI1EC_PLUGIN_NAME ),
 
 
 
 
 
 
 
 
 
326
  );
327
  $options = $temp;
328
  }
337
  * @return String Repeat dropdown
338
  */
339
  function create_repeat_dropdown( $selected = null ) {
340
+ $options = array(
341
+ ' ' => __( 'No repeat', AI1EC_PLUGIN_NAME ),
342
+ 1 => __( 'Every day', AI1EC_PLUGIN_NAME ),
343
+ 2 => __( 'Every week', AI1EC_PLUGIN_NAME ),
344
+ 3 => __( 'Every month', AI1EC_PLUGIN_NAME ),
345
+ 4 => __( 'Every year', AI1EC_PLUGIN_NAME ),
346
+ 5 => __( '-----------', AI1EC_PLUGIN_NAME ),
347
+ 6 => __( 'Custom...', AI1EC_PLUGIN_NAME ),
348
+ );
349
+ return $this->create_select_element( 'ai1ec_repeat', $options, $selected, array( 5 ) );
 
 
 
 
 
 
 
 
350
  }
351
 
352
  /**
422
  *
423
  * @return String Repeat dropdown
424
  */
425
+ function create_count_input( $name, $count = 100, $max = 365 ) {
426
  ob_start();
427
 
428
  if( ! $count ) $count = 100;
429
  ?>
430
+ <input type="range" name="<?php echo $name ?>" id="<?php echo $name ?>" min="1" max="<?php echo $max ?>"
431
  <?php if( $count ) echo 'value="' . $count . '"' ?> />
 
432
  <?php
433
+ return ob_get_clean();
434
+ }
435
+
436
+ /**
437
+ * create_select_element function
438
+ *
439
+ *
440
+ *
441
+ * @return void
442
+ **/
443
+ function create_select_element( $name, $options = array(), $selected = false, $disabled_keys = array() ) {
444
+ ob_start();
445
+ ?>
446
+ <select name="<?php echo $name ?>" id="<?php echo $name ?>">
447
+ <?php foreach( $options as $key => $val ): ?>
448
+ <option value="<?php echo $key ?>" <?php echo $key === $selected ? 'selected="selected"' : '' ?><?php echo in_array( $key, $disabled_keys ) ? 'disabled="disabled"' : '' ?>>
449
+ <?php echo $val ?>
450
+ </option>
451
+ <?php endforeach ?>
452
+ </select>
453
+ <?php
454
+ return ob_get_clean();
455
+ }
456
+
457
+ /**
458
+ * create_on_the_select function
459
+ *
460
+ *
461
+ *
462
+ * @return void
463
+ **/
464
+ function create_on_the_select( $f_selected = false, $s_selected = false ) {
465
+ $ret = "";
466
+
467
+ $first_options = array(
468
+ '0' => __( 'first', AI1EC_PLUGIN_NAME ),
469
+ '1' => __( 'second', AI1EC_PLUGIN_NAME ),
470
+ '2' => __( 'third', AI1EC_PLUGIN_NAME ),
471
+ '3' => __( 'fourth', AI1EC_PLUGIN_NAME ),
472
+ '4' => __( '------', AI1EC_PLUGIN_NAME ),
473
+ '5' => __( 'last', AI1EC_PLUGIN_NAME )
474
+ );
475
+ $ret = $this->create_select_element( 'ai1ec_monthly_each_select', $first_options, $f_selected, array( 4 ) );
476
+
477
+ $second_options = array(
478
+ '0' => __( 'Sunday', AI1EC_PLUGIN_NAME ),
479
+ '1' => __( 'Monday', AI1EC_PLUGIN_NAME ),
480
+ '2' => __( 'Tuesday', AI1EC_PLUGIN_NAME ),
481
+ '3' => __( 'Wednesday', AI1EC_PLUGIN_NAME ),
482
+ '4' => __( 'Thursday', AI1EC_PLUGIN_NAME ),
483
+ '5' => __( 'Friday', AI1EC_PLUGIN_NAME ),
484
+ '6' => __( 'Saturday', AI1EC_PLUGIN_NAME ),
485
+ '7' => __( '--------', AI1EC_PLUGIN_NAME ),
486
+ '8' => __( 'day', AI1EC_PLUGIN_NAME ),
487
+ '9' => __( 'weekday', AI1EC_PLUGIN_NAME ),
488
+ '10' => __( 'weekend day', AI1EC_PLUGIN_NAME )
489
+ );
490
+
491
+ return $ret . $this->create_select_element( 'ai1ec_monthly_on_the_select', $second_options, $s_selected, array( 7 ) );
492
+ }
493
+
494
+ /**
495
+ * undocumented function
496
+ *
497
+ *
498
+ *
499
+ * @return void
500
+ **/
501
+ function create_list_element( $name, $options = array(), $selected = array() ) {
502
+ ob_start();
503
+ ?>
504
+ <ul class="ai1ec_date_select <?php echo $name?>" id="<?php echo $name?>">
505
+ <?php foreach( $options as $key => $val ): ?>
506
+ <li<?php echo in_array( $key, $selected ) ? 'class="ai1ec_selected"' : '' ?>>
507
+ <?php echo $val ?>
508
+ <input type="hidden" name="<?php echo $name . '_' . $key ?>" value="<?php echo $key ?>" />
509
+ </li>
510
+ <?php endforeach ?>
511
+ </ul>
512
+ <input type="hidden" name="<?php echo $name ?>" value="<?php echo implode( ',', $selected ) ?>" />
513
+ <?php
514
+ return ob_get_clean();
515
+ }
516
+
517
+ /**
518
+ * create_montly_date_select function
519
+ *
520
+ *
521
+ *
522
+ * @return void
523
+ **/
524
+ function create_montly_date_select( $selected = array() ) {
525
+ $options = array();
526
+
527
+ for( $i = 1; $i <= 31; ++$i )
528
+ $options[$i] = $i;
529
+
530
+ return $this->create_list_element( 'ai1ec_montly_date_select', $options, $selected );
531
+ }
532
+
533
+ /**
534
+ * create_yearly_date_select function
535
+ *
536
+ *
537
+ *
538
+ * @return void
539
+ **/
540
+ function create_yearly_date_select( $selected = array() ) {
541
+ global $wp_locale;
542
+ $options = array();
543
+
544
+ for( $i = 1; $i <= 12; ++$i ) {
545
+ $x = $i < 10 ? 0 . $i : $i;
546
+ $options[$i] = $wp_locale->month_abbrev[$wp_locale->month[$x]];
547
+ }
548
+
549
+ return $this->create_list_element( 'ai1ec_yearly_date_select', $options, $selected );
550
+ }
551
+
552
+ function get_frequency( $index ) {
553
+ $frequency = array(
554
+ 0 => __( 'Daily', AI1EC_PLUGIN_NAME ),
555
+ 1 => __( 'Weekly', AI1EC_PLUGIN_NAME ),
556
+ 2 => __( 'Monthly', AI1EC_PLUGIN_NAME ),
557
+ 3 => __( 'Yearly', AI1EC_PLUGIN_NAME ),
558
+ );
559
+ return $frequency[$index];
560
+ }
561
+
562
+ /**
563
+ * row_frequency function
564
+ *
565
+ *
566
+ *
567
+ * @return void
568
+ **/
569
+ function row_frequency( $visible = false, $selected = false ) {
570
+ global $ai1ec_view_helper;
571
+
572
+ $frequency = array(
573
+ 0 => __( 'Daily', AI1EC_PLUGIN_NAME ),
574
+ 1 => __( 'Weekly', AI1EC_PLUGIN_NAME ),
575
+ 2 => __( 'Monthly', AI1EC_PLUGIN_NAME ),
576
+ 3 => __( 'Yearly', AI1EC_PLUGIN_NAME ),
577
+ );
578
+
579
+ $args = array(
580
+ 'visible' => $visible,
581
+ 'frequency' => $this->create_select_element( 'ai1ec_frequency', $frequency, $selected )
582
+ );
583
+ return $ai1ec_view_helper->get_view( 'row_frequency.php', $args );
584
+ }
585
+
586
+ /**
587
+ * row_daily function
588
+ *
589
+ * Returns daily selector
590
+ *
591
+ * @return void
592
+ **/
593
+ function row_daily( $visible = false, $selected = 1 ) {
594
+ global $ai1ec_view_helper;
595
+
596
+ $args = array(
597
+ 'visible' => $visible,
598
+ 'count' => $this->create_count_input( 'ai1ec_daily_count', $selected, 365 ) . __( 'day(s)', AI1EC_PLUGIN_NAME )
599
+ );
600
+ return $ai1ec_view_helper->get_view( 'row_daily.php', $args );
601
+ }
602
+
603
+ /**
604
+ * row_weekly function
605
+ *
606
+ * Returns weekly selector
607
+ *
608
+ * @return void
609
+ **/
610
+ function row_weekly( $visible = false, $count = 1, $selected = array() ) {
611
+ global $ai1ec_view_helper, $wp_locale;
612
+ $start_of_week = get_option( 'start_of_week', 1 );
613
+
614
+ $options = array();
615
+ // get days from start_of_week until the last day
616
+ for( $i = $start_of_week; $i <= 6; ++$i )
617
+ $options[$this->get_weekday_by_id( $i )] = $wp_locale->weekday_initial[$wp_locale->weekday[$i]];
618
+
619
+ // get days from 0 until start_of_week
620
+ if( $start_of_week > 0 ) {
621
+ for( $i = 0; $i < $start_of_week; $i++ )
622
+ $options[$this->get_weekday_by_id( $i )] = $wp_locale->weekday_initial[$wp_locale->weekday[$i]];
623
+ }
624
 
625
+ $args = array(
626
+ 'visible' => $visible,
627
+ 'count' => $this->create_count_input( 'ai1ec_weekly_count', $count, 52 ) . __( 'week(s)', AI1EC_PLUGIN_NAME ),
628
+ 'week_days' => $this->create_list_element( 'ai1ec_weekly_date_select', $options, $selected )
629
+ );
630
+ return $ai1ec_view_helper->get_view( 'row_weekly.php', $args );
631
+ }
632
+
633
+ /**
634
+ * get_weekday_by_id function
635
+ *
636
+ * Returns weekday name in English
637
+ *
638
+ * @param int $day_id Day ID
639
+ *
640
+ * @return string
641
+ **/
642
+ function get_weekday_by_id( $day_id, $by_value = false ) {
643
+ // do not translate this !!!
644
+ $week_days = array(
645
+ 0 => 'SU',
646
+ 1 => 'MO',
647
+ 2 => 'TU',
648
+ 3 => 'WE',
649
+ 4 => 'TH',
650
+ 5 => 'FR',
651
+ 6 => 'SA'
652
+ );
653
+
654
+ if( $by_value ) {
655
+ while( $_name = current( $week_days ) ) {
656
+ if( $_name == $day_id ) {
657
+ return key( $week_days );
658
+ }
659
+ next( $week_days );
660
+ }
661
+ return false;
662
+ }
663
+ else
664
+ return $week_days[$day_id];
665
+ }
666
+
667
+ /**
668
+ * row_monthly function
669
+ *
670
+ * Returns monthly selector
671
+ *
672
+ * @return void
673
+ **/
674
+ function row_monthly( $visible = false, $count = 1, $ai1ec_monthly_each = 0, $ai1ec_monthly_on_the = 0, $month = array(), $first = false, $second = false ) {
675
+ global $ai1ec_view_helper;
676
+
677
+ $args = array(
678
+ 'visible' => $visible,
679
+ 'count' => $this->create_count_input( 'ai1ec_monthly_count', $count, 12 ) . __( 'month(s)', AI1EC_PLUGIN_NAME ),
680
+ 'ai1ec_monthly_each' => $ai1ec_monthly_each,
681
+ 'ai1ec_monthly_on_the' => $ai1ec_monthly_on_the,
682
+ 'month' => $this->create_montly_date_select( $month ),
683
+ 'on_the_select' => $this->create_on_the_select( $first, $second )
684
+ );
685
+ return $ai1ec_view_helper->get_view( 'row_monthly.php', $args );
686
+ }
687
+
688
+ /**
689
+ * row_yearly function
690
+ *
691
+ * Returns yearly selector
692
+ *
693
+ * @return void
694
+ **/
695
+ function row_yearly( $visible = false, $count = 1, $year = array(), $first = false, $second = false ) {
696
+ global $ai1ec_view_helper;
697
+
698
+ $args = array(
699
+ 'visible' => $visible,
700
+ 'count' => $this->create_count_input( 'ai1ec_yearly_count', $count, 10 ) . __( 'year(s)', AI1EC_PLUGIN_NAME ),
701
+ 'year' => $this->create_yearly_date_select( $year ),
702
+ 'on_the_select' => $this->create_on_the_select( $first, $second )
703
+ );
704
+ return $ai1ec_view_helper->get_view( 'row_yearly.php', $args );
705
  }
706
 
707
  /**
753
  // = Generating start date sql =
754
  // =============================
755
  if( $start !== false ) {
756
+ $start_where_sql = "AND (e.start >= FROM_UNIXTIME( %d ) OR e.recurrence_rules != '')";
757
  $args[] = $start;
758
  }
759
 
761
  // = Generating end date sql =
762
  // ===========================
763
  if( $end !== false ) {
764
+ $end_where_sql = "AND (e.end <= FROM_UNIXTIME( %d ) OR e.recurrence_rules != '')";
765
  $args[] = $end;
766
  }
767
 
777
  foreach( explode( ',', $categories ) as $cat )
778
  $tmp[] = (int) $cat;
779
 
780
+ $categories = implode( ',', $tmp );
781
  } else {
782
  // prevent sql injection
783
  $categories = (int) $categories;
784
  }
785
 
786
+ $c_sql = "INNER JOIN $wpdb->term_relationships AS tr1 ON post_id = tr1.object_id ";
787
+ $c_sql .= "INNER JOIN $wpdb->term_taxonomy AS ttc ON tr1.term_taxonomy_id = ttc.term_taxonomy_id ";
788
+ $c_where_sql = "AND ( ttc.term_id IN ( $categories ) ";
789
  }
790
 
791
  // =============================
800
  foreach( explode( ',', $tags ) as $tag )
801
  $tmp[] = (int) $tag;
802
 
803
+ $tags = implode( ',', $tmp );
804
  } else {
805
  $tags = (int) $tags;
806
  }
807
+
808
+ if( $categories !== false ) {
809
+ $t_sql = "INNER JOIN $wpdb->term_relationships AS tr2 ON e.post_id = tr2.object_id ";
810
+ $t_sql .= "INNER JOIN $wpdb->term_taxonomy AS ttt ON tr2.term_taxonomy_id = ttt.term_taxonomy_id ";
811
+ $c_where_sql .= "AND ttt.term_id IN ( $tags ) ) ";
812
  } else {
813
+ $t_sql = "INNER JOIN $wpdb->term_relationships AS tr2 ON e.post_id = tr2.object_id ";
814
+ $t_sql .= "INNER JOIN $wpdb->term_taxonomy AS ttt ON tr2.term_taxonomy_id = ttt.term_taxonomy_id ";
815
+ $t_where_sql = "AND ttt.term_id IN ( $tags ) ";
816
  }
817
+
818
+ } else {
819
+ $c_where_sql .= ") ";
820
  }
821
 
822
  // ========================
1001
  * @return int
1002
  **/
1003
  function gmt_to_local( $timestamp ) {
1004
+ $offset = get_option( 'gmt_offset' );
1005
+ $tz = get_option( 'timezone_string', 'America/Los_Angeles' );
1006
+
1007
+ $offset = $this->get_timezone_offset( 'UTC', $tz, $timestamp );
1008
+
1009
+ if( ! $offset )
1010
+ $offset = get_option( 'gmt_offset' ) * 3600;
1011
+
1012
+ return $timestamp + $offset;
1013
  }
1014
 
1015
  /**
1022
  * @return int
1023
  **/
1024
  function local_to_gmt( $timestamp ) {
1025
+ $offset = get_option( 'gmt_offset' );
1026
+ $tz = get_option( 'timezone_string', 'America/Los_Angeles' );
1027
+
1028
+ $offset = $this->get_timezone_offset( 'UTC', $tz, $timestamp );
1029
+
1030
+ if( ! $offset )
1031
+ $offset = get_option( 'gmt_offset' ) * 3600;
1032
+
1033
+ return $timestamp - $offset;
1034
+ }
1035
+
1036
+ /**
1037
+ * get_timezone_offset function
1038
+ *
1039
+ * Returns the offset from the origin timezone to the remote timezone, in seconds.
1040
+ *
1041
+ * @param string $remote_tz Remote TimeZone
1042
+ * @param string $origin_tz Origin TimeZone
1043
+ * @param string/int $timestamp Unix Timestamp or 'now'
1044
+ *
1045
+ * @return int
1046
+ **/
1047
+ function get_timezone_offset( $remote_tz, $origin_tz = null, $timestamp = "now" ) {
1048
+ if( $origin_tz === null )
1049
+ if( ! is_string( $origin_tz = date_default_timezone_get() ) )
1050
+ return false; // A UTC timestamp was returned -- bail out!
1051
+
1052
+ $origin_dtz = new DateTimeZone( $origin_tz );
1053
+ $remote_dtz = new DateTimeZone( $remote_tz );
1054
+ $origin_dt = new DateTime( gmdate( 'Y-m-d H:i:s', $timestamp ), $origin_dtz );
1055
+ $remote_dt = new DateTime( gmdate( 'Y-m-d H:i:s', $timestamp ), $remote_dtz );
1056
+ $offset = $origin_dtz->getOffset( $origin_dt ) - $remote_dtz->getOffset( $remote_dt );
1057
+
1058
+ return $offset;
1059
  }
1060
 
1061
  /**
1287
 
1288
  return $output;
1289
  }
1290
+
1291
+ /**
1292
+ * rrule_to_text function
1293
+ *
1294
+ *
1295
+ *
1296
+ * @return void
1297
+ **/
1298
+ function rrule_to_text( $rrule = '') {
1299
+ $txt = '';
1300
+ $rc = new SG_iCal_Recurrence( new SG_iCal_Line( 'RRULE:' . $rrule ) );
1301
+ switch( $rc->getFreq() ) {
1302
+ case 'DAILY':
1303
+ $this->_get_interval( $txt, 'daily', $rc->getInterval() );
1304
+ $this->_ending_sentence( $txt, $rc );
1305
+ break;
1306
+ case 'WEEKLY':
1307
+ $this->_get_interval( $txt, 'weekly', $rc->getInterval() );
1308
+ $this->_get_sentence_by( $txt, 'weekly', $rc );
1309
+ $this->_ending_sentence( $txt, $rc );
1310
+ break;
1311
+ case 'MONTHLY':
1312
+ $this->_get_interval( $txt, 'monthly', $rc->getInterval() );
1313
+ $this->_get_sentence_by( $txt, 'monthly', $rc );
1314
+ $this->_ending_sentence( $txt, $rc );
1315
+ break;
1316
+ case 'YEARLY':
1317
+ $this->_get_interval( $txt, 'yearly', $rc->getInterval() );
1318
+ $this->_get_sentence_by( $txt, 'yearly', $rc );
1319
+ $this->_ending_sentence( $txt, $rc );
1320
+ break;
1321
+ default:
1322
+ $txt = $rrule;
1323
+ }
1324
+ return $txt;
1325
+ }
1326
+
1327
+ /**
1328
+ * _get_sentence_by function
1329
+ *
1330
+ * @internal
1331
+ *
1332
+ * @return void
1333
+ **/
1334
+ function _get_sentence_by( &$txt, $freq, $rc ) {
1335
+ global $wp_locale;
1336
+
1337
+ switch( $freq ) {
1338
+ case 'weekly':
1339
+ if( $rc->getByDay() ) {
1340
+ if( count( $rc->getByDay() ) > 1 ) {
1341
+ // if there are more than 3 days
1342
+ // use days's abbr
1343
+ if( count( $rc->getByDay() ) > 2 ) {
1344
+ $_days = '';
1345
+ foreach( $rc->getByDay() as $d ) {
1346
+ $day = $this->get_weekday_by_id( $d, true );
1347
+ $_days .= ' ' . $wp_locale->weekday_abbrev[$wp_locale->weekday[$day]] . ',';
1348
+ }
1349
+ // remove the last ' and'
1350
+ $_days = substr( $_days, 0, -1 );
1351
+ $txt .= ' ' . __( 'on' ) . $_days;
1352
+ } else {
1353
+ $_days = '';
1354
+ foreach( $rc->getByDay() as $d ) {
1355
+ $day = $this->get_weekday_by_id( $d, true );
1356
+ $_days .= ' ' . $wp_locale->weekday[$day] . ' ' . __( 'and', AI1EC_PLUGIN_NAME );
1357
+ }
1358
+ // remove the last ' and'
1359
+ $_days = substr( $_days, 0, -4 );
1360
+ $txt .= ' ' . __( 'on' ) . $_days;
1361
+ }
1362
+ } else {
1363
+ $_days = '';
1364
+ foreach( $rc->getByDay() as $d ) {
1365
+ $day = $this->get_weekday_by_id( $d, true );
1366
+ $_days .= ' ' . $wp_locale->weekday[$day];
1367
+ }
1368
+ $txt .= ' ' . __( 'on' ) . $_days;
1369
+ }
1370
+ }
1371
+ break;
1372
+ case 'monthly':
1373
+ if( $rc->getByMonthDay() ) {
1374
+ // if there are more than 2 days
1375
+ if( count( $rc->getByMonthDay() ) > 2 ) {
1376
+ $_days = '';
1377
+ foreach( $rc->getByMonthDay() as $m_day ) {
1378
+ $_days .= ' ' . $this->_ordinal( $m_day ) . ',';
1379
+ }
1380
+ $_days = substr( $_days, 0, -1 );
1381
+ $txt .= ' ' . __( 'on' ) . $_days . ' ' . __( 'of the month', AI1EC_PLUGIN_NAME );
1382
+ } else if( count( $rc->getByMonthDay() ) > 1 ) {
1383
+ $_days = '';
1384
+ foreach( $rc->getByMonthDay() as $m_day ) {
1385
+ $_days .= ' ' . $this->_ordinal( $m_day ) . ' ' . __( 'and', AI1EC_PLUGIN_NAME );
1386
+ }
1387
+ $_days = substr( $_days, 0, -4 );
1388
+ $txt .= ' ' . __( 'on' ) . $_days . ' ' . __( 'of the month', AI1EC_PLUGIN_NAME );
1389
+ } else {
1390
+ $_days = '';
1391
+ foreach( $rc->getByMonthDay() as $m_day ) {
1392
+ $_days .= ' ' . $this->_ordinal( $m_day );
1393
+ }
1394
+ $txt .= ' ' . __( 'on' ) . $_days . ' ' . __( 'of the month', AI1EC_PLUGIN_NAME );
1395
+ }
1396
+ }
1397
+ break;
1398
+ case 'yearly':
1399
+ if( $rc->getByMonth() ) {
1400
+ // if there are more than 2 months
1401
+ if( count( $rc->getByMonth() ) > 2 ) {
1402
+ $_months = '';
1403
+ foreach( $rc->getByMonth() as $_m ) {
1404
+ $_m = $_m < 10 ? 0 . $_m : $_m;
1405
+ $_months .= ' ' . $wp_locale->month_abbrev[$wp_locale->month[$_m]] . ',';
1406
+ }
1407
+ $_months = substr( $_months, 0, -1 );
1408
+ $txt .= ' ' . __( 'on' ) . $_months;
1409
+ } else if( count( $rc->getByMonth() ) > 1 ) {
1410
+ $_months = '';
1411
+ foreach( $rc->getByMonth() as $_m ) {
1412
+ $_m = $_m < 10 ? 0 . $_m : $_m;
1413
+ $_months .= ' ' . $wp_locale->month[$_m] . ' ' . __( 'and', AI1EC_PLUGIN_NAME );
1414
+ }
1415
+ $_months = substr( $_months, 0, -4 );
1416
+ $txt .= ' ' . __( 'on' ) . $_months;
1417
+ } else {
1418
+ $_months = '';
1419
+ foreach( $rc->getByMonth() as $_m ) {
1420
+ $_m = $_m < 10 ? 0 . $_m : $_m;
1421
+ $_months .= ' ' . $wp_locale->month[$_m];
1422
+ }
1423
+ $txt .= ' ' . __( 'on' ) . $_months;
1424
+ }
1425
+ }
1426
+ break;
1427
+ }
1428
+ }
1429
+
1430
+ /**
1431
+ * _ordinal function
1432
+ *
1433
+ * @internal
1434
+ *
1435
+ * @return void
1436
+ **/
1437
+ function _ordinal( $cdnl ) {
1438
+ $test_c = abs($cdnl) % 10;
1439
+ $ext = ( ( abs( $cdnl ) % 100 < 21 && abs( $cdnl ) % 100 > 4 ) ? 'th'
1440
+ : ( ( $test_c < 4 ) ? ( $test_c < 3 ) ? ( $test_c < 2 ) ? ( $test_c < 1 )
1441
+ ? 'th' : 'st' : 'nd' : 'rd' : 'th' ) );
1442
+ return $cdnl.$ext;
1443
+ }
1444
+
1445
+ /**
1446
+ * _get_interval function
1447
+ *
1448
+ * @internal
1449
+ *
1450
+ * @return void
1451
+ **/
1452
+ function _get_interval( &$txt, $freq, $interval ) {
1453
+ switch( $freq ) {
1454
+ case 'daily':
1455
+ // check if interval is set
1456
+ if( ! $interval || $interval == 1 ) {
1457
+ $txt = __( 'Daily', AI1EC_PLUGIN_NAME );
1458
+ } else {
1459
+ if( $interval == 2 ) {
1460
+ $txt = __( 'Every other day', AI1EC_PLUGIN_NAME );
1461
+ } else {
1462
+ $txt = sprintf( __( 'Every %d days', AI1EC_PLUGIN_NAME ), $interval );
1463
+ }
1464
+ }
1465
+ break;
1466
+ case 'weekly':
1467
+ // check if interval is set
1468
+ if( ! $interval || $interval == 1 ) {
1469
+ $txt = __( 'Weekly', AI1EC_PLUGIN_NAME );
1470
+ } else {
1471
+ if( $interval == 2 ) {
1472
+ $txt = __( 'Every other week', AI1EC_PLUGIN_NAME );
1473
+ } else {
1474
+ $txt = sprintf( __( 'Every %d weeks', AI1EC_PLUGIN_NAME ), $interval );
1475
+ }
1476
+ }
1477
+ break;
1478
+ case 'monthly':
1479
+ // check if interval is set
1480
+ if( ! $interval || $interval == 1 ) {
1481
+ $txt = __( 'Monthly', AI1EC_PLUGIN_NAME );
1482
+ } else {
1483
+ if( $interval == 2 ) {
1484
+ $txt = __( 'Every other month', AI1EC_PLUGIN_NAME );
1485
+ } else {
1486
+ $txt = sprintf( __( 'Every %d months', AI1EC_PLUGIN_NAME ), $interval );
1487
+ }
1488
+ }
1489
+ break;
1490
+ case 'yearly':
1491
+ // check if interval is set
1492
+ if( ! $interval || $interval == 1 ) {
1493
+ $txt = __( 'Yearly', AI1EC_PLUGIN_NAME );
1494
+ } else {
1495
+ if( $interval == 2 ) {
1496
+ $txt = __( 'Every other year', AI1EC_PLUGIN_NAME );
1497
+ } else {
1498
+ $txt = sprintf( __( 'Every %d years', AI1EC_PLUGIN_NAME ), $interval );
1499
+ }
1500
+ }
1501
+ break;
1502
+ }
1503
+ }
1504
+
1505
+ /**
1506
+ * _ending_sentence function
1507
+ *
1508
+ * Ends rrule to text sentence
1509
+ *
1510
+ * @internal
1511
+ *
1512
+ * @return void
1513
+ **/
1514
+ function _ending_sentence( &$txt, &$rc ) {
1515
+ if( $until = $rc->getUntil() ) {
1516
+ if( ! is_int( $until ) )
1517
+ $until = strtotime( $until );
1518
+ $txt .= ' ' . sprintf( __( 'until %s', AI1EC_PLUGIN_NAME ), date_i18n( get_option( 'date_format' ), $until ) );
1519
+ }
1520
+ else if( $count = $rc->getCount() )
1521
+ $txt .= ' ' . sprintf( __( 'for %d occurrences', AI1EC_PLUGIN_NAME ), $count );
1522
+ else
1523
+ $txt .= ' - ' . __( 'forever', AI1EC_PLUGIN_NAME );
1524
+ }
1525
+
1526
+ /**
1527
+ * undocumented function
1528
+ *
1529
+ *
1530
+ *
1531
+ * @return void
1532
+ **/
1533
+ function convert_rrule_to_text() {
1534
+ $error = false;
1535
+ // check to see if RRULE is set
1536
+ if( isset( $_REQUEST["rrule"] ) ) {
1537
+
1538
+ // check to see if rrule is empty
1539
+ if( empty( $_REQUEST["rrule"] ) ) {
1540
+ $error = true;
1541
+ $message = 'Recurrence rule cannot be empty!';
1542
+ } else {
1543
+ // convert rrule to text
1544
+ $message = $this->rrule_to_text( $_REQUEST["rrule"] );
1545
+ }
1546
+
1547
+ } else {
1548
+ $error = true;
1549
+ $message = 'Recurrence rule is not provided!';
1550
+ }
1551
+
1552
+ $output = array(
1553
+ "error" => $error,
1554
+ "message" => stripslashes( $message )
1555
+ );
1556
+
1557
+ echo json_encode( $output );
1558
+ exit();
1559
+ }
1560
+
1561
+ /**
1562
+ * post_type_link function
1563
+ *
1564
+ *
1565
+ *
1566
+ * @return void
1567
+ **/
1568
+ function post_type_link( $permalink, $post, $leavename ) {
1569
+ $pm = get_option( 'permalink_structure', false );
1570
+ if( empty( $pm ) )
1571
+ return $permalink . '&instance_id=';
1572
+ else
1573
+ return $permalink . '?instance_id=';
1574
+ }
1575
  }
1576
  // END class
app/helper/class-ai1ec-exporter-helper.php CHANGED
@@ -63,7 +63,7 @@ class Ai1ec_Exporter_Helper {
63
  $e = & $c->newComponent( 'vevent' );
64
  $uid = $event->ical_uid ? $event->ical_uid : $event->post->guid;
65
  $e->setProperty( 'uid', $uid );
66
- $e->setProperty( 'url', get_permalink( $event->post_id ) );
67
  $e->setProperty( 'summary', html_entity_decode( apply_filters( 'the_title', $event->post->post_title ), ENT_QUOTES ) );
68
  $content = apply_filters( 'the_content', $event->post->post_content );
69
  $content = str_replace(']]>', ']]&gt;', $content);
63
  $e = & $c->newComponent( 'vevent' );
64
  $uid = $event->ical_uid ? $event->ical_uid : $event->post->guid;
65
  $e->setProperty( 'uid', $uid );
66
+ $e->setProperty( 'url', get_permalink( $event->post_id ) . '?instance_id=' . $event->instance_id );
67
  $e->setProperty( 'summary', html_entity_decode( apply_filters( 'the_title', $event->post->post_title ), ENT_QUOTES ) );
68
  $content = apply_filters( 'the_content', $event->post->post_content );
69
  $content = str_replace(']]>', ']]&gt;', $content);
app/helper/class-ai1ec-importer-helper.php CHANGED
@@ -64,9 +64,13 @@ class Ai1ec_Importer_Helper {
64
  $ret .= ' ' . $t['value']['hour'] .
65
  ':' . $t['value']['min'] .
66
  ':' . $t['value']['sec'];
67
- $timezone = ( isset( $t['value']['tz'] ) && $t['value']['tz'] == 'Z' ) ? 'Z' : $t['params']['TZID'];
 
 
 
 
68
 
69
- if( ! $timezone ) $timezone = $def_timezone;
70
  if( $timezone )
71
  $ret .= ' ' . $timezone;
72
  return strtotime( $ret );
64
  $ret .= ' ' . $t['value']['hour'] .
65
  ':' . $t['value']['min'] .
66
  ':' . $t['value']['sec'];
67
+ $timezone = '';
68
+ if( isset( $t['value']['tz'] ) && $t['value']['tz'] == 'Z' )
69
+ $timezone = 'Z';
70
+ elseif( isset( $t['params']['TZID'] ) )
71
+ $timezone = $t['params']['TZID'];
72
 
73
+ if( empty( $timezone ) ) $timezone = $def_timezone;
74
  if( $timezone )
75
  $ret .= ' ' . $timezone;
76
  return strtotime( $ret );
app/helper/class-ai1ec-settings-helper.php CHANGED
@@ -75,7 +75,7 @@ class Ai1ec_Settings_Helper {
75
  if( $results ) {
76
  $pages = $results;
77
  }
78
-
79
  ?>
80
  <select class="inputwidth" name="<?php echo $field_name; ?>"
81
  id="<?php echo $field_name; ?>"
@@ -170,7 +170,7 @@ class Ai1ec_Settings_Helper {
170
  <?php foreach( $timezone_identifiers as $value ) : ?>
171
  <?php if( preg_match( '/^(Africa|America|Antartica|Arctic|Asia|Atlantic|Australia|Europe|Indian|Pacific)\//', $value ) ) : ?>
172
  <?php $ex = explode( "/", $value ); //obtain continent,city ?>
173
- <?php if( $continent != $ex[0] ) : ?>
174
  <?php if( ! empty( $continent ) ) : ?>
175
  </optgroup>
176
  <?php endif ?>
@@ -186,6 +186,34 @@ class Ai1ec_Settings_Helper {
186
  <?php
187
  return ob_get_clean();
188
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  /**
190
  * get_cron_freq_dropdown function
191
  *
@@ -260,7 +288,7 @@ class Ai1ec_Settings_Helper {
260
  <?php
261
  foreach( get_terms( 'events_categories', array( 'hide_empty' => false ) ) as $term ) :
262
  ?>
263
- <option value="<?php echo $term->term_id; ?>" <?php echo ( $selected === $term->id ) ? 'selected' : '' ?>>
264
  <?php echo $term->name; ?>
265
  </option>
266
  <?php
@@ -299,10 +327,11 @@ class Ai1ec_Settings_Helper {
299
  $exclude_from_search = $ai1ec_settings->exclude_from_search ? 'checked=checked' : '';
300
  $show_publish_button = $ai1ec_settings->show_publish_button ? 'checked=checked' : '';
301
  $hide_maps_until_clicked = $ai1ec_settings->hide_maps_until_clicked ? 'checked=checked' : '';
 
302
  $turn_off_subscription_buttons = $ai1ec_settings->turn_off_subscription_buttons ? 'checked=checked' : '';
303
  $show_create_event_button = $ai1ec_settings->show_create_event_button ? 'checked=checked' : '';
304
  $inject_categories = $ai1ec_settings->inject_categories ? 'checked=checked' : '';
305
- $input_us_format = $ai1ec_settings->input_us_format ? 'checked=checked' : '';
306
  $input_24h_time = $ai1ec_settings->input_24h_time ? 'checked=checked' : '';
307
  $default_calendar_view = $ai1ec_settings_helper->get_view_dropdown( $ai1ec_settings->default_calendar_view );
308
  $timezone_control = $ai1ec_settings_helper->get_timezone_dropdown( $ai1ec_settings->timezone );
@@ -316,10 +345,11 @@ class Ai1ec_Settings_Helper {
316
  'exclude_from_search' => $exclude_from_search,
317
  'show_publish_button' => $show_publish_button,
318
  'hide_maps_until_clicked' => $hide_maps_until_clicked,
 
319
  'turn_off_subscription_buttons' => $turn_off_subscription_buttons,
320
  'show_create_event_button' => $show_create_event_button,
321
  'inject_categories' => $inject_categories,
322
- 'input_us_format' => $input_us_format,
323
  'input_24h_time' => $input_24h_time,
324
  'show_timezone' => ! get_option( 'timezone_string' ),
325
  'timezone_control' => $timezone_control
@@ -357,7 +387,10 @@ class Ai1ec_Settings_Helper {
357
  **/
358
  function the_seed_studio_meta_box( $object, $box ) {
359
  global $ai1ec_view_helper;
360
- $ai1ec_view_helper->display( 'box_the_seed_studio.php' );
 
 
 
361
  }
362
 
363
  /**
75
  if( $results ) {
76
  $pages = $results;
77
  }
78
+ $selected_title = '';
79
  ?>
80
  <select class="inputwidth" name="<?php echo $field_name; ?>"
81
  id="<?php echo $field_name; ?>"
170
  <?php foreach( $timezone_identifiers as $value ) : ?>
171
  <?php if( preg_match( '/^(Africa|America|Antartica|Arctic|Asia|Atlantic|Australia|Europe|Indian|Pacific)\//', $value ) ) : ?>
172
  <?php $ex = explode( "/", $value ); //obtain continent,city ?>
173
+ <?php if( isset( $continent ) && $continent != $ex[0] ) : ?>
174
  <?php if( ! empty( $continent ) ) : ?>
175
  </optgroup>
176
  <?php endif ?>
186
  <?php
187
  return ob_get_clean();
188
  }
189
+
190
+ /**
191
+ * get_date_format_dropdown function
192
+ *
193
+ * @return string
194
+ **/
195
+ function get_date_format_dropdown( $view = null ) {
196
+ ob_start();
197
+ ?>
198
+ <select name="input_date_format">
199
+ <option value="def" <?php echo $view == 'def' ? 'selected' : '' ?>>
200
+ <?php _e( 'Default (d/m/y)', AI1EC_PLUGIN_NAME ) ?>
201
+ </option>
202
+ <option value="us" <?php echo $view == 'us' ? 'selected' : '' ?>>
203
+ <?php _e( 'US (m/d/y)', AI1EC_PLUGIN_NAME ) ?>
204
+ </option>
205
+ <option value="iso" <?php echo $view == 'iso' ? 'selected' : '' ?>>
206
+ <?php _e( 'ISO 8601 (y-m-d)', AI1EC_PLUGIN_NAME ) ?>
207
+ </option>
208
+ <option value="dot" <?php echo $view == 'dot' ? 'selected' : '' ?>>
209
+ <?php _e( 'Dotted (m.d.y)', AI1EC_PLUGIN_NAME ) ?>
210
+ </option>
211
+
212
+ </select>
213
+ <?php
214
+ return ob_get_clean();
215
+ }
216
+
217
  /**
218
  * get_cron_freq_dropdown function
219
  *
288
  <?php
289
  foreach( get_terms( 'events_categories', array( 'hide_empty' => false ) ) as $term ) :
290
  ?>
291
+ <option value="<?php echo $term->term_id; ?>" <?php echo ( $selected === $term->term_id ) ? 'selected' : '' ?>>
292
  <?php echo $term->name; ?>
293
  </option>
294
  <?php
327
  $exclude_from_search = $ai1ec_settings->exclude_from_search ? 'checked=checked' : '';
328
  $show_publish_button = $ai1ec_settings->show_publish_button ? 'checked=checked' : '';
329
  $hide_maps_until_clicked = $ai1ec_settings->hide_maps_until_clicked ? 'checked=checked' : '';
330
+ $agenda_events_expanded = $ai1ec_settings->agenda_events_expanded ? 'checked=checked' : '';
331
  $turn_off_subscription_buttons = $ai1ec_settings->turn_off_subscription_buttons ? 'checked=checked' : '';
332
  $show_create_event_button = $ai1ec_settings->show_create_event_button ? 'checked=checked' : '';
333
  $inject_categories = $ai1ec_settings->inject_categories ? 'checked=checked' : '';
334
+ $input_date_format = $ai1ec_settings_helper->get_date_format_dropdown( $ai1ec_settings->input_date_format );
335
  $input_24h_time = $ai1ec_settings->input_24h_time ? 'checked=checked' : '';
336
  $default_calendar_view = $ai1ec_settings_helper->get_view_dropdown( $ai1ec_settings->default_calendar_view );
337
  $timezone_control = $ai1ec_settings_helper->get_timezone_dropdown( $ai1ec_settings->timezone );
345
  'exclude_from_search' => $exclude_from_search,
346
  'show_publish_button' => $show_publish_button,
347
  'hide_maps_until_clicked' => $hide_maps_until_clicked,
348
+ 'agenda_events_expanded' => $agenda_events_expanded,
349
  'turn_off_subscription_buttons' => $turn_off_subscription_buttons,
350
  'show_create_event_button' => $show_create_event_button,
351
  'inject_categories' => $inject_categories,
352
+ 'input_date_format' => $input_date_format,
353
  'input_24h_time' => $input_24h_time,
354
  'show_timezone' => ! get_option( 'timezone_string' ),
355
  'timezone_control' => $timezone_control
387
  **/
388
  function the_seed_studio_meta_box( $object, $box ) {
389
  global $ai1ec_view_helper;
390
+ include_once( ABSPATH . WPINC . '/feed.php' );
391
+ // Initialize new feed
392
+ $feed = fetch_feed( AI1EC_RSS_FEED );
393
+ $ai1ec_view_helper->display( 'box_the_seed_studio.php', array( 'news' => $feed->get_items() ) );
394
  }
395
 
396
  /**
app/helper/class-ai1ec-view-helper.php CHANGED
@@ -91,7 +91,7 @@ class Ai1ec_View_Helper {
91
 
92
  $file = AI1EC_CSS_PATH . "/" . $file;
93
 
94
- if( $displayed[$file] === $args ) // Skip if already displayed
95
  return;
96
 
97
  if( ! file_exists( $file ) ) {
91
 
92
  $file = AI1EC_CSS_PATH . "/" . $file;
93
 
94
+ if( isset( $displayed[$file] ) && $displayed[$file] === $args ) // Skip if already displayed
95
  return;
96
 
97
  if( ! file_exists( $file ) ) {
app/model/class-ai1ec-event.php CHANGED
@@ -265,7 +265,7 @@ class Ai1ec_Event {
265
  *
266
  * @return void
267
  **/
268
- function __construct( $data = null ) {
269
  global $wpdb;
270
 
271
  if( $data == null )
@@ -283,23 +283,35 @@ class Ai1ec_Event {
283
 
284
  if( ! $post || $post->post_status == 'auto-draft' )
285
  throw new Ai1ec_Event_Not_Found( "Post with ID '$data' could not be retrieved from the database." );
286
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  // =============================
288
  // = Fetch event from database =
289
  // =============================
290
  $query = $wpdb->prepare(
291
- "SELECT e.post_id, UNIX_TIMESTAMP( e.start ) as start, UNIX_TIMESTAMP( e.end ) as end, e.allday, e.recurrence_rules, e.exception_rules,
292
- e.recurrence_dates, e.exception_dates, e.venue, e.country, e.address, e.city, e.province, e.postal_code,
293
- e.show_map, e.contact_name, e.contact_phone, e.contact_email, e.cost, e.ical_feed_url, e.ical_source_url,
294
- e.ical_organizer, e.ical_contact, e.ical_uid, " .
295
- "GROUP_CONCAT( ttc.term_id ) AS categories, " .
296
- "GROUP_CONCAT( ttt.term_id ) AS tags " .
297
  "FROM {$wpdb->prefix}ai1ec_events e " .
298
  "LEFT JOIN $wpdb->term_relationships tr ON post_id = tr.object_id " .
299
  "LEFT JOIN $wpdb->term_taxonomy ttc ON tr.term_taxonomy_id = ttc.term_taxonomy_id AND ttc.taxonomy = 'events_categories' " .
300
  "LEFT JOIN $wpdb->term_taxonomy ttt ON tr.term_taxonomy_id = ttt.term_taxonomy_id AND ttt.taxonomy = 'events_tags' " .
301
- "WHERE post_id = %d " .
302
- "GROUP BY post_id",
 
303
  $data );
304
  $event = $wpdb->get_row( $query );
305
 
@@ -315,8 +327,10 @@ class Ai1ec_Event {
315
  // = Assign values to $this =
316
  // ==========================
317
  foreach( $this as $property => $value ) {
318
- if( $property != 'post' )
319
- $this->{$property} = $event->{$property};
 
 
320
  }
321
  }
322
  // ===================
@@ -541,7 +555,8 @@ class Ai1ec_Event {
541
  case 'color_style':
542
  if( $this->color_style === null ) {
543
  $categories = wp_get_post_terms( $this->post_id, 'events_categories' );
544
- $this->color_style = $ai1ec_events_helper->get_event_category_color_style( $categories[0]->term_id, $this->allday );
 
545
  }
546
  return $this->color_style;
547
 
@@ -572,41 +587,10 @@ class Ai1ec_Event {
572
  // = Recurrence info as HTML =
573
  // ===========================
574
  case 'recurrence_html':
575
- if( ! $this->recurrence_rules )
576
  return null;
577
- $rules = $ai1ec_events_helper->parse_recurrence_rules( $this );
578
- $patterns = $ai1ec_events_helper->get_repeat_patterns();
579
-
580
- $recurrence_html = '<strong>' . esc_html( $patterns[$rules['repeat']] ) . '</strong>';
581
- unset( $rules['repeat'] );
582
-
583
- if( $rules['count'] ) {
584
- $rules['count'] = sprintf( _n(
585
- 'ending after <strong>%d</strong> time',
586
- 'ending after <strong>%d</strong> times',
587
- $rules['count'], AI1EC_PLUGIN_NAME ),
588
- $rules['count'] );
589
- } else {
590
- unset( $rules['count'] );
591
- }
592
-
593
- if( $rules['until'] ) {
594
- $rules['until'] = sprintf(
595
- __( 'until <strong>%s</strong>', AI1EC_PLUGIN_NAME ),
596
- esc_html( $ai1ec_events_helper->get_long_date( $rules['until'], false ) ) );
597
- } else {
598
- unset( $rules['until'] );
599
- }
600
-
601
- // The "end" specifier shouldn't be output
602
- unset( $rules['end'] );
603
-
604
- $end = join( __( ' or ', AI1EC_PLUGIN_NAME ), $rules );
605
-
606
- if( $end )
607
- $recurrence_html .= ', ' . $end;
608
 
609
- return $recurrence_html;
610
  }
611
  }
612
 
265
  *
266
  * @return void
267
  **/
268
+ function __construct( $data = null, $instance = false ) {
269
  global $wpdb;
270
 
271
  if( $data == null )
283
 
284
  if( ! $post || $post->post_status == 'auto-draft' )
285
  throw new Ai1ec_Event_Not_Found( "Post with ID '$data' could not be retrieved from the database." );
286
+
287
+ $left_join = "";
288
+ $select_sql = "e.post_id, e.recurrence_rules, e.exception_rules, e.allday, " .
289
+ "e.recurrence_dates, e.exception_dates, e.venue, e.country, e.address, e.city, e.province, e.postal_code, " .
290
+ "e.show_map, e.contact_name, e.contact_phone, e.contact_email, e.cost, e.ical_feed_url, e.ical_source_url, " .
291
+ "e.ical_organizer, e.ical_contact, e.ical_uid, " .
292
+ "GROUP_CONCAT( ttc.term_id ) AS categories, " .
293
+ "GROUP_CONCAT( ttt.term_id ) AS tags ";
294
+
295
+ if( $instance ) {
296
+ $select_sql .= ", UNIX_TIMESTAMP( aei.start ) as start, UNIX_TIMESTAMP( aei.end ) as end ";
297
+
298
+ $instance = (int) $instance;
299
+ $left_join = "LEFT JOIN {$wpdb->prefix}ai1ec_event_instances aei ON aei.id = $instance ";
300
+ } else {
301
+ $select_sql .= ", UNIX_TIMESTAMP( e.start ) as start, UNIX_TIMESTAMP( e.end ) as end, e.allday ";
302
+ }
303
  // =============================
304
  // = Fetch event from database =
305
  // =============================
306
  $query = $wpdb->prepare(
307
+ "SELECT {$select_sql}" .
 
 
 
 
 
308
  "FROM {$wpdb->prefix}ai1ec_events e " .
309
  "LEFT JOIN $wpdb->term_relationships tr ON post_id = tr.object_id " .
310
  "LEFT JOIN $wpdb->term_taxonomy ttc ON tr.term_taxonomy_id = ttc.term_taxonomy_id AND ttc.taxonomy = 'events_categories' " .
311
  "LEFT JOIN $wpdb->term_taxonomy ttt ON tr.term_taxonomy_id = ttt.term_taxonomy_id AND ttt.taxonomy = 'events_tags' " .
312
+ "{$left_join}" .
313
+ "WHERE e.post_id = %d " .
314
+ "GROUP BY e.post_id",
315
  $data );
316
  $event = $wpdb->get_row( $query );
317
 
327
  // = Assign values to $this =
328
  // ==========================
329
  foreach( $this as $property => $value ) {
330
+ if( $property != 'post' ) {
331
+ if( isset( $event->{$property} ) )
332
+ $this->{$property} = $event->{$property};
333
+ }
334
  }
335
  }
336
  // ===================
555
  case 'color_style':
556
  if( $this->color_style === null ) {
557
  $categories = wp_get_post_terms( $this->post_id, 'events_categories' );
558
+ if( $categories && ! empty( $categories ) )
559
+ $this->color_style = $ai1ec_events_helper->get_event_category_color_style( $categories[0]->term_id, $this->allday );
560
  }
561
  return $this->color_style;
562
 
587
  // = Recurrence info as HTML =
588
  // ===========================
589
  case 'recurrence_html':
590
+ if( ! $this->recurrence_rules || empty( $this->recurrence_rules ) )
591
  return null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
592
 
593
+ return '<strong>' . esc_html( $ai1ec_events_helper->rrule_to_text( $this->recurrence_rules ) ) . '</strong>';
594
  }
595
  }
596
 
app/model/class-ai1ec-settings.php CHANGED
@@ -129,6 +129,16 @@ class Ai1ec_Settings {
129
  * @var bool
130
  **/
131
  var $hide_maps_until_clicked;
 
 
 
 
 
 
 
 
 
 
132
 
133
  /**
134
  * show_create_event_button class variable
@@ -161,13 +171,14 @@ class Ai1ec_Settings {
161
  var $inject_categories;
162
 
163
  /**
164
- * input_us_format class variable
165
  *
166
- * Input dates in US format.
 
167
  *
168
- * @var bool
169
  **/
170
- var $input_us_format;
171
 
172
  /**
173
  * input_24h_time class variable
@@ -252,6 +263,7 @@ class Ai1ec_Settings {
252
  'calendar_css_selector' => '',
253
  'week_start_day' => get_option( 'start_of_week' ),
254
  'agenda_events_per_page' => get_option( 'posts_per_page' ),
 
255
  'include_events_in_rss' => false,
256
  'allow_publish_to_facebook' => false,
257
  'facebook_credentials' => null,
@@ -262,7 +274,7 @@ class Ai1ec_Settings {
262
  'show_create_event_button' => false,
263
  'turn_off_subscription_buttons' => false,
264
  'inject_categories' => false,
265
- 'input_us_format' => false,
266
  'input_24h_time' => false,
267
  'cron_freq' => 'daily',
268
  'timezone' => get_option( 'timezone_string' )
@@ -286,27 +298,26 @@ class Ai1ec_Settings {
286
  **/
287
  function update( $params ) {
288
  $this->update_page( 'calendar_page_id', $params );
289
- $this->default_calendar_view = $params['default_calendar_view'];
290
- $this->calendar_css_selector = $params['calendar_css_selector'];
291
- $this->week_start_day = $params['week_start_day'];
292
- $this->agenda_events_per_page = $params['agenda_events_per_page'];
293
- $this->agenda_events_per_page = intval( $this->agenda_events_per_page );
294
- $this->cron_freq = $params['cron_freq'];
295
- $this->show_publish_button = $params['show_publish_button'];
296
- $this->hide_maps_until_clicked = $params['hide_maps_until_clicked'];
297
- $this->exclude_from_search = $params['exclude_from_search'];
298
- $this->show_create_event_button = $params['show_create_event_button'];
299
- $this->turn_off_subscription_buttons = $params['turn_off_subscription_buttons'];
300
- $this->inject_categories = $params['inject_categories'];
301
- $this->input_us_format = $params['input_us_format'];
302
- $this->input_24h_time = $params['input_24h_time'];
303
- $this->include_events_in_rss = $params['include_events_in_rss'];
304
- $this->allow_events_posting_facebook = $params['allow_events_posting_facebook'];
305
- $this->facebook_credentials = $params['facebook_credentials'];
306
- $this->user_role_can_create_event = $params['user_role_can_create_event'];
307
-
308
- if( $this->agenda_events_per_page <= 0 ) $this->agenda_events_per_page = 1;
309
- if( isset( $params['timezone'] ) ) $this->timezone = $params['timezone'];
310
  }
311
 
312
  /**
129
  * @var bool
130
  **/
131
  var $hide_maps_until_clicked;
132
+
133
+ /**
134
+ * agenda_events_expanded class variable
135
+ *
136
+ * When this setting is on, events are expanded
137
+ * in agenda view
138
+ *
139
+ * @var bool
140
+ **/
141
+ var $agenda_events_expanded;
142
 
143
  /**
144
  * show_create_event_button class variable
171
  var $inject_categories;
172
 
173
  /**
174
+ * input_date_format class variable
175
  *
176
+ * Date format used for date input. For supported formats
177
+ * @see jquery.calendrical.js
178
  *
179
+ * @var string
180
  **/
181
+ var $input_date_format;
182
 
183
  /**
184
  * input_24h_time class variable
263
  'calendar_css_selector' => '',
264
  'week_start_day' => get_option( 'start_of_week' ),
265
  'agenda_events_per_page' => get_option( 'posts_per_page' ),
266
+ 'agenda_events_expanded' => false,
267
  'include_events_in_rss' => false,
268
  'allow_publish_to_facebook' => false,
269
  'facebook_credentials' => null,
274
  'show_create_event_button' => false,
275
  'turn_off_subscription_buttons' => false,
276
  'inject_categories' => false,
277
+ 'input_date_format' => 'def',
278
  'input_24h_time' => false,
279
  'cron_freq' => 'daily',
280
  'timezone' => get_option( 'timezone_string' )
298
  **/
299
  function update( $params ) {
300
  $this->update_page( 'calendar_page_id', $params );
301
+ if( isset( $params['default_calendar_view'] ) ) $this->default_calendar_view = $params['default_calendar_view'];
302
+ if( isset( $params['calendar_css_selector'] ) ) $this->calendar_css_selector = $params['calendar_css_selector'];
303
+ if( isset( $params['week_start_day'] ) ) $this->week_start_day = $params['week_start_day'];
304
+ if( isset( $params['agenda_events_per_page'] ) ) $this->agenda_events_per_page = intval( $params['agenda_events_per_page'] );
305
+ if( isset( $params['cron_freq'] ) ) $this->cron_freq = $params['cron_freq'];
306
+ if( isset( $params['show_publish_button'] ) ) $this->show_publish_button = $params['show_publish_button'];
307
+ if( isset( $params['hide_maps_until_clicked'] ) ) $this->hide_maps_until_clicked = $params['hide_maps_until_clicked'];
308
+ if( isset( $params['agenda_events_expanded'] ) ) $this->agenda_events_expanded = $params['agenda_events_expanded'];
309
+ if( isset( $params['exclude_from_search'] ) ) $this->exclude_from_search = $params['exclude_from_search'];
310
+ if( isset( $params['show_create_event_button'] ) ) $this->show_create_event_button = $params['show_create_event_button'];
311
+ if( isset( $params['turn_off_subscription_buttons'] ) ) $this->turn_off_subscription_buttons = $params['turn_off_subscription_buttons'];
312
+ if( isset( $params['inject_categories'] ) ) $this->inject_categories = $params['inject_categories'];
313
+ if( isset( $params['input_date_format'] ) ) $this->input_date_format = $params['input_date_format'];
314
+ if( isset( $params['input_24h_time'] ) ) $this->input_24h_time = $params['input_24h_time'];
315
+ if( isset( $params['include_events_in_rss'] ) ) $this->include_events_in_rss = $params['include_events_in_rss'];
316
+ if( isset( $params['allow_events_posting_facebook'] ) ) $this->allow_events_posting_facebook = $params['allow_events_posting_facebook'];
317
+ if( isset( $params['facebook_credentials'] ) ) $this->facebook_credentials = $params['facebook_credentials'];
318
+ if( isset( $params['user_role_can_create_event'] ) ) $this->user_role_can_create_event = $params['user_role_can_create_event'];
319
+ if( isset( $params['timezone'] ) ) $this->timezone = $params['timezone'];
320
+ if( $this->agenda_events_per_page <= 0 ) $this->agenda_events_per_page = 1;
 
321
  }
322
 
323
  /**
app/view/agenda-widget-form.php CHANGED
@@ -6,6 +6,48 @@
6
  <label for="<?php echo $events_per_page['id'] ?>"><?php _e( 'Number of events to show:', AI1EC_PLUGIN_NAME ) ?></label>
7
  <input id="<?php echo $events_per_page['id'] ?>" name="<?php echo $events_per_page['name'] ?>" type="text" size="3" value="<?php echo $events_per_page['value'] ?>" />
8
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  <p>
10
  <input id="<?php echo $show_calendar_button['id'] ?>" name="<?php echo $show_calendar_button['name'] ?>" type="checkbox" value="1" <?php if( $show_calendar_button['value'] ) echo 'checked="checked"' ?> />
11
  <label for="<?php echo $show_calendar_button['id'] ?>"><?php _e( 'Show <strong>View Calendar</strong> button', AI1EC_PLUGIN_NAME ) ?></label>
@@ -15,4 +57,43 @@
15
  <br />
16
  <input id="<?php echo $hide_on_calendar_page['id'] ?>" name="<?php echo $hide_on_calendar_page['name'] ?>" type="checkbox" value="1" <?php if( $hide_on_calendar_page['value'] ) echo 'checked="checked"' ?> />
17
  <label for="<?php echo $hide_on_calendar_page['id'] ?>"><?php _e( 'Hide this widget on calendar page', AI1EC_PLUGIN_NAME ) ?></label>
18
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  <label for="<?php echo $events_per_page['id'] ?>"><?php _e( 'Number of events to show:', AI1EC_PLUGIN_NAME ) ?></label>
7
  <input id="<?php echo $events_per_page['id'] ?>" name="<?php echo $events_per_page['name'] ?>" type="text" size="3" value="<?php echo $events_per_page['value'] ?>" />
8
  </p>
9
+ <p class="ai1ec-limit-by-container">
10
+ Limit to:
11
+ <br />
12
+ <!-- Limit by Category -->
13
+ <input id="<?php echo $limit_by_cat['id'] ?>" class="ai1ec-limit-by-cat" name="<?php echo $limit_by_cat['name'] ?>" type="checkbox" value="1" <?php if( $limit_by_cat['value'] ) echo 'checked="checked"' ?> />
14
+ <label for="<?php echo $limit_by_cat['id'] ?>"><?php _e( 'Events with these <strong>Categories</strong>', AI1EC_PLUGIN_NAME ) ?></label>
15
+ </p>
16
+ <div class="ai1ec-limit-by-options-container" <?php if( ! $limit_by_cat['value'] ) { ?> style="display: none;" <?php } ?>>
17
+ <!-- Limit by Category Select box -->
18
+ <select id="<?php echo $event_cat_ids['id'] ?>" class="ai1ec-widget-cat-ids" name="<?php echo $event_cat_ids['name'] ?>[]" size="5" multiple="multiple">
19
+ <?php foreach( $event_cat_ids['options'] as $event_cat ): ?>
20
+ <option value="<?php echo $event_cat->term_id; ?>"<?php if( in_array( $event_cat->term_id, $event_cat_ids['value'] ) ) { ?> selected="selected"<?php } ?>><?php echo $event_cat->name; ?></option>
21
+ <?php endforeach ?>
22
+ </select>
23
+ </div>
24
+ <p class="ai1ec-limit-by-container">
25
+ <!-- Limit by Tag -->
26
+ <input id="<?php echo $limit_by_tag['id'] ?>" class="ai1ec-limit-by-tag" name="<?php echo $limit_by_tag['name'] ?>" type="checkbox" value="1" <?php if( $limit_by_tag['value'] ) echo 'checked="checked"' ?> />
27
+ <label for="<?php echo $limit_by_tag['id'] ?>"><?php _e( '<strong>Or</strong> events with these <strong>Tags</strong>', AI1EC_PLUGIN_NAME ) ?></label>
28
+ </p>
29
+ <div class="ai1ec-limit-by-options-container" <?php if( ! $limit_by_tag['value'] ) { ?> style="display: none;" <?php } ?>>
30
+ <!-- Limit by Tag Select box -->
31
+ <select id="<?php echo $event_tag_ids['id'] ?>" class="ai1ec-widget-tag-ids" name="<?php echo $event_tag_ids['name'] ?>[]" size="5" multiple="multiple">
32
+ <?php foreach( $event_tag_ids['options'] as $event_tag ): ?>
33
+ <option value="<?php echo $event_tag->term_id; ?>"<?php if( in_array( $event_tag->term_id, $event_tag_ids['value'] ) ) { ?> selected="selected"<?php } ?>><?php echo $event_tag->name; ?></option>
34
+ <?php endforeach ?>
35
+ </select>
36
+ </div>
37
+ <p class="ai1ec-limit-by-container">
38
+ <!-- Limit by Event -->
39
+ <input id="<?php echo $limit_by_post['id'] ?>" class="ai1ec-limit-by-event" name="<?php echo $limit_by_post['name'] ?>" type="checkbox" value="1" <?php if( $limit_by_post['value'] ) echo 'checked="checked"' ?> />
40
+ <label for="<?php echo $limit_by_post['id'] ?>"><?php _e( '<strong>Or</strong> any of these <strong>Events</strong>', AI1EC_PLUGIN_NAME ) ?></label>
41
+ </p>
42
+ <div class="ai1ec-limit-by-options-container" <?php if( ! $limit_by_post['value'] ) { ?> style="display: none;" <?php } ?>>
43
+ <!-- Limit by Event Select box -->
44
+ <select id="<?php echo $event_post_ids['id'] ?>" class="ai1ec-widget-event-ids" name="<?php echo $event_post_ids['name'] ?>[]" size="5" multiple="multiple">
45
+ <?php foreach( $event_post_ids['options'] as $event_post ): ?>
46
+ <option value="<?php echo $event_post->ID; ?>"<?php if( in_array( $event_post->ID, $event_post_ids['value'] ) ) { ?> selected="selected"<?php } ?>><?php echo $event_post->post_title; ?></option>
47
+ <?php endforeach ?>
48
+ </select>
49
+ </div>
50
+ <br />
51
  <p>
52
  <input id="<?php echo $show_calendar_button['id'] ?>" name="<?php echo $show_calendar_button['name'] ?>" type="checkbox" value="1" <?php if( $show_calendar_button['value'] ) echo 'checked="checked"' ?> />
53
  <label for="<?php echo $show_calendar_button['id'] ?>"><?php _e( 'Show <strong>View Calendar</strong> button', AI1EC_PLUGIN_NAME ) ?></label>
57
  <br />
58
  <input id="<?php echo $hide_on_calendar_page['id'] ?>" name="<?php echo $hide_on_calendar_page['name'] ?>" type="checkbox" value="1" <?php if( $hide_on_calendar_page['value'] ) echo 'checked="checked"' ?> />
59
  <label for="<?php echo $hide_on_calendar_page['id'] ?>"><?php _e( 'Hide this widget on calendar page', AI1EC_PLUGIN_NAME ) ?></label>
60
+ </p>
61
+ <script type="text/javascript">
62
+ /* <![CDATA[ */
63
+ // To be run every time the widget form is rendered, sets up the Multi-select boxes with bsmSelect
64
+ jQuery( function( $ ) {
65
+ $( 'select.ai1ec-widget-cat-ids' ).bsmSelect( {
66
+ title: '<?php _e( "Categories", AI1EC_PLUGIN_NAME ) ?>:',
67
+ highlight: 'highlight',
68
+ removeLabel: '<img src="<?php echo AI1EC_IMAGE_URL ?>/icon-close.png" alt="x" />',
69
+ selectClass: 'ai1ec-widget-option-ids',
70
+ listClass: 'ai1ec-category-selected-items',
71
+ listItemClass: 'ai1ec-category-selected-item',
72
+ listItemLabelClass: 'ai1ec-category-selected-item-label',
73
+ removeClass: 'ai1ec-category-selected-item-remove',
74
+ } );
75
+
76
+ $( 'select.ai1ec-widget-tag-ids' ).bsmSelect( {
77
+ title: '<?php _e( "Tags", AI1EC_PLUGIN_NAME ) ?>:',
78
+ highlight: 'highlight',
79
+ removeLabel: '<img src="<?php echo AI1EC_IMAGE_URL ?>/icon-close.png" alt="x" />',
80
+ selectClass: 'ai1ec-widget-option-ids',
81
+ listClass: 'ai1ec-category-selected-items',
82
+ listItemClass: 'ai1ec-category-selected-item',
83
+ listItemLabelClass: 'ai1ec-category-selected-item-label',
84
+ removeClass: 'ai1ec-category-selected-item-remove',
85
+ } );
86
+
87
+ $( 'select.ai1ec-widget-event-ids' ).bsmSelect( {
88
+ title: '<?php _e( "Events", AI1EC_PLUGIN_NAME ) ?>:',
89
+ highlight: 'highlight',
90
+ removeLabel: '<img src="<?php echo AI1EC_IMAGE_URL ?>/icon-close.png" alt="x" />',
91
+ selectClass: 'ai1ec-widget-option-ids',
92
+ listClass: 'ai1ec-category-selected-items',
93
+ listItemClass: 'ai1ec-category-selected-item',
94
+ listItemLabelClass: 'ai1ec-category-selected-item-label',
95
+ removeClass: 'ai1ec-category-selected-item-remove',
96
+ } );
97
+ } );
98
+ /* ]]> */
99
+ </script>
app/view/agenda-widget.php CHANGED
@@ -13,11 +13,11 @@
13
  <?php else: ?>
14
  <ol>
15
  <?php foreach( $dates as $timestamp => $date_info ): ?>
16
- <li class="ai1ec-date <?php if( $date_info['today'] ) echo 'ai1ec-today' ?>">
17
  <h3 class="ai1ec-date-title">
18
- <div class="ai1ec-month"><?php echo gmstrftime( '%b', $timestamp ) ?></div>
19
- <div class="ai1ec-day"><?php echo gmstrftime( '%e', $timestamp ) ?></div>
20
- <div class="ai1ec-weekday"><?php echo gmstrftime( '%a', $timestamp ) ?></div>
21
  </h3>
22
  <ol class="ai1ec-date-events">
23
  <?php foreach( $date_info['events'] as $category ): ?>
@@ -30,7 +30,7 @@
30
  <?php // Insert post ID for use by JavaScript filtering later ?>
31
  <input type="hidden" class="ai1ec-post-id" value="<?php echo $event->post_id ?>" />
32
 
33
- <a href="<?php echo esc_attr( get_permalink( $event->post_id ) ) ?>">
34
  <?php if( $event->category_colors ): ?>
35
  <span class="ai1ec-category-colors"><?php echo $event->category_colors ?></span>
36
  <?php endif ?>
@@ -63,12 +63,12 @@
63
  <?php if( $show_subscribe_buttons ): ?>
64
  <div class="ai1ec-subscribe-buttons">
65
  <a class="ai1ec-button ai1ec-subscribe"
66
- href="<?php echo AI1EC_EXPORT_URL ?>"
67
  title="<?php _e( 'Subscribe to this calendar using your favourite calendar program (iCal, Outlook, etc.)', AI1EC_PLUGIN_NAME ) ?>" />
68
  <?php _e( '✔ Subscribe', AI1EC_PLUGIN_NAME ) ?>
69
  </a>
70
  <a class="ai1ec-button ai1ec-subscribe-google" target="_blank"
71
- href="http://www.google.com/calendar/render?cid=<?php echo urlencode( str_replace( 'webcal://', 'http://', AI1EC_EXPORT_URL ) ) ?>"
72
  title="<?php _e( 'Subscribe to this calendar in your Google Calendar', AI1EC_PLUGIN_NAME ) ?>" />
73
  <img src="<?php echo AI1EC_IMAGE_URL ?>/google-calendar.png" />
74
  <?php _e( 'Add to Google', AI1EC_PLUGIN_NAME ) ?>
13
  <?php else: ?>
14
  <ol>
15
  <?php foreach( $dates as $timestamp => $date_info ): ?>
16
+ <li class="ai1ec-date <?php if( isset( $date_info['today'] ) && $date_info['today'] ) echo 'ai1ec-today' ?>">
17
  <h3 class="ai1ec-date-title">
18
+ <div class="ai1ec-month"><?php echo date_i18n( 'M', $timestamp ) ?></div>
19
+ <div class="ai1ec-day"><?php echo date_i18n( 'j', $timestamp ) ?></div>
20
+ <div class="ai1ec-weekday"><?php echo date_i18n( 'D', $timestamp ) ?></div>
21
  </h3>
22
  <ol class="ai1ec-date-events">
23
  <?php foreach( $date_info['events'] as $category ): ?>
30
  <?php // Insert post ID for use by JavaScript filtering later ?>
31
  <input type="hidden" class="ai1ec-post-id" value="<?php echo $event->post_id ?>" />
32
 
33
+ <a href="<?php echo esc_attr( get_permalink( $event->post_id ) ) . $event->instance_id ?>">
34
  <?php if( $event->category_colors ): ?>
35
  <span class="ai1ec-category-colors"><?php echo $event->category_colors ?></span>
36
  <?php endif ?>
63
  <?php if( $show_subscribe_buttons ): ?>
64
  <div class="ai1ec-subscribe-buttons">
65
  <a class="ai1ec-button ai1ec-subscribe"
66
+ href="<?php echo $subscribe_url ?>"
67
  title="<?php _e( 'Subscribe to this calendar using your favourite calendar program (iCal, Outlook, etc.)', AI1EC_PLUGIN_NAME ) ?>" />
68
  <?php _e( '✔ Subscribe', AI1EC_PLUGIN_NAME ) ?>
69
  </a>
70
  <a class="ai1ec-button ai1ec-subscribe-google" target="_blank"
71
+ href="http://www.google.com/calendar/render?cid=<?php echo urlencode( str_replace( 'webcal://', 'http://', $subscribe_url ) ) ?>"
72
  title="<?php _e( 'Subscribe to this calendar in your Google Calendar', AI1EC_PLUGIN_NAME ) ?>" />
73
  <img src="<?php echo AI1EC_IMAGE_URL ?>/google-calendar.png" />
74
  <?php _e( 'Add to Google', AI1EC_PLUGIN_NAME ) ?>
app/view/agenda.php CHANGED
@@ -29,7 +29,7 @@
29
  </p>
30
  <?php else: ?>
31
  <?php foreach( $dates as $timestamp => $date_info ): ?>
32
- <li class="ai1ec-date <?php if( $date_info['today'] ) echo 'ai1ec-today' ?>">
33
  <h3 class="ai1ec-date-title">
34
  <div class="ai1ec-month"><?php echo date_i18n( 'M', $timestamp, true ) ?></div>
35
  <div class="ai1ec-day"><?php echo date_i18n( 'j', $timestamp, true ) ?></div>
@@ -42,13 +42,14 @@
42
  ai1ec-event-id-<?php echo $event->post_id ?>
43
  ai1ec-event-instance-id-<?php echo $event->instance_id ?>
44
  <?php if( $event->allday ) echo 'ai1ec-allday' ?>
45
- <?php if( $event->post_id == $active_event ) echo 'ai1ec-active-event' ?>">
 
46
 
47
  <?php // Insert post ID for use by JavaScript filtering later ?>
48
  <input type="hidden" class="ai1ec-post-id" value="<?php echo $event->post_id ?>" />
49
 
50
  <?php // Hidden summary, until clicked ?>
51
- <div class="ai1ec-event-summary">
52
  <div class="ai1ec-event-click">
53
  <div class="ai1ec-event-expand">−</div>
54
  <div class="ai1ec-event-title">
@@ -71,7 +72,7 @@
71
  <div class="ai1ec-event-description">
72
  <div class="ai1ec-event-overlay">
73
  <a class="ai1ec-read-more ai1ec-button"
74
- href="<?php echo esc_attr( get_permalink( $event->post_id ) ) ?>">
75
  <?php _e( 'Read more »', AI1EC_PLUGIN_NAME ) ?>
76
  </a>
77
  <?php if( $event->categories_html ): ?>
@@ -91,7 +92,7 @@
91
  </div>
92
  </div>
93
 
94
- <div class="ai1ec-event-click">
95
  <?php if( $event->category_colors ): ?>
96
  <div class="ai1ec-category-colors"><?php echo $event->category_colors ?></div>
97
  <?php endif ?>
29
  </p>
30
  <?php else: ?>
31
  <?php foreach( $dates as $timestamp => $date_info ): ?>
32
+ <li class="ai1ec-date <?php if( isset( $date_info['today'] ) && $date_info['today'] ) echo 'ai1ec-today' ?>">
33
  <h3 class="ai1ec-date-title">
34
  <div class="ai1ec-month"><?php echo date_i18n( 'M', $timestamp, true ) ?></div>
35
  <div class="ai1ec-day"><?php echo date_i18n( 'j', $timestamp, true ) ?></div>
42
  ai1ec-event-id-<?php echo $event->post_id ?>
43
  ai1ec-event-instance-id-<?php echo $event->instance_id ?>
44
  <?php if( $event->allday ) echo 'ai1ec-allday' ?>
45
+ <?php if( $event->post_id == $active_event ) echo 'ai1ec-active-event' ?>
46
+ <?php if( $expanded ) echo 'ai1ec-expanded' ?>">
47
 
48
  <?php // Insert post ID for use by JavaScript filtering later ?>
49
  <input type="hidden" class="ai1ec-post-id" value="<?php echo $event->post_id ?>" />
50
 
51
  <?php // Hidden summary, until clicked ?>
52
+ <div class="ai1ec-event-summary"<?php if( $expanded ) echo ' style="display: block;"' ?>>
53
  <div class="ai1ec-event-click">
54
  <div class="ai1ec-event-expand">−</div>
55
  <div class="ai1ec-event-title">
72
  <div class="ai1ec-event-description">
73
  <div class="ai1ec-event-overlay">
74
  <a class="ai1ec-read-more ai1ec-button"
75
+ href="<?php echo esc_attr( get_permalink( $event->post_id ) ) ?>?instance_id=<?php echo $event->instance_id ?>">
76
  <?php _e( 'Read more »', AI1EC_PLUGIN_NAME ) ?>
77
  </a>
78
  <?php if( $event->categories_html ): ?>
92
  </div>
93
  </div>
94
 
95
+ <div class="ai1ec-event-click"<?php echo $expanded ? ' style="display: none;"' : ''?>>
96
  <?php if( $event->category_colors ): ?>
97
  <div class="ai1ec-category-colors"><?php echo $event->category_colors ?></div>
98
  <?php endif ?>
app/view/box_general_settings.php CHANGED
@@ -26,6 +26,12 @@
26
  <input name="agenda_events_per_page" id="agenda_events_per_page" type="text" size="1" value="<?php echo esc_attr( $agenda_events_per_page ) ?>" />&nbsp;<?php _e( 'events', AI1EC_PLUGIN_NAME ) ?>
27
  <br class="clear" />
28
 
 
 
 
 
 
 
29
  <label for="exclude_from_search">
30
  <input class="checkbox" name="exclude_from_search" id="exclude_from_search" type="checkbox" value="1" <?php echo $exclude_from_search ?> />
31
  <?php _e( '<strong>Exclude</strong> events from search results', AI1EC_PLUGIN_NAME ) ?>
@@ -58,10 +64,8 @@
58
 
59
  <h2><?php _e( 'Adding/Editing Events', AI1EC_PLUGIN_NAME ) ?></h2>
60
 
61
- <label for="input_us_format">
62
- <input class="checkbox" name="input_us_format" id="input_us_format" type="checkbox" value="1" <?php echo $input_us_format ?> />
63
- <?php _e( 'Input dates in <strong>US format</strong>', AI1EC_PLUGIN_NAME ) ?>
64
- </label>
65
  <br class="clear" />
66
 
67
  <label for="input_24h_time">
26
  <input name="agenda_events_per_page" id="agenda_events_per_page" type="text" size="1" value="<?php echo esc_attr( $agenda_events_per_page ) ?>" />&nbsp;<?php _e( 'events', AI1EC_PLUGIN_NAME ) ?>
27
  <br class="clear" />
28
 
29
+ <label for="agenda_events_expanded">
30
+ <input class="checkbox" name="agenda_events_expanded" id="agenda_events_expanded" type="checkbox" value="1" <?php echo $agenda_events_expanded ?> />
31
+ <?php _e( 'Keep all events <strong>expanded</strong> in the agenda view', AI1EC_PLUGIN_NAME ) ?>
32
+ </label>
33
+ <br class="clear" />
34
+
35
  <label for="exclude_from_search">
36
  <input class="checkbox" name="exclude_from_search" id="exclude_from_search" type="checkbox" value="1" <?php echo $exclude_from_search ?> />
37
  <?php _e( '<strong>Exclude</strong> events from search results', AI1EC_PLUGIN_NAME ) ?>
64
 
65
  <h2><?php _e( 'Adding/Editing Events', AI1EC_PLUGIN_NAME ) ?></h2>
66
 
67
+ <label class="textinput" for="input_date_format"><?php _e( 'Input dates in this format:', AI1EC_PLUGIN_NAME ) ?></label>
68
+ <?php echo $input_date_format ?>
 
 
69
  <br class="clear" />
70
 
71
  <label for="input_24h_time">
app/view/box_the_seed_studio.php CHANGED
@@ -13,11 +13,11 @@
13
  <div class="clear"></div>
14
  </div>
15
  <div class="ai1ec-support-button">
16
- <a href="http://theseedstudio.com/get-supported/" target="_blank"><?php _e( 'Get Support<span> from one of our experienced pros</span>', AI1EC_PLUGIN_NAME ) ?></a>
17
  </div>
18
  <h2><?php _e( 'Support', AI1EC_PLUGIN_NAME ) ?></h2>
19
  <p>
20
- <a href="http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/all-in-one-event-calendar-documentation/" target="_blank"><?php _e( 'View plugin documentation', AI1EC_PLUGIN_NAME ) ?></a>
21
  </p>
22
  <p>
23
  <?php _e( 'You can also hire The Seed for support on a contract or per-hour basis for this plugin, for your website or for any of your Internet marketing needs (we can really help!).', AI1EC_PLUGIN_NAME ) ?>
@@ -32,17 +32,19 @@
32
  <?php _e( 'This plugin is offered free to the Wordpress Community under the GPL3 license. All we ask is that you:', AI1EC_PLUGIN_NAME ) ?>
33
  <ol>
34
  <li><?php _e( '<a href="http://wordpress.org/extend/plugins/all-in-one-event-calendar/" target="_blank">Give it a five-star rating on wordpress.org</a> (if you think it deserves it!)', AI1EC_PLUGIN_NAME ) ?></li>
35
- <li><a href="http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/" target="_blank"><?php _e( 'Link to the plugin page on our website', AI1EC_PLUGIN_NAME ) ?></a></li>
36
  <li><a href="http://www.facebook.com/theseednet" target="_blank"><?php _e( 'Become a Fan on Facebook', AI1EC_PLUGIN_NAME ) ?></a></li>
37
  <li><a href="https://twitter.com/intent/user?screen_name=the_seed_studio" target="_blank"><?php _e( 'Follow us on Twitter', AI1EC_PLUGIN_NAME ) ?></a></li>
38
  </ol>
39
  </p>
40
 
41
- <h2><?php _e( 'Donate', AI1EC_PLUGIN_NAME ) ?></h2>
42
-
43
- <p><?php _e( 'If you would like to help support development of this plugin, then by all means...', AI1EC_PLUGIN_NAME ) ?></p>
44
- <p class="ai1ec-donate">
45
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=9JJMUW48W2ED8" target="_blank" /><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="PayPal - The safer, easier way to pay online!" /></a>
46
- </p>
 
 
47
  </div>
48
  <br class="clear" />
13
  <div class="clear"></div>
14
  </div>
15
  <div class="ai1ec-support-button">
16
+ <a href="http://theseednetwork.com/get-supported/" target="_blank"><?php _e( 'Get Support<span> from one of our experienced pros</span>', AI1EC_PLUGIN_NAME ) ?></a>
17
  </div>
18
  <h2><?php _e( 'Support', AI1EC_PLUGIN_NAME ) ?></h2>
19
  <p>
20
+ <a href="http://theseednetwork.com/software/all-in-one-event-calendar-wordpress/all-in-one-event-calendar-documentation/" target="_blank"><?php _e( 'View plugin documentation', AI1EC_PLUGIN_NAME ) ?></a>
21
  </p>
22
  <p>
23
  <?php _e( 'You can also hire The Seed for support on a contract or per-hour basis for this plugin, for your website or for any of your Internet marketing needs (we can really help!).', AI1EC_PLUGIN_NAME ) ?>
32
  <?php _e( 'This plugin is offered free to the Wordpress Community under the GPL3 license. All we ask is that you:', AI1EC_PLUGIN_NAME ) ?>
33
  <ol>
34
  <li><?php _e( '<a href="http://wordpress.org/extend/plugins/all-in-one-event-calendar/" target="_blank">Give it a five-star rating on wordpress.org</a> (if you think it deserves it!)', AI1EC_PLUGIN_NAME ) ?></li>
35
+ <li><a href="http://theseednetwork.com/software/all-in-one-event-calendar-wordpress/" target="_blank"><?php _e( 'Link to the plugin page on our website', AI1EC_PLUGIN_NAME ) ?></a></li>
36
  <li><a href="http://www.facebook.com/theseednet" target="_blank"><?php _e( 'Become a Fan on Facebook', AI1EC_PLUGIN_NAME ) ?></a></li>
37
  <li><a href="https://twitter.com/intent/user?screen_name=the_seed_studio" target="_blank"><?php _e( 'Follow us on Twitter', AI1EC_PLUGIN_NAME ) ?></a></li>
38
  </ol>
39
  </p>
40
 
41
+ <h2><?php _e( 'Latest from the Seed Network', AI1EC_PLUGIN_NAME ) ?></h2>
42
+ <p>
43
+ <ul id="ai1ec-rss-news">
44
+ <?php foreach( $news as $n ) : ?>
45
+ <li><a href="<?php echo $n->get_link() ?>" target="_blank"><?php echo $n->get_title() ?></a></li>
46
+ <?php endforeach ?>
47
+ </ul>
48
+ </p>
49
  </div>
50
  <br class="clear" />
app/view/box_time_and_date.php CHANGED
@@ -9,7 +9,7 @@
9
  </label>
10
  </td>
11
  <td>
12
- <input type="checkbox" name="ai1ec_all_day_event" id="ai1ec_all_day_event" <?php echo $all_day_event; ?> />
13
  </td>
14
  </tr>
15
  <tr>
@@ -40,44 +40,73 @@
40
  </tr>
41
  <tr>
42
  <td>
43
- <label for="ai1ec_repeat">
44
- <?php _e( 'Repeat', AI1EC_PLUGIN_NAME ) ?>:
 
 
45
  </label>
46
  </td>
47
  <td>
48
- <?php echo $repeat; ?>
49
- </td>
50
- </tr>
51
- <tr id="ai1ec_end_holder" <?php if( ! $repeating_event ) echo 'class="ai1ec_hidden"' ?>>
52
- <td>
53
- <label for="ai1ec_end">
54
- <?php _e( 'End', AI1EC_PLUGIN_NAME ) ?>:
55
- </label>
56
- </td>
57
- <td>
58
- <?php echo $end ?>
59
- </td>
60
- </tr>
61
- <tr id="ai1ec_count_holder" <?php if( $ending != 1 ) echo 'class="ai1ec_hidden"' ?>>
62
- <td>
63
- <label for="ai1ec_count">
64
- <?php _e( 'Ending after', AI1EC_PLUGIN_NAME ) ?>:
65
- </label>
66
- </td>
67
- <td>
68
- <?php echo $count; ?>
69
- </td>
70
- </tr>
71
- <tr id="ai1ec_until_holder" <?php if( $ending != 2 ) echo 'class="ai1ec_hidden"' ?>>
72
- <td>
73
- <label for="ai1ec_until-date-input">
74
- <?php _e( 'On date', AI1EC_PLUGIN_NAME ) ?>:
75
- </label>
76
- </td>
77
- <td>
78
- <input type="text" class="ai1ec-date-input" id="ai1ec_until-date-input" />
79
- <input type="hidden" name="ai1ec_until_time" id="ai1ec_until-time" value="<?php echo !is_null( $until ) && $until > 0 ? $until : '' ?>" />
80
  </td>
81
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  </tbody>
83
  </table>
9
  </label>
10
  </td>
11
  <td>
12
+ <input type="checkbox" name="ai1ec_all_day_event" id="ai1ec_all_day_event" value="1" <?php echo $all_day_event; ?> />
13
  </td>
14
  </tr>
15
  <tr>
40
  </tr>
41
  <tr>
42
  <td>
43
+ <input type="checkbox" name="ai1ec_repeat" id="ai1ec_repeat" value="1" <?php echo $repeating_event ? 'checked="checked"' : '' ?>/>
44
+ <input type="hidden" name="ai1ec_rrule" id="ai1ec_rrule" value="<?php echo $rrule ?>" />
45
+ <label for="ai1ec_repeat" id="ai1ec_repeat_label">
46
+ <?php _e( 'Repeat', AI1EC_PLUGIN_NAME ); echo $repeating_event ? ':' : '...' ?>
47
  </label>
48
  </td>
49
  <td>
50
+ <div id="ai1ec_repeat_text">
51
+ <a href="#ai1ec_repeat_box"><?php echo $rrule_text ?></a>
52
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  </td>
54
  </tr>
55
+
56
+ <div id="ai1ec_repeat_box">
57
+ <ul class="ai1ec_repeat_tabs">
58
+ <li><a href="#ai1ec_daily_content" id="ai1ec_daily_tab" class="ai1ec_tab ai1ec_active"><?php _e( 'Daily', AI1EC_PLUGIN_NAME ) ;?></a></li>
59
+ <li><a href="#ai1ec_weekly_content" id="ai1ec_weekly_tab" class="ai1ec_tab"><?php _e( 'Weekly', AI1EC_PLUGIN_NAME ) ;?></a></li>
60
+ <li><a href="#ai1ec_monthly_content" id="ai1ec_monthly_tab" class="ai1ec_tab"><?php _e( 'Monthly', AI1EC_PLUGIN_NAME ) ;?></a></li>
61
+ <li><a href="#ai1ec_yearly_content" id="ai1ec_yearly_tab" class="ai1ec_tab"><?php _e( 'Yearly', AI1EC_PLUGIN_NAME ) ;?></a></li>
62
+ </ul>
63
+ <div style="clear:both;"></div>
64
+ <div id="ai1ec_daily_content" class="ai1ec_tab_content" title="daily">
65
+ <?php echo $row_daily ?>
66
+ <div id="ai1ec_repeat_tab_append">
67
+ <div id="ai1ec_ending_box" class="ai1ec_repeat_centered_content">
68
+ <div id="ai1ec_end_holder">
69
+ <label for="ai1ec_end">
70
+ <?php _e( 'End', AI1EC_PLUGIN_NAME ) ?>:
71
+ </label>
72
+ <?php echo $end ?>
73
+ </div>
74
+ <div style="clear:both;"></div>
75
+ <div id="ai1ec_count_holder">
76
+ <label for="ai1ec_count">
77
+ <?php _e( 'Ending after', AI1EC_PLUGIN_NAME ) ?>:
78
+ </label>
79
+ <?php echo $count; ?>
80
+ </div>
81
+ <div style="clear:both;"></div>
82
+ <div id="ai1ec_until_holder">
83
+ <label for="ai1ec_until-date-input">
84
+ <?php _e( 'On date', AI1EC_PLUGIN_NAME ) ?>:
85
+ </label>
86
+ <input type="text" class="ai1ec-date-input" id="ai1ec_until-date-input" />
87
+ <input type="hidden" name="ai1ec_until_time" id="ai1ec_until-time" value="<?php echo !is_null( $until ) && $until > 0 ? $until : '' ?>" />
88
+ </div>
89
+ <div style="clear:both;"></div>
90
+ </div>
91
+ <div id="ai1ec_apply_button_holder">
92
+ <input type="button" name="ai1ec_none_button" value="<?php _e( 'Apply', AI1EC_PLUGIN_NAME ) ;?>" class="ai1ec_repeat_apply button button-highlighted" />
93
+ <a href="#ai1ec_cancel" class="ai1ec_repeat_cancel"><?php _e( 'Cancel', AI1EC_PLUGIN_NAME ) ?></a>
94
+ </div>
95
+ <div style="clear:both;"></div>
96
+ </div>
97
+ <div style="clear:both;"></div>
98
+ </div>
99
+ <div id="ai1ec_weekly_content" class="ai1ec_tab_content" title="weekly">
100
+ <?php echo $row_weekly ?>
101
+ </div>
102
+ <div id="ai1ec_monthly_content" class="ai1ec_tab_content" title="monthly">
103
+ <?php echo $row_monthly ?>
104
+ </div>
105
+ <div id="ai1ec_yearly_content" class="ai1ec_tab_content" title="yearly">
106
+ <?php echo $row_yearly ?>
107
+ </div>
108
+ <div style="clear:both;"></div>
109
+ </div>
110
+
111
  </tbody>
112
  </table>
app/view/class-ai1ec-agenda-widget.php CHANGED
@@ -41,21 +41,51 @@ class Ai1ec_Agenda_Widget extends WP_Widget
41
  'show_subscribe_buttons' => true,
42
  'show_calendar_button' => true,
43
  'hide_on_calendar_page' => true,
 
 
 
 
 
 
44
  );
45
  $instance = wp_parse_args( (array) $instance, $default );
46
 
 
 
 
 
 
 
47
  // Generate unique IDs and NAMEs of all needed form fields
48
  $fields = array(
49
- 'title' => array(),
50
- 'events_per_page' => array(),
51
- 'show_subscribe_buttons' => array(),
52
- 'show_calendar_button' => array(),
53
- 'hide_on_calendar_page' => array(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  );
55
  foreach( $fields as $field => $data ) {
56
- $fields[$field]['id'] = $this->get_field_id( $field );
57
- $fields[$field]['name'] = $this->get_field_name( $field );
58
- $fields[$field]['value'] = $instance[$field];
 
 
 
59
  }
60
 
61
  $ai1ec_view_helper->display( 'agenda-widget-form.php', $fields );
@@ -75,13 +105,19 @@ class Ai1ec_Agenda_Widget extends WP_Widget
75
  {
76
  // Save existing data as a base to modify with new data
77
  $instance = $old_instance;
78
-
79
  $instance['title'] = strip_tags( $new_instance['title'] );
80
  $instance['events_per_page'] = intval( $new_instance['events_per_page'] );
81
  if( $instance['events_per_page'] < 1 ) $instance['events_per_page'] = 1;
82
  $instance['show_subscribe_buttons'] = $new_instance['show_subscribe_buttons'] ? true : false;
83
  $instance['show_calendar_button'] = $new_instance['show_calendar_button'] ? true : false;
84
  $instance['hide_on_calendar_page'] = $new_instance['hide_on_calendar_page'] ? true : false;
 
 
 
 
 
 
 
85
 
86
  return $instance;
87
  }
@@ -100,23 +136,47 @@ class Ai1ec_Agenda_Widget extends WP_Widget
100
  $ai1ec_events_helper,
101
  $ai1ec_calendar_helper,
102
  $ai1ec_settings;
 
 
 
 
 
 
 
 
 
103
 
104
  if( $instance['hide_on_calendar_page'] &&
105
  is_page( $ai1ec_settings->calendar_page_id ) )
106
  return;
107
 
 
 
 
 
 
 
108
  // Get localized time
109
  $timestamp = $ai1ec_events_helper->gmt_to_local( time() );
 
 
 
 
 
 
 
 
110
  // Get events, then classify into date array
111
  $event_results = $ai1ec_calendar_helper->get_events_relative_to(
112
- $timestamp, $instance['events_per_page'], 0 );
113
  $dates = $ai1ec_calendar_helper->get_agenda_date_array( $event_results['events'] );
114
 
115
  $args['title'] = $instance['title'];
116
  $args['show_subscribe_buttons'] = $instance['show_subscribe_buttons'];
117
  $args['show_calendar_button'] = $instance['show_calendar_button'];
118
  $args['dates'] = $dates;
119
- $args['calendar_url'] = $ai1ec_calendar_helper->get_calendar_url();
 
120
 
121
  $ai1ec_view_helper->display( 'agenda-widget.php', $args );
122
  }
41
  'show_subscribe_buttons' => true,
42
  'show_calendar_button' => true,
43
  'hide_on_calendar_page' => true,
44
+ 'limit_by_cat' => false,
45
+ 'limit_by_tag' => false,
46
+ 'limit_by_post' => false,
47
+ 'event_cat_ids' => array(),
48
+ 'event_tag_ids' => array(),
49
+ 'event_post_ids' => array(),
50
  );
51
  $instance = wp_parse_args( (array) $instance, $default );
52
 
53
+ // Get available cats, tags, events to allow user to limit widget to certain categories
54
+ $events_categories = get_terms( 'events_categories', array( 'orderby' => 'name', "hide_empty" => false ) );
55
+ $events_tags = get_terms( 'events_tags', array( 'orderby' => 'name', "hide_empty" => false ) );
56
+ $get_events = new WP_Query( array ( 'post_type' => AI1EC_POST_TYPE, 'posts_per_page' => -1 ) );
57
+ $events_options = $get_events->posts;
58
+
59
  // Generate unique IDs and NAMEs of all needed form fields
60
  $fields = array(
61
+ 'title' => array('value' => $instance['title']),
62
+ 'events_per_page' => array('value' => $instance['events_per_page']),
63
+ 'show_subscribe_buttons' => array('value' => $instance['show_subscribe_buttons']),
64
+ 'show_calendar_button' => array('value' => $instance['show_calendar_button']),
65
+ 'hide_on_calendar_page' => array('value' => $instance['hide_on_calendar_page']),
66
+ 'limit_by_cat' => array('value' => $instance['limit_by_cat']),
67
+ 'limit_by_tag' => array('value' => $instance['limit_by_tag']),
68
+ 'limit_by_post' => array('value' => $instance['limit_by_post']),
69
+ 'event_cat_ids' => array(
70
+ 'value' => (array)$instance['event_cat_ids'],
71
+ 'options' => $events_categories
72
+ ),
73
+ 'event_tag_ids' => array(
74
+ 'value' => (array)$instance['event_tag_ids'],
75
+ 'options' => $events_tags
76
+ ),
77
+ 'event_post_ids' => array(
78
+ 'value' => (array)$instance['event_post_ids'],
79
+ 'options' => $events_options
80
+ ),
81
  );
82
  foreach( $fields as $field => $data ) {
83
+ $fields[$field]['id'] = $this->get_field_id( $field );
84
+ $fields[$field]['name'] = $this->get_field_name( $field );
85
+ $fields[$field]['value'] = $data['value'];
86
+ if( isset($data['options']) ) {
87
+ $fields[$field]['options'] = $data['options'];
88
+ }
89
  }
90
 
91
  $ai1ec_view_helper->display( 'agenda-widget-form.php', $fields );
105
  {
106
  // Save existing data as a base to modify with new data
107
  $instance = $old_instance;
 
108
  $instance['title'] = strip_tags( $new_instance['title'] );
109
  $instance['events_per_page'] = intval( $new_instance['events_per_page'] );
110
  if( $instance['events_per_page'] < 1 ) $instance['events_per_page'] = 1;
111
  $instance['show_subscribe_buttons'] = $new_instance['show_subscribe_buttons'] ? true : false;
112
  $instance['show_calendar_button'] = $new_instance['show_calendar_button'] ? true : false;
113
  $instance['hide_on_calendar_page'] = $new_instance['hide_on_calendar_page'] ? true : false;
114
+ // For limits, set the limit to False if no IDs were selected, or set the respective IDs to empty if "limit by" was unchecked
115
+ $instance['limit_by_cat'] = ( ! $new_instance['event_cat_ids'] || ! $new_instance['limit_by_cat'] ) ? false : true;
116
+ $instance['event_cat_ids'] = ! $new_instance['limit_by_cat'] ? array() : $new_instance['event_cat_ids'] ;
117
+ $instance['limit_by_tag'] = ( ! $new_instance['event_tag_ids'] || ! $new_instance['limit_by_tag'] ) ? false : true;
118
+ $instance['event_tag_ids'] = ! $new_instance['limit_by_tag'] ? array() : $new_instance['event_tag_ids'] ;
119
+ $instance['limit_by_post'] = ( ! $new_instance['event_post_ids'] || ! $new_instance['limit_by_post'] ) ? false : true;
120
+ $instance['event_post_ids'] = ! $new_instance['limit_by_post'] ? array() : $new_instance['event_post_ids'] ;
121
 
122
  return $instance;
123
  }
136
  $ai1ec_events_helper,
137
  $ai1ec_calendar_helper,
138
  $ai1ec_settings;
139
+
140
+ $defaults = array(
141
+ 'hide_on_calendar_page' => true,
142
+ 'event_cat_ids' => array(),
143
+ 'event_tag_ids' => array(),
144
+ 'event_post_ids' => array(),
145
+ 'events_per_page' => 10,
146
+ );
147
+ $instance = wp_parse_args( $instance, $defaults );
148
 
149
  if( $instance['hide_on_calendar_page'] &&
150
  is_page( $ai1ec_settings->calendar_page_id ) )
151
  return;
152
 
153
+ // Add params to the subscribe_url for filtering by Limits (category, tag)
154
+ $subscribe_filter = '';
155
+ $subscribe_filter .= $instance['event_cat_ids'] ? '&ai1ec_cat_ids=' . join( ',', $instance['event_cat_ids'] ) : '';
156
+ $subscribe_filter .= $instance['event_tag_ids'] ? '&ai1ec_tag_ids=' . join( ',', $instance['event_tag_ids'] ) : '';
157
+ $subscribe_filter .= $instance['event_post_ids'] ? '&ai1ec_post_ids=' . join( ',', $instance['event_post_ids'] ) : '';
158
+
159
  // Get localized time
160
  $timestamp = $ai1ec_events_helper->gmt_to_local( time() );
161
+
162
+ // Set $limit to the specified category/tag
163
+ $limit = array(
164
+ "cat_ids" => $instance['event_cat_ids'],
165
+ "tag_ids" => $instance['event_tag_ids'],
166
+ "post_ids" => $instance['event_post_ids'],
167
+ );
168
+
169
  // Get events, then classify into date array
170
  $event_results = $ai1ec_calendar_helper->get_events_relative_to(
171
+ $timestamp, $instance['events_per_page'], 0, $limit );
172
  $dates = $ai1ec_calendar_helper->get_agenda_date_array( $event_results['events'] );
173
 
174
  $args['title'] = $instance['title'];
175
  $args['show_subscribe_buttons'] = $instance['show_subscribe_buttons'];
176
  $args['show_calendar_button'] = $instance['show_calendar_button'];
177
  $args['dates'] = $dates;
178
+ $args['calendar_url'] = $ai1ec_calendar_helper->get_calendar_url( null, $instance['event_cat_ids'], $instance['event_tag_ids'] );
179
+ $args['subscribe_url'] = AI1EC_EXPORT_URL . $subscribe_filter;
180
 
181
  $ai1ec_view_helper->display( 'agenda-widget.php', $args );
182
  }
app/view/month.php CHANGED
@@ -32,7 +32,7 @@
32
  <div class="ai1ec-day">
33
  <div class="ai1ec-date"><?php echo $day['date'] ?></div>
34
  <?php foreach( $day['events'] as $event ): ?>
35
- <a href="<?php echo esc_attr( get_permalink( $event->post_id ) ) ?>"
36
  class="ai1ec-event-container
37
  ai1ec-event-id-<?php echo $event->post_id ?>
38
  ai1ec-event-instance-id-<?php echo $event->instance_id ?>
32
  <div class="ai1ec-day">
33
  <div class="ai1ec-date"><?php echo $day['date'] ?></div>
34
  <?php foreach( $day['events'] as $event ): ?>
35
+ <a href="<?php echo esc_attr( get_permalink( $event->post_id ) ) . $event->instance_id ?>"
36
  class="ai1ec-event-container
37
  ai1ec-event-id-<?php echo $event->post_id ?>
38
  ai1ec-event-instance-id-<?php echo $event->instance_id ?>
app/view/on_the_select.php ADDED
File without changes
app/view/row_daily.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <div class="ai1ec_repeat_centered_content">
2
+ <label for="ai1ec_daily_count">
3
+ <?php _e( 'Every', AI1EC_PLUGIN_NAME ) ?>:
4
+ </label>
5
+ <?php echo $count ?>
6
+ </div>
app/view/row_monthly.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ai1ec_repeat_centered_content">
2
+ <label for="ai1ec_monthly_count">
3
+ <?php _e( 'Every', AI1EC_PLUGIN_NAME ) ?>:
4
+ </label>
5
+ <?php echo $count ?>
6
+ <label for="ai1ec_monthly_each">
7
+ <?php _e( 'Each', AI1EC_PLUGIN_NAME ) ?>:
8
+ </label>
9
+ <div style="clear:both;"></div>
10
+ <?php echo $month ?>
11
+ </div>
app/view/row_weekly.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <div class="ai1ec_repeat_centered_content">
2
+ <label for="ai1ec_weekly_count">
3
+ <?php _e( 'Every', AI1EC_PLUGIN_NAME ) ?>:
4
+ </label>
5
+ <?php echo $count ?>
6
+ <label><?php _e( 'On', AI1EC_PLUGIN_NAME ) ?>:</label>
7
+ <div style="clear: both;"></div>
8
+ <?php echo $week_days ?>
9
+ </div>
app/view/row_yearly.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ai1ec_repeat_centered_content">
2
+ <label for="ai1ec_yearly_count">
3
+ <?php _e( 'Every', AI1EC_PLUGIN_NAME ) ?>:
4
+ </label>
5
+ <?php echo $count ?>
6
+ <label for="ai1ec_yearly_date_select">
7
+ <?php _e( 'In', AI1EC_PLUGIN_NAME ) ?>:
8
+ </label>
9
+ <div style="clear: both;"></div>
10
+ <?php echo $year ?>
11
+ </div>
css/add_new_event.css CHANGED
@@ -2,17 +2,20 @@
2
  #ai1ec_event {
3
  overflow: hidden;
4
  }
5
- .ai1ec-form {
6
  width: 100%;
7
  margin-bottom: 1em;
8
  }
9
- .ai1ec-form td.ai1ec-first {
10
  width: 8.5em;
11
  }
12
- .ai1ec-form label {
 
 
 
13
  font-size: 9pt;
14
  }
15
- .ai1ec-form td {
16
  line-height: 1.5em;
17
  }
18
  .ai1ec-section-title {
@@ -242,3 +245,183 @@
242
  -ms-box-sizing: border-box;
243
  box-sizing: border-box;
244
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  #ai1ec_event {
3
  overflow: hidden;
4
  }
5
+ .ai1ec-form, .ai1ec-form-nested {
6
  width: 100%;
7
  margin-bottom: 1em;
8
  }
9
+ .ai1ec-form td.ai1ec-first, .ai1ec-form-nested td.ai1ec-first {
10
  width: 8.5em;
11
  }
12
+ .ai1ec-first-padding {
13
+ padding-left: 8.5em;
14
+ }
15
+ .ai1ec-form label, .ai1ec-form-nested label {
16
  font-size: 9pt;
17
  }
18
+ .ai1ec-form td, .ai1ec-form-nested td {
19
  line-height: 1.5em;
20
  }
21
  .ai1ec-section-title {
245
  -ms-box-sizing: border-box;
246
  box-sizing: border-box;
247
  }
248
+ /* date select list */
249
+ .ai1ec_date_select {
250
+ margin: 0;
251
+ padding: 0;
252
+ list-style: none;
253
+ }
254
+ .ai1ec_date_select li {
255
+ float: left;
256
+ width: 20px;
257
+ padding: 3px 3px;
258
+ -moz-border-radius: 3px;
259
+ border-radius: 3px;
260
+ border: 1px solid #ccc;
261
+ text-align: center;
262
+ margin-right: 5px;
263
+ background: #f6f8f9; /* Old browsers */
264
+ background: -moz-linear-gradient(top, #f6f8f9 0%, #e5ebee 50%, #d7dee3 51%, #f5f7f9 100%); /* FF3.6+ */
265
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f6f8f9), color-stop(50%,#e5ebee), color-stop(51%,#d7dee3), color-stop(100%,#f5f7f9)); /* Chrome,Safari4+ */
266
+ background: -webkit-linear-gradient(top, #f6f8f9 0%,#e5ebee 50%,#d7dee3 51%,#f5f7f9 100%); /* Chrome10+,Safari5.1+ */
267
+ background: -o-linear-gradient(top, #f6f8f9 0%,#e5ebee 50%,#d7dee3 51%,#f5f7f9 100%); /* Opera 11.10+ */
268
+ background: -ms-linear-gradient(top, #f6f8f9 0%,#e5ebee 50%,#d7dee3 51%,#f5f7f9 100%); /* IE10+ */
269
+ background: linear-gradient(top, #f6f8f9 0%,#e5ebee 50%,#d7dee3 51%,#f5f7f9 100%); /* W3C */
270
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f8f9', endColorstr='#f5f7f9',GradientType=0 ); /* IE6-9 */
271
+ cursor: pointer;
272
+ }
273
+ .ai1ec_date_select li:hover {
274
+ background: #f5f7f9; /* Old browsers */
275
+ background: -moz-linear-gradient(top, #f5f7f9 0%, #d7dee3 49%, #e5ebee 50%, #f6f8f9 100%); /* FF3.6+ */
276
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f7f9), color-stop(49%,#d7dee3), color-stop(50%,#e5ebee), color-stop(100%,#f6f8f9)); /* Chrome,Safari4+ */
277
+ background: -webkit-linear-gradient(top, #f5f7f9 0%,#d7dee3 49%,#e5ebee 50%,#f6f8f9 100%); /* Chrome10+,Safari5.1+ */
278
+ background: -o-linear-gradient(top, #f5f7f9 0%,#d7dee3 49%,#e5ebee 50%,#f6f8f9 100%); /* Opera 11.10+ */
279
+ background: -ms-linear-gradient(top, #f5f7f9 0%,#d7dee3 49%,#e5ebee 50%,#f6f8f9 100%); /* IE10+ */
280
+ background: linear-gradient(top, #f5f7f9 0%,#d7dee3 49%,#e5ebee 50%,#f6f8f9 100%); /* W3C */
281
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f7f9', endColorstr='#f6f8f9',GradientType=0 ); /* IE6-9 */
282
+ }
283
+ .ai1ec_date_select li.ai1ec_selected {
284
+ background: #deefff; /* Old browsers */
285
+ background: -moz-linear-gradient(top, #deefff 0%, #98bede 100%); /* FF3.6+ */
286
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#deefff), color-stop(100%,#98bede)); /* Chrome,Safari4+ */
287
+ background: -webkit-linear-gradient(top, #deefff 0%,#98bede 100%); /* Chrome10+,Safari5.1+ */
288
+ background: -o-linear-gradient(top, #deefff 0%,#98bede 100%); /* Opera 11.10+ */
289
+ background: -ms-linear-gradient(top, #deefff 0%,#98bede 100%); /* IE10+ */
290
+ background: linear-gradient(top, #deefff 0%,#98bede 100%); /* W3C */
291
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#deefff', endColorstr='#98bede',GradientType=0 ); /* IE6-9 */
292
+ }
293
+ .ai1ec_date_select li.ai1ec_selected:hover {
294
+ background: #98bede; /* Old browsers */
295
+ background: -moz-linear-gradient(top, #98bede 0%, #deefff 100%); /* FF3.6+ */
296
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#98bede), color-stop(100%,#deefff)); /* Chrome,Safari4+ */
297
+ background: -webkit-linear-gradient(top, #98bede 0%,#deefff 100%); /* Chrome10+,Safari5.1+ */
298
+ background: -o-linear-gradient(top, #98bede 0%,#deefff 100%); /* Opera 11.10+ */
299
+ background: -ms-linear-gradient(top, #98bede 0%,#deefff 100%); /* IE10+ */
300
+ background: linear-gradient(top, #98bede 0%,#deefff 100%); /* W3C */
301
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#98bede', endColorstr='#deefff',GradientType=0 ); /* IE6-9 */
302
+ }
303
+ /* week days list */
304
+ #ai1ec_weekly_date_select {
305
+ margin-left: 25px;
306
+ }
307
+ /* month days list */
308
+ #ai1ec_montly_date_select {
309
+ width: 231px;
310
+ margin-left: 25px;
311
+ }
312
+ /* yearly months list */
313
+ #ai1ec_yearly_date_select {
314
+ width: 208px;
315
+ margin-left: 30px;
316
+ }
317
+ #ai1ec_yearly_date_select li {
318
+ padding: 10px 5px;
319
+ width: 35px;
320
+ }
321
+
322
+ #ai1ec_repeat_box {
323
+ display: none;
324
+ margin-top: 10px;
325
+ width: 295px;
326
+ }
327
+ ul.ai1ec_repeat_tabs {
328
+ margin:0px; padding:0px;
329
+ margin-bottom: 6px;
330
+ }
331
+
332
+ ul.ai1ec_repeat_tabs li {
333
+ list-style: none;
334
+ display:inline;
335
+ }
336
+ ul.ai1ec_repeat_tabs li a {
337
+ background-color:#464c54;
338
+ color:#ffebb5;
339
+ padding:8px 14px 8px 14px;
340
+ text-decoration:none;
341
+ font-size:9px;
342
+ font-family:Verdana, Arial, Helvetica, sans-serif;
343
+ font-weight:bold;
344
+ text-transform:uppercase;
345
+ border:1px solid #464c54;
346
+ -webkit-border-top-left-radius: 5px;
347
+ -webkit-border-top-right-radius: 5px;
348
+ -moz-border-radius-topleft: 5px;
349
+ -moz-border-radius-topright: 5px;
350
+ border-top-left-radius: 5px;
351
+ border-top-right-radius: 5px;
352
+ }
353
+ ul.ai1ec_repeat_tabs li a:hover {
354
+ background-color:#2f343a;
355
+ border-color:#2f343a;
356
+ }
357
+ ul.ai1ec_repeat_tabs li a.ai1ec_active {
358
+ background-color:#ffffff;
359
+ color:#282e32;
360
+ border:1px solid #464c54;
361
+ border-bottom: 1px solid #ffffff;
362
+ }
363
+ .ai1ec_tab_content {
364
+ background-color:#ffffff;
365
+ padding:10px;
366
+ border:1px solid #464c54;
367
+ margin-top: -1px;
368
+ -webkit-border-bottom-right-radius: 5px;
369
+ -webkit-border-bottom-left-radius: 5px;
370
+ -moz-border-radius-bottomright: 5px;
371
+ -moz-border-radius-bottomleft: 5px;
372
+ border-bottom-right-radius: 5px;
373
+ border-bottom-left-radius: 5px;
374
+ cursor: normal !important;
375
+ }
376
+ #ai1ec_weekly_content, #ai1ec_monthly_content, #ai1ec_yearly_content { display:none; }
377
+ .ai1ec_repeat_centered_content {
378
+ width: 100%;
379
+ text-align: center;
380
+ float: left;
381
+ border-bottom: 1px solid #EEE;
382
+ padding-bottom: 10px;
383
+ }
384
+ #ai1ec_apply_button_holder {
385
+ width: 100%;
386
+ text-align: center;
387
+ float: left;
388
+ }
389
+ .ai1ec_tab_content label {
390
+ float: left;
391
+ width: 61px;
392
+ text-align: left;
393
+ }
394
+ #ai1ec_ending_box, #ai1ec_end_holder, #ai1ec_repeat_text {
395
+ float: left;
396
+ }
397
+ #ai1ec_repeat_text a {
398
+ text-decoration: none;
399
+ border-bottom: 1px dashed red;
400
+ }
401
+ #ai1ec_ending_box, #ai1ec_apply_button_holder {
402
+ margin-top: 10px;
403
+ }
404
+ .ai1ec_repeat_cancel {
405
+ color: red;
406
+ text-decoration: none;
407
+ border-bottom: 1px solid red;
408
+ }
409
+ a.ai1ec_repeat_cancel:hover {
410
+ color: white;
411
+ background-color: red;
412
+ }
413
+ #ai1ec_count_holder, #ai1ec_until_holder {
414
+ display: none;
415
+ }
416
+ #ai1ec_until_holder input {
417
+ float: left;
418
+ }
419
+ #ai1ec_end_holder {
420
+ height: 30px;
421
+ }
422
+ #menu-posts-ai1ec_event > div.wp-menu-image {
423
+ background-image: url( '../img/admin-menu.png' ) !important;
424
+ }
425
+ div.growlUI h1, div.growlUI h2 {
426
+ color: white; padding: 5px 5px 5px 75px; text-align: left
427
+ }
css/calendar.css CHANGED
@@ -349,6 +349,50 @@ table.ai1ec-month-view {
349
  color: #aaa;
350
  color: rgba(0,0,0,0.4);
351
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
 
353
  /* Agenda view */
354
  .ai1ec-agenda-view {
@@ -636,4 +680,4 @@ table.ai1ec-month-view {
636
  /* Category and Tags */
637
  .ai1ec-filter-selector-container:hover > .ai1ec-filter-selector{
638
  display: block;
639
- }
349
  color: #aaa;
350
  color: rgba(0,0,0,0.4);
351
  }
352
+ /* Month view date scrolling */
353
+ .ai1ec-month-view .ai1ec-obscured {
354
+ display: none !important;
355
+ }
356
+ .ai1ec-month-view a.ai1ec-scroll-up,
357
+ .ai1ec-month-view a.ai1ec-scroll-down {
358
+ display: block;
359
+ position: relative;
360
+ background: #fff no-repeat center center;
361
+ border: 1px solid #ccc;
362
+ border-radius: 0.2em;
363
+ -moz-border-radius: 0.2em;
364
+ -webkit-border-radius: 0.2em;
365
+ width: 15px;
366
+ height: 11px;
367
+ left: 50%;
368
+ margin-left: -8px;
369
+ }
370
+ .ai1ec-month-view a.ai1ec-scroll-up:hover,
371
+ .ai1ec-month-view a.ai1ec-scroll-down:hover {
372
+ background-color: #ccc;
373
+ }
374
+ .ai1ec-month-view a.ai1ec-scroll-up.ai1ec-disabled:hover,
375
+ .ai1ec-month-view a.ai1ec-scroll-down.ai1ec-disabled:hover {
376
+ background-color: transparent;
377
+ }
378
+ .ai1ec-month-view a.ai1ec-scroll-up {
379
+ background-image: url(../img/scroll-up.png);
380
+ margin-top: -13px;
381
+ margin-bottom: 2px;
382
+ }
383
+ .ai1ec-month-view a.ai1ec-scroll-down {
384
+ background-image: url(../img/scroll-down.png);
385
+ }
386
+ .ai1ec-month-view a.ai1ec-scroll-up.ai1ec-disabled,
387
+ .ai1ec-month-view a.ai1ec-scroll-down.ai1ec-disabled {
388
+ opacity: 0.2;
389
+ -moz-opacity: 0.2;
390
+ filter: alpha(opacity=2);
391
+ background-color: transparent;
392
+ border: none;
393
+ padding: 1px; /* To compensate for height lost by invisible border */
394
+ cursor: default;
395
+ }
396
 
397
  /* Agenda view */
398
  .ai1ec-agenda-view {
680
  /* Category and Tags */
681
  .ai1ec-filter-selector-container:hover > .ai1ec-filter-selector{
682
  display: block;
683
+ }
css/jquery.bsmselect.css ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .bsmContainer {
2
+ /* container that surrounds entire bsmSelect widget */
3
+ }
4
+
5
+ .bsmSelect {
6
+ /* the newly created regular 'select' */
7
+ display: inline;
8
+ }
9
+
10
+ .bsmOptionDisabled {
11
+ /* disabled options in new select */
12
+ color: #999;
13
+ }
14
+
15
+ .bsmHighlight {
16
+ /* the highlight span */
17
+ float: right;
18
+ padding: 0;
19
+ margin: 0 0 0 1em;
20
+ }
21
+
22
+ .bsmList {
23
+ /* html list that contains selected items */
24
+ margin: 0.25em 0 1em 0;
25
+ position: relative;
26
+ display: block;
27
+ padding-left: 0;
28
+ list-style: none;
29
+ }
30
+
31
+ .bsmListItem {
32
+ /* li item from the html list above */
33
+ position: relative;
34
+ margin-left: 0;
35
+ padding-left: 0;
36
+ list-style: none;
37
+ background: #ddd;
38
+ border: 1px solid #bbb;
39
+ width: 100%;
40
+ margin: 0 0 -1px 0;
41
+ line-height: 1em;
42
+ }
43
+
44
+ .bsmListItem:hover {
45
+ background-color: #e5e5e5;
46
+ }
47
+
48
+ .bsmListItemLabel {
49
+ /* this is a span that surrounds the text in the item, except for the remove link */
50
+ padding: 5px;
51
+ display: block;
52
+ }
53
+
54
+ .bsmListSortable .bsmListItemLabel {
55
+ cursor: move;
56
+ }
57
+
58
+ .bsmListItemRemove {
59
+ /* the remove link in each list item */
60
+ position: absolute;
61
+ right: 0;
62
+ top: 0;
63
+ padding: 5px;
64
+ }
css/settings.css CHANGED
@@ -176,3 +176,10 @@
176
  .ai1ec-donate {
177
  text-align: center;
178
  }
 
 
 
 
 
 
 
176
  .ai1ec-donate {
177
  text-align: center;
178
  }
179
+ #ai1ec-rss-news {
180
+ margin: 0;
181
+ padding: 0px 0px 0px 20px;
182
+ }
183
+ #ai1ec-rss-news > li {
184
+ list-style: disc;
185
+ }
css/widget.css ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Style the multi-select container & selection div in the widget options */
2
+
3
+ .widget .widget-inside p.ai1ec-limit-by-container {
4
+ margin: 0;
5
+ }
6
+
7
+ .ai1ec-limit-by-options-container {
8
+ background-color: #f3f3f3;
9
+ border: 1px solid #e3e3e3;
10
+ border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
11
+ float: left;
12
+ width: 94%;
13
+ margin: 0.6em 0 0.6em 0.3em;
14
+ padding: 0.6em;
15
+ }
16
+ .ai1ec-widget-option-ids {
17
+ width: 110px;
18
+ }
19
+ .ai1ec-category-selected-items {
20
+ margin: 0;
21
+ display: block;
22
+ padding-left: 0;
23
+ list-style: none;
24
+ }
25
+ .ai1ec-category-selected-item {
26
+ margin: 0.4em 0.3em 0.2em 0;
27
+ padding: 0.4em 0.5em;
28
+ list-style: none;
29
+ background: linear-gradient( top, #fff, #eee );
30
+ background: -o-linear-gradient( top, #fff, #eee );
31
+ background: -moz-linear-gradient( top, #fff, #eee );
32
+ background: -webkit-gradient( linear, left top, left bottom, color-stop( 0, #fff ), color-stop( 1, #eee ) );
33
+ background: -webkit-linear-gradient( top, #fff, #eee );
34
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#eee' );
35
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#eee' )";
36
+ border: 1px solid #ccc;
37
+ line-height: 1em;
38
+ float: left;
39
+ border-radius: 8px;
40
+ -moz-border-radius: 8px;
41
+ -webkit-border-radius: 8px;
42
+ }
43
+ .ai1ec-category-selected-item-label {
44
+ padding-right: 0.5em;
45
+ }
46
+ .ai1ec-category-selected-item-remove {
47
+ text-decoration: none;
48
+ }
49
+ .ai1ec-category-selected-item-remove img {
50
+ vertical-align: bottom;
51
+ }
img/admin-menu.png ADDED
Binary file
img/icon-close.png ADDED
Binary file
img/scroll-down.png ADDED
Binary file
img/scroll-up.png ADDED
Binary file
js/add_new_event.js CHANGED
@@ -5,14 +5,6 @@ jQuery( function( $ ){
5
  */
6
  if( $('#ai1ec_event' ).length )
7
  {
8
- // Selector for repeat weekly
9
- element_selector( '.ai1ec_week_days_list > li', 'ai1ec_selected', 'ai1ec_weekday_value', '#ai1ec_weekly_days' );
10
-
11
- // Selector for repeat monthly
12
- element_selector( '.ai1ec_month_days_list > li', 'ai1ec_selected', 'ai1ec_monthday_value', '#ai1ec_monthly_days' );
13
-
14
- // Selector for repeat yearly
15
- element_selector( '.ai1ec_yearly_months_list > li', 'ai1ec_selected', 'ai1ec_yearmonth_value', '#ai1ec_yearly_months' );
16
 
17
  var now = new Date( ai1ec_add_new_event.now * 1000 );
18
 
@@ -22,30 +14,37 @@ jQuery( function( $ ){
22
 
23
  // Initialize timespan plugin on our date/time inputs.
24
  var data = {
25
- allday: '#ai1ec_all_day_event',
26
- start_date_input: '#ai1ec_start-date-input',
27
- start_time_input: '#ai1ec_start-time-input',
28
- start_time: '#ai1ec_start-time',
29
- end_date_input: '#ai1ec_end-date-input',
30
- end_time_input: '#ai1ec_end-time-input',
31
- end_time: '#ai1ec_end-time',
32
- us_format: ai1ec_add_new_event.us_format,
33
- twentyfour_hour: ai1ec_add_new_event.twentyfour_hour,
34
- now: now
 
 
 
35
  }
36
  $.timespan( data );
37
 
38
  // Initialize inputdate plugin on our "until" date input.
39
  data = {
40
- start_date_input: '#ai1ec_until-date-input',
41
- start_time: '#ai1ec_until-time',
42
- us_format: ai1ec_add_new_event.us_format,
43
- now: now
 
 
 
 
44
  }
45
  $.inputdate( data );
46
 
47
  // Initialize count range slider
48
- $( '#ai1ec_count' ).rangeinput( {
49
  css: {
50
  input: 'ai1ec-range',
51
  slider: 'ai1ec-slider',
@@ -227,35 +226,36 @@ jQuery( function( $ ){
227
  }
228
  function hide_all_repeat_fields() {
229
  hide_all_end_fields();
 
 
230
  $( '#ai1ec_end_holder' ).fadeOut();
231
  }
232
  function hide_all_end_fields() {
233
  $( '#ai1ec_count_holder, #ai1ec_until_holder' ).hide();
234
  }
235
-
236
- // ===========================
237
- // = Repeat dropdown clicked =
238
- // ===========================
239
- $( '#ai1ec_repeat' ).change( function() {
240
- // hide all helper elements
241
-
242
- var selected = $( '#ai1ec_repeat option:selected' ).val();
243
- switch( selected ) {
244
- // =============================
245
- // = None selected, hide repeating fields =
246
- // =============================
247
- case ' ':
248
- hide_all_repeat_fields();
249
- break;
250
-
251
- // =====================
252
- // = Repeating event, show repeating fields =
253
- // =====================
254
- default:
255
- show_all_repeat_fields();
256
- break;
257
- }
258
- });
259
  // ========================
260
  // = End dropdown clicked =
261
  // ========================
@@ -269,6 +269,160 @@ jQuery( function( $ ){
269
  $( '#publish' ).trigger( 'click' );
270
  });
271
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  }
273
 
274
  /**
@@ -325,7 +479,9 @@ jQuery( function( $ ){
325
  feed_tags: $( '#ai1ec_feed_tags' ).val()
326
  };
327
  // make an ajax call to save the new feed
328
- $.getJSON( ajaxurl, data,
 
 
329
  function( response ) {
330
  // restore add button
331
  $button.removeAttr( 'disabled' );
@@ -338,7 +494,8 @@ jQuery( function( $ ){
338
  // Add the feed to the settings screen
339
  $( '#ai1ec-feeds-after' ).after( response.message );
340
  }
341
- }
 
342
  );
343
  }
344
 
@@ -363,7 +520,7 @@ jQuery( function( $ ){
363
  ics_id: ics_id
364
  };
365
  // remove the feed from the database
366
- $.getJSON( ajaxurl, data,
367
  function( response ) {
368
  // restore the delete button
369
  $button.removeAttr( 'disabled' );
@@ -374,7 +531,8 @@ jQuery( function( $ ){
374
  // remove the feed from the settings screen
375
  $feed_row.remove();
376
  }
377
- }
 
378
  );
379
  });
380
 
@@ -396,7 +554,7 @@ jQuery( function( $ ){
396
  ics_id: ics_id
397
  };
398
  // remove the feed from the database
399
- $.getJSON( ajaxurl, data,
400
  function( response ) {
401
  if( response.error ) {
402
  // tell the user there is an error
@@ -405,7 +563,8 @@ jQuery( function( $ ){
405
  $button.fadeOut();
406
  }
407
  $button.siblings( '.ajax-loading' ).css( 'visibility', 'hidden' );
408
- }
 
409
  );
410
  });
411
 
@@ -427,7 +586,7 @@ jQuery( function( $ ){
427
  ics_id: ics_id
428
  };
429
  // remove the feed from the database
430
- $.getJSON( ajaxurl, data,
431
  function( response ) {
432
  if( response.error ) {
433
  // tell the user there is an error
@@ -443,7 +602,8 @@ jQuery( function( $ ){
443
  $button
444
  .attr( 'disabled', false )
445
  .siblings( '.ajax-loading' ).css( 'visibility', 'hidden' );
446
- }
 
447
  );
448
  });
449
 
5
  */
6
  if( $('#ai1ec_event' ).length )
7
  {
 
 
 
 
 
 
 
 
8
 
9
  var now = new Date( ai1ec_add_new_event.now * 1000 );
10
 
14
 
15
  // Initialize timespan plugin on our date/time inputs.
16
  var data = {
17
+ allday: '#ai1ec_all_day_event',
18
+ start_date_input: '#ai1ec_start-date-input',
19
+ start_time_input: '#ai1ec_start-time-input',
20
+ start_time: '#ai1ec_start-time',
21
+ end_date_input: '#ai1ec_end-date-input',
22
+ end_time_input: '#ai1ec_end-time-input',
23
+ end_time: '#ai1ec_end-time',
24
+ date_format: ai1ec_add_new_event.date_format,
25
+ month_names: ai1ec_add_new_event.month_names,
26
+ day_names: ai1ec_add_new_event.day_names,
27
+ week_start_day: ai1ec_add_new_event.week_start_day,
28
+ twentyfour_hour: ai1ec_add_new_event.twentyfour_hour,
29
+ now: now
30
  }
31
  $.timespan( data );
32
 
33
  // Initialize inputdate plugin on our "until" date input.
34
  data = {
35
+ start_date_input: '#ai1ec_until-date-input',
36
+ start_time: '#ai1ec_until-time',
37
+ date_format: ai1ec_add_new_event.date_format,
38
+ month_names: ai1ec_add_new_event.month_names,
39
+ day_names: ai1ec_add_new_event.day_names,
40
+ week_start_day: ai1ec_add_new_event.week_start_day,
41
+ twentyfour_hour: ai1ec_add_new_event.twentyfour_hour,
42
+ now: now
43
  }
44
  $.inputdate( data );
45
 
46
  // Initialize count range slider
47
+ $( '#ai1ec_count, #ai1ec_daily_count, #ai1ec_weekly_count, #ai1ec_monthly_count, #ai1ec_yearly_count' ).rangeinput( {
48
  css: {
49
  input: 'ai1ec-range',
50
  slider: 'ai1ec-slider',
226
  }
227
  function hide_all_repeat_fields() {
228
  hide_all_end_fields();
229
+ hide_custom_repeat_elements();
230
+ hide_frequency();
231
  $( '#ai1ec_end_holder' ).fadeOut();
232
  }
233
  function hide_all_end_fields() {
234
  $( '#ai1ec_count_holder, #ai1ec_until_holder' ).hide();
235
  }
236
+
237
+ function ai1ec_selector( selector ) {
238
+ $( selector + ' > li' ).click( function() {
239
+ if( $( this ).hasClass( 'ai1ec_selected' ) ) {
240
+ $( this ).removeClass( 'ai1ec_selected' );
241
+ } else {
242
+ $( this ).addClass( 'ai1ec_selected' );
243
+ }
244
+ var data = new Array();
245
+ $( selector + ' > li' ).each( function() {
246
+ if( $( this ).hasClass( 'ai1ec_selected' ) ) {
247
+ var value = $( this ).children( 'input[type="hidden"]:first' ).val();
248
+ data.push( value );
249
+ }
250
+ });
251
+ $( selector ).next().val( data.join() );
252
+ });
253
+ }
254
+
255
+ ai1ec_selector( '#ai1ec_weekly_date_select' );
256
+ ai1ec_selector( '#ai1ec_montly_date_select' );
257
+ ai1ec_selector( '#ai1ec_yearly_date_select' );
258
+
 
259
  // ========================
260
  // = End dropdown clicked =
261
  // ========================
269
  $( '#publish' ).trigger( 'click' );
270
  });
271
  }
272
+
273
+ $( '.ai1ec_tab' ).live( 'click', function() {
274
+ if( ! $( this ).hasClass( 'ai1ec_active' ) ) {
275
+ var $active_tab = $( '.ai1ec_repeat_tabs > li > a.ai1ec_active' );
276
+ var $active_content = $( $active_tab.attr( 'href' ) );
277
+
278
+ var $becoming_active = $( $( this ).attr( 'href' ) );
279
+
280
+ $active_tab.removeClass( 'ai1ec_active' );
281
+ $active_content.hide();
282
+
283
+ $( this ).addClass( 'ai1ec_active' );
284
+ $becoming_active.append( $( '#ai1ec_repeat_tab_append' ) );
285
+ $( '#ai1ec_ending_box' ).show();
286
+ $becoming_active.show();
287
+ }
288
+ return false;
289
+ });
290
+ $( '.ai1ec_repeat_apply' ).live( 'click', function() {
291
+ var $button = $( this );
292
+ var rule = '';
293
+ var $active_tab = $( $( '.ai1ec_active' ).attr( 'href' ) );
294
+ var frequency = $active_tab.attr( 'title' );
295
+ switch( frequency ) {
296
+ case 'daily':
297
+ rule += 'FREQ=DAILY;';
298
+ var interval = $( '#ai1ec_daily_count' ).val();
299
+ if( interval > 1 )
300
+ rule += 'INTERVAL=' + interval + ';';
301
+ break;
302
+ case 'weekly':
303
+ rule += 'FREQ=WEEKLY;';
304
+ var interval = $( '#ai1ec_weekly_count' ).val();
305
+ if( interval > 1 )
306
+ rule += 'INTERVAL=' + interval + ';';
307
+ var week_days = $( 'input[name="ai1ec_weekly_date_select"]:first' ).val();
308
+ var wkst = $( '#ai1ec_weekly_date_select > li:first > input[type="hidden"]:first' ).val();
309
+ if( week_days.length > 0 )
310
+ rule += 'WKST=' + wkst + ';BYDAY=' + week_days + ';';
311
+ break;
312
+ case 'monthly':
313
+ rule += 'FREQ=MONTHLY;';
314
+ var interval = $( '#ai1ec_monthly_count' ).val();
315
+ if( interval > 1 )
316
+ rule += 'INTERVAL=' + interval + ';';
317
+ var month_days = $( 'input[name="ai1ec_montly_date_select"]:first' ).val();
318
+ if( month_days.length > 0 )
319
+ rule += 'BYMONTHDAY=' + month_days + ';';
320
+ break;
321
+ case 'yearly':
322
+ rule += 'FREQ=YEARLY;';
323
+ var interval = $( '#ai1ec_yearly_count' ).val();
324
+ if( interval > 1 )
325
+ rule += 'INTERVAL=' + interval + ';';
326
+ var months = $( 'input[name="ai1ec_yearly_date_select"]:first' ).val();
327
+ if( months.length > 0 )
328
+ rule += 'BYMONTH=' + months + ';';
329
+ break;
330
+ }
331
+
332
+ var ending = $( '#ai1ec_end' ).val();
333
+ // After
334
+ if( ending == '1' ) {
335
+ rule += 'COUNT=' + $( '#ai1ec_count' ).val() + ';';
336
+ }
337
+ // On Date
338
+ if( ending == '2' ) {
339
+ var until = parseDate( $( '#ai1ec_until-date-input' ).val(), ai1ec_add_new_event.date_format );
340
+ until = until.getUTCFullYear() + '' + ( until.getUTCMonth() + 1 ) + until.getUTCDate() + 'T000000Z';
341
+ rule += 'UNTIL=' + until + ';';
342
+ }
343
+
344
+ var data = {
345
+ action: 'ai1ec_rrule_to_text',
346
+ rrule: rule
347
+ };
348
+ $( this ).attr( 'disabled', true );
349
+ $.post(
350
+ ajaxurl,
351
+ data,
352
+ function( response ) {
353
+ if( response.error ) {
354
+ $.growlUI( 'Error', response.message );
355
+ $button.attr( 'disabled', false );
356
+ $( '#ai1ec_rrule' ).val( '' );
357
+ var txt = $.trim( $( '#ai1ec_repeat_label' ).text() );
358
+ if( txt.lastIndexOf( '...' ) == -1 ) {
359
+ txt = txt.substring( 0, txt.length - 1 );
360
+ $( '#ai1ec_repeat_label' ).text( txt + '...' );
361
+ }
362
+ } else {
363
+ $( '#ai1ec_rrule' ).val( rule );
364
+ $.unblockUI();
365
+ var txt = $.trim( $( '#ai1ec_repeat_label' ).text() );
366
+ if( txt.lastIndexOf( ':' ) == -1 ) {
367
+ txt = txt.substring( 0, txt.length - 3 );
368
+ $( '#ai1ec_repeat_label' ).text( txt + ':' );
369
+ }
370
+ $button.attr( 'disabled', false );
371
+ $( '#ai1ec_repeat_text > a' ).fadeOut( 'fast', function() {
372
+ $( this ).text( response.message );
373
+ $( this ).fadeIn( 'fast' );
374
+ })
375
+ }
376
+ },
377
+ 'json'
378
+ );
379
+ })
380
+
381
+ $( '#ai1ec_repeat_text > a' ).live( 'click', function() {
382
+ if( ! $( '#ai1ec_repeat' ).is( ':checked' ) ) {
383
+ $( '#ai1ec_repeat' ).attr( 'checked', true );
384
+ var txt = $.trim( $( '#ai1ec_repeat_label' ).text() );
385
+ txt = txt.substring( 0, txt.length - 3 );
386
+ $( '#ai1ec_repeat_label' ).text( txt + ':' );
387
+ }
388
+ ai1ec_show_repeat_tabs();
389
+ return false;
390
+ });
391
+
392
+ $( '#ai1ec_repeat' ).click( function() {
393
+ if( $(this).is( ':checked' ) ) {
394
+ ai1ec_show_repeat_tabs();
395
+ } else {
396
+ $( '#ai1ec_repeat_text > a' ).text( '' );
397
+ var txt = $.trim( $( '#ai1ec_repeat_label' ).text() );
398
+ txt = txt.substring( 0, txt.length - 1 );
399
+ $( '#ai1ec_repeat_label' ).text( txt + '...' );
400
+ }
401
+ })
402
+ $( 'a.ai1ec_repeat_cancel' ).live( 'click', function() {
403
+ if( $.trim( $( '#ai1ec_repeat_text > a' ).text() ) == '' ) {
404
+ $( '#ai1ec_repeat' ).attr( 'checked', false );
405
+ var txt = $.trim( $( '#ai1ec_repeat_label' ).text() );
406
+ if( txt.lastIndexOf( '...' ) == -1 ) {
407
+ txt = txt.substring( 0, txt.length - 1 );
408
+ $( '#ai1ec_repeat_label' ).text( txt + '...' );
409
+ }
410
+ }
411
+ $.unblockUI();
412
+ return false;
413
+ });
414
+
415
+ var ai1ec_show_repeat_tabs = function() {
416
+ $.blockUI( {
417
+ message: $('#ai1ec_repeat_box'),
418
+ css: {
419
+ width: '358px',
420
+ border: '0',
421
+ background: 'transparent',
422
+ cursor: 'normal'
423
+ }
424
+ });
425
+ }
426
  }
427
 
428
  /**
479
  feed_tags: $( '#ai1ec_feed_tags' ).val()
480
  };
481
  // make an ajax call to save the new feed
482
+ $.post(
483
+ ajaxurl,
484
+ data,
485
  function( response ) {
486
  // restore add button
487
  $button.removeAttr( 'disabled' );
494
  // Add the feed to the settings screen
495
  $( '#ai1ec-feeds-after' ).after( response.message );
496
  }
497
+ },
498
+ 'json'
499
  );
500
  }
501
 
520
  ics_id: ics_id
521
  };
522
  // remove the feed from the database
523
+ $.post( ajaxurl, data,
524
  function( response ) {
525
  // restore the delete button
526
  $button.removeAttr( 'disabled' );
531
  // remove the feed from the settings screen
532
  $feed_row.remove();
533
  }
534
+ },
535
+ 'json'
536
  );
537
  });
538
 
554
  ics_id: ics_id
555
  };
556
  // remove the feed from the database
557
+ $.post( ajaxurl, data,
558
  function( response ) {
559
  if( response.error ) {
560
  // tell the user there is an error
563
  $button.fadeOut();
564
  }
565
  $button.siblings( '.ajax-loading' ).css( 'visibility', 'hidden' );
566
+ },
567
+ 'json'
568
  );
569
  });
570
 
586
  ics_id: ics_id
587
  };
588
  // remove the feed from the database
589
+ $.post( ajaxurl, data,
590
  function( response ) {
591
  if( response.error ) {
592
  // tell the user there is an error
602
  $button
603
  .attr( 'disabled', false )
604
  .siblings( '.ajax-loading' ).css( 'visibility', 'hidden' );
605
+ },
606
+ 'json'
607
  );
608
  });
609
 
js/calendar.js CHANGED
@@ -1,3 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  jQuery( document ).ready( function( $ ) {
2
 
3
  // =====================================
@@ -53,7 +77,7 @@ jQuery( document ).ready( function( $ ) {
53
  */
54
  function check_hash() {
55
  var live_hash = document.location.hash;
56
- var default_hash = convertEntities( ai1ec_calendar.default_hash );
57
  // If current_hash doesn't match live hash, and the document's live hash
58
  // isn't empty, or if it is, the current_hash isn't equivalent to empty
59
  // (i.e., default hash), the page needs to be updated.
@@ -83,7 +107,7 @@ jQuery( document ).ready( function( $ ) {
83
  var query = hash.substring( 1 );
84
 
85
  // Fetch AJAX result
86
- $.getJSON( ai1ec_calendar.ajaxurl, query, function( data )
87
  {
88
  // Replace action body class with new one
89
  var classes = $('body').attr( 'class' );
@@ -110,7 +134,8 @@ jQuery( document ).ready( function( $ ) {
110
 
111
  // Do any general view initialization after loading
112
  initialize_view();
113
- }
 
114
  );
115
  } );
116
 
@@ -187,6 +212,118 @@ jQuery( document ).ready( function( $ ) {
187
  } );
188
  }
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  // *** Agenda view ***
191
 
192
  /**
@@ -235,9 +372,9 @@ jQuery( document ).ready( function( $ ) {
235
 
236
  // *** All views ***
237
 
238
- /**
239
- * Category/tag filters
240
- */
241
 
242
  element_selector(
243
  '.ai1ec-category-filter-selector li',
@@ -250,14 +387,16 @@ jQuery( document ).ready( function( $ ) {
250
  'ai1ec-tags',
251
  '#ai1ec-selected-tags' );
252
 
253
- // Category/tag filtering actions
254
-
 
 
255
  /**
256
- * Checks if the element has visibile events
257
  */
258
- function has_visible_events( el ) {
259
  var ret = false;
260
- $( el ).find( 'ol.ai1ec-date-events li.ai1ec-event' ).each( function() {
261
  if( $( this ).css( 'display' ) != 'none' ) ret = true;
262
  });
263
  return ret;
@@ -294,12 +433,11 @@ jQuery( document ).ready( function( $ ) {
294
  selected_ids = selected_ids.join();
295
 
296
  // Modify export URL
297
- var export_url;
298
  if( selected_ids.length ) {
299
- export_url = convertEntities( ai1ec_calendar.export_url ) + selected_cats + selected_tags;
300
  $( '.ai1ec-subscribe-filtered' ).fadeIn( 'fast' );
301
  } else {
302
- export_url = convertEntities( ai1ec_calendar.export_url );
303
  $( '.ai1ec-subscribe-filtered' ).fadeOut( 'fast' );
304
  }
305
  $( '.ai1ec-subscribe' ).attr( 'href', export_url );
@@ -321,30 +459,38 @@ jQuery( document ).ready( function( $ ) {
321
  .delay( 500 )
322
  .fadeTo( 'fast', 0.3 );
323
 
324
- $.getJSON( ai1ec_calendar.ajaxurl, query, function( data )
325
  {
326
  // Cancel loading animation or fade out if faded in.
327
  $loading.clearQueue().fadeOut( 'fast' );
328
  $view.clearQueue().fadeTo( 'fast', 1.0 );
329
 
330
- // Fade in events that should be displayed (or leave them visible)
331
  var jq_selector = new Array(); // Build our jQuery selector string
332
  $.each( data.matching_ids, function( i, val ) {
333
  jq_selector.push( '.ai1ec-event-id-' + val );
334
  } );
335
  $( jq_selector.join() ).css( 'display', 'block' );
336
 
337
- // Fade out events that should be hidden (or leave them hidden)
338
  jq_selector = new Array();
339
  $.each( data.unmatching_ids, function( i, val ) {
340
  jq_selector.push( '.ai1ec-event-id-' + val );
341
  } );
342
  $( jq_selector.join() ).css( 'display', 'none' );
 
 
 
343
  $( 'ol.ai1ec-agenda-view > li.ai1ec-date' ).each( function() {
344
  if( has_visible_events( $( this ) ) ) $( this ).slideDown( 'fast' );
345
  else $( this ).slideUp( 'fast' );
346
- });
347
- }
 
 
 
 
 
348
  );
349
  }
350
 
@@ -422,6 +568,9 @@ jQuery( document ).ready( function( $ ) {
422
  if( $('.ai1ec-dropdown.ai1ec-selected').length ) {
423
  $('.ai1ec-month-view .ai1ec-event-container, .ai1ec-agenda-view .ai1ec-event').hide();
424
  apply_filters();
 
 
 
425
  }
426
  }
427
 
1
+ //Used to ensure that Entities used in L10N strings are correct
2
+ function ai1ec_convert_entities(o) {
3
+ var c, v;
4
+ c = function(s) {
5
+ if (/&[^;]+;/.test(s)) {
6
+ var e = document.createElement("div");
7
+ e.innerHTML = s;
8
+ return !e.firstChild ? s : e.firstChild.nodeValue;
9
+ }
10
+ return s;
11
+ }
12
+
13
+ if ( typeof o === 'string' ) {
14
+ return c(o);
15
+ } else if ( typeof o === 'object' ) {
16
+ for (v in o) {
17
+ if ( typeof o[v] === 'string' ) {
18
+ o[v] = c(o[v]);
19
+ }
20
+ }
21
+ }
22
+ return o;
23
+ }
24
+
25
  jQuery( document ).ready( function( $ ) {
26
 
27
  // =====================================
77
  */
78
  function check_hash() {
79
  var live_hash = document.location.hash;
80
+ var default_hash = ai1ec_convert_entities( ai1ec_calendar.default_hash );
81
  // If current_hash doesn't match live hash, and the document's live hash
82
  // isn't empty, or if it is, the current_hash isn't equivalent to empty
83
  // (i.e., default hash), the page needs to be updated.
107
  var query = hash.substring( 1 );
108
 
109
  // Fetch AJAX result
110
+ $.post( ai1ec_calendar.ajaxurl, query, function( data )
111
  {
112
  // Replace action body class with new one
113
  var classes = $('body').attr( 'class' );
134
 
135
  // Do any general view initialization after loading
136
  initialize_view();
137
+ },
138
+ 'json'
139
  );
140
  } );
141
 
212
  } );
213
  }
214
 
215
+ /**
216
+ * Trims date boxes for which there are too many listed events.
217
+ */
218
+ function truncate_month_view()
219
+ {
220
+ if( $( '.ai1ec-month-view' ).length )
221
+ {
222
+ // First undo any previous truncation
223
+ $( '.ai1ec-day .ai1ec-obscured' ).removeClass( 'ai1ec-obscured' );
224
+ $( '.ai1ec-day .ai1ec-scroll-up, .ai1ec-day .ai1ec-scroll-down' ).remove();
225
+
226
+ // Now set up truncation on any days with max visible events.
227
+ $( '.ai1ec-month-view .ai1ec-day' ).each( function()
228
+ {
229
+ var max_visible = 8;
230
+ var $events = $( '.ai1ec-event-container:visible', this );
231
+
232
+ if( $events.length > max_visible )
233
+ {
234
+ /**
235
+ * Scroll up by one event.
236
+ */
237
+ function scroll_up( $el ) {
238
+ if( ! $el.hasClass( 'ai1ec-disabled' ) ) {
239
+ var $first_visible =
240
+ $el.siblings( '.ai1ec-event-container:not(.ai1ec-obscured)' )
241
+ .last().addClass( 'ai1ec-obscured' ).end()
242
+ .first().prev( '.ai1ec-event-container' ).removeClass( 'ai1ec-obscured' );
243
+ if( $first_visible.prev( '.ai1ec-event-container' ).length == 0 )
244
+ $el.addClass( 'ai1ec-disabled' );
245
+ $el.parent().find( '.ai1ec-scroll-down' ).removeClass( 'ai1ec-disabled' );
246
+ }
247
+ }
248
+
249
+ /**
250
+ * Scroll down by one event.
251
+ */
252
+ function scroll_down( $el ) {
253
+ if( ! $el.hasClass( 'ai1ec-disabled' ) ) {
254
+ var $last_visible =
255
+ $el.siblings( '.ai1ec-event-container:not(.ai1ec-obscured)' )
256
+ .first().addClass( 'ai1ec-obscured' ).end()
257
+ .last().next( '.ai1ec-event-container' ).removeClass( 'ai1ec-obscured' );
258
+ if( $last_visible.next( '.ai1ec-event-container' ).length == 0 )
259
+ $el.addClass( 'ai1ec-disabled' );
260
+ $el.parent().find( '.ai1ec-scroll-up' ).removeClass( 'ai1ec-disabled' );
261
+ }
262
+ }
263
+
264
+ /**
265
+ * Mouse button held down on a scroll button.
266
+ */
267
+ function scroll_hold( $el, func ) {
268
+ $el.delay( 100 ).queue( function( next ) {
269
+ func( $el );
270
+ scroll_hold( $el, func );
271
+ next();
272
+ } );
273
+ }
274
+ /**
275
+ * Mouse button let go of a scroll button.
276
+ */
277
+ function scroll_cancel() {
278
+ $( this ).clearQueue();
279
+ }
280
+
281
+ /**
282
+ * Register mousedown action. Trigger once right away, then again
283
+ * after 600 ms delay, then again every 100 ms while held down.
284
+ */
285
+ function register_mousedown( $button, func ) {
286
+ $button.mousedown( function( e ) {
287
+ if( e.button == 0 ) {
288
+ func( $( this ) ); // Scroll once
289
+ $( this )
290
+ .delay( 600 )
291
+ .queue( function( next ) {
292
+ func( $( this ) ); // Scroll again after 600 ms
293
+ scroll_hold( $( this ), func ); // Scroll repeatedly
294
+ next();
295
+ } );
296
+ }
297
+ } );
298
+ }
299
+
300
+ // Scroll up button, and register mousedown
301
+ $scroll_up = $( '<a href="#" class="ai1ec-scroll-up ai1ec-disabled"></a>' )
302
+ register_mousedown( $scroll_up, scroll_up );
303
+
304
+ // Scroll down button, and register mousedown
305
+ $scroll_down = $( '<a href="#" class="ai1ec-scroll-down"></a>' );
306
+ register_mousedown( $scroll_down, scroll_down );
307
+
308
+ // Register scroll cancel events
309
+ $scroll_up.add( $scroll_down )
310
+ .mouseup( function ( e ) {
311
+ if( e.button == 0 )
312
+ $( this ).each( scroll_cancel );
313
+ } )
314
+ .mouseout( scroll_cancel )
315
+ .click( function() { return false } );
316
+
317
+ // Attach scroll buttons to date DIV
318
+ $events
319
+ .first().before( $scroll_up ).end()
320
+ .last().after( $scroll_down ).end()
321
+ .filter( ':gt(' + max_visible + ')' ).addClass( 'ai1ec-obscured' );
322
+ }
323
+ } );
324
+ }
325
+ }
326
+
327
  // *** Agenda view ***
328
 
329
  /**
372
 
373
  // *** All views ***
374
 
375
+ // ========================
376
+ // = Category/tag filters =
377
+ // ========================
378
 
379
  element_selector(
380
  '.ai1ec-category-filter-selector li',
387
  'ai1ec-tags',
388
  '#ai1ec-selected-tags' );
389
 
390
+ // ==================================
391
+ // = Category/tag filtering actions =
392
+ // ==================================
393
+
394
  /**
395
+ * Checks if the date element in Agenda view contains visible events
396
  */
397
+ function has_visible_events( $el ) {
398
  var ret = false;
399
+ $el.find( 'ol.ai1ec-date-events li.ai1ec-event' ).each( function() {
400
  if( $( this ).css( 'display' ) != 'none' ) ret = true;
401
  });
402
  return ret;
433
  selected_ids = selected_ids.join();
434
 
435
  // Modify export URL
436
+ var export_url = ai1ec_convert_entities( ai1ec_calendar.export_url );
437
  if( selected_ids.length ) {
438
+ export_url += selected_cats + selected_tags;
439
  $( '.ai1ec-subscribe-filtered' ).fadeIn( 'fast' );
440
  } else {
 
441
  $( '.ai1ec-subscribe-filtered' ).fadeOut( 'fast' );
442
  }
443
  $( '.ai1ec-subscribe' ).attr( 'href', export_url );
459
  .delay( 500 )
460
  .fadeTo( 'fast', 0.3 );
461
 
462
+ $.post( ai1ec_calendar.ajaxurl, query, function( data )
463
  {
464
  // Cancel loading animation or fade out if faded in.
465
  $loading.clearQueue().fadeOut( 'fast' );
466
  $view.clearQueue().fadeTo( 'fast', 1.0 );
467
 
468
+ // Show events that should be displayed (or leave them visible)
469
  var jq_selector = new Array(); // Build our jQuery selector string
470
  $.each( data.matching_ids, function( i, val ) {
471
  jq_selector.push( '.ai1ec-event-id-' + val );
472
  } );
473
  $( jq_selector.join() ).css( 'display', 'block' );
474
 
475
+ // Hide events that should be hidden (or leave them hidden)
476
  jq_selector = new Array();
477
  $.each( data.unmatching_ids, function( i, val ) {
478
  jq_selector.push( '.ai1ec-event-id-' + val );
479
  } );
480
  $( jq_selector.join() ).css( 'display', 'none' );
481
+
482
+ // Agenda view only: Slide up dates for which there are no events, and
483
+ // slide down those for which there are
484
  $( 'ol.ai1ec-agenda-view > li.ai1ec-date' ).each( function() {
485
  if( has_visible_events( $( this ) ) ) $( this ).slideDown( 'fast' );
486
  else $( this ).slideUp( 'fast' );
487
+ } );
488
+
489
+ // Month view only: Trim down date boxes for which there are too many
490
+ // listed events.
491
+ truncate_month_view();
492
+ },
493
+ 'json'
494
  );
495
  }
496
 
568
  if( $('.ai1ec-dropdown.ai1ec-selected').length ) {
569
  $('.ai1ec-month-view .ai1ec-event-container, .ai1ec-agenda-view .ai1ec-event').hide();
570
  apply_filters();
571
+ } else {
572
+ // Else do month view trimming
573
+ truncate_month_view();
574
  }
575
  }
576
 
js/jquery.blockUI.js ADDED
@@ -0,0 +1,500 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery blockUI plugin
3
+ * Version 2.39 (23-MAY-2011)
4
+ * @requires jQuery v1.2.3 or later
5
+ *
6
+ * Examples at: http://malsup.com/jquery/block/
7
+ * Copyright (c) 2007-2010 M. Alsup
8
+ * Dual licensed under the MIT and GPL licenses:
9
+ * http://www.opensource.org/licenses/mit-license.php
10
+ * http://www.gnu.org/licenses/gpl.html
11
+ *
12
+ * Thanks to Amir-Hossein Sobhi for some excellent contributions!
13
+ */
14
+
15
+ ;(function($) {
16
+
17
+ if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
18
+ alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
19
+ return;
20
+ }
21
+
22
+ $.fn._fadeIn = $.fn.fadeIn;
23
+
24
+ var noOp = function() {};
25
+
26
+ // this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
27
+ // retarded userAgent strings on Vista)
28
+ var mode = document.documentMode || 0;
29
+ var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);
30
+ var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode;
31
+
32
+ // global $ methods for blocking/unblocking the entire page
33
+ $.blockUI = function(opts) { install(window, opts); };
34
+ $.unblockUI = function(opts) { remove(window, opts); };
35
+
36
+ // convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
37
+ $.growlUI = function(title, message, timeout, onClose) {
38
+ var $m = $('<div class="growlUI"></div>');
39
+ if (title) $m.append('<h1>'+title+'</h1>');
40
+ if (message) $m.append('<h2>'+message+'</h2>');
41
+ if (timeout == undefined) timeout = 3000;
42
+ $.blockUI({
43
+ message: $m, fadeIn: 700, fadeOut: 1000, centerY: false,
44
+ timeout: timeout, showOverlay: false,
45
+ onUnblock: onClose,
46
+ css: $.blockUI.defaults.growlCSS
47
+ });
48
+ };
49
+
50
+ // plugin method for blocking element content
51
+ $.fn.block = function(opts) {
52
+ return this.unblock({ fadeOut: 0 }).each(function() {
53
+ if ($.css(this,'position') == 'static')
54
+ this.style.position = 'relative';
55
+ if ($.browser.msie)
56
+ this.style.zoom = 1; // force 'hasLayout'
57
+ install(this, opts);
58
+ });
59
+ };
60
+
61
+ // plugin method for unblocking element content
62
+ $.fn.unblock = function(opts) {
63
+ return this.each(function() {
64
+ remove(this, opts);
65
+ });
66
+ };
67
+
68
+ $.blockUI.version = 2.39; // 2nd generation blocking at no extra cost!
69
+
70
+ // override these in your code to change the default behavior and style
71
+ $.blockUI.defaults = {
72
+ // message displayed when blocking (use null for no message)
73
+ message: '<h1>Please wait...</h1>',
74
+
75
+ title: null, // title string; only used when theme == true
76
+ draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
77
+
78
+ theme: false, // set to true to use with jQuery UI themes
79
+
80
+ // styles for the message when blocking; if you wish to disable
81
+ // these and use an external stylesheet then do this in your code:
82
+ // $.blockUI.defaults.css = {};
83
+ css: {
84
+ padding: 0,
85
+ margin: 0,
86
+ width: '30%',
87
+ top: '40%',
88
+ left: '35%',
89
+ textAlign: 'center',
90
+ color: '#000',
91
+ border: '3px solid #aaa',
92
+ backgroundColor:'#fff',
93
+ cursor: 'wait'
94
+ },
95
+
96
+ // minimal style set used when themes are used
97
+ themedCSS: {
98
+ width: '30%',
99
+ top: '40%',
100
+ left: '35%'
101
+ },
102
+
103
+ // styles for the overlay
104
+ overlayCSS: {
105
+ backgroundColor: '#000',
106
+ opacity: 0.6,
107
+ cursor: 'wait'
108
+ },
109
+
110
+ // styles applied when using $.growlUI
111
+ growlCSS: {
112
+ width: '350px',
113
+ top: '10px',
114
+ left: '',
115
+ right: '10px',
116
+ border: 'none',
117
+ padding: '5px',
118
+ opacity: 0.6,
119
+ cursor: 'default',
120
+ color: '#fff',
121
+ backgroundColor: '#000',
122
+ '-webkit-border-radius': '10px',
123
+ '-moz-border-radius': '10px',
124
+ 'border-radius': '10px'
125
+ },
126
+
127
+ // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
128
+ // (hat tip to Jorge H. N. de Vasconcelos)
129
+ iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
130
+
131
+ // force usage of iframe in non-IE browsers (handy for blocking applets)
132
+ forceIframe: false,
133
+
134
+ // z-index for the blocking overlay
135
+ baseZ: 1000,
136
+
137
+ // set these to true to have the message automatically centered
138
+ centerX: true, // <-- only effects element blocking (page block controlled via css above)
139
+ centerY: true,
140
+
141
+ // allow body element to be stetched in ie6; this makes blocking look better
142
+ // on "short" pages. disable if you wish to prevent changes to the body height
143
+ allowBodyStretch: true,
144
+
145
+ // enable if you want key and mouse events to be disabled for content that is blocked
146
+ bindEvents: true,
147
+
148
+ // be default blockUI will supress tab navigation from leaving blocking content
149
+ // (if bindEvents is true)
150
+ constrainTabKey: true,
151
+
152
+ // fadeIn time in millis; set to 0 to disable fadeIn on block
153
+ fadeIn: 200,
154
+
155
+ // fadeOut time in millis; set to 0 to disable fadeOut on unblock
156
+ fadeOut: 400,
157
+
158
+ // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
159
+ timeout: 0,
160
+
161
+ // disable if you don't want to show the overlay
162
+ showOverlay: true,
163
+
164
+ // if true, focus will be placed in the first available input field when
165
+ // page blocking
166
+ focusInput: true,
167
+
168
+ // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
169
+ applyPlatformOpacityRules: true,
170
+
171
+ // callback method invoked when fadeIn has completed and blocking message is visible
172
+ onBlock: null,
173
+
174
+ // callback method invoked when unblocking has completed; the callback is
175
+ // passed the element that has been unblocked (which is the window object for page
176
+ // blocks) and the options that were passed to the unblock call:
177
+ // onUnblock(element, options)
178
+ onUnblock: null,
179
+
180
+ // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
181
+ quirksmodeOffsetHack: 4,
182
+
183
+ // class name of the message block
184
+ blockMsgClass: 'blockMsg'
185
+ };
186
+
187
+ // private data and functions follow...
188
+
189
+ var pageBlock = null;
190
+ var pageBlockEls = [];
191
+
192
+ function install(el, opts) {
193
+ var full = (el == window);
194
+ var msg = opts && opts.message !== undefined ? opts.message : undefined;
195
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
196
+ opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
197
+ var css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
198
+ var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
199
+ msg = msg === undefined ? opts.message : msg;
200
+
201
+ // remove the current block (if there is one)
202
+ if (full && pageBlock)
203
+ remove(window, {fadeOut:0});
204
+
205
+ // if an existing element is being used as the blocking content then we capture
206
+ // its current place in the DOM (and current display style) so we can restore
207
+ // it when we unblock
208
+ if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
209
+ var node = msg.jquery ? msg[0] : msg;
210
+ var data = {};
211
+ $(el).data('blockUI.history', data);
212
+ data.el = node;
213
+ data.parent = node.parentNode;
214
+ data.display = node.style.display;
215
+ data.position = node.style.position;
216
+ if (data.parent)
217
+ data.parent.removeChild(node);
218
+ }
219
+
220
+ $(el).data('blockUI.onUnblock', opts.onUnblock);
221
+ var z = opts.baseZ;
222
+
223
+ // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
224
+ // layer1 is the iframe layer which is used to supress bleed through of underlying content
225
+ // layer2 is the overlay layer which has opacity and a wait cursor (by default)
226
+ // layer3 is the message content that is displayed while blocking
227
+
228
+ var lyr1 = ($.browser.msie || opts.forceIframe)
229
+ ? $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>')
230
+ : $('<div class="blockUI" style="display:none"></div>');
231
+
232
+ var lyr2 = opts.theme
233
+ ? $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>')
234
+ : $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
235
+
236
+ var lyr3, s;
237
+ if (opts.theme && full) {
238
+ s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">' +
239
+ '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
240
+ '<div class="ui-widget-content ui-dialog-content"></div>' +
241
+ '</div>';
242
+ }
243
+ else if (opts.theme) {
244
+ s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">' +
245
+ '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>' +
246
+ '<div class="ui-widget-content ui-dialog-content"></div>' +
247
+ '</div>';
248
+ }
249
+ else if (full) {
250
+ s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
251
+ }
252
+ else {
253
+ s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
254
+ }
255
+ lyr3 = $(s);
256
+
257
+ // if we have a message, style it
258
+ if (msg) {
259
+ if (opts.theme) {
260
+ lyr3.css(themedCSS);
261
+ lyr3.addClass('ui-widget-content');
262
+ }
263
+ else
264
+ lyr3.css(css);
265
+ }
266
+
267
+ // style the overlay
268
+ if (!opts.theme && (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform))))
269
+ lyr2.css(opts.overlayCSS);
270
+ lyr2.css('position', full ? 'fixed' : 'absolute');
271
+
272
+ // make iframe layer transparent in IE
273
+ if ($.browser.msie || opts.forceIframe)
274
+ lyr1.css('opacity',0.0);
275
+
276
+ //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
277
+ var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
278
+ $.each(layers, function() {
279
+ this.appendTo($par);
280
+ });
281
+
282
+ if (opts.theme && opts.draggable && $.fn.draggable) {
283
+ lyr3.draggable({
284
+ handle: '.ui-dialog-titlebar',
285
+ cancel: 'li'
286
+ });
287
+ }
288
+
289
+ // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
290
+ var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
291
+ if (ie6 || expr) {
292
+ // give body 100% height
293
+ if (full && opts.allowBodyStretch && $.boxModel)
294
+ $('html,body').css('height','100%');
295
+
296
+ // fix ie6 issue when blocked element has a border width
297
+ if ((ie6 || !$.boxModel) && !full) {
298
+ var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
299
+ var fixT = t ? '(0 - '+t+')' : 0;
300
+ var fixL = l ? '(0 - '+l+')' : 0;
301
+ }
302
+
303
+ // simulate fixed position
304
+ $.each([lyr1,lyr2,lyr3], function(i,o) {
305
+ var s = o[0].style;
306
+ s.position = 'absolute';
307
+ if (i < 2) {
308
+ full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"')
309
+ : s.setExpression('height','this.parentNode.offsetHeight + "px"');
310
+ full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
311
+ : s.setExpression('width','this.parentNode.offsetWidth + "px"');
312
+ if (fixL) s.setExpression('left', fixL);
313
+ if (fixT) s.setExpression('top', fixT);
314
+ }
315
+ else if (opts.centerY) {
316
+ if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
317
+ s.marginTop = 0;
318
+ }
319
+ else if (!opts.centerY && full) {
320
+ var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0;
321
+ var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
322
+ s.setExpression('top',expression);
323
+ }
324
+ });
325
+ }
326
+
327
+ // show the message
328
+ if (msg) {
329
+ if (opts.theme)
330
+ lyr3.find('.ui-widget-content').append(msg);
331
+ else
332
+ lyr3.append(msg);
333
+ if (msg.jquery || msg.nodeType)
334
+ $(msg).show();
335
+ }
336
+
337
+ if (($.browser.msie || opts.forceIframe) && opts.showOverlay)
338
+ lyr1.show(); // opacity is zero
339
+ if (opts.fadeIn) {
340
+ var cb = opts.onBlock ? opts.onBlock : noOp;
341
+ var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
342
+ var cb2 = msg ? cb : noOp;
343
+ if (opts.showOverlay)
344
+ lyr2._fadeIn(opts.fadeIn, cb1);
345
+ if (msg) {
346
+ lyr3._fadeIn(opts.fadeIn, cb2);
347
+ }
348
+ }
349
+ else {
350
+ if (opts.showOverlay)
351
+ lyr2.show();
352
+ if (msg)
353
+ lyr3.show();
354
+ if (opts.onBlock)
355
+ opts.onBlock();
356
+ }
357
+
358
+ // bind key and mouse events
359
+ bind(1, el, opts);
360
+
361
+ if (full) {
362
+ pageBlock = lyr3[0];
363
+ pageBlockEls = $(':input:enabled:visible',pageBlock);
364
+ if (opts.focusInput)
365
+ setTimeout(focus, 20);
366
+ }
367
+ else
368
+ center(lyr3[0], opts.centerX, opts.centerY);
369
+
370
+ if (opts.timeout) {
371
+ // auto-unblock
372
+ var to = setTimeout(function() {
373
+ full ? $.unblockUI(opts) : $(el).unblock(opts);
374
+ }, opts.timeout);
375
+ $(el).data('blockUI.timeout', to);
376
+ }
377
+ };
378
+
379
+ // remove the block
380
+ function remove(el, opts) {
381
+ var full = (el == window);
382
+ var $el = $(el);
383
+ var data = $el.data('blockUI.history');
384
+ var to = $el.data('blockUI.timeout');
385
+ if (to) {
386
+ clearTimeout(to);
387
+ $el.removeData('blockUI.timeout');
388
+ }
389
+ opts = $.extend({}, $.blockUI.defaults, opts || {});
390
+ bind(0, el, opts); // unbind events
391
+
392
+ if (opts.onUnblock === null) {
393
+ opts.onUnblock = $el.data('blockUI.onUnblock');
394
+ $el.removeData('blockUI.onUnblock');
395
+ }
396
+
397
+ var els;
398
+ if (full) // crazy selector to handle odd field errors in ie6/7
399
+ els = $('body').children().filter('.blockUI').add('body > .blockUI');
400
+ else
401
+ els = $('.blockUI', el);
402
+
403
+ if (full)
404
+ pageBlock = pageBlockEls = null;
405
+
406
+ if (opts.fadeOut) {
407
+ els.fadeOut(opts.fadeOut);
408
+ setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut);
409
+ }
410
+ else
411
+ reset(els, data, opts, el);
412
+ };
413
+
414
+ // move blocking element back into the DOM where it started
415
+ function reset(els,data,opts,el) {
416
+ els.each(function(i,o) {
417
+ // remove via DOM calls so we don't lose event handlers
418
+ if (this.parentNode)
419
+ this.parentNode.removeChild(this);
420
+ });
421
+
422
+ if (data && data.el) {
423
+ data.el.style.display = data.display;
424
+ data.el.style.position = data.position;
425
+ if (data.parent)
426
+ data.parent.appendChild(data.el);
427
+ $(el).removeData('blockUI.history');
428
+ }
429
+
430
+ if (typeof opts.onUnblock == 'function')
431
+ opts.onUnblock(el,opts);
432
+ };
433
+
434
+ // bind/unbind the handler
435
+ function bind(b, el, opts) {
436
+ var full = el == window, $el = $(el);
437
+
438
+ // don't bother unbinding if there is nothing to unbind
439
+ if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
440
+ return;
441
+ if (!full)
442
+ $el.data('blockUI.isBlocked', b);
443
+
444
+ // don't bind events when overlay is not in use or if bindEvents is false
445
+ if (!opts.bindEvents || (b && !opts.showOverlay))
446
+ return;
447
+
448
+ // bind anchors and inputs for mouse and key events
449
+ var events = 'mousedown mouseup keydown keypress';
450
+ b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler);
451
+
452
+ // former impl...
453
+ // var $e = $('a,:input');
454
+ // b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
455
+ };
456
+
457
+ // event handler to suppress keyboard/mouse events when blocking
458
+ function handler(e) {
459
+ // allow tab navigation (conditionally)
460
+ if (e.keyCode && e.keyCode == 9) {
461
+ if (pageBlock && e.data.constrainTabKey) {
462
+ var els = pageBlockEls;
463
+ var fwd = !e.shiftKey && e.target === els[els.length-1];
464
+ var back = e.shiftKey && e.target === els[0];
465
+ if (fwd || back) {
466
+ setTimeout(function(){focus(back)},10);
467
+ return false;
468
+ }
469
+ }
470
+ }
471
+ var opts = e.data;
472
+ // allow events within the message content
473
+ if ($(e.target).parents('div.' + opts.blockMsgClass).length > 0)
474
+ return true;
475
+
476
+ // allow events for content that is not being blocked
477
+ return $(e.target).parents().children().filter('div.blockUI').length == 0;
478
+ };
479
+
480
+ function focus(back) {
481
+ if (!pageBlockEls)
482
+ return;
483
+ var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
484
+ if (e)
485
+ e.focus();
486
+ };
487
+
488
+ function center(el, x, y) {
489
+ var p = el.parentNode, s = el.style;
490
+ var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
491
+ var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
492
+ if (x) s.left = l > 0 ? (l+'px') : '0';
493
+ if (y) s.top = t > 0 ? (t+'px') : '0';
494
+ };
495
+
496
+ function sz(el, p) {
497
+ return parseInt($.css(el,p))||0;
498
+ };
499
+
500
+ })(jQuery);
js/jquery.bsmselect.js ADDED
@@ -0,0 +1,381 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Better Select Multiple - jQuery Plugin
3
+ *
4
+ * based on Alternate Select Multiple (asmSelect) 1.0.4a beta (http://www.ryancramer.com/projects/asmselect/)
5
+ *
6
+ * Copyright (c) 2009 by Ryan Cramer - http://www.ryancramer.com
7
+ * Copyright (c) 2010 by Victor Berchet - http://www.github.com/vicb
8
+ *
9
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
10
+ *
11
+ * bsmSelect version: v1.4.3 - 2011-05-05
12
+ */
13
+
14
+ (function($) {
15
+
16
+ function BsmSelect(target, options)
17
+ {
18
+ this.$original = $(target); // the original select multiple
19
+ this.buildingSelect = false; // is the new select being constructed right now?
20
+ this.ieClick = false; // in IE, has a click event occurred? ignore if not
21
+ this.ignoreOriginalChangeEvent = false; // originalChangeEvent bypassed when this is true
22
+ this.options = options;
23
+ this.buildDom();
24
+ }
25
+
26
+ BsmSelect.prototype = {
27
+ /**
28
+ * Generate an UID
29
+ */
30
+ generateUid: function(index) {
31
+ return (this.uid = this.options.containerClass + index);
32
+ },
33
+
34
+ /**
35
+ * Build the DOM for bsmSelect
36
+ */
37
+ buildDom: function() {
38
+ var self = this, o = this.options;
39
+
40
+ if (o.addItemTarget === 'original') {
41
+ $('option', this.$original).each(function(i, o) {
42
+ if ($(o).data('bsm-order') === null) { $(o).data('bsm-order', i); }
43
+ });
44
+ }
45
+
46
+ for (var index = 0; $('#' + this.generateUid(index)).size(); index++) {}
47
+
48
+ this.$select = $('<select>', {
49
+ 'class': o.selectClass,
50
+ name: o.selectClass + this.uid,
51
+ id: o.selectClass + this.uid,
52
+ change: $.proxy(this.selectChangeEvent, this),
53
+ click: $.proxy(this.selectClickEvent, this)
54
+ });
55
+
56
+ this.$list = $.isFunction(o.listType)
57
+ ? o.listType(this.$original)
58
+ : $('<' + o.listType + '>', { id: o.listClass + this.uid });
59
+
60
+ this.$list.addClass(o.listClass);
61
+
62
+ this.$container = $('<div>', { 'class': o.containerClass, id: this.uid });
63
+
64
+ this.buildSelect();
65
+
66
+ this.$original.change($.proxy(this.originalChangeEvent, this)).wrap(this.$container).before(this.$select);
67
+
68
+ // if the list isn't already in the document, add it (it might be inserted by a custom callback)
69
+ if (!this.$list.parent().length) { this.$original.before(this.$list); }
70
+
71
+ if (this.$original.attr('id')) {
72
+ $('label[for=' + this.$original.attr('id') + ']').attr('for', this.$select.attr('id'));
73
+ }
74
+
75
+ // set up remove event (may be a link, or the list item itself)
76
+ this.$list.delegate('.' + o.removeClass, 'click', function() {
77
+ self.dropListItem($(this).closest('li'));
78
+ return false;
79
+ });
80
+
81
+ $.each(o.plugins, function() { this.init(self); });
82
+ },
83
+
84
+ /**
85
+ * Triggered when an item has been selected
86
+ * Check to make sure it's not an IE screwup, and add it to the list
87
+ */
88
+ selectChangeEvent: function() {
89
+ if ($.browser.msie && $.browser.version < 7 && !this.ieClick) { return; }
90
+ var bsmOpt = $('option:selected:eq(0)', this.$select);
91
+ if (bsmOpt.data('orig-option')) {
92
+ this.addListItem(bsmOpt);
93
+ this.triggerOriginalChange(bsmOpt.data('orig-option'), 'add');
94
+ }
95
+ this.ieClick = false;
96
+ },
97
+
98
+ /**
99
+ * IE6 lets you scroll around in a select without it being pulled down
100
+ * making sure a click preceded the change() event reduces the chance
101
+ * if unintended items being added. there may be a better solution?
102
+ */
103
+ selectClickEvent: function() {
104
+ this.ieClick = true;
105
+ },
106
+
107
+ /**
108
+ * Rebuild bsmSelect when the 'change' event is triggered on the original select
109
+ */
110
+ originalChangeEvent: function() {
111
+ if (this.ignoreOriginalChangeEvent) {
112
+ // We don't want to rebuild everything when an item is added / droped
113
+ this.ignoreOriginalChangeEvent = false;
114
+ } else {
115
+ this.buildSelect();
116
+ // opera has an issue where it needs a force redraw, otherwise
117
+ // the items won't appear until something else forces a redraw
118
+ if ($.browser.opera) { this.$list.hide().show(); }
119
+ }
120
+ },
121
+
122
+ /**
123
+ * Build the DOM for the new select
124
+ */
125
+ buildSelect: function() {
126
+ var self = this;
127
+
128
+ this.buildingSelect = true;
129
+
130
+ // add a first option to be the home option / default selectLabel
131
+ this.$select.empty().prepend($('<option value=""></option>').text(this.$original.attr('title') || this.options.title));
132
+ this.$list.empty();
133
+
134
+ this.$original.children().each(function() {
135
+ if ($(this).is('option')) {
136
+ self.addSelectOption(self.$select, $(this));
137
+ } else if ($(this).is('optgroup')) {
138
+ self.addSelectOptionGroup(self.$select, $(this));
139
+ }
140
+ });
141
+
142
+ if (!this.options.debugMode) { this.$original.hide(); }
143
+ this.selectFirstItem();
144
+ this.buildingSelect = false;
145
+ },
146
+
147
+ /**
148
+ * Append an option to the new select
149
+ *
150
+ * @param {jQuery} $parent Where to append the option
151
+ * @param {jQuery} $origOpt Option from the original select
152
+ */
153
+ addSelectOption: function ($parent, $origOpt) {
154
+ var $bsmOpt = $('<option>', {
155
+ text: $origOpt.text(),
156
+ val: $origOpt.val() }).appendTo($parent).data('orig-option', $origOpt),
157
+ isSelected = $origOpt.is(':selected'),
158
+ isDisabled = $origOpt.is(':disabled');
159
+ $origOpt.data('bsm-option', $bsmOpt);
160
+ if (isSelected && !isDisabled) {
161
+ this.addListItem($bsmOpt);
162
+ this.disableSelectOption($bsmOpt);
163
+ } else if (!isSelected && isDisabled) {
164
+ this.disableSelectOption($bsmOpt);
165
+ }
166
+ },
167
+
168
+ /**
169
+ * Append an option group to the new select
170
+ *
171
+ * @param {jQuery} $parent Where to append the group
172
+ * @param {jQuery} $group Model group from the original select
173
+ */
174
+ addSelectOptionGroup: function($parent, $group)
175
+ {
176
+ var self = this,
177
+ $G = $('<optgroup>', { label: $group.attr('label')} ).appendTo($parent);
178
+ if ($group.is(':disabled')) { $G.attr('disabled', 'disabled'); }
179
+ $('option', $group).each(function() { self.addSelectOption($G, $(this)); });
180
+ },
181
+
182
+ /**
183
+ * Select the first item of the new select
184
+ */
185
+ selectFirstItem: function() {
186
+ $('option:eq(0)', this.$select).attr('selected', 'selected');
187
+ },
188
+
189
+ /**
190
+ * Make an option disabled, indicating that it's already been selected
191
+ * because safari is the only browser that makes disabled items look 'disabled'
192
+ * we apply a class that reproduces the disabled look in other browsers
193
+ *
194
+ * @param {jQuery} $bsmOpt Option from the new select
195
+ */
196
+ disableSelectOption: function($bsmOpt) {
197
+ $bsmOpt.addClass(this.options.optionDisabledClass)
198
+ .removeAttr('selected')
199
+ .attr('disabled', 'disabled')
200
+ .toggle(!this.options.hideWhenAdded);
201
+ if ($.browser.msie && $.browser.version < 8) { this.$select.hide().show(); } // this forces IE to update display
202
+ },
203
+
204
+ /**
205
+ * Enable a select option
206
+ *
207
+ * @param {jQuery} $bsmOpt Option from the new select
208
+ */
209
+ enableSelectOption: function($bsmOpt) {
210
+ $bsmOpt.removeClass(this.options.optionDisabledClass)
211
+ .removeAttr('disabled')
212
+ .toggle(!this.options.hideWhenAdded);
213
+ if ($.browser.msie && $.browser.version < 8) { this.$select.hide().show(); } // this forces IE to update display
214
+ },
215
+
216
+ /**
217
+ * Append an item corresponding to the option to the list
218
+ *
219
+ * @param {jQuery} $bsmOpt Option from the new select
220
+ */
221
+ addListItem: function($bsmOpt) {
222
+ var $item,
223
+ $origOpt = $bsmOpt.data('orig-option'),
224
+ o = this.options;
225
+
226
+ if (!$origOpt) { return; } // this is the first item, selectLabel
227
+
228
+ if (!this.buildingSelect) {
229
+ if ($origOpt.is(':selected')) { return; } // already have it
230
+ $origOpt.attr('selected', 'selected');
231
+ }
232
+
233
+ $item = $('<li>', { 'class': o.listItemClass })
234
+ .append($('<span>', { 'class': o.listItemLabelClass, html: o.extractLabel($bsmOpt, o)}))
235
+ .append($('<a>', { href: '#', 'class': o.removeClass, html: o.removeLabel }))
236
+ .data('bsm-option', $bsmOpt);
237
+
238
+ this.disableSelectOption($bsmOpt.data('item', $item));
239
+
240
+ switch (o.addItemTarget) {
241
+ case 'bottom':
242
+ this.$list.append($item.hide());
243
+ break;
244
+ case 'original':
245
+ var order = $origOpt.data('bsm-order'), inserted = false;
246
+ $('.' + o.listItemClass, this.$list).each(function() {
247
+ if (order < $(this).data('bsm-option').data('orig-option').data('bsm-order')) {
248
+ $item.hide().insertBefore(this);
249
+ inserted = true;
250
+ return false;
251
+ }
252
+ });
253
+ if (!inserted) { this.$list.append($item.hide()); }
254
+ break;
255
+ default:
256
+ this.$list.prepend($item.hide());
257
+ }
258
+
259
+ if (this.buildingSelect) {
260
+ $.bsmSelect.effects.show($item);
261
+ } else {
262
+ o.showEffect($item);
263
+ o.highlightEffect(this.$select, $item, o.highlightAddedLabel, this.options);
264
+ this.selectFirstItem();
265
+ }
266
+ },
267
+
268
+ /**
269
+ * Remove an item from the list of selection
270
+ *
271
+ * @param {jQuey} $item A list item
272
+ */
273
+ dropListItem: function($item) {
274
+ var $bsmOpt = $item.data('bsm-option'), o = this.options;
275
+ $bsmOpt.removeData('item').data('orig-option').removeAttr('selected');
276
+ (this.buildingSelect ? $.bsmSelect.effects.remove : o.hideEffect)($item);
277
+ this.enableSelectOption($bsmOpt);
278
+ o.highlightEffect(this.$select, $item, o.highlightRemovedLabel, o);
279
+ this.triggerOriginalChange($bsmOpt.data('orig-option'), 'drop');
280
+ },
281
+
282
+ /**
283
+ * Trigger a change event on the original select multiple
284
+ * so that other scripts can pick them up
285
+ *
286
+ * @param {jQuery} $origOpt The option from the original select
287
+ * @param {String} type Event type
288
+ */
289
+ triggerOriginalChange: function($origOpt, type) {
290
+ this.ignoreOriginalChangeEvent = true;
291
+ this.$original.trigger('change', [{
292
+ option: $origOpt,
293
+ value: $origOpt.val(),
294
+ item: $origOpt.data('bsm-option').data('item'),
295
+ type: type
296
+ }]);
297
+ }
298
+ };
299
+
300
+ $.fn.bsmSelect = function(customOptions) {
301
+ var options = $.extend({}, $.bsmSelect.conf, customOptions);
302
+ return this.each(function() {
303
+ var bsm = $(this).data("bsmSelect");
304
+ if (!bsm) {
305
+ bsm = new BsmSelect($(this), options);
306
+ $(this).data("bsmSelect", bsm);
307
+ }
308
+ });
309
+ };
310
+
311
+ $.bsmSelect = {};
312
+ $.extend($.bsmSelect, {
313
+ effects: {
314
+ show: function($el) { $el.show(); },
315
+
316
+ remove: function($el) { $el.remove(); },
317
+
318
+ highlight: function ($select, $item, label, conf) {
319
+ var $highlight,
320
+ id = $select.attr('id') + conf.highlightClass;
321
+ $('#' + id).remove();
322
+ $highlight = $('<span>', {
323
+ 'class': conf.highlightClass,
324
+ id: id,
325
+ html: label + $item.children('.' + conf.listItemLabelClass).first().text()
326
+ }).hide();
327
+ $select.after($highlight.fadeIn('fast').delay(50).fadeOut('slow', function() { $(this).remove(); }));
328
+ },
329
+
330
+ verticalListAdd: function ($el) {
331
+ $el.animate({ opacity: 'show', height: 'show' }, 100, function() {
332
+ $(this).animate({ height: '+=2px' }, 100, function() {
333
+ $(this).animate({ height: '-=2px' }, 100);
334
+ });
335
+ });
336
+ },
337
+
338
+ verticalListRemove: function($el) {
339
+ $el.animate({ opacity: 'hide', height: 'hide' }, 100, function() {
340
+ $(this).prev('li').animate({ height: '-=2px' }, 100, function() {
341
+ $(this).animate({ height: '+=2px' }, 100);
342
+ });
343
+ $(this).remove();
344
+ });
345
+ }
346
+ },
347
+ plugins: {
348
+ }
349
+ });
350
+
351
+ // Default configuration
352
+ $.bsmSelect.conf = {
353
+ listType: 'ol', // Ordered list 'ol', or unordered list 'ul'
354
+
355
+ showEffect: $.bsmSelect.effects.show,
356
+ hideEffect: $.bsmSelect.effects.remove,
357
+ highlightEffect: $.noop,
358
+
359
+ addItemTarget: 'bottom', // Where to place new selected items in list: top or bottom
360
+ hideWhenAdded: false, // Hide the option when added to the list? works only in FF
361
+ debugMode: false, // Debug mode keeps original select visible
362
+
363
+ title: 'Select...', // Text used for the default select label
364
+ removeLabel: 'remove', // HTML used for the 'remove' link
365
+ highlightAddedLabel: 'Added: ', // Text that precedes highlight of added item
366
+ highlightRemovedLabel: 'Removed: ', // Text that precedes highlight of removed item
367
+ extractLabel: function($o) { return $o.html(); },
368
+
369
+ plugins: [], // An array of plugin objects to enable
370
+
371
+ containerClass: 'bsmContainer', // Class for container that wraps this widget
372
+ selectClass: 'bsmSelect', // Class for the newly created <select>
373
+ optionDisabledClass: 'bsmOptionDisabled', // Class for items that are already selected / disabled
374
+ listClass: 'bsmList', // Class for the list ($list)
375
+ listItemClass: 'bsmListItem', // Class for the <li> list items
376
+ listItemLabelClass: 'bsmListItemLabel', // Class for the label text that appears in list items
377
+ removeClass: 'bsmListItemRemove', // Class given to the 'remove' link
378
+ highlightClass: 'bsmHighlight' // Class given to the highlight <span>
379
+ };
380
+
381
+ })(jQuery);
js/jquery.calendrical.js CHANGED
@@ -1,48 +1,105 @@
1
- function formatDate(date, usa)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  {
3
- return (usa ?
4
- ((date.getUTCMonth() + 1) + '/' + date.getUTCDate()) :
5
- (date.getUTCDate() + '/' + (date.getUTCMonth() + 1))
6
- ) + '/' + date.getUTCFullYear();
 
 
 
 
 
 
 
 
 
 
 
7
  }
8
 
9
  function formatTime(hour, minute, iso)
10
  {
11
  var printMinute = minute;
12
- if (minute < 10) printMinute = '0' + minute;
13
 
14
- if (iso) {
15
  var printHour = hour
16
- if (printHour < 10) printHour = '0' + hour;
17
  return printHour + ':' + printMinute;
18
  } else {
19
  var printHour = hour % 12;
20
- if (printHour == 0) printHour = 12;
21
- var half = (hour < 12) ? 'am' : 'pm';
22
  return printHour + ':' + printMinute + half;
23
  }
24
  }
25
 
26
- function parseDate(date, usa)
27
  {
28
- date += " GMT";
29
- if (usa) return new Date(date);
30
- a = date.split(/[\.\-\/]/);
31
- var day = a.shift();
32
- var month = a.shift();
33
- a.unshift(day);
34
- a.unshift(month);
35
- return new Date(a.join('/'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  function parseTime(text)
39
  {
40
  var match = match = /(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(text);
41
- if (match && match.length >= 3) {
42
  var hour = Number(match[1]);
43
  var minute = Number(match[2]);
44
- if (hour == 12 && match[3]) hour -= 12;
45
- if (match[3] && match[3].toLowerCase() == 'pm') hour += 12;
46
  return {
47
  hour: hour,
48
  minute: minute
@@ -53,9 +110,7 @@ function parseTime(text)
53
  }
54
 
55
  (function($) {
56
- var monthNames = ['January', 'February', 'March', 'April', 'May', 'June',
57
- 'July', 'August', 'September', 'October', 'November', 'December'];
58
-
59
  function getToday()
60
  {
61
  var date = new Date();
@@ -64,7 +119,20 @@ function parseTime(text)
64
 
65
  function areDatesEqual(date1, date2)
66
  {
67
- return String(date1) == String(date2);
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
 
70
  function daysInMonth(year, month)
@@ -106,6 +174,7 @@ function parseTime(text)
106
  */
107
  function renderCalendarHeader(element, year, month, options)
108
  {
 
109
  //Prepare thead element
110
  var thead = $('<thead />');
111
  var titleRow = $('<tr />').appendTo(thead);
@@ -141,9 +210,15 @@ function parseTime(text)
141
  })
142
  ).appendTo(titleRow);
143
 
144
- //Generate weekday initials row
 
 
 
 
 
 
145
  var dayNames = $('<tr />').appendTo(thead);
146
- $.each(String('SMTWTFS').split(''), function(k, v) {
147
  $('<td />').addClass('dayName').append(v).appendTo(dayNames);
148
  });
149
 
@@ -154,14 +229,34 @@ function parseTime(text)
154
  {
155
  options = options || {};
156
 
 
157
  var today = options.today ? options.today : getToday();
158
-
 
 
 
159
  var date = new Date(year, month, 1);
 
160
 
161
- //Wind end date forward to saturday week after month
162
- var endDate = monthAfter(year, month);
163
- var ff = 6 - endDate.getUTCDay();
164
- if (ff < 6) ff += 7;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  for (var i = 0; i < ff; i++) endDate = dayAfter(endDate);
166
 
167
  var table = $('<table />');
@@ -170,8 +265,9 @@ function parseTime(text)
170
  var tbody = $('<tbody />').appendTo(table);
171
  var row = $('<tr />');
172
 
173
- //Rewind date to monday week before month
174
- var rewind = date.getUTCDay() + 7;
 
175
  for (var i = 0; i < rewind; i++) date = dayBefore(date);
176
 
177
  while (date <= endDate) {
@@ -201,8 +297,8 @@ function parseTime(text)
201
  if (isToday && isSelected) td.addClass('today_selected');
202
  if (date.getUTCMonth() != month) td.addClass('nonMonth');
203
 
204
- dow = date.getUTCDay();
205
- if (dow == 6) {
206
  tbody.append(row);
207
  row = $('<tr />');
208
  }
@@ -296,6 +392,10 @@ function parseTime(text)
296
  {
297
  options = options || {};
298
  options.padding = options.padding || 4;
 
 
 
 
299
 
300
  return this.each(function() {
301
  var element = $(this);
@@ -321,7 +421,7 @@ function parseTime(text)
321
  });
322
  element.after(div);
323
 
324
- var selected = parseDate(element.val(), options.usa);
325
  if (!selected.getUTCFullYear()) selected = options.today ? options.today : getToday();
326
 
327
  renderCalendarPage(
@@ -330,14 +430,17 @@ function parseTime(text)
330
  selected.getUTCMonth(), {
331
  today: options.today,
332
  selected: selected,
 
 
 
333
  selectDate: function(date) {
334
  within = false;
335
- element.val(formatDate(date, options.usa));
336
  div.remove();
337
  div = null;
338
  if (options.endDate) {
339
  var endDate = parseDate(
340
- options.endDate.val(), options.usa
341
  );
342
  if (endDate >= selected) {
343
  options.endDate.val(formatDate(
@@ -346,7 +449,7 @@ function parseTime(text)
346
  endDate.getTime() -
347
  selected.getTime()
348
  ),
349
- options.usa
350
  ));
351
  }
352
  }
1
+ calendricalDateFormats = {
2
+ us : { //US date format (eg. 12/1/2011)
3
+ pattern : /([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,
4
+ format : 'm/d/y',
5
+ order : 'middleEndian',
6
+ zeroPad : false },
7
+ iso : { //ISO 8601 (eg. 2011-12-01)
8
+ pattern : /([\d]{4}|[\d]{2})-([\d]{1,2})-([\d]{1,2})/,
9
+ format : 'y-m-d',
10
+ order : 'bigEndian',
11
+ zeroPad : true },
12
+ dot : { //Little endian with dots (eg. 1.12.2011)
13
+ pattern : /([\d]{1,2}).([\d]{1,2}).([\d]{4}|[\d]{2})/,
14
+ format : 'd.m.y',
15
+ order : 'littleEndian',
16
+ zeroPad : false },
17
+ def : { //Default (eg. 1/12/2011)
18
+ pattern : /([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,
19
+ format : 'd/m/y',
20
+ order : 'littleEndian',
21
+ zeroPad : false }
22
+ };
23
+
24
+ function formatDate(date, format)
25
  {
26
+ if( typeof calendricalDateFormats[format] === 'undefined' )
27
+ format = 'def';
28
+
29
+ var y = ( date.getUTCFullYear() ).toString();
30
+ var m = ( date.getUTCMonth() + 1 ).toString();
31
+ var d = ( date.getUTCDate() ).toString();
32
+ if( calendricalDateFormats[format].zeroPad ) {
33
+ if( m.length == 1 ) m = '0' + m;
34
+ if( d.length == 1 ) d = '0' + d;
35
+ }
36
+ var dt = calendricalDateFormats[format].format;
37
+ dt = dt.replace('d', d);
38
+ dt = dt.replace('m', m);
39
+ dt = dt.replace('y', y);
40
+ return dt;
41
  }
42
 
43
  function formatTime(hour, minute, iso)
44
  {
45
  var printMinute = minute;
46
+ if( minute < 10 ) printMinute = '0' + minute;
47
 
48
+ if( iso ) {
49
  var printHour = hour
50
+ if( printHour < 10 ) printHour = '0' + hour;
51
  return printHour + ':' + printMinute;
52
  } else {
53
  var printHour = hour % 12;
54
+ if( printHour == 0 ) printHour = 12;
55
+ var half = ( hour < 12 ) ? 'am' : 'pm';
56
  return printHour + ':' + printMinute + half;
57
  }
58
  }
59
 
60
+ function parseDate(date, format)
61
  {
62
+ if( typeof calendricalDateFormats[format] === 'undefined' )
63
+ format = 'def';
64
+
65
+ var matches = date.match(calendricalDateFormats[format].pattern);
66
+ if( !matches || matches.length != 4 ) {
67
+ // Return an "invalid date" date instance like the original parseDate
68
+ return Date( 'invalid' );
69
+ }
70
+
71
+ switch( calendricalDateFormats[format].order ) {
72
+ case 'bigEndian' :
73
+ var d = matches[3]; var m = matches[2]; var y = matches[1];
74
+ break;
75
+ case 'littleEndian' :
76
+ var d = matches[1]; var m = matches[2]; var y = matches[3];
77
+ break;
78
+ case 'middleEndian' :
79
+ var d = matches[2]; var m = matches[1]; var y = matches[3];
80
+ break;
81
+ default : //Default to little endian
82
+ var d = matches[1]; var m = matches[2]; var y = matches[3];
83
+ break;
84
+ }
85
+
86
+ // Add century to a two digit year
87
+ if( y.length == 2 ) {
88
+ y = new Date().getUTCFullYear().toString().substr(0, 2) + y;
89
+ }
90
+
91
+ // This is how the original parseDate does it
92
+ return new Date( m + '/' + d + '/' + y + ' GMT' );
93
  }
94
 
95
  function parseTime(text)
96
  {
97
  var match = match = /(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(text);
98
+ if( match && match.length >= 3 ) {
99
  var hour = Number(match[1]);
100
  var minute = Number(match[2]);
101
+ if( hour == 12 && match[3] ) hour -= 12;
102
+ if( match[3] && match[3].toLowerCase() == 'pm' ) hour += 12;
103
  return {
104
  hour: hour,
105
  minute: minute
110
  }
111
 
112
  (function($) {
113
+
 
 
114
  function getToday()
115
  {
116
  var date = new Date();
119
 
120
  function areDatesEqual(date1, date2)
121
  {
122
+ if( typeof date1 === 'string' )
123
+ date1 = new Date( date1 );
124
+
125
+ if( typeof date2 === 'string' )
126
+ date2 = new Date(date2);
127
+
128
+ if( date1.getUTCDate() === date2.getUTCDate() ) {
129
+ if( date1.getUTCMonth() === date2.getUTCMonth() ) {
130
+ if( date1.getUTCFullYear() === date2.getUTCFullYear() ) {
131
+ return true;
132
+ }
133
+ }
134
+ }
135
+ return false;
136
  }
137
 
138
  function daysInMonth(year, month)
174
  */
175
  function renderCalendarHeader(element, year, month, options)
176
  {
177
+ var monthNames = options.monthNames.split(',');
178
  //Prepare thead element
179
  var thead = $('<thead />');
180
  var titleRow = $('<tr />').appendTo(thead);
210
  })
211
  ).appendTo(titleRow);
212
 
213
+ // Generate weekday initials row. Adjust for week start day
214
+ var names = options.dayNames.split(',');
215
+ var startDay = parseInt(options.weekStartDay);
216
+ var adjustedNames = [];
217
+ for( var i = 0, len = names.length; i < len; i++ ) {
218
+ adjustedNames[i] = names[(i + startDay) % len];
219
+ }
220
  var dayNames = $('<tr />').appendTo(thead);
221
+ $.each( adjustedNames, function( k, v ) {
222
  $('<td />').addClass('dayName').append(v).appendTo(dayNames);
223
  });
224
 
229
  {
230
  options = options || {};
231
 
232
+ var startDay = parseInt(options.weekStartDay);
233
  var today = options.today ? options.today : getToday();
234
+ // Normalize
235
+ today.setHours(0);
236
+ today.setMinutes(0);
237
+
238
  var date = new Date(year, month, 1);
239
+ var endDate = monthAfter(year, month);
240
 
241
+ //Adjust dates for current timezone. This is a workaround to get
242
+ //date comparison to work properly.
243
+ var tzOffset = Math.abs(today.getTimezoneOffset());
244
+ if (tzOffset != 0) {
245
+ today.setHours(today.getHours() + tzOffset / 60);
246
+ today.setMinutes(today.getMinutes() + tzOffset % 60);
247
+ date.setHours(date.getHours() + tzOffset / 60);
248
+ date.setMinutes(date.getMinutes() + tzOffset % 60);
249
+ endDate.setHours(endDate.getHours() + tzOffset / 60);
250
+ endDate.setMinutes(endDate.getMinutes() + tzOffset % 60);
251
+ }
252
+
253
+ //Wind end date forward to last day of week
254
+ var ff = endDate.getUTCDay() - startDay;
255
+ if (ff < 0) {
256
+ ff = Math.abs(ff) - 1;
257
+ } else {
258
+ ff = 6 - ff;
259
+ }
260
  for (var i = 0; i < ff; i++) endDate = dayAfter(endDate);
261
 
262
  var table = $('<table />');
265
  var tbody = $('<tbody />').appendTo(table);
266
  var row = $('<tr />');
267
 
268
+ //Rewind date to first day of week
269
+ var rewind = date.getUTCDay() - startDay;
270
+ if (rewind < 0) rewind = 7 + rewind;
271
  for (var i = 0; i < rewind; i++) date = dayBefore(date);
272
 
273
  while (date <= endDate) {
297
  if (isToday && isSelected) td.addClass('today_selected');
298
  if (date.getUTCMonth() != month) td.addClass('nonMonth');
299
 
300
+ var dow = date.getUTCDay();
301
+ if (((dow + 1) % 7) == startDay) {
302
  tbody.append(row);
303
  row = $('<tr />');
304
  }
392
  {
393
  options = options || {};
394
  options.padding = options.padding || 4;
395
+ options.monthNames = options.monthNames ||
396
+ 'January,February,March,April,May,June,July,August,September,October,November,December';
397
+ options.dayNames = options.dayNames || 'S,M,T,W,T,F,S';
398
+ options.weekStartDay = options.weekStartDay || 0;
399
 
400
  return this.each(function() {
401
  var element = $(this);
421
  });
422
  element.after(div);
423
 
424
+ var selected = parseDate(element.val(), options.dateFormat);
425
  if (!selected.getUTCFullYear()) selected = options.today ? options.today : getToday();
426
 
427
  renderCalendarPage(
430
  selected.getUTCMonth(), {
431
  today: options.today,
432
  selected: selected,
433
+ monthNames: options.monthNames,
434
+ dayNames: options.dayNames,
435
+ weekStartDay: options.weekStartDay,
436
  selectDate: function(date) {
437
  within = false;
438
+ element.val(formatDate(date, options.dateFormat));
439
  div.remove();
440
  div = null;
441
  if (options.endDate) {
442
  var endDate = parseDate(
443
+ options.endDate.val(), options.dateFormat
444
  );
445
  if (endDate >= selected) {
446
  options.endDate.val(formatDate(
449
  endDate.getTime() -
450
  selected.getTime()
451
  ),
452
+ options.dateFormat
453
  ));
454
  }
455
  }
js/jquery.inputdate.js CHANGED
@@ -26,7 +26,7 @@
26
  /**
27
  * Value initialization
28
  */
29
- function reset( start_date_input, start_time, twentyfour_hour, us_format, now )
30
  {
31
  // Restore original values of fields when the page was loaded
32
  start_time.val( start_time.data( 'timespan.initial_value' ) );
@@ -42,7 +42,7 @@
42
  } else {
43
  start = new Date( now );
44
  }
45
- start_date_input.val( formatDate( start, us_format ) );
46
 
47
  // Trigger function (defined above) to internally store values of each
48
  // input field (used in calculations later).
@@ -57,7 +57,7 @@
57
  start_date_input: 'date-input',
58
  start_time: 'time',
59
  twentyfour_hour: false,
60
- us_format: false,
61
  now: new Date()
62
  };
63
 
@@ -89,14 +89,15 @@
89
  all_inputs.bind( 'focus.timespan', store_value );
90
  date_inputs.calendricalDate( {
91
  today: new Date( o.now.getFullYear(), o.now.getMonth(), o.now.getDate() ),
92
- usa: o.us_format
 
93
  } );
94
 
95
  // Validate and update saved value of DATE fields upon blur.
96
  date_inputs
97
  .bind( 'blur.timespan', function() {
98
  // Validate contents of this field.
99
- var date = parseDate( this.value, o.us_format );
100
  if( isNaN( date ) ) {
101
  // This field is invalid.
102
  reset_invalid( $(this) );
@@ -105,7 +106,7 @@
105
  $(this).data( 'timespan.stored', this.value );
106
  // Re-format contents of field correctly (in case parsable but not
107
  // perfect).
108
- $(this).val( formatDate( date, o.us_format ) );
109
  }
110
  });
111
 
@@ -113,10 +114,10 @@
113
  // appropriate amount.
114
  start_date_input.bind( 'focus.timespan', function() {
115
  // Calculate the time difference between start & end and save it.
116
- var start_date_val = parseDate( start_date_input.val(), o.us_format ).getTime() / 1000;
117
  } )
118
  .bind( 'blur.timespan', function() {
119
- var start_date_val = parseDate( start_date_input.data( 'timespan.stored' ), o.us_format );
120
  // Shift end date/time as appropriate.
121
  } );
122
 
@@ -126,7 +127,7 @@
126
  // Update hidden field value with chosen date/time.
127
 
128
  // Convert Date object into UNIX timestamp for form submission
129
- var unix_start_time = parseDate( start_date_input.val(), o.us_format ).getTime() / 1000;
130
  // If parsed incorrectly, entire calculation is invalid.
131
  if( isNaN( unix_start_time ) ) {
132
  unix_start_time = '';
@@ -143,7 +144,7 @@
143
  reset( start_date_input,
144
  start_time,
145
  o.twentyfour_hour,
146
- o.us_format,
147
  o.now )
148
 
149
  return this;
@@ -159,7 +160,7 @@
159
  reset( $(o.start_date_input),
160
  $(o.start_time),
161
  o.twentyfour_hour,
162
- o.us_format,
163
  o.now );
164
 
165
  return this;
26
  /**
27
  * Value initialization
28
  */
29
+ function reset( start_date_input, start_time, twentyfour_hour, date_format, now )
30
  {
31
  // Restore original values of fields when the page was loaded
32
  start_time.val( start_time.data( 'timespan.initial_value' ) );
42
  } else {
43
  start = new Date( now );
44
  }
45
+ start_date_input.val( formatDate( start, date_format ) );
46
 
47
  // Trigger function (defined above) to internally store values of each
48
  // input field (used in calculations later).
57
  start_date_input: 'date-input',
58
  start_time: 'time',
59
  twentyfour_hour: false,
60
+ date_format: 'def',
61
  now: new Date()
62
  };
63
 
89
  all_inputs.bind( 'focus.timespan', store_value );
90
  date_inputs.calendricalDate( {
91
  today: new Date( o.now.getFullYear(), o.now.getMonth(), o.now.getDate() ),
92
+ dateFormat: o.date_format, monthNames: o.month_names, dayNames: o.day_names,
93
+ weekStartDay: o.week_start_day
94
  } );
95
 
96
  // Validate and update saved value of DATE fields upon blur.
97
  date_inputs
98
  .bind( 'blur.timespan', function() {
99
  // Validate contents of this field.
100
+ var date = parseDate( this.value, o.date_format );
101
  if( isNaN( date ) ) {
102
  // This field is invalid.
103
  reset_invalid( $(this) );
106
  $(this).data( 'timespan.stored', this.value );
107
  // Re-format contents of field correctly (in case parsable but not
108
  // perfect).
109
+ $(this).val( formatDate( date, o.date_format ) );
110
  }
111
  });
112
 
114
  // appropriate amount.
115
  start_date_input.bind( 'focus.timespan', function() {
116
  // Calculate the time difference between start & end and save it.
117
+ var start_date_val = parseDate( start_date_input.val(), o.date_format ).getTime() / 1000;
118
  } )
119
  .bind( 'blur.timespan', function() {
120
+ var start_date_val = parseDate( start_date_input.data( 'timespan.stored' ), o.date_format );
121
  // Shift end date/time as appropriate.
122
  } );
123
 
127
  // Update hidden field value with chosen date/time.
128
 
129
  // Convert Date object into UNIX timestamp for form submission
130
+ var unix_start_time = parseDate( start_date_input.val(), o.date_format ).getTime() / 1000;
131
  // If parsed incorrectly, entire calculation is invalid.
132
  if( isNaN( unix_start_time ) ) {
133
  unix_start_time = '';
144
  reset( start_date_input,
145
  start_time,
146
  o.twentyfour_hour,
147
+ o.date_format,
148
  o.now )
149
 
150
  return this;
160
  reset( $(o.start_date_input),
161
  $(o.start_time),
162
  o.twentyfour_hour,
163
+ o.date_format,
164
  o.now );
165
 
166
  return this;
js/jquery.timespan.js CHANGED
@@ -28,7 +28,7 @@
28
  */
29
  function reset( start_date_input, start_time_input, start_time,
30
  end_date_input, end_time_input, end_time, allday, twentyfour_hour,
31
- us_format, now )
32
  {
33
  // Restore original values of fields when the page was loaded
34
  start_time.val( start_time.data( 'timespan.initial_value' ) );
@@ -50,7 +50,7 @@
50
  start_time_input.val(
51
  formatTime( start.getUTCHours(), start.getUTCMinutes() - start.getUTCMinutes() % 15, twentyfour_hour ) );
52
  }
53
- start_date_input.val( formatDate( start, us_format ) );
54
 
55
  var end = parseInt( end_time.val() );
56
  // If end_time field has a valid integer, use it, else use start time plus
@@ -68,7 +68,7 @@
68
  // provided we were given an iCalendar-spec all-day timespan.
69
  if( allday.get(0).checked )
70
  end.setUTCDate( end.getUTCDate() - 1 );
71
- end_date_input.val( formatDate( end, us_format ) );
72
 
73
  // Trigger function (defined above) to internally store values of each
74
  // input field (used in calculations later).
@@ -95,7 +95,7 @@
95
  end_time_input: '#end-time-input',
96
  end_time: '#end-time',
97
  twentyfour_hour: false,
98
- us_format: false,
99
  now: new Date(),
100
  };
101
 
@@ -139,10 +139,16 @@
139
  .bind( 'change.timespan', function() {
140
  if( this.checked ) {
141
  time_inputs.fadeOut();
142
- date_inputs.calendricalDateRange( { today: today, usa: o.us_format } );
 
 
 
143
  } else {
144
  time_inputs.fadeIn();
145
- all_inputs.calendricalDateTimeRange( { today: today, usa: o.us_format, isoTime: o.twentyfour_hour } );
 
 
 
146
  }
147
  } )
148
  .get().checked = false;
@@ -151,7 +157,7 @@
151
  date_inputs
152
  .bind( 'blur.timespan', function() {
153
  // Validate contents of this field.
154
- var date = parseDate( this.value, o.us_format );
155
  if( isNaN( date ) ) {
156
  // This field is invalid.
157
  reset_invalid( $(this) );
@@ -160,7 +166,7 @@
160
  $(this).data( 'timespan.stored', this.value );
161
  // Re-format contents of field correctly (in case parsable but not
162
  // perfect).
163
- $(this).val( formatDate( date, o.us_format ) );
164
  }
165
  });
166
 
@@ -186,23 +192,23 @@
186
  start_date_input.add( o.start_time_input )
187
  .bind( 'focus.timespan', function() {
188
  // Calculate the time difference between start & end and save it.
189
- var start_date_val = parseDate( start_date_input.val(), o.us_format ).getTime() / 1000;
190
  var start_time_val = parseTime( start_time_input.val() );
191
  start_date_val += start_time_val.hour * 3600 + start_time_val.minute * 60;
192
- var end_date_val = parseDate( end_date_input.val(), o.us_format ).getTime() / 1000;
193
  var end_time_val = parseTime( end_time_input.val() );
194
  end_date_val += end_time_val.hour * 3600 + end_time_val.minute * 60;
195
  start_date_input.data( 'time_diff', end_date_val - start_date_val );
196
  } )
197
  .bind( 'blur.timespan', function() {
198
- var start_date_val = parseDate( start_date_input.data( 'timespan.stored' ), o.us_format );
199
  var start_time_val = parseTime( start_time_input.data( 'timespan.stored' ) );
200
  // Shift end date/time as appropriate.
201
  var end_time_val = start_date_val.getTime() / 1000
202
  + start_time_val.hour * 3600 + start_time_val.minute * 60
203
  + start_date_input.data( 'time_diff' );
204
  end_time_val = new Date( end_time_val * 1000 );
205
- end_date_input.val( formatDate( end_time_val, o.us_format ) );
206
  end_time_input.val( formatTime( end_time_val.getUTCHours(), end_time_val.getUTCMinutes(), o.twentyfour_hour ) );
207
  } );
208
 
@@ -214,7 +220,7 @@
214
  // 1. Start date/time
215
 
216
  // Convert Date object into UNIX timestamp for form submission
217
- var unix_start_time = parseDate( start_date_input.val(), o.us_format ).getTime() / 1000;
218
  // If parsed correctly, proceed to add the time.
219
  if( ! isNaN( unix_start_time ) ) {
220
  // Add time quantity to date, unless "All day" is checked.
@@ -239,7 +245,7 @@
239
  // 2. End date/time
240
 
241
  // Convert Date object into UNIX timestamp for form submission
242
- var unix_end_time = parseDate( end_date_input.val(), o.us_format ).getTime() / 1000;
243
  // If parsed correctly, proceed to add the time.
244
  if( ! isNaN( unix_end_time ) ) {
245
  // If "All day" is checked, store an end date that is one day
@@ -280,7 +286,7 @@
280
  end_time,
281
  allday,
282
  o.twentyfour_hour,
283
- o.us_format,
284
  o.now )
285
 
286
  return this;
@@ -301,7 +307,7 @@
301
  $(o.end_time),
302
  $(o.allday),
303
  o.twentyfour_hour,
304
- o.us_format,
305
  o.now );
306
 
307
  return this;
28
  */
29
  function reset( start_date_input, start_time_input, start_time,
30
  end_date_input, end_time_input, end_time, allday, twentyfour_hour,
31
+ date_format, now )
32
  {
33
  // Restore original values of fields when the page was loaded
34
  start_time.val( start_time.data( 'timespan.initial_value' ) );
50
  start_time_input.val(
51
  formatTime( start.getUTCHours(), start.getUTCMinutes() - start.getUTCMinutes() % 15, twentyfour_hour ) );
52
  }
53
+ start_date_input.val( formatDate( start, date_format ) );
54
 
55
  var end = parseInt( end_time.val() );
56
  // If end_time field has a valid integer, use it, else use start time plus
68
  // provided we were given an iCalendar-spec all-day timespan.
69
  if( allday.get(0).checked )
70
  end.setUTCDate( end.getUTCDate() - 1 );
71
+ end_date_input.val( formatDate( end, date_format ) );
72
 
73
  // Trigger function (defined above) to internally store values of each
74
  // input field (used in calculations later).
95
  end_time_input: '#end-time-input',
96
  end_time: '#end-time',
97
  twentyfour_hour: false,
98
+ date_format: 'def',
99
  now: new Date(),
100
  };
101
 
139
  .bind( 'change.timespan', function() {
140
  if( this.checked ) {
141
  time_inputs.fadeOut();
142
+ date_inputs.calendricalDateRange( {
143
+ today: today, dateFormat: o.date_format, monthNames: o.month_names,
144
+ dayNames: o.day_names, weekStartDay: o.week_start_day
145
+ } );
146
  } else {
147
  time_inputs.fadeIn();
148
+ all_inputs.calendricalDateTimeRange( {
149
+ today: today, dateFormat: o.date_format, isoTime: o.twentyfour_hour,
150
+ monthNames: o.month_names, dayNames: o.day_names, weekStartDay: o.week_start_day
151
+ } );
152
  }
153
  } )
154
  .get().checked = false;
157
  date_inputs
158
  .bind( 'blur.timespan', function() {
159
  // Validate contents of this field.
160
+ var date = parseDate( this.value, o.date_format );
161
  if( isNaN( date ) ) {
162
  // This field is invalid.
163
  reset_invalid( $(this) );
166
  $(this).data( 'timespan.stored', this.value );
167
  // Re-format contents of field correctly (in case parsable but not
168
  // perfect).
169
+ $(this).val( formatDate( date, o.date_format ) );
170
  }
171
  });
172
 
192
  start_date_input.add( o.start_time_input )
193
  .bind( 'focus.timespan', function() {
194
  // Calculate the time difference between start & end and save it.
195
+ var start_date_val = parseDate( start_date_input.val(), o.date_format ).getTime() / 1000;
196
  var start_time_val = parseTime( start_time_input.val() );
197
  start_date_val += start_time_val.hour * 3600 + start_time_val.minute * 60;
198
+ var end_date_val = parseDate( end_date_input.val(), o.date_format ).getTime() / 1000;
199
  var end_time_val = parseTime( end_time_input.val() );
200
  end_date_val += end_time_val.hour * 3600 + end_time_val.minute * 60;
201
  start_date_input.data( 'time_diff', end_date_val - start_date_val );
202
  } )
203
  .bind( 'blur.timespan', function() {
204
+ var start_date_val = parseDate( start_date_input.data( 'timespan.stored' ), o.date_format );
205
  var start_time_val = parseTime( start_time_input.data( 'timespan.stored' ) );
206
  // Shift end date/time as appropriate.
207
  var end_time_val = start_date_val.getTime() / 1000
208
  + start_time_val.hour * 3600 + start_time_val.minute * 60
209
  + start_date_input.data( 'time_diff' );
210
  end_time_val = new Date( end_time_val * 1000 );
211
+ end_date_input.val( formatDate( end_time_val, o.date_format ) );
212
  end_time_input.val( formatTime( end_time_val.getUTCHours(), end_time_val.getUTCMinutes(), o.twentyfour_hour ) );
213
  } );
214
 
220
  // 1. Start date/time
221
 
222
  // Convert Date object into UNIX timestamp for form submission
223
+ var unix_start_time = parseDate( start_date_input.val(), o.date_format ).getTime() / 1000;
224
  // If parsed correctly, proceed to add the time.
225
  if( ! isNaN( unix_start_time ) ) {
226
  // Add time quantity to date, unless "All day" is checked.
245
  // 2. End date/time
246
 
247
  // Convert Date object into UNIX timestamp for form submission
248
+ var unix_end_time = parseDate( end_date_input.val(), o.date_format ).getTime() / 1000;
249
  // If parsed correctly, proceed to add the time.
250
  if( ! isNaN( unix_end_time ) ) {
251
  // If "All day" is checked, store an end date that is one day
286
  end_time,
287
  allday,
288
  o.twentyfour_hour,
289
+ o.date_format,
290
  o.now )
291
 
292
  return this;
307
  $(o.end_time),
308
  $(o.allday),
309
  o.twentyfour_hour,
310
+ o.date_format,
311
  o.now );
312
 
313
  return this;
js/settings.js CHANGED
@@ -1,4 +1,4 @@
1
  jQuery( function( $ ) {
2
- $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
3
- postboxes.add_postbox_toggles( ai1ec_settings_page );
4
- });
1
  jQuery( function( $ ) {
2
+ $( '.if-js-closed' ).removeClass( 'if-js-closed' ).addClass( 'closed' );
3
+ postboxes.add_postbox_toggles( ai1ec_settings.page );
4
+ });
js/widget.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ jQuery( function( $ ) {
2
+ // Show/hide the multiselect containers when user clicks on "limit by" widget options
3
+ $( '.ai1ec-limit-by-cat, .ai1ec-limit-by-tag, .ai1ec-limit-by-event' ).live( 'click', function() {
4
+ $( this ).parent().next( '.ai1ec-limit-by-options-container' ).toggle();
5
+ } );
6
+ } );
language/all-in-one-event-calendar-de_DE.mo ADDED
Binary file
language/all-in-one-event-calendar-de_DE.po ADDED
@@ -0,0 +1,816 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: All-in-One Event Calendar Plugin 1.0.6\n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
5
+ "POT-Creation-Date: 2011-09-15 08:49:29+00:00\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "PO-Revision-Date: 2011-09-23 15:34+0100\n"
10
+ "Last-Translator: \n"
11
+ "Language-Team: \n"
12
+ "X-Poedit-Language: German\n"
13
+ "X-Poedit-Country: Germany\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+
16
+ #: app/controller/class-ai1ec-importer-controller.php:91
17
+ msgid "The Events Calendar → All-in-One Event Calendar"
18
+ msgstr "Der Event Kalender → All-in-One Event Calendar"
19
+
20
+ #: app/controller/class-ai1ec-importer-controller.php:92
21
+ msgid "Imports events created using The Events Calendar plugin into the All-in-One Event Calendar"
22
+ msgstr "Importiert Events aus dem Events Calender Plugin"
23
+
24
+ #: app/controller/class-ai1ec-settings-controller.php:82
25
+ msgid "Settings Updated."
26
+ msgstr "Einstellungen aktualisiert."
27
+
28
+ #: app/controller/class-ai1ec-settings-controller.php:172
29
+ msgid "Flushed %d events"
30
+ msgstr "%d Events gelöscht"
31
+
32
+ #: app/controller/class-ai1ec-settings-controller.php:214
33
+ msgid "Imported %d events"
34
+ msgstr "%d Events importiert"
35
+
36
+ #: app/controller/class-ai1ec-settings-controller.php:215
37
+ #: app/view/feed_row.php:266
38
+ msgctxt "meta box"
39
+ msgid "General Settings"
40
+ msgstr "Globale Einstellungen"
41
+
42
+ #: app/controller/class-ai1ec-settings-controller.php:273
43
+ msgctxt "meta box"
44
+ msgid "The Seed Studio Support"
45
+ msgstr "The Seed Studio Support"
46
+
47
+ #: app/controller/class-ai1ec-settings-controller.php:280
48
+ msgctxt "meta box"
49
+ msgid "ICS Import Settings"
50
+ msgstr "ICS Import Einstellungen"
51
+
52
+ #: app/controller/class-ai1ec-settings-controller.php:344
53
+ msgid "<a href=\"%s\">Settings</a>"
54
+ msgstr "<a href=\"%s\">Einstellungen</a>"
55
+
56
+ #: app/controller/class-ai1ec-settings-controller.php:358
57
+ msgid "<a href=\"%s\" target=\"_blank\">Donate</a>"
58
+ msgstr "<a href=\"%s\" target=\"_blank\">Spenden</a>"
59
+
60
+ #: app/controller/class-ai1ec-settings-controller.php:359
61
+ msgid "<a href=\"%s\" target=\"_blank\">Get Support</a>"
62
+ msgstr "<a href=\"%s\" target=\"_blank\">Unterstützung anfordern</a>"
63
+
64
+ #: app/controller/class-ai1ec-calendar-controller.php:280
65
+ #: app/helper/class-ai1ec-settings-helper.php:151
66
+ #: app/view/calendar.php:18
67
+ msgid "Agenda"
68
+ msgstr "Liste"
69
+
70
+ #: app/controller/class-ai1ec-events-controller.php:133
71
+ msgid "This feed is already being imported."
72
+ msgstr "Dieser Feede existiert bereits"
73
+
74
+ #: app/controller/class-ai1ec-events-controller.php:134
75
+ msgid "Please enter a valid iCalendar URL."
76
+ msgstr "Bitte geben Sie eine gültige iCalendar URL ein."
77
+
78
+ #: app/controller/class-ai1ec-events-controller.php:274
79
+ msgid "Publish"
80
+ msgstr "Veröffenltichen"
81
+
82
+ #: app/controller/class-ai1ec-events-controller.php:274
83
+ #: app/view/feed_row.php:20
84
+ msgid "Update"
85
+ msgstr "Aktualisieren"
86
+
87
+ #: app/controller/class-ai1ec-events-controller.php:276
88
+ msgid "Submit for Review"
89
+ msgstr "Zur Überprüfung senden"
90
+
91
+ #: app/controller/class-ai1ec-events-controller.php:465
92
+ msgid "Event updated. <a href=\"%s\">View event</a>"
93
+ msgstr "Event aktualisiert. <a href=\"%s\">Details</a>"
94
+
95
+ #: app/controller/class-ai1ec-events-controller.php:466
96
+ msgid "Custom field updated."
97
+ msgstr "Custom field aktualisiert"
98
+
99
+ #: app/controller/class-ai1ec-events-controller.php:467
100
+ msgid "Custom field deleted."
101
+ msgstr "Custom field gelöscht"
102
+
103
+ #: app/controller/class-ai1ec-events-controller.php:468
104
+ msgid "Event updated."
105
+ msgstr "Event aktualisiert"
106
+
107
+ #. translators: %s: date and time of the revision
108
+ #: app/controller/class-ai1ec-events-controller.php:470
109
+ msgid "Event restored to revision from %s"
110
+ msgstr "Event wiederhergestellt von Revision %s"
111
+
112
+ #: app/controller/class-ai1ec-events-controller.php:471
113
+ msgid "Event published. <a href=\"%s\">View event</a>"
114
+ msgstr "Event veröffentlicht. <a href=\"%s\">Ansehen</a>"
115
+
116
+ #: app/controller/class-ai1ec-events-controller.php:472
117
+ msgid "Event saved."
118
+ msgstr "Events gespeichert"
119
+
120
+ #: app/controller/class-ai1ec-events-controller.php:473
121
+ msgid "Event submitted. <a target=\"_blank\" href=\"%s\">Preview event</a>"
122
+ msgstr "Event veröffentlicht. <a target=\"_blank\" href=\"%s\">Ansehen</a>"
123
+
124
+ #: app/controller/class-ai1ec-events-controller.php:474
125
+ msgid "Event scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Preview event</a>"
126
+ msgstr "Event vorgemerkt für: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s\">Vorschau</a>"
127
+
128
+ #. translators: Publish box date format, see http:php.net/date
129
+ #: app/controller/class-ai1ec-events-controller.php:476
130
+ msgid "M j, Y @ G:i"
131
+ msgstr "d.F Y @ H:i"
132
+
133
+ #: app/controller/class-ai1ec-events-controller.php:477
134
+ msgid "Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
135
+ msgstr "Entwurf aktualisiert. <a target=\"_blank\" href=\"%s\">Vorschau</a>"
136
+
137
+ #: app/controller/class-ai1ec-app-controller.php:331
138
+ #: app/controller/class-ai1ec-app-controller.php:332
139
+ msgid "Settings"
140
+ msgstr "Einstellungen"
141
+
142
+ #: app/helper/class-ai1ec-events-helper.php:438
143
+ msgid "times"
144
+ msgstr "times"
145
+
146
+ #: app/helper/class-ai1ec-app-helper.php:149
147
+ msgid "Add New"
148
+ msgstr "Hinzufügen"
149
+
150
+ #: app/helper/class-ai1ec-app-helper.php:150
151
+ msgid "Add New Event"
152
+ msgstr "Neues Event"
153
+
154
+ #: app/helper/class-ai1ec-app-helper.php:151
155
+ msgid "Edit Event"
156
+ msgstr "Bearbeiten"
157
+
158
+ #: app/helper/class-ai1ec-app-helper.php:152
159
+ msgid "New Event"
160
+ msgstr "Neues Event"
161
+
162
+ #: app/helper/class-ai1ec-app-helper.php:153
163
+ msgid "View Event"
164
+ msgstr "Ansehen"
165
+
166
+ #: app/helper/class-ai1ec-app-helper.php:154
167
+ msgid "Search Events"
168
+ msgstr "Suchen"
169
+
170
+ #: app/helper/class-ai1ec-app-helper.php:155
171
+ msgid "No Events found"
172
+ msgstr "Keine Events gefunden"
173
+
174
+ #: app/helper/class-ai1ec-app-helper.php:156
175
+ msgid "No Events found in Trash"
176
+ msgstr "Keine Events im Papierkorb"
177
+
178
+ #: app/helper/class-ai1ec-app-helper.php:157
179
+ msgid "Parent Event"
180
+ msgstr "Mutter Event"
181
+
182
+ #: app/helper/class-ai1ec-app-helper.php:158
183
+ msgid "Events"
184
+ msgstr "Events"
185
+
186
+ #: app/helper/class-ai1ec-app-helper.php:313
187
+ msgid "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events\"><span class=\"update-count\">%d</span></span>"
188
+ msgstr "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events\"><span class=\"update-count\">%d</span></span>"
189
+
190
+ #: app/helper/class-ai1ec-app-helper.php:319
191
+ msgid "All Events"
192
+ msgstr "Alle Events"
193
+
194
+ #: app/helper/class-ai1ec-app-helper.php:395
195
+ msgid "Event Details"
196
+ msgstr "Event Details"
197
+
198
+ #: app/helper/class-ai1ec-app-helper.php:412
199
+ msgid "Post Date"
200
+ msgstr "Datum"
201
+
202
+ #: app/helper/class-ai1ec-app-helper.php:413
203
+ msgid "Event date/time"
204
+ msgstr "Event Datum/Zeit"
205
+
206
+ #: app/helper/class-ai1ec-app-helper.php:629
207
+ msgid "To set up the plugin, please select an option in the <strong>Calendar page</strong> dropdown list, then click <strong>Update Settings</strong>."
208
+ msgstr "Um das Plugin zu konfigurieren, wählen Sie auf der <strong>Kalenderseite</strong> aus der Liste <strong>Einstellungen aktualisieren</strong>."
209
+
210
+ #: app/helper/class-ai1ec-app-helper.php:633
211
+ msgid "The plugin is installed, but has not been configured. <a href=\"%s\">Click here to set it up now »</a>"
212
+ msgstr "Das Plugin wurde installiert. <a href=\"%s\">Jetzt konfigurieren »</a>"
213
+
214
+ #: app/helper/class-ai1ec-app-helper.php:639
215
+ msgid "The plugin is installed, but has not been configured. Please log in as a WordPress Administrator to set it up."
216
+ msgstr "Das Plugin wurde installiert, aber vom Administrator noch nicht konfiguriert."
217
+
218
+ #: app/helper/class-ai1ec-calendar-helper.php:564
219
+ msgid "« Previous Events"
220
+ msgstr "« Frühere Events"
221
+
222
+ #: app/helper/class-ai1ec-calendar-helper.php:571
223
+ msgid "Next Events »"
224
+ msgstr "Spätere Events »"
225
+
226
+ #: app/helper/class-ai1ec-settings-helper.php:85
227
+ msgid "- Auto-Create New Page -"
228
+ msgstr "- Neue Seite automatisch anlegen -"
229
+
230
+ #: app/helper/class-ai1ec-settings-helper.php:106
231
+ msgid "View \"%s\" »"
232
+ msgstr "Zeige \"%s\" »"
233
+
234
+ #: app/helper/class-ai1ec-settings-helper.php:148
235
+ #: app/view/calendar.php:10
236
+ #: app/view/calendar.php:11
237
+ #: app/view/calendar.php:17
238
+ msgid "Month"
239
+ msgstr "Monat"
240
+
241
+ #: app/helper/class-ai1ec-settings-helper.php:168
242
+ msgid "Hourly"
243
+ msgstr "Stündlich"
244
+
245
+ #: app/helper/class-ai1ec-settings-helper.php:171
246
+ msgid "Twice Daily"
247
+ msgstr "Zweimal täglich"
248
+
249
+ #: app/helper/class-ai1ec-settings-helper.php:174
250
+ msgid "Daily"
251
+ msgstr "Täglich"
252
+
253
+ #: app/helper/class-ai1ec-settings-helper.php:258
254
+ msgid "Calendar"
255
+ msgstr "Kalender"
256
+
257
+ #: app/view/settings.php:5
258
+ msgid "All-in-one Event Calendar"
259
+ msgstr "All-in-one Event Kalender"
260
+
261
+ #: app/view/settings.php:17
262
+ msgid "Update Settings"
263
+ msgstr "Einstellungen aktualisieren"
264
+
265
+ #: app/view/box_event_cost.php:1
266
+ msgid "Event cost"
267
+ msgstr "Event Kosten"
268
+
269
+ #: app/view/box_event_cost.php:7
270
+ msgid "Cost"
271
+ msgstr "Kosten"
272
+
273
+ #: app/view/event-excerpt.php:2
274
+ #: app/view/event-single.php:5
275
+ #: app/view/event-multi.php:4
276
+ msgid "When:"
277
+ msgstr "Wann:"
278
+
279
+ #: app/view/event-excerpt.php:4
280
+ #: app/view/event-single.php:20
281
+ #: app/view/event-multi.php:20
282
+ msgid "Where:"
283
+ msgstr "Wo:"
284
+
285
+ #: app/view/feed_row.php:3
286
+ #: app/view/box_ics_import_settings.php:8
287
+ msgid "iCalendar/.ics Feed URL:"
288
+ msgstr "iCalendar/.ics Feed URL:"
289
+
290
+ #: app/view/feed_row.php:9
291
+ msgid "Event category:"
292
+ msgstr "Event Kategorie:"
293
+
294
+ #: app/view/feed_row.php:15
295
+ #: app/view/box_ics_import_settings.php:18
296
+ msgid "Tag with"
297
+ msgstr "Schlagwort:"
298
+
299
+ #: app/view/feed_row.php:19
300
+ msgid "× Delete"
301
+ msgstr "× Löschen"
302
+
303
+ #: app/view/event-map.php:6
304
+ msgid "View Full-Size Map »"
305
+ msgstr "View Full-Size Map »"
306
+
307
+ #: app/view/box_event_location.php:1
308
+ msgid "Event location details"
309
+ msgstr "Veranstaltungsort"
310
+
311
+ #: app/view/box_event_location.php:7
312
+ msgid "Venue name:"
313
+ msgstr "Austragungsort:"
314
+
315
+ #: app/view/box_event_location.php:17
316
+ msgid "Address:"
317
+ msgstr "Adresse:"
318
+
319
+ #: app/view/box_event_location.php:27
320
+ msgid "Show Google Map:"
321
+ msgstr "Google Map anzeigen:"
322
+
323
+ #: app/view/class-ai1ec-agenda-widget.php:18
324
+ #: app/view/class-ai1ec-agenda-widget.php:39
325
+ msgid "Upcoming Events"
326
+ msgstr "Zukünftige Events"
327
+
328
+ #: app/view/class-ai1ec-agenda-widget.php:20
329
+ msgid "All-in-One Event Calendar: Lists upcoming events in Agenda view"
330
+ msgstr "All-in-One Event Calendar: Zukünftige Events in Listenansicht darstellen"
331
+
332
+ #: app/view/month.php:4
333
+ #: app/view/agenda.php:12
334
+ msgid "Today"
335
+ msgstr "Heute"
336
+
337
+ #: app/view/month.php:50
338
+ msgid "Summary:"
339
+ msgstr "Zusammenfassung:"
340
+
341
+ #: app/view/month.php:53
342
+ msgid "click anywhere for details"
343
+ msgstr "Für Details hier klicken"
344
+
345
+ #: app/view/month.php:61
346
+ #: app/view/agenda.php:57
347
+ #: app/view/agenda.php:107
348
+ msgid "(all-day)"
349
+ msgstr "(ganztägig)"
350
+
351
+ #: app/view/import.php:6
352
+ msgid "Successfully imported events:"
353
+ msgstr "Event erfolgreich importiert:"
354
+
355
+ #: app/view/event-single.php:8
356
+ msgid "Back to Calendar »"
357
+ msgstr "Zum Kalender »"
358
+
359
+ #: app/view/event-single.php:15
360
+ #: app/view/event-multi.php:14
361
+ msgid "Repeats:"
362
+ msgstr "Wiederholung:"
363
+
364
+ #: app/view/event-single.php:27
365
+ msgid "Add this event to your favourite calendar program (iCal, Outlook, etc.)"
366
+ msgstr "Dieses Event zum persönlichen Kalender hinzufügen (iCal, Outlook, etc.)"
367
+
368
+ #: app/view/event-single.php:28
369
+ msgid "✔ Add to Calendar"
370
+ msgstr "✔ Zum Kalender hinzufügen"
371
+
372
+ #: app/view/event-single.php:31
373
+ msgid "Add this event to your Google Calendar"
374
+ msgstr "Dieses Event zu Google Kalender hinzufügen"
375
+
376
+ #: app/view/event-single.php:33
377
+ msgid "Add to Google Calendar"
378
+ msgstr "Zu Google Kalender hinzufügen"
379
+
380
+ #: app/view/event-single.php:40
381
+ #: app/view/event-multi.php:33
382
+ msgid "Cost:"
383
+ msgstr "Kosten:"
384
+
385
+ #: app/view/event-single.php:46
386
+ #: app/view/event-multi.php:39
387
+ msgid "Contact:"
388
+ msgstr "Kontakt:"
389
+
390
+ #: app/view/event-single.php:52
391
+ #: app/view/event-multi.php:45
392
+ #: app/view/agenda.php:79
393
+ msgid "Categories:"
394
+ msgstr "Kategorien:"
395
+
396
+ #: app/view/event-single.php:59
397
+ #: app/view/event-multi.php:51
398
+ #: app/view/agenda.php:85
399
+ msgid "Tags:"
400
+ msgstr "Schlagworte:"
401
+
402
+ #: app/view/box_eventbrite.php:1
403
+ msgid "Eventbrite Ticketing"
404
+ msgstr "Eventbrite Ticketing"
405
+
406
+ #: app/view/box_eventbrite.php:7
407
+ msgid "Register this event with Eventbrite.com?"
408
+ msgstr "Event auf Eventbrite.com veröffentlichen?"
409
+
410
+ #: app/view/box_eventbrite.php:12
411
+ msgid "Yes"
412
+ msgstr "Ja"
413
+
414
+ #: app/view/box_eventbrite.php:14
415
+ msgid "No"
416
+ msgstr "Nein"
417
+
418
+ #: app/view/box_eventbrite.php:22
419
+ msgid "Set up your first ticket"
420
+ msgstr "Ticket konfigurieren"
421
+
422
+ #: app/view/box_eventbrite.php:24
423
+ msgid "To create multiple tickets per event, submit this form, then follow the link to Eventbrite."
424
+ msgstr "Um mehrere Tickets zu generieren, senden Sie dieses Formular ab und folgen Sie dem Link"
425
+
426
+ #: app/view/box_eventbrite.php:32
427
+ msgid "Name"
428
+ msgstr "Name"
429
+
430
+ #: app/view/box_eventbrite.php:42
431
+ msgid "Description"
432
+ msgstr "Beschreibung"
433
+
434
+ #: app/view/box_eventbrite.php:53
435
+ msgid "Type"
436
+ msgstr "Typ"
437
+
438
+ #: app/view/box_eventbrite.php:58
439
+ msgid "Set Price"
440
+ msgstr "Preis festlegen"
441
+
442
+ #: app/view/box_eventbrite.php:60
443
+ msgid "Donation Based"
444
+ msgstr "Spendenbasiert"
445
+
446
+ #: app/view/box_eventbrite.php:68
447
+ msgid "The price for this event's first ticket will be taken from the Cost field above."
448
+ msgstr "Der Ticketpreis wird vom Kostenfeld übernommen"
449
+
450
+ #: app/view/box_eventbrite.php:75
451
+ msgid "Quantity"
452
+ msgstr "Anzahl"
453
+
454
+ #: app/view/box_eventbrite.php:85
455
+ msgid "Include Fee in Price"
456
+ msgstr "Gebühr im Preis inbegriffen"
457
+
458
+ #: app/view/box_eventbrite.php:90
459
+ msgid "Add Service Fee on top of price"
460
+ msgstr "Servicezuschlag zum Preis hinzufügen"
461
+
462
+ #: app/view/box_eventbrite.php:92
463
+ msgid "Include Service fee in price"
464
+ msgstr "Servicezuschlag im Preis berücksichtigen"
465
+
466
+ #: app/view/box_eventbrite.php:98
467
+ msgid "Payment Options"
468
+ msgstr "Zahlungsoptionen"
469
+
470
+ #: app/view/box_eventbrite.php:103
471
+ msgid "Paypal"
472
+ msgstr "Paypal"
473
+
474
+ #: app/view/box_eventbrite.php:105
475
+ msgid "Google Checkout"
476
+ msgstr "Google Checkout"
477
+
478
+ #: app/view/box_eventbrite.php:107
479
+ msgid "Check"
480
+ msgstr "Scheck"
481
+
482
+ #: app/view/box_eventbrite.php:109
483
+ msgid "Cash"
484
+ msgstr "Bar"
485
+
486
+ #: app/view/box_eventbrite.php:111
487
+ msgid "Send an Invoice"
488
+ msgstr "Rechnung senden"
489
+
490
+ #. #-#-#-#-# plugin.pot (All-in-One Event Calendar Plugin 1.0.6) #-#-#-#-#
491
+ #. Author of the plugin/theme
492
+ #: app/view/box_the_seed_studio.php:3
493
+ msgid "The Seed Studio"
494
+ msgstr "The Seed Studio"
495
+
496
+ #: app/view/box_the_seed_studio.php:5
497
+ msgid "The Seed Studio provides web development and support services for clients and web developers."
498
+ msgstr "The Seed Studio provides web development and support services for clients and web developers."
499
+
500
+ #: app/view/box_the_seed_studio.php:11
501
+ msgid "Follow @the_seed_studio"
502
+ msgstr "Follow @the_seed_studio"
503
+
504
+ #: app/view/box_the_seed_studio.php:16
505
+ msgid "Get Support<span> from one of our experienced pros</span>"
506
+ msgstr "Unterstützung <span>durch einen unserer Profis</span>"
507
+
508
+ #: app/view/box_the_seed_studio.php:18
509
+ msgid "Support"
510
+ msgstr "Unterstützung"
511
+
512
+ #: app/view/box_the_seed_studio.php:20
513
+ msgid "View plugin documentation"
514
+ msgstr "Plugin Dokumentation"
515
+
516
+ #: app/view/box_the_seed_studio.php:23
517
+ msgid "You can also hire The Seed for support on a contract or per-hour basis for this plugin, for your website or for any of your Internet marketing needs (we can really help!)."
518
+ msgstr "Hilfe von The Seed anfordern"
519
+
520
+ #: app/view/box_the_seed_studio.php:26
521
+ msgid "Plugin users: The Seed gives support priority to clients. For free support from other WordPress users, visit the plugin's forum."
522
+ msgstr "Plugin Nutzer: Nur Kunden erhalten direkte Unterstützung von The Seed. Kostenlose Unterstützung gibt es im Plugin Forum"
523
+
524
+ #: app/view/box_the_seed_studio.php:29
525
+ msgid "Vote and Share"
526
+ msgstr "Abstimmen und Teilen"
527
+
528
+ #: app/view/box_the_seed_studio.php:32
529
+ msgid "This plugin is offered free to the Wordpress Community under the GPL3 license. All we ask is that you:"
530
+ msgstr "This plugin is offered free to the Wordpress Community under the GPL3 license. All we ask is that you:"
531
+
532
+ #: app/view/box_the_seed_studio.php:34
533
+ msgid "<a href=\"http://wordpress.org/extend/plugins/all-in-one-event-calendar/\" target=\"_blank\">Give it a five-star rating on wordpress.org</a> (if you think it deserves it!)"
534
+ msgstr "<a href=\"http://wordpress.org/extend/plugins/all-in-one-event-calendar/\" target=\"_blank\">Give it a five-star rating on wordpress.org</a> (if you think it deserves it!)"
535
+
536
+ #: app/view/box_the_seed_studio.php:35
537
+ msgid "Link to the plugin page on our website"
538
+ msgstr "Verlinke auf unsere Website"
539
+
540
+ #: app/view/box_the_seed_studio.php:36
541
+ msgid "Become a Fan on Facebook"
542
+ msgstr "Werde Fan auf Facebook"
543
+
544
+ #: app/view/box_the_seed_studio.php:37
545
+ msgid "Follow us on Twitter"
546
+ msgstr "Folge uns auf Twitter"
547
+
548
+ #: app/view/box_the_seed_studio.php:41
549
+ msgid "Donate"
550
+ msgstr "Spenden"
551
+
552
+ #: app/view/box_the_seed_studio.php:43
553
+ msgid "If you would like to help support development of this plugin, then by all means..."
554
+ msgstr "Unterstützen Sie die ENtwicklung dieses Plugins:"
555
+
556
+ #: app/view/event-multi.php:7
557
+ msgid "View in Calendar »"
558
+ msgstr "Im Kalender anzeigen »"
559
+
560
+ #: app/view/event-multi.php:24
561
+ msgid "View Map »"
562
+ msgstr "Map anzeigen »"
563
+
564
+ #: app/view/box_general_settings.php:3
565
+ msgid "Calendar page:"
566
+ msgstr "Kalender Seite:"
567
+
568
+ #: app/view/box_general_settings.php:7
569
+ msgid "Default calendar view:"
570
+ msgstr "Standardansicht:"
571
+
572
+ #: app/view/box_general_settings.php:11
573
+ msgid "Contain calendar in this DOM element:"
574
+ msgstr "Kalender in diesem DOM Element anzeigen:"
575
+
576
+ #: app/view/box_general_settings.php:13
577
+ msgid "Optional. Provide a <a href=\"http://api.jquery.com/category/selectors/\" target=\"_blank\">jQuery selector</a> that evaluates to a single DOM element. Replaces any existing markup found within target. If left empty, calendar is shown in normal page content container."
578
+ msgstr "Optional. Provide a <a href=\"http://api.jquery.com/category/selectors/\" target=\"_blank\">jQuery selector</a> that evaluates to a single DOM element. Replaces any existing markup found within target. If left empty, calendar is shown in normal page content container."
579
+
580
+ #: app/view/box_general_settings.php:15
581
+ msgid "Week starts on"
582
+ msgstr "Woche startet am:"
583
+
584
+ #: app/view/box_general_settings.php:19
585
+ msgid "Agenda pages show at most"
586
+ msgstr "Listenansicht zeigt hauptsächlich:"
587
+
588
+ #: app/view/box_general_settings.php:20
589
+ msgid "events"
590
+ msgstr "Events"
591
+
592
+ #: app/view/box_general_settings.php:25
593
+ msgid "<strong>Exclude</strong> events from search results"
594
+ msgstr "Events von den Suchergebnissen <strong>ausschliessen</strong>"
595
+
596
+ #: app/view/box_general_settings.php:31
597
+ msgid "Show <strong>Post Your Event</strong> button above the calendar to privileged users"
598
+ msgstr "<strong>Event mitteilen</strong> Button für registrierte Benutzer anzeigen"
599
+
600
+ #: app/view/box_general_settings.php:37
601
+ msgid "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in calendar and single event views"
602
+ msgstr "Verstecke <strong>Abonnieren</strong>/<strong>Zu Kalener hinzufügen</strong> in Kalender- und Detailansicht"
603
+
604
+ #: app/view/box_general_settings.php:43
605
+ msgid "Include <strong>event categories</strong> in post category lists"
606
+ msgstr "<strong>Event Kategorien</strong> in Artikelkategorien inkludieren"
607
+
608
+ #: app/view/box_general_settings.php:51
609
+ msgid "Input dates in <strong>US format</strong>"
610
+ msgstr "Datum im US-Format"
611
+
612
+ #: app/view/box_general_settings.php:57
613
+ msgid "Display <strong>Publish</strong> at bottom of Edit Event form"
614
+ msgstr "<strong>Veröffentlichen</strong> Button in der Fußzeiel des Editor anzeigen"
615
+
616
+ #: app/view/agenda-widget.php:11
617
+ msgid "There are no upcoming events."
618
+ msgstr "Keine Events veröffentlicht."
619
+
620
+ #: app/view/agenda-widget.php:59
621
+ msgid "View Calendar »"
622
+ msgstr "Event Kalender »"
623
+
624
+ #: app/view/agenda-widget.php:67
625
+ #: app/view/calendar.php:101
626
+ msgid "Subscribe to this calendar using your favourite calendar program (iCal, Outlook, etc.)"
627
+ msgstr "Kalender abonnieren (iCal, Outlook, etc.)"
628
+
629
+ #: app/view/agenda-widget.php:68
630
+ #: app/view/calendar.php:102
631
+ msgid "✔ Subscribe"
632
+ msgstr "✔ Abonnieren"
633
+
634
+ #: app/view/agenda-widget.php:72
635
+ #: app/view/calendar.php:107
636
+ msgid "Subscribe to this calendar in your Google Calendar"
637
+ msgstr "Kalender auf Google abonnieren"
638
+
639
+ #: app/view/agenda-widget.php:74
640
+ msgid "Add to Google"
641
+ msgstr "Zu Google hinzufügen"
642
+
643
+ #: app/view/box_event_contact.php:1
644
+ msgid "Organizer contact info"
645
+ msgstr "Veranstalter:"
646
+
647
+ #: app/view/box_event_contact.php:7
648
+ msgid "Contact name:"
649
+ msgstr "Kontaktname:"
650
+
651
+ #: app/view/box_event_contact.php:17
652
+ msgid "Phone:"
653
+ msgstr "Telefon:"
654
+
655
+ #: app/view/box_event_contact.php:27
656
+ msgid "E-mail:"
657
+ msgstr "E-Mail:"
658
+
659
+ #: app/view/admin_notices.php:2
660
+ msgid "All-in-One Event Calendar Notice:"
661
+ msgstr "Notiz:"
662
+
663
+ #: app/view/calendar.php:27
664
+ msgid "+ Post Your Event"
665
+ msgstr "+ Event veröffentlichen"
666
+
667
+ #: app/view/calendar.php:36
668
+ msgid "Clear Filters"
669
+ msgstr "Filter löschen"
670
+
671
+ #: app/view/calendar.php:36
672
+ msgid "✘"
673
+ msgstr "✘"
674
+
675
+ #: app/view/calendar.php:37
676
+ msgid "Filter:"
677
+ msgstr "Filter:"
678
+
679
+ #: app/view/calendar.php:42
680
+ msgid "Categories ▾"
681
+ msgstr "Kategorien ▾"
682
+
683
+ #: app/view/calendar.php:64
684
+ msgid "Tags ▾"
685
+ msgstr "Schlagworte ▾"
686
+
687
+ #: app/view/calendar.php:103
688
+ msgid "to this filtered calendar"
689
+ msgstr "zum gefilterten Kalender"
690
+
691
+ #: app/view/calendar.php:109
692
+ msgid "Subscribe in Google Calendar"
693
+ msgstr "Zu Google Kalender hinzufügen"
694
+
695
+ #: app/view/agenda.php:5
696
+ msgid "+ Expand All"
697
+ msgstr "+ Alle anzeigen"
698
+
699
+ #: app/view/agenda.php:8
700
+ msgid "− Collapse All"
701
+ msgstr "− Alle schließen"
702
+
703
+ #: app/view/agenda.php:28
704
+ msgid "There are no upcoming events to display at this time."
705
+ msgstr "Keine Events veröffentlicht"
706
+
707
+ #: app/view/agenda.php:75
708
+ msgid "Read more »"
709
+ msgstr "Details »"
710
+
711
+ #: app/view/event-single-footer.php:8
712
+ msgid "View original post »"
713
+ msgstr "Originalbeitrag »"
714
+
715
+ #: app/view/agenda-widget-form.php:2
716
+ msgid "Title:"
717
+ msgstr "Titel:"
718
+
719
+ #: app/view/agenda-widget-form.php:6
720
+ msgid "Number of events to show:"
721
+ msgstr "Anzahl angezeigter Events:"
722
+
723
+ #: app/view/agenda-widget-form.php:11
724
+ msgid "Show <strong>View Calendar</strong> button"
725
+ msgstr "<strong>Kalender</strong> Button anzeigen"
726
+
727
+ #: app/view/agenda-widget-form.php:14
728
+ msgid "Show <strong>Subscribe</strong> buttons"
729
+ msgstr "<strong>Abonnieren</strong> Buttons anzeigen"
730
+
731
+ #: app/view/agenda-widget-form.php:17
732
+ msgid "Hide this widget on calendar page"
733
+ msgstr "Widget nicht auf Kalenderseite anzeigen"
734
+
735
+ #: app/view/box_time_and_date.php:2
736
+ msgid "Event date and time"
737
+ msgstr "Event Datum und Zeit"
738
+
739
+ #: app/view/box_time_and_date.php:8
740
+ msgid "All-day event"
741
+ msgstr "Ganztägiges Event"
742
+
743
+ #: app/view/box_time_and_date.php:18
744
+ msgid "Start date / time"
745
+ msgstr "Start Datum/Zeit"
746
+
747
+ #: app/view/box_time_and_date.php:31
748
+ msgid "End date / time"
749
+ msgstr "End Datum/Zeit"
750
+
751
+ #: app/view/box_time_and_date.php:44
752
+ msgid "Repeat"
753
+ msgstr "Wiederholung"
754
+
755
+ #: app/view/box_time_and_date.php:54
756
+ msgid "End"
757
+ msgstr "Ende"
758
+
759
+ #: app/view/box_time_and_date.php:64
760
+ msgid "Ending after"
761
+ msgstr "Endet nach"
762
+
763
+ #: app/view/box_time_and_date.php:74
764
+ msgid "On date"
765
+ msgstr "nach Datum"
766
+
767
+ #: app/view/box_ics_import_settings.php:2
768
+ msgid "Auto-refresh"
769
+ msgstr "Automatische Aktualisierung"
770
+
771
+ #: app/view/box_ics_import_settings.php:12
772
+ msgid "Event category"
773
+ msgstr "Event Kategorie"
774
+
775
+ #: app/view/box_ics_import_settings.php:22
776
+ msgid "+ Add new subscription"
777
+ msgstr "+ Abonnement hinzufügen"
778
+
779
+ #: app/view/event_categories-color_picker.php:5
780
+ #: app/view/event_categories-color_picker.php:19
781
+ msgid "Category Color"
782
+ msgstr "Farbe für Kategorie"
783
+
784
+ #: app/view/event_categories-color_picker.php:13
785
+ #: app/view/event_categories-color_picker.php:25
786
+ msgid "Events in this category will be identified by this color"
787
+ msgstr "Events in dieser Kategorie werden anhand dieser Farbe identifziert"
788
+
789
+ #: app/model/class-ai1ec-event.php:444
790
+ msgid " (all-day)"
791
+ msgstr "(ganztägig)"
792
+
793
+ #: app/model/class-ai1ec-event.php:594
794
+ msgid "until <strong>%s</strong>"
795
+ msgstr "bis <strong>%s</strong>"
796
+
797
+ #: app/model/class-ai1ec-event.php:603
798
+ msgid " or "
799
+ msgstr " oder "
800
+
801
+ #. Plugin Name of the plugin/theme
802
+ msgid "All-in-One Event Calendar Plugin"
803
+ msgstr "All-in-One Event Calendar Plugin"
804
+
805
+ #. Plugin URI of the plugin/theme
806
+ msgid "http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/"
807
+ msgstr "http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/"
808
+
809
+ #. Description of the plugin/theme
810
+ msgid "An event calendar system with month and agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds."
811
+ msgstr "Ein Kalendersystem"
812
+
813
+ #. Author URI of the plugin/theme
814
+ msgid "http://theseedstudio.com/"
815
+ msgstr "http://theseedstudio.com/"
816
+
language/all-in-one-event-calendar.po CHANGED
@@ -950,7 +950,7 @@ msgid "All-in-One Event Calendar Plugin"
950
  msgstr ""
951
 
952
  #. Plugin URI of the plugin/theme
953
- msgid "http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/"
954
  msgstr ""
955
 
956
  #. Description of the plugin/theme
@@ -958,6 +958,6 @@ msgid "An event calendar system with month and agenda views, upcoming events wid
958
  msgstr ""
959
 
960
  #. Author URI of the plugin/theme
961
- msgid "http://theseedstudio.com/"
962
  msgstr ""
963
 
950
  msgstr ""
951
 
952
  #. Plugin URI of the plugin/theme
953
+ msgid "http://theseednetwork.com/software/all-in-one-event-calendar-wordpress/"
954
  msgstr ""
955
 
956
  #. Description of the plugin/theme
958
  msgstr ""
959
 
960
  #. Author URI of the plugin/theme
961
+ msgid "http://theseednetwork.com/"
962
  msgstr ""
963
 
language/all-in-one-event-calendar.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the All-in-One Event Calendar Plugin package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: All-in-One Event Calendar Plugin 1.0.9\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
- "POT-Creation-Date: 2011-10-03 16:47:28+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,12 +12,63 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: app/helper/class-ai1ec-calendar-helper.php:601
16
- msgid "« Previous Events"
17
  msgstr ""
18
 
19
- #: app/helper/class-ai1ec-calendar-helper.php:608
20
- msgid "Next Events »"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  msgstr ""
22
 
23
  #: app/helper/class-ai1ec-app-helper.php:147
@@ -67,6 +118,7 @@ msgid "Parent Event"
67
  msgstr ""
68
 
69
  #: app/helper/class-ai1ec-app-helper.php:158
 
70
  msgid "Events"
71
  msgstr ""
72
 
@@ -104,313 +156,410 @@ msgstr ""
104
  msgid "Event Details"
105
  msgstr ""
106
 
107
- #: app/helper/class-ai1ec-app-helper.php:412
108
  msgid "Post Date"
109
  msgstr ""
110
 
111
- #: app/helper/class-ai1ec-app-helper.php:413
112
  msgid "Event date/time"
113
  msgstr ""
114
 
115
- #: app/helper/class-ai1ec-app-helper.php:630
116
  msgid ""
117
  "%sTo set up the plugin: %s 1. Select an option in the <strong>Calendar page</"
118
  "strong> dropdown list. %s 2. Select an option in the <strong>Timezone</"
119
  "strong> dropdown list. %s 3. Click <strong>Update Settings</strong>. %s"
120
  msgstr ""
121
 
122
- #: app/helper/class-ai1ec-app-helper.php:632
123
  msgid ""
124
  "To set up the plugin: Select an option in the <strong>Calendar page</strong> "
125
  "dropdown list, the click <strong>Update Settings</strong>."
126
  msgstr ""
127
 
128
- #: app/helper/class-ai1ec-app-helper.php:634
129
  msgid ""
130
  "To set up the plugin: Select an option in the <strong>Timezone</strong> "
131
  "dropdown list, the click <strong>Update Settings</strong>."
132
  msgstr ""
133
 
134
- #: app/helper/class-ai1ec-app-helper.php:638
135
  msgid ""
136
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
137
  "here to set it up now »</a>"
138
  msgstr ""
139
 
140
- #: app/helper/class-ai1ec-app-helper.php:644
141
  msgid ""
142
  "The plugin is installed, but has not been configured. Please log in as a "
143
  "WordPress Administrator to set it up."
144
  msgstr ""
145
 
146
- #: app/helper/class-ai1ec-events-helper.php:313
 
 
 
 
 
 
 
 
 
147
  msgid "No repeat"
148
  msgstr ""
149
 
150
- #: app/helper/class-ai1ec-events-helper.php:314
151
- #: app/helper/class-ai1ec-settings-helper.php:205
152
- msgid "Daily"
 
 
 
 
 
153
  msgstr ""
154
 
155
- #: app/helper/class-ai1ec-events-helper.php:315
156
- msgid "Mondays"
 
157
  msgstr ""
158
 
159
- #: app/helper/class-ai1ec-events-helper.php:316
160
- msgid "Tuesdays"
 
161
  msgstr ""
162
 
163
- #: app/helper/class-ai1ec-events-helper.php:317
164
- msgid "Wednesdays"
 
165
  msgstr ""
166
 
167
- #: app/helper/class-ai1ec-events-helper.php:318
168
- msgid "Thursdays"
 
169
  msgstr ""
170
 
171
- #: app/helper/class-ai1ec-events-helper.php:319
172
- msgid "Fridays"
173
  msgstr ""
174
 
175
- #: app/helper/class-ai1ec-events-helper.php:320
176
- msgid "Saturdays"
177
  msgstr ""
178
 
179
- #: app/helper/class-ai1ec-events-helper.php:321
180
- msgid "Sundays"
181
  msgstr ""
182
 
183
- #: app/helper/class-ai1ec-events-helper.php:322
184
- msgid "Tuesdays & Thursdays"
185
  msgstr ""
186
 
187
- #: app/helper/class-ai1ec-events-helper.php:323
188
- msgid "Mondays, Wednesdays & Fridays"
189
  msgstr ""
190
 
191
- #: app/helper/class-ai1ec-events-helper.php:324
192
- msgid "Weekdays"
193
  msgstr ""
194
 
195
- #: app/helper/class-ai1ec-events-helper.php:325
196
- msgid "Weekends"
 
 
 
 
 
 
 
 
197
  msgstr ""
198
 
199
- #: app/helper/class-ai1ec-events-helper.php:326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  msgid "Weekly"
201
  msgstr ""
202
 
203
- #: app/helper/class-ai1ec-events-helper.php:327
 
 
 
204
  msgid "Monthly"
205
  msgstr ""
206
 
207
- #: app/helper/class-ai1ec-events-helper.php:328
 
 
 
208
  msgid "Yearly"
209
  msgstr ""
210
 
211
- #: app/helper/class-ai1ec-events-helper.php:443
212
- msgid "times"
 
 
 
 
 
 
 
 
 
 
 
 
213
  msgstr ""
214
 
215
- #: app/helper/class-ai1ec-events-helper.php:967
216
  msgid "Never"
217
  msgstr ""
218
 
219
- #: app/helper/class-ai1ec-events-helper.php:968
220
  msgid "After"
221
  msgstr ""
222
 
223
- #: app/helper/class-ai1ec-events-helper.php:969
224
- #: app/view/box_time_and_date.php:74
225
  msgid "On date"
226
  msgstr ""
227
 
228
- #: app/helper/class-ai1ec-settings-helper.php:85
229
- msgid "- Auto-Create New Page -"
 
 
 
 
 
 
 
 
230
  msgstr ""
231
 
232
- #: app/helper/class-ai1ec-settings-helper.php:106
233
- msgid "View \"%s\" »"
 
 
234
  msgstr ""
235
 
236
- #: app/helper/class-ai1ec-settings-helper.php:148 app/view/calendar.php:10
237
- #: app/view/calendar.php:11 app/view/calendar.php:17
238
- msgid "Month"
 
239
  msgstr ""
240
 
241
- #: app/helper/class-ai1ec-settings-helper.php:151 app/view/calendar.php:18
242
- #: app/controller/class-ai1ec-calendar-controller.php:280
243
- msgid "Agenda"
244
  msgstr ""
245
 
246
- #: app/helper/class-ai1ec-settings-helper.php:199
247
- msgid "Hourly"
248
  msgstr ""
249
 
250
- #: app/helper/class-ai1ec-settings-helper.php:202
251
- msgid "Twice Daily"
252
  msgstr ""
253
 
254
- #: app/helper/class-ai1ec-settings-helper.php:289
255
- msgid "Calendar"
256
  msgstr ""
257
 
258
- #: app/view/box_ics_import_settings.php:2
259
- msgid "Auto-refresh"
260
  msgstr ""
261
 
262
- #: app/view/box_ics_import_settings.php:8 app/view/feed_row.php:3
263
- msgid "iCalendar/.ics Feed URL:"
264
  msgstr ""
265
 
266
- #: app/view/box_ics_import_settings.php:12
267
- msgid "Event category"
268
  msgstr ""
269
 
270
- #: app/view/box_ics_import_settings.php:18 app/view/feed_row.php:15
271
- msgid "Tag with"
272
  msgstr ""
273
 
274
- #: app/view/box_ics_import_settings.php:22
275
- msgid "+ Add new subscription"
276
  msgstr ""
277
 
278
- #: app/view/calendar.php:27
279
- msgid "+ Post Your Event"
280
  msgstr ""
281
 
282
- #: app/view/calendar.php:36
283
- msgid "Clear Filters"
284
  msgstr ""
285
 
286
- #: app/view/calendar.php:36
287
- msgid ""
288
  msgstr ""
289
 
290
- #: app/view/calendar.php:37
291
- msgid "Filter:"
292
  msgstr ""
293
 
294
- #: app/view/calendar.php:42
295
- msgid "Categories "
296
  msgstr ""
297
 
298
- #: app/view/calendar.php:64
299
- msgid "Tags ▾"
300
- msgstr ""
 
 
 
301
 
302
- #: app/view/calendar.php:101 app/view/agenda-widget.php:67
303
- msgid ""
304
- "Subscribe to this calendar using your favourite calendar program (iCal, "
305
- "Outlook, etc.)"
306
  msgstr ""
307
 
308
- #: app/view/calendar.php:102 app/view/agenda-widget.php:68
309
- msgid " Subscribe"
 
310
  msgstr ""
311
 
312
- #: app/view/calendar.php:103
313
- msgid "to this filtered calendar"
 
314
  msgstr ""
315
 
316
- #: app/view/calendar.php:107 app/view/agenda-widget.php:72
317
- msgid "Subscribe to this calendar in your Google Calendar"
318
  msgstr ""
319
 
320
- #: app/view/calendar.php:109
321
- msgid "Subscribe in Google Calendar"
322
  msgstr ""
323
 
324
- #. #-#-#-#-# plugin.pot (All-in-One Event Calendar Plugin 1.0.9) #-#-#-#-#
325
- #. Author of the plugin/theme
326
- #: app/view/box_the_seed_studio.php:3
327
- msgid "The Seed Studio"
328
  msgstr ""
329
 
330
- #: app/view/box_the_seed_studio.php:5
331
- msgid ""
332
- "The Seed Studio provides web development and support services for clients "
333
- "and web developers."
334
  msgstr ""
335
 
336
- #: app/view/box_the_seed_studio.php:11
337
- msgid "Follow @the_seed_studio"
338
  msgstr ""
339
 
340
- #: app/view/box_the_seed_studio.php:16
341
- msgid "Get Support<span> from one of our experienced pros</span>"
342
  msgstr ""
343
 
344
- #: app/view/box_the_seed_studio.php:18
345
- msgid "Support"
346
  msgstr ""
347
 
348
- #: app/view/box_the_seed_studio.php:20
349
- msgid "View plugin documentation"
 
350
  msgstr ""
351
 
352
- #: app/view/box_the_seed_studio.php:23
353
- msgid ""
354
- "You can also hire The Seed for support on a contract or per-hour basis for "
355
- "this plugin, for your website or for any of your Internet marketing needs "
356
- "(we can really help!)."
357
  msgstr ""
358
 
359
- #: app/view/box_the_seed_studio.php:26
360
- msgid ""
361
- "Plugin users: The Seed gives support priority to clients. For free support "
362
- "from other WordPress users, visit the plugin's forum."
363
  msgstr ""
364
 
365
- #: app/view/box_the_seed_studio.php:29
366
- msgid "Vote and Share"
367
  msgstr ""
368
 
369
- #: app/view/box_the_seed_studio.php:32
370
- msgid ""
371
- "This plugin is offered free to the Wordpress Community under the GPL3 "
372
- "license. All we ask is that you:"
373
  msgstr ""
374
 
375
- #: app/view/box_the_seed_studio.php:34
376
- msgid ""
377
- "<a href=\"http://wordpress.org/extend/plugins/all-in-one-event-calendar/\" "
378
- "target=\"_blank\">Give it a five-star rating on wordpress.org</a> (if you "
379
- "think it deserves it!)"
380
  msgstr ""
381
 
382
- #: app/view/box_the_seed_studio.php:35
383
- msgid "Link to the plugin page on our website"
 
384
  msgstr ""
385
 
386
- #: app/view/box_the_seed_studio.php:36
387
- msgid "Become a Fan on Facebook"
388
  msgstr ""
389
 
390
- #: app/view/box_the_seed_studio.php:37
391
- msgid "Follow us on Twitter"
392
  msgstr ""
393
 
394
- #: app/view/box_the_seed_studio.php:41
395
- msgid "Donate"
396
  msgstr ""
397
 
398
- #: app/view/box_the_seed_studio.php:43
399
  msgid ""
400
- "If you would like to help support development of this plugin, then by all "
401
- "means..."
402
  msgstr ""
403
 
404
- #: app/view/settings.php:5
405
- msgid "All-in-one Event Calendar"
 
406
  msgstr ""
407
 
408
- #: app/view/settings.php:17
409
- msgid "Update Settings"
 
 
 
 
 
 
 
 
 
410
  msgstr ""
411
 
412
- #: app/view/event-single.php:5 app/view/event-excerpt.php:2
413
- #: app/view/event-multi.php:4
 
 
 
 
 
 
414
  msgid "When:"
415
  msgstr ""
416
 
@@ -422,8 +571,8 @@ msgstr ""
422
  msgid "Repeats:"
423
  msgstr ""
424
 
425
- #: app/view/event-single.php:20 app/view/event-excerpt.php:4
426
- #: app/view/event-multi.php:20
427
  msgid "Where:"
428
  msgstr ""
429
 
@@ -452,49 +601,46 @@ msgid "Contact:"
452
  msgstr ""
453
 
454
  #: app/view/event-single.php:52 app/view/event-multi.php:45
455
- #: app/view/agenda.php:79
456
  msgid "Categories:"
457
  msgstr ""
458
 
459
  #: app/view/event-single.php:59 app/view/event-multi.php:51
460
- #: app/view/agenda.php:85
461
  msgid "Tags:"
462
  msgstr ""
463
 
464
- #: app/view/box_time_and_date.php:2
465
- msgid "Event date and time"
466
- msgstr ""
467
-
468
- #: app/view/box_time_and_date.php:8
469
- msgid "All-day event"
470
  msgstr ""
471
 
472
- #: app/view/box_time_and_date.php:18
473
- msgid "Start date / time"
474
  msgstr ""
475
 
476
- #: app/view/box_time_and_date.php:31
477
- msgid "End date / time"
478
  msgstr ""
479
 
480
- #: app/view/box_time_and_date.php:44
481
- msgid "Repeat"
482
  msgstr ""
483
 
484
- #: app/view/box_time_and_date.php:54
485
- msgid "End"
486
  msgstr ""
487
 
488
- #: app/view/box_time_and_date.php:64
489
- msgid "Ending after"
490
  msgstr ""
491
 
492
  #: app/view/admin_notices.php:2
493
  msgid "All-in-One Event Calendar Notice:"
494
  msgstr ""
495
 
496
- #: app/view/import.php:6
497
- msgid "Successfully imported events:"
 
498
  msgstr ""
499
 
500
  #: app/view/event_categories-color_picker.php:5
@@ -507,38 +653,66 @@ msgstr ""
507
  msgid "Events in this category will be identified by this color"
508
  msgstr ""
509
 
510
- #: app/view/event-single-footer.php:4
 
 
 
 
 
 
 
 
511
  msgid ""
512
- "This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
513
- "href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
514
  msgstr ""
515
 
516
- #: app/view/event-single-footer.php:8
517
- msgid "View original post »"
518
  msgstr ""
519
 
520
- #: app/view/box_event_location.php:1
521
- msgid "Event location details"
522
  msgstr ""
523
 
524
- #: app/view/box_event_location.php:7
525
- msgid "Venue name:"
526
  msgstr ""
527
 
528
- #: app/view/box_event_location.php:17
529
- msgid "Address:"
530
  msgstr ""
531
 
532
- #: app/view/box_event_location.php:27
533
- msgid "Show Google Map:"
534
  msgstr ""
535
 
536
- #: app/view/event-multi.php:7
537
- msgid "View in Calendar »"
538
  msgstr ""
539
 
540
- #: app/view/event-multi.php:24
541
- msgid "View Map »"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
542
  msgstr ""
543
 
544
  #: app/view/box_general_settings.php:1
@@ -582,45 +756,61 @@ msgid "events"
582
  msgstr ""
583
 
584
  #: app/view/box_general_settings.php:31
585
- msgid "<strong>Exclude</strong> events from search results"
586
  msgstr ""
587
 
588
  #: app/view/box_general_settings.php:37
 
 
 
 
589
  msgid ""
590
  "Show <strong>Post Your Event</strong> button above the calendar to "
591
  "privileged users"
592
  msgstr ""
593
 
594
- #: app/view/box_general_settings.php:43
595
  msgid ""
596
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
597
  "calendar and single event views"
598
  msgstr ""
599
 
600
- #: app/view/box_general_settings.php:49
601
  msgid "Hide <strong>Google Maps</strong> until clicked"
602
  msgstr ""
603
 
604
- #: app/view/box_general_settings.php:55
605
  msgid "Include <strong>event categories</strong> in post category lists"
606
  msgstr ""
607
 
608
- #: app/view/box_general_settings.php:59
609
  msgid "Adding/Editing Events"
610
  msgstr ""
611
 
612
- #: app/view/box_general_settings.php:63
613
- msgid "Input dates in <strong>US format</strong>"
614
  msgstr ""
615
 
616
- #: app/view/box_general_settings.php:69
617
  msgid "Use <strong>24h time</strong> in time pickers"
618
  msgstr ""
619
 
620
- #: app/view/box_general_settings.php:75
621
  msgid "Display <strong>Publish</strong> at bottom of Edit Event form"
622
  msgstr ""
623
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  #: app/view/agenda-widget-form.php:2
625
  msgid "Title:"
626
  msgstr ""
@@ -629,32 +819,68 @@ msgstr ""
629
  msgid "Number of events to show:"
630
  msgstr ""
631
 
632
- #: app/view/agenda-widget-form.php:11
 
 
 
 
 
 
 
 
 
 
 
 
633
  msgid "Show <strong>View Calendar</strong> button"
634
  msgstr ""
635
 
636
- #: app/view/agenda-widget-form.php:14
637
  msgid "Show <strong>Subscribe</strong> buttons"
638
  msgstr ""
639
 
640
- #: app/view/agenda-widget-form.php:17
641
  msgid "Hide this widget on calendar page"
642
  msgstr ""
643
 
644
- #: app/view/month.php:4 app/view/agenda.php:12
645
- msgid "Today"
646
  msgstr ""
647
 
648
- #: app/view/month.php:50
649
- msgid "Summary:"
650
  msgstr ""
651
 
652
- #: app/view/month.php:53
653
- msgid "click anywhere for details"
654
  msgstr ""
655
 
656
- #: app/view/month.php:68 app/view/agenda.php:57 app/view/agenda.php:107
657
- msgid "(all-day)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
658
  msgstr ""
659
 
660
  #: app/view/agenda.php:5
@@ -665,65 +891,103 @@ msgstr ""
665
  msgid "− Collapse All"
666
  msgstr ""
667
 
 
 
 
 
668
  #: app/view/agenda.php:28
669
  msgid "There are no upcoming events to display at this time."
670
  msgstr ""
671
 
672
- #: app/view/agenda.php:75
 
 
 
 
673
  msgid "Read more »"
674
  msgstr ""
675
 
676
- #: app/view/agenda-widget.php:11
677
- msgid "There are no upcoming events."
 
678
  msgstr ""
679
 
680
- #: app/view/agenda-widget.php:59
681
- msgid "View Calendar »"
682
  msgstr ""
683
 
684
- #: app/view/agenda-widget.php:74
685
- msgid "Add to Google"
 
 
686
  msgstr ""
687
 
688
- #: app/view/box_event_contact.php:1
689
- msgid "Organizer contact info"
 
 
690
  msgstr ""
691
 
692
- #: app/view/box_event_contact.php:7
693
- msgid "Contact name:"
694
  msgstr ""
695
 
696
- #: app/view/box_event_contact.php:17
697
- msgid "Phone:"
698
  msgstr ""
699
 
700
- #: app/view/box_event_contact.php:27
701
- msgid "E-mail:"
702
  msgstr ""
703
 
704
- #: app/view/class-ai1ec-agenda-widget.php:18
705
- #: app/view/class-ai1ec-agenda-widget.php:39
706
- msgid "Upcoming Events"
707
  msgstr ""
708
 
709
- #: app/view/class-ai1ec-agenda-widget.php:20
710
- msgid "All-in-One Event Calendar: Lists upcoming events in Agenda view"
 
 
 
711
  msgstr ""
712
 
713
- #: app/view/box_event_cost.php:1
714
- msgid "Event cost"
 
 
715
  msgstr ""
716
 
717
- #: app/view/box_event_cost.php:7
718
- msgid "Cost"
719
  msgstr ""
720
 
721
- #: app/view/event-map.php:2
722
- msgid "Click to view map"
 
 
723
  msgstr ""
724
 
725
- #: app/view/event-map.php:9
726
- msgid "View Full-Size Map »"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
727
  msgstr ""
728
 
729
  #: app/view/box_eventbrite.php:1
@@ -818,160 +1082,94 @@ msgstr ""
818
  msgid "Send an Invoice"
819
  msgstr ""
820
 
821
- #: app/view/feed_row.php:9
822
- msgid "Event category:"
823
- msgstr ""
824
-
825
- #: app/view/feed_row.php:19
826
- msgid "× Delete"
827
- msgstr ""
828
-
829
- #: app/view/feed_row.php:20
830
- #: app/controller/class-ai1ec-events-controller.php:276
831
- msgid "Update"
832
- msgstr ""
833
-
834
- #: app/view/feed_row.php:22
835
- #: app/controller/class-ai1ec-settings-controller.php:215
836
- msgid "Flush 1 event"
837
- msgid_plural "Flush %s events"
838
- msgstr[0] ""
839
- msgstr[1] ""
840
-
841
- #: app/controller/class-ai1ec-events-controller.php:135
842
- msgid "This feed is already being imported."
843
- msgstr ""
844
-
845
- #: app/controller/class-ai1ec-events-controller.php:136
846
- msgid "Please enter a valid iCalendar URL."
847
- msgstr ""
848
-
849
- #: app/controller/class-ai1ec-events-controller.php:276
850
- msgid "Publish"
851
- msgstr ""
852
-
853
- #: app/controller/class-ai1ec-events-controller.php:278
854
- msgid "Submit for Review"
855
- msgstr ""
856
-
857
- #: app/controller/class-ai1ec-events-controller.php:472
858
- msgid "Event updated. <a href=\"%s\">View event</a>"
859
- msgstr ""
860
-
861
- #: app/controller/class-ai1ec-events-controller.php:473
862
- msgid "Custom field updated."
863
- msgstr ""
864
-
865
- #: app/controller/class-ai1ec-events-controller.php:474
866
- msgid "Custom field deleted."
867
- msgstr ""
868
-
869
- #: app/controller/class-ai1ec-events-controller.php:475
870
- msgid "Event updated."
871
- msgstr ""
872
-
873
- #. translators: %s: date and time of the revision
874
- #: app/controller/class-ai1ec-events-controller.php:477
875
- msgid "Event restored to revision from %s"
876
  msgstr ""
877
 
878
- #: app/controller/class-ai1ec-events-controller.php:478
879
- msgid "Event published. <a href=\"%s\">View event</a>"
880
  msgstr ""
881
 
882
- #: app/controller/class-ai1ec-events-controller.php:479
883
- msgid "Event saved."
884
  msgstr ""
885
 
886
- #: app/controller/class-ai1ec-events-controller.php:480
887
- msgid "Event submitted. <a target=\"_blank\" href=\"%s\">Preview event</a>"
888
  msgstr ""
889
 
890
- #: app/controller/class-ai1ec-events-controller.php:481
891
- msgid ""
892
- "Event scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
893
- "\">Preview event</a>"
894
  msgstr ""
895
 
896
- #. translators: Publish box date format, see http:php.net/date
897
- #: app/controller/class-ai1ec-events-controller.php:483
898
- msgid "M j, Y @ G:i"
899
  msgstr ""
900
 
901
- #: app/controller/class-ai1ec-events-controller.php:484
902
- msgid "Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
903
  msgstr ""
904
 
905
- #: app/controller/class-ai1ec-app-controller.php:346
906
- #: app/controller/class-ai1ec-app-controller.php:347
907
- msgid "Settings"
908
  msgstr ""
909
 
910
- #: app/controller/class-ai1ec-settings-controller.php:82
911
- msgid "Settings Updated."
912
  msgstr ""
913
 
914
- #: app/controller/class-ai1ec-settings-controller.php:172
915
- msgid "Flushed %d events"
916
  msgstr ""
917
 
918
- #: app/controller/class-ai1ec-settings-controller.php:214
919
- msgid "Imported %d events"
920
  msgstr ""
921
 
922
- #: app/controller/class-ai1ec-settings-controller.php:266
923
- msgctxt "meta box"
924
- msgid "General Settings"
925
  msgstr ""
926
 
927
- #: app/controller/class-ai1ec-settings-controller.php:273
928
- msgctxt "meta box"
929
- msgid "The Seed Studio Support"
930
  msgstr ""
931
 
932
- #: app/controller/class-ai1ec-settings-controller.php:280
933
- msgctxt "meta box"
934
- msgid "ICS Import Settings"
935
  msgstr ""
936
 
937
- #: app/controller/class-ai1ec-settings-controller.php:344
938
- msgid "<a href=\"%s\">Settings</a>"
939
  msgstr ""
940
 
941
- #: app/controller/class-ai1ec-settings-controller.php:358
942
- msgid "<a href=\"%s\" target=\"_blank\">Donate</a>"
943
  msgstr ""
944
 
945
- #: app/controller/class-ai1ec-settings-controller.php:359
946
- msgid "<a href=\"%s\" target=\"_blank\">Get Support</a>"
947
  msgstr ""
948
 
949
- #: app/controller/class-ai1ec-importer-controller.php:91
950
- msgid "The Events Calendar → All-in-One Event Calendar"
951
  msgstr ""
952
 
953
- #: app/controller/class-ai1ec-importer-controller.php:92
954
- msgid ""
955
- "Imports events created using The Events Calendar plugin into the All-in-One "
956
- "Event Calendar"
957
  msgstr ""
958
 
959
- #: app/model/class-ai1ec-event.php:445
960
- msgid " (all-day)"
961
  msgstr ""
962
 
963
- #: app/model/class-ai1ec-event.php:584
964
- msgid "ending after <strong>%d</strong> time"
965
- msgid_plural "ending after <strong>%d</strong> times"
966
- msgstr[0] ""
967
- msgstr[1] ""
968
-
969
- #: app/model/class-ai1ec-event.php:595
970
- msgid "until <strong>%s</strong>"
971
  msgstr ""
972
 
973
- #: app/model/class-ai1ec-event.php:604
974
- msgid " or "
975
  msgstr ""
976
 
977
  #. Plugin Name of the plugin/theme
@@ -979,7 +1177,7 @@ msgid "All-in-One Event Calendar Plugin"
979
  msgstr ""
980
 
981
  #. Plugin URI of the plugin/theme
982
- msgid "http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/"
983
  msgstr ""
984
 
985
  #. Description of the plugin/theme
@@ -989,5 +1187,5 @@ msgid ""
989
  msgstr ""
990
 
991
  #. Author URI of the plugin/theme
992
- msgid "http://theseedstudio.com/"
993
  msgstr ""
2
  # This file is distributed under the same license as the All-in-One Event Calendar Plugin package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: All-in-One Event Calendar Plugin 1.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
+ "POT-Creation-Date: 2011-11-18 01:32:36+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: app/model/class-ai1ec-event.php:459
16
+ msgid " (all-day)"
17
  msgstr ""
18
 
19
+ #: app/helper/class-ai1ec-settings-helper.php:85
20
+ msgid "- Auto-Create New Page -"
21
+ msgstr ""
22
+
23
+ #: app/helper/class-ai1ec-settings-helper.php:106
24
+ msgid "View \"%s\" »"
25
+ msgstr ""
26
+
27
+ #: app/helper/class-ai1ec-settings-helper.php:148 app/view/calendar.php:10
28
+ #: app/view/calendar.php:11 app/view/calendar.php:17
29
+ msgid "Month"
30
+ msgstr ""
31
+
32
+ #: app/helper/class-ai1ec-settings-helper.php:151
33
+ #: app/controller/class-ai1ec-calendar-controller.php:288
34
+ #: app/view/calendar.php:18
35
+ msgid "Agenda"
36
+ msgstr ""
37
+
38
+ #: app/helper/class-ai1ec-settings-helper.php:200
39
+ msgid "Default (d/m/y)"
40
+ msgstr ""
41
+
42
+ #: app/helper/class-ai1ec-settings-helper.php:203
43
+ msgid "US (m/d/y)"
44
+ msgstr ""
45
+
46
+ #: app/helper/class-ai1ec-settings-helper.php:206
47
+ msgid "ISO 8601 (y-m-d)"
48
+ msgstr ""
49
+
50
+ #: app/helper/class-ai1ec-settings-helper.php:209
51
+ msgid "Dotted (m.d.y)"
52
+ msgstr ""
53
+
54
+ #: app/helper/class-ai1ec-settings-helper.php:227
55
+ msgid "Hourly"
56
+ msgstr ""
57
+
58
+ #: app/helper/class-ai1ec-settings-helper.php:230
59
+ msgid "Twice Daily"
60
+ msgstr ""
61
+
62
+ #: app/helper/class-ai1ec-settings-helper.php:233
63
+ #: app/helper/class-ai1ec-events-helper.php:554
64
+ #: app/helper/class-ai1ec-events-helper.php:573
65
+ #: app/helper/class-ai1ec-events-helper.php:1457
66
+ #: app/view/box_time_and_date.php:58
67
+ msgid "Daily"
68
+ msgstr ""
69
+
70
+ #: app/helper/class-ai1ec-settings-helper.php:317
71
+ msgid "Calendar"
72
  msgstr ""
73
 
74
  #: app/helper/class-ai1ec-app-helper.php:147
118
  msgstr ""
119
 
120
  #: app/helper/class-ai1ec-app-helper.php:158
121
+ #: app/view/agenda-widget-form.php:88
122
  msgid "Events"
123
  msgstr ""
124
 
156
  msgid "Event Details"
157
  msgstr ""
158
 
159
+ #: app/helper/class-ai1ec-app-helper.php:428
160
  msgid "Post Date"
161
  msgstr ""
162
 
163
+ #: app/helper/class-ai1ec-app-helper.php:429
164
  msgid "Event date/time"
165
  msgstr ""
166
 
167
+ #: app/helper/class-ai1ec-app-helper.php:646
168
  msgid ""
169
  "%sTo set up the plugin: %s 1. Select an option in the <strong>Calendar page</"
170
  "strong> dropdown list. %s 2. Select an option in the <strong>Timezone</"
171
  "strong> dropdown list. %s 3. Click <strong>Update Settings</strong>. %s"
172
  msgstr ""
173
 
174
+ #: app/helper/class-ai1ec-app-helper.php:648
175
  msgid ""
176
  "To set up the plugin: Select an option in the <strong>Calendar page</strong> "
177
  "dropdown list, the click <strong>Update Settings</strong>."
178
  msgstr ""
179
 
180
+ #: app/helper/class-ai1ec-app-helper.php:650
181
  msgid ""
182
  "To set up the plugin: Select an option in the <strong>Timezone</strong> "
183
  "dropdown list, the click <strong>Update Settings</strong>."
184
  msgstr ""
185
 
186
+ #: app/helper/class-ai1ec-app-helper.php:654
187
  msgid ""
188
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
189
  "here to set it up now »</a>"
190
  msgstr ""
191
 
192
+ #: app/helper/class-ai1ec-app-helper.php:660
193
  msgid ""
194
  "The plugin is installed, but has not been configured. Please log in as a "
195
  "WordPress Administrator to set it up."
196
  msgstr ""
197
 
198
+ #: app/helper/class-ai1ec-calendar-helper.php:615
199
+ msgid "« Previous Events"
200
+ msgstr ""
201
+
202
+ #: app/helper/class-ai1ec-calendar-helper.php:622
203
+ msgid "Next Events »"
204
+ msgstr ""
205
+
206
+ #: app/helper/class-ai1ec-events-helper.php:319
207
+ #: app/helper/class-ai1ec-events-helper.php:341
208
  msgid "No repeat"
209
  msgstr ""
210
 
211
+ #: app/helper/class-ai1ec-events-helper.php:320
212
+ #: app/helper/class-ai1ec-events-helper.php:342
213
+ msgid "Every day"
214
+ msgstr ""
215
+
216
+ #: app/helper/class-ai1ec-events-helper.php:321
217
+ #: app/helper/class-ai1ec-events-helper.php:343
218
+ msgid "Every week"
219
  msgstr ""
220
 
221
+ #: app/helper/class-ai1ec-events-helper.php:322
222
+ #: app/helper/class-ai1ec-events-helper.php:344
223
+ msgid "Every month"
224
  msgstr ""
225
 
226
+ #: app/helper/class-ai1ec-events-helper.php:323
227
+ #: app/helper/class-ai1ec-events-helper.php:345
228
+ msgid "Every year"
229
  msgstr ""
230
 
231
+ #: app/helper/class-ai1ec-events-helper.php:324
232
+ #: app/helper/class-ai1ec-events-helper.php:346
233
+ msgid "-----------"
234
  msgstr ""
235
 
236
+ #: app/helper/class-ai1ec-events-helper.php:325
237
+ #: app/helper/class-ai1ec-events-helper.php:347
238
+ msgid "Custom..."
239
  msgstr ""
240
 
241
+ #: app/helper/class-ai1ec-events-helper.php:468
242
+ msgid "first"
243
  msgstr ""
244
 
245
+ #: app/helper/class-ai1ec-events-helper.php:469
246
+ msgid "second"
247
  msgstr ""
248
 
249
+ #: app/helper/class-ai1ec-events-helper.php:470
250
+ msgid "third"
251
  msgstr ""
252
 
253
+ #: app/helper/class-ai1ec-events-helper.php:471
254
+ msgid "fourth"
255
  msgstr ""
256
 
257
+ #: app/helper/class-ai1ec-events-helper.php:472
258
+ msgid "------"
259
  msgstr ""
260
 
261
+ #: app/helper/class-ai1ec-events-helper.php:473
262
+ msgid "last"
263
  msgstr ""
264
 
265
+ #: app/helper/class-ai1ec-events-helper.php:478
266
+ msgid "Sunday"
267
+ msgstr ""
268
+
269
+ #: app/helper/class-ai1ec-events-helper.php:479
270
+ msgid "Monday"
271
+ msgstr ""
272
+
273
+ #: app/helper/class-ai1ec-events-helper.php:480
274
+ msgid "Tuesday"
275
  msgstr ""
276
 
277
+ #: app/helper/class-ai1ec-events-helper.php:481
278
+ msgid "Wednesday"
279
+ msgstr ""
280
+
281
+ #: app/helper/class-ai1ec-events-helper.php:482
282
+ msgid "Thursday"
283
+ msgstr ""
284
+
285
+ #: app/helper/class-ai1ec-events-helper.php:483
286
+ msgid "Friday"
287
+ msgstr ""
288
+
289
+ #: app/helper/class-ai1ec-events-helper.php:484
290
+ msgid "Saturday"
291
+ msgstr ""
292
+
293
+ #: app/helper/class-ai1ec-events-helper.php:485
294
+ msgid "--------"
295
+ msgstr ""
296
+
297
+ #: app/helper/class-ai1ec-events-helper.php:486
298
+ msgid "day"
299
+ msgstr ""
300
+
301
+ #: app/helper/class-ai1ec-events-helper.php:487
302
+ msgid "weekday"
303
+ msgstr ""
304
+
305
+ #: app/helper/class-ai1ec-events-helper.php:488
306
+ msgid "weekend day"
307
+ msgstr ""
308
+
309
+ #: app/helper/class-ai1ec-events-helper.php:555
310
+ #: app/helper/class-ai1ec-events-helper.php:574
311
+ #: app/helper/class-ai1ec-events-helper.php:1469
312
+ #: app/view/box_time_and_date.php:59
313
  msgid "Weekly"
314
  msgstr ""
315
 
316
+ #: app/helper/class-ai1ec-events-helper.php:556
317
+ #: app/helper/class-ai1ec-events-helper.php:575
318
+ #: app/helper/class-ai1ec-events-helper.php:1481
319
+ #: app/view/box_time_and_date.php:60
320
  msgid "Monthly"
321
  msgstr ""
322
 
323
+ #: app/helper/class-ai1ec-events-helper.php:557
324
+ #: app/helper/class-ai1ec-events-helper.php:576
325
+ #: app/helper/class-ai1ec-events-helper.php:1493
326
+ #: app/view/box_time_and_date.php:61
327
  msgid "Yearly"
328
  msgstr ""
329
 
330
+ #: app/helper/class-ai1ec-events-helper.php:598
331
+ msgid "day(s)"
332
+ msgstr ""
333
+
334
+ #: app/helper/class-ai1ec-events-helper.php:627
335
+ msgid "week(s)"
336
+ msgstr ""
337
+
338
+ #: app/helper/class-ai1ec-events-helper.php:679
339
+ msgid "month(s)"
340
+ msgstr ""
341
+
342
+ #: app/helper/class-ai1ec-events-helper.php:700
343
+ msgid "year(s)"
344
  msgstr ""
345
 
346
+ #: app/helper/class-ai1ec-events-helper.php:1270
347
  msgid "Never"
348
  msgstr ""
349
 
350
+ #: app/helper/class-ai1ec-events-helper.php:1271
351
  msgid "After"
352
  msgstr ""
353
 
354
+ #: app/helper/class-ai1ec-events-helper.php:1272
355
+ #: app/view/box_time_and_date.php:84
356
  msgid "On date"
357
  msgstr ""
358
 
359
+ #: app/helper/class-ai1ec-events-helper.php:1351
360
+ #: app/helper/class-ai1ec-events-helper.php:1360
361
+ #: app/helper/class-ai1ec-events-helper.php:1368
362
+ #: app/helper/class-ai1ec-events-helper.php:1381
363
+ #: app/helper/class-ai1ec-events-helper.php:1388
364
+ #: app/helper/class-ai1ec-events-helper.php:1394
365
+ #: app/helper/class-ai1ec-events-helper.php:1408
366
+ #: app/helper/class-ai1ec-events-helper.php:1416
367
+ #: app/helper/class-ai1ec-events-helper.php:1423
368
+ msgid "on"
369
  msgstr ""
370
 
371
+ #: app/helper/class-ai1ec-events-helper.php:1356
372
+ #: app/helper/class-ai1ec-events-helper.php:1385
373
+ #: app/helper/class-ai1ec-events-helper.php:1413
374
+ msgid "and"
375
  msgstr ""
376
 
377
+ #: app/helper/class-ai1ec-events-helper.php:1381
378
+ #: app/helper/class-ai1ec-events-helper.php:1388
379
+ #: app/helper/class-ai1ec-events-helper.php:1394
380
+ msgid "of the month"
381
  msgstr ""
382
 
383
+ #: app/helper/class-ai1ec-events-helper.php:1460
384
+ msgid "Every other day"
 
385
  msgstr ""
386
 
387
+ #: app/helper/class-ai1ec-events-helper.php:1462
388
+ msgid "Every %d days"
389
  msgstr ""
390
 
391
+ #: app/helper/class-ai1ec-events-helper.php:1472
392
+ msgid "Every other week"
393
  msgstr ""
394
 
395
+ #: app/helper/class-ai1ec-events-helper.php:1474
396
+ msgid "Every %d weeks"
397
  msgstr ""
398
 
399
+ #: app/helper/class-ai1ec-events-helper.php:1484
400
+ msgid "Every other month"
401
  msgstr ""
402
 
403
+ #: app/helper/class-ai1ec-events-helper.php:1486
404
+ msgid "Every %d months"
405
  msgstr ""
406
 
407
+ #: app/helper/class-ai1ec-events-helper.php:1496
408
+ msgid "Every other year"
409
  msgstr ""
410
 
411
+ #: app/helper/class-ai1ec-events-helper.php:1498
412
+ msgid "Every %d years"
413
  msgstr ""
414
 
415
+ #: app/helper/class-ai1ec-events-helper.php:1518
416
+ msgid "until %s"
417
  msgstr ""
418
 
419
+ #: app/helper/class-ai1ec-events-helper.php:1521
420
+ msgid "for %d occurrences"
421
  msgstr ""
422
 
423
+ #: app/helper/class-ai1ec-events-helper.php:1523
424
+ msgid "forever"
425
  msgstr ""
426
 
427
+ #: app/controller/class-ai1ec-settings-controller.php:82
428
+ msgid "Settings Updated."
429
  msgstr ""
430
 
431
+ #: app/controller/class-ai1ec-settings-controller.php:173
432
+ msgid "Flushed %d events"
433
  msgstr ""
434
 
435
+ #: app/controller/class-ai1ec-settings-controller.php:215
436
+ msgid "Imported %d events"
437
  msgstr ""
438
 
439
+ #: app/controller/class-ai1ec-settings-controller.php:216
440
+ #: app/view/feed_row.php:22
441
+ msgid "Flush 1 event"
442
+ msgid_plural "Flush %s events"
443
+ msgstr[0] ""
444
+ msgstr[1] ""
445
 
446
+ #: app/controller/class-ai1ec-settings-controller.php:267
447
+ msgctxt "meta box"
448
+ msgid "General Settings"
 
449
  msgstr ""
450
 
451
+ #: app/controller/class-ai1ec-settings-controller.php:275
452
+ msgctxt "meta box"
453
+ msgid "The Seed Studio Support"
454
  msgstr ""
455
 
456
+ #: app/controller/class-ai1ec-settings-controller.php:282
457
+ msgctxt "meta box"
458
+ msgid "ICS Import Settings"
459
  msgstr ""
460
 
461
+ #: app/controller/class-ai1ec-settings-controller.php:334
462
+ msgid "<a href=\"%s\">Settings</a>"
463
  msgstr ""
464
 
465
+ #: app/controller/class-ai1ec-settings-controller.php:348
466
+ msgid "<a href=\"%s\" target=\"_blank\">Donate</a>"
467
  msgstr ""
468
 
469
+ #: app/controller/class-ai1ec-settings-controller.php:349
470
+ msgid "<a href=\"%s\" target=\"_blank\">Get Support</a>"
 
 
471
  msgstr ""
472
 
473
+ #: app/controller/class-ai1ec-events-controller.php:147
474
+ msgid "This feed is already being imported."
 
 
475
  msgstr ""
476
 
477
+ #: app/controller/class-ai1ec-events-controller.php:148
478
+ msgid "Please enter a valid iCalendar URL."
479
  msgstr ""
480
 
481
+ #: app/controller/class-ai1ec-events-controller.php:276
482
+ msgid "times"
483
  msgstr ""
484
 
485
+ #: app/controller/class-ai1ec-events-controller.php:325
486
+ msgid "Publish"
487
  msgstr ""
488
 
489
+ #: app/controller/class-ai1ec-events-controller.php:325
490
+ #: app/view/feed_row.php:20
491
+ msgid "Update"
492
  msgstr ""
493
 
494
+ #: app/controller/class-ai1ec-events-controller.php:327
495
+ msgid "Submit for Review"
 
 
 
496
  msgstr ""
497
 
498
+ #: app/controller/class-ai1ec-events-controller.php:440
499
+ msgid "Event updated. <a href=\"%s\">View event</a>"
 
 
500
  msgstr ""
501
 
502
+ #: app/controller/class-ai1ec-events-controller.php:441
503
+ msgid "Custom field updated."
504
  msgstr ""
505
 
506
+ #: app/controller/class-ai1ec-events-controller.php:442
507
+ msgid "Custom field deleted."
 
 
508
  msgstr ""
509
 
510
+ #: app/controller/class-ai1ec-events-controller.php:443
511
+ msgid "Event updated."
 
 
 
512
  msgstr ""
513
 
514
+ #. translators: %s: date and time of the revision
515
+ #: app/controller/class-ai1ec-events-controller.php:445
516
+ msgid "Event restored to revision from %s"
517
  msgstr ""
518
 
519
+ #: app/controller/class-ai1ec-events-controller.php:446
520
+ msgid "Event published. <a href=\"%s\">View event</a>"
521
  msgstr ""
522
 
523
+ #: app/controller/class-ai1ec-events-controller.php:447
524
+ msgid "Event saved."
525
  msgstr ""
526
 
527
+ #: app/controller/class-ai1ec-events-controller.php:448
528
+ msgid "Event submitted. <a target=\"_blank\" href=\"%s\">Preview event</a>"
529
  msgstr ""
530
 
531
+ #: app/controller/class-ai1ec-events-controller.php:449
532
  msgid ""
533
+ "Event scheduled for: <strong>%1$s</strong>. <a target=\"_blank\" href=\"%2$s"
534
+ "\">Preview event</a>"
535
  msgstr ""
536
 
537
+ #. translators: Publish box date format, see http:php.net/date
538
+ #: app/controller/class-ai1ec-events-controller.php:451
539
+ msgid "M j, Y @ G:i"
540
  msgstr ""
541
 
542
+ #: app/controller/class-ai1ec-events-controller.php:452
543
+ msgid "Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
544
+ msgstr ""
545
+
546
+ #: app/controller/class-ai1ec-app-controller.php:354
547
+ #: app/controller/class-ai1ec-app-controller.php:355
548
+ msgid "Settings"
549
+ msgstr ""
550
+
551
+ #: app/controller/class-ai1ec-importer-controller.php:91
552
+ msgid "The Events Calendar → All-in-One Event Calendar"
553
  msgstr ""
554
 
555
+ #: app/controller/class-ai1ec-importer-controller.php:92
556
+ msgid ""
557
+ "Imports events created using The Events Calendar plugin into the All-in-One "
558
+ "Event Calendar"
559
+ msgstr ""
560
+
561
+ #: app/view/event-single.php:5 app/view/event-multi.php:4
562
+ #: app/view/event-excerpt.php:2
563
  msgid "When:"
564
  msgstr ""
565
 
571
  msgid "Repeats:"
572
  msgstr ""
573
 
574
+ #: app/view/event-single.php:20 app/view/event-multi.php:20
575
+ #: app/view/event-excerpt.php:4
576
  msgid "Where:"
577
  msgstr ""
578
 
601
  msgstr ""
602
 
603
  #: app/view/event-single.php:52 app/view/event-multi.php:45
604
+ #: app/view/agenda.php:80
605
  msgid "Categories:"
606
  msgstr ""
607
 
608
  #: app/view/event-single.php:59 app/view/event-multi.php:51
609
+ #: app/view/agenda.php:86
610
  msgid "Tags:"
611
  msgstr ""
612
 
613
+ #: app/view/event-map.php:2
614
+ msgid "Click to view map"
 
 
 
 
615
  msgstr ""
616
 
617
+ #: app/view/event-map.php:9
618
+ msgid "View Full-Size Map »"
619
  msgstr ""
620
 
621
+ #: app/view/box_event_cost.php:1
622
+ msgid "Event cost"
623
  msgstr ""
624
 
625
+ #: app/view/box_event_cost.php:7
626
+ msgid "Cost"
627
  msgstr ""
628
 
629
+ #: app/view/event-multi.php:7
630
+ msgid "View in Calendar »"
631
  msgstr ""
632
 
633
+ #: app/view/event-multi.php:24
634
+ msgid "View Map »"
635
  msgstr ""
636
 
637
  #: app/view/admin_notices.php:2
638
  msgid "All-in-One Event Calendar Notice:"
639
  msgstr ""
640
 
641
+ #: app/view/row_daily.php:3 app/view/row_yearly.php:3
642
+ #: app/view/row_weekly.php:3 app/view/row_monthly.php:3
643
+ msgid "Every"
644
  msgstr ""
645
 
646
  #: app/view/event_categories-color_picker.php:5
653
  msgid "Events in this category will be identified by this color"
654
  msgstr ""
655
 
656
+ #: app/view/agenda-widget.php:11
657
+ msgid "There are no upcoming events."
658
+ msgstr ""
659
+
660
+ #: app/view/agenda-widget.php:59
661
+ msgid "View Calendar »"
662
+ msgstr ""
663
+
664
+ #: app/view/agenda-widget.php:67 app/view/calendar.php:101
665
  msgid ""
666
+ "Subscribe to this calendar using your favourite calendar program (iCal, "
667
+ "Outlook, etc.)"
668
  msgstr ""
669
 
670
+ #: app/view/agenda-widget.php:68 app/view/calendar.php:102
671
+ msgid " Subscribe"
672
  msgstr ""
673
 
674
+ #: app/view/agenda-widget.php:72 app/view/calendar.php:107
675
+ msgid "Subscribe to this calendar in your Google Calendar"
676
  msgstr ""
677
 
678
+ #: app/view/agenda-widget.php:74
679
+ msgid "Add to Google"
680
  msgstr ""
681
 
682
+ #: app/view/box_event_contact.php:1
683
+ msgid "Organizer contact info"
684
  msgstr ""
685
 
686
+ #: app/view/box_event_contact.php:7
687
+ msgid "Contact name:"
688
  msgstr ""
689
 
690
+ #: app/view/box_event_contact.php:17
691
+ msgid "Phone:"
692
  msgstr ""
693
 
694
+ #: app/view/box_event_contact.php:27
695
+ msgid "E-mail:"
696
+ msgstr ""
697
+
698
+ #: app/view/box_ics_import_settings.php:2
699
+ msgid "Auto-refresh"
700
+ msgstr ""
701
+
702
+ #: app/view/box_ics_import_settings.php:8 app/view/feed_row.php:3
703
+ msgid "iCalendar/.ics Feed URL:"
704
+ msgstr ""
705
+
706
+ #: app/view/box_ics_import_settings.php:12
707
+ msgid "Event category"
708
+ msgstr ""
709
+
710
+ #: app/view/box_ics_import_settings.php:18 app/view/feed_row.php:15
711
+ msgid "Tag with"
712
+ msgstr ""
713
+
714
+ #: app/view/box_ics_import_settings.php:22
715
+ msgid "+ Add new subscription"
716
  msgstr ""
717
 
718
  #: app/view/box_general_settings.php:1
756
  msgstr ""
757
 
758
  #: app/view/box_general_settings.php:31
759
+ msgid "Keep all events <strong>expanded</strong> in the agenda view"
760
  msgstr ""
761
 
762
  #: app/view/box_general_settings.php:37
763
+ msgid "<strong>Exclude</strong> events from search results"
764
+ msgstr ""
765
+
766
+ #: app/view/box_general_settings.php:43
767
  msgid ""
768
  "Show <strong>Post Your Event</strong> button above the calendar to "
769
  "privileged users"
770
  msgstr ""
771
 
772
+ #: app/view/box_general_settings.php:49
773
  msgid ""
774
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
775
  "calendar and single event views"
776
  msgstr ""
777
 
778
+ #: app/view/box_general_settings.php:55
779
  msgid "Hide <strong>Google Maps</strong> until clicked"
780
  msgstr ""
781
 
782
+ #: app/view/box_general_settings.php:61
783
  msgid "Include <strong>event categories</strong> in post category lists"
784
  msgstr ""
785
 
786
+ #: app/view/box_general_settings.php:65
787
  msgid "Adding/Editing Events"
788
  msgstr ""
789
 
790
+ #: app/view/box_general_settings.php:67
791
+ msgid "Input dates in this format:"
792
  msgstr ""
793
 
794
+ #: app/view/box_general_settings.php:73
795
  msgid "Use <strong>24h time</strong> in time pickers"
796
  msgstr ""
797
 
798
+ #: app/view/box_general_settings.php:79
799
  msgid "Display <strong>Publish</strong> at bottom of Edit Event form"
800
  msgstr ""
801
 
802
+ #: app/view/row_yearly.php:7
803
+ msgid "In"
804
+ msgstr ""
805
+
806
+ #: app/view/feed_row.php:9
807
+ msgid "Event category:"
808
+ msgstr ""
809
+
810
+ #: app/view/feed_row.php:19
811
+ msgid "× Delete"
812
+ msgstr ""
813
+
814
  #: app/view/agenda-widget-form.php:2
815
  msgid "Title:"
816
  msgstr ""
819
  msgid "Number of events to show:"
820
  msgstr ""
821
 
822
+ #: app/view/agenda-widget-form.php:14
823
+ msgid "Events with these <strong>Categories</strong>"
824
+ msgstr ""
825
+
826
+ #: app/view/agenda-widget-form.php:27
827
+ msgid "<strong>Or</strong> events with these <strong>Tags</strong>"
828
+ msgstr ""
829
+
830
+ #: app/view/agenda-widget-form.php:40
831
+ msgid "<strong>Or</strong> any of these <strong>Events</strong>"
832
+ msgstr ""
833
+
834
+ #: app/view/agenda-widget-form.php:53
835
  msgid "Show <strong>View Calendar</strong> button"
836
  msgstr ""
837
 
838
+ #: app/view/agenda-widget-form.php:56
839
  msgid "Show <strong>Subscribe</strong> buttons"
840
  msgstr ""
841
 
842
+ #: app/view/agenda-widget-form.php:59
843
  msgid "Hide this widget on calendar page"
844
  msgstr ""
845
 
846
+ #: app/view/agenda-widget-form.php:66
847
+ msgid "Categories"
848
  msgstr ""
849
 
850
+ #: app/view/agenda-widget-form.php:77
851
+ msgid "Tags"
852
  msgstr ""
853
 
854
+ #: app/view/calendar.php:27
855
+ msgid "+ Post Your Event"
856
  msgstr ""
857
 
858
+ #: app/view/calendar.php:36
859
+ msgid "Clear Filters"
860
+ msgstr ""
861
+
862
+ #: app/view/calendar.php:36
863
+ msgid "✘"
864
+ msgstr ""
865
+
866
+ #: app/view/calendar.php:37
867
+ msgid "Filter:"
868
+ msgstr ""
869
+
870
+ #: app/view/calendar.php:42
871
+ msgid "Categories ▾"
872
+ msgstr ""
873
+
874
+ #: app/view/calendar.php:64
875
+ msgid "Tags ▾"
876
+ msgstr ""
877
+
878
+ #: app/view/calendar.php:103
879
+ msgid "to this filtered calendar"
880
+ msgstr ""
881
+
882
+ #: app/view/calendar.php:109
883
+ msgid "Subscribe in Google Calendar"
884
  msgstr ""
885
 
886
  #: app/view/agenda.php:5
891
  msgid "− Collapse All"
892
  msgstr ""
893
 
894
+ #: app/view/agenda.php:12 app/view/month.php:4
895
+ msgid "Today"
896
+ msgstr ""
897
+
898
  #: app/view/agenda.php:28
899
  msgid "There are no upcoming events to display at this time."
900
  msgstr ""
901
 
902
+ #: app/view/agenda.php:58 app/view/agenda.php:108 app/view/month.php:68
903
+ msgid "(all-day)"
904
+ msgstr ""
905
+
906
+ #: app/view/agenda.php:76
907
  msgid "Read more »"
908
  msgstr ""
909
 
910
+ #: app/view/class-ai1ec-agenda-widget.php:18
911
+ #: app/view/class-ai1ec-agenda-widget.php:39
912
+ msgid "Upcoming Events"
913
  msgstr ""
914
 
915
+ #: app/view/class-ai1ec-agenda-widget.php:20
916
+ msgid "All-in-One Event Calendar: Lists upcoming events in Agenda view"
917
  msgstr ""
918
 
919
+ #. #-#-#-#-# plugin.pot (All-in-One Event Calendar Plugin 1.1) #-#-#-#-#
920
+ #. Author of the plugin/theme
921
+ #: app/view/box_the_seed_studio.php:3
922
+ msgid "The Seed Studio"
923
  msgstr ""
924
 
925
+ #: app/view/box_the_seed_studio.php:5
926
+ msgid ""
927
+ "The Seed Studio provides web development and support services for clients "
928
+ "and web developers."
929
  msgstr ""
930
 
931
+ #: app/view/box_the_seed_studio.php:11
932
+ msgid "Follow @the_seed_studio"
933
  msgstr ""
934
 
935
+ #: app/view/box_the_seed_studio.php:16
936
+ msgid "Get Support<span> from one of our experienced pros</span>"
937
  msgstr ""
938
 
939
+ #: app/view/box_the_seed_studio.php:18
940
+ msgid "Support"
941
  msgstr ""
942
 
943
+ #: app/view/box_the_seed_studio.php:20
944
+ msgid "View plugin documentation"
 
945
  msgstr ""
946
 
947
+ #: app/view/box_the_seed_studio.php:23
948
+ msgid ""
949
+ "You can also hire The Seed for support on a contract or per-hour basis for "
950
+ "this plugin, for your website or for any of your Internet marketing needs "
951
+ "(we can really help!)."
952
  msgstr ""
953
 
954
+ #: app/view/box_the_seed_studio.php:26
955
+ msgid ""
956
+ "Plugin users: The Seed gives support priority to clients. For free support "
957
+ "from other WordPress users, visit the plugin's forum."
958
  msgstr ""
959
 
960
+ #: app/view/box_the_seed_studio.php:29
961
+ msgid "Vote and Share"
962
  msgstr ""
963
 
964
+ #: app/view/box_the_seed_studio.php:32
965
+ msgid ""
966
+ "This plugin is offered free to the Wordpress Community under the GPL3 "
967
+ "license. All we ask is that you:"
968
  msgstr ""
969
 
970
+ #: app/view/box_the_seed_studio.php:34
971
+ msgid ""
972
+ "<a href=\"http://wordpress.org/extend/plugins/all-in-one-event-calendar/\" "
973
+ "target=\"_blank\">Give it a five-star rating on wordpress.org</a> (if you "
974
+ "think it deserves it!)"
975
+ msgstr ""
976
+
977
+ #: app/view/box_the_seed_studio.php:35
978
+ msgid "Link to the plugin page on our website"
979
+ msgstr ""
980
+
981
+ #: app/view/box_the_seed_studio.php:36
982
+ msgid "Become a Fan on Facebook"
983
+ msgstr ""
984
+
985
+ #: app/view/box_the_seed_studio.php:37
986
+ msgid "Follow us on Twitter"
987
+ msgstr ""
988
+
989
+ #: app/view/box_the_seed_studio.php:41
990
+ msgid "Latest from the Seed Network"
991
  msgstr ""
992
 
993
  #: app/view/box_eventbrite.php:1
1082
  msgid "Send an Invoice"
1083
  msgstr ""
1084
 
1085
+ #: app/view/event-single-footer.php:4
1086
+ msgid ""
1087
+ "This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
1088
+ "href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1089
  msgstr ""
1090
 
1091
+ #: app/view/event-single-footer.php:8
1092
+ msgid "View original post »"
1093
  msgstr ""
1094
 
1095
+ #: app/view/box_time_and_date.php:2
1096
+ msgid "Event date and time"
1097
  msgstr ""
1098
 
1099
+ #: app/view/box_time_and_date.php:8
1100
+ msgid "All-day event"
1101
  msgstr ""
1102
 
1103
+ #: app/view/box_time_and_date.php:18
1104
+ msgid "Start date / time"
 
 
1105
  msgstr ""
1106
 
1107
+ #: app/view/box_time_and_date.php:31
1108
+ msgid "End date / time"
 
1109
  msgstr ""
1110
 
1111
+ #: app/view/box_time_and_date.php:46
1112
+ msgid "Repeat"
1113
  msgstr ""
1114
 
1115
+ #: app/view/box_time_and_date.php:70
1116
+ msgid "End"
 
1117
  msgstr ""
1118
 
1119
+ #: app/view/box_time_and_date.php:77
1120
+ msgid "Ending after"
1121
  msgstr ""
1122
 
1123
+ #: app/view/box_time_and_date.php:92
1124
+ msgid "Apply"
1125
  msgstr ""
1126
 
1127
+ #: app/view/box_time_and_date.php:93
1128
+ msgid "Cancel"
1129
  msgstr ""
1130
 
1131
+ #: app/view/row_weekly.php:6
1132
+ msgid "On"
 
1133
  msgstr ""
1134
 
1135
+ #: app/view/row_monthly.php:7
1136
+ msgid "Each"
 
1137
  msgstr ""
1138
 
1139
+ #: app/view/settings.php:5
1140
+ msgid "All-in-one Event Calendar"
 
1141
  msgstr ""
1142
 
1143
+ #: app/view/settings.php:17
1144
+ msgid "Update Settings"
1145
  msgstr ""
1146
 
1147
+ #: app/view/box_event_location.php:1
1148
+ msgid "Event location details"
1149
  msgstr ""
1150
 
1151
+ #: app/view/box_event_location.php:7
1152
+ msgid "Venue name:"
1153
  msgstr ""
1154
 
1155
+ #: app/view/box_event_location.php:17
1156
+ msgid "Address:"
1157
  msgstr ""
1158
 
1159
+ #: app/view/box_event_location.php:27
1160
+ msgid "Show Google Map:"
 
 
1161
  msgstr ""
1162
 
1163
+ #: app/view/month.php:50
1164
+ msgid "Summary:"
1165
  msgstr ""
1166
 
1167
+ #: app/view/month.php:53
1168
+ msgid "click anywhere for details"
 
 
 
 
 
 
1169
  msgstr ""
1170
 
1171
+ #: app/view/import.php:6
1172
+ msgid "Successfully imported events:"
1173
  msgstr ""
1174
 
1175
  #. Plugin Name of the plugin/theme
1177
  msgstr ""
1178
 
1179
  #. Plugin URI of the plugin/theme
1180
+ msgid "http://theseednetwork.com/software/all-in-one-event-calendar-wordpress/"
1181
  msgstr ""
1182
 
1183
  #. Description of the plugin/theme
1187
  msgstr ""
1188
 
1189
  #. Author URI of the plugin/theme
1190
+ msgid "http://theseednetwork.com/"
1191
  msgstr ""
lib/helpers/SG_iCal_Freq.php CHANGED
@@ -50,6 +50,9 @@ class SG_iCal_Freq {
50
 
51
  $rules = array();
52
  foreach( explode(';', $rule) AS $v) {
 
 
 
53
  list($k, $v) = explode('=', $v);
54
  $this->rules[ strtolower($k) ] = $v;
55
  }
50
 
51
  $rules = array();
52
  foreach( explode(';', $rule) AS $v) {
53
+ if( strpos( $v, '=' ) === false )
54
+ continue;
55
+
56
  list($k, $v) = explode('=', $v);
57
  $this->rules[ strtolower($k) ] = $v;
58
  }
lib/helpers/SG_iCal_Recurrence.php CHANGED
@@ -63,10 +63,12 @@ class SG_iCal_Recurrence {
63
  //split up the properties
64
  $recurProperties = explode(';', $line);
65
  $recur = array();
66
-
67
  //loop through the properties in the line and set their associated
68
  //member variables
69
  foreach ($recurProperties as $property) {
 
 
 
70
  $nameAndValue = explode('=', $property);
71
 
72
  //need the lower-case name for setting the member variable
63
  //split up the properties
64
  $recurProperties = explode(';', $line);
65
  $recur = array();
 
66
  //loop through the properties in the line and set their associated
67
  //member variables
68
  foreach ($recurProperties as $property) {
69
+ if( empty( $property ) )
70
+ continue;
71
+
72
  $nameAndValue = explode('=', $property);
73
 
74
  //need the lower-case name for setting the member variable
readme.txt CHANGED
@@ -1,16 +1,16 @@
1
  === All-in-One Event Calendar ===
2
  Contributors: theseed, hubrik, vtowel, yani.iliev
3
- Donate link: http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/
4
  Tags: calendar, event, events, ics, ics calendar, ical-feed, ics feed, wordpress ics importer, wordpress ical importer, upcoming events, todo, notes, journal, freebusy, availability, web calendar, web events, webcal, google calendar, ical, iCalendar, all-in-one, ai1ec, google calendar sync, ical sync, events sync, holiday calendar, calendar 2011, events 2011, widget, events widget, upcoming events widget, calendar widget, agenda widget
5
  Requires at least: 3.1.3
6
  Tested up to: 3.2.1
7
- Stable tag: 1.0.9
8
 
9
  An event calendar system with month and agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
10
 
11
  == Description ==
12
 
13
- Welcome to the All-in-One Event Calendar Plugin, a new way to list your events in WordPress and easily share them with the rest of the world.
14
 
15
  Our new calendar system combines a clean visual design, solid architectural patterns and rigorous testing with a powerful set of features to create the most advanced calendar system available for WordPress and one of the most powerful website calendar systems in the world. Best of all: it’s completely free.
16
 
@@ -48,15 +48,29 @@ The All-in-One Event Calendar Plugin also has a few features that will prove use
48
  * Each event links to the original calendar
49
  * Your calendar can be embedded into a WordPress page without needing to create template files or modify the theme
50
 
51
- [Check out the DEMO »](http://demo.theseedstudio.com/calendar/)
52
 
53
  [Track the development process »](http://trac.the-seed.ca/roadmap)
54
 
55
  [Bug reports (only for registered users) »](http://trac.the-seed.ca/newticket)
56
 
57
- [Get Premium Support »](http://theseedstudio.com/get-supported-2/) from [The Seed Studio »](http://theseedstudio.com/)
58
 
59
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  = Version 1.0.9 =
61
  * Fixed a problem with timezone dropdown list
62
 
1
  === All-in-One Event Calendar ===
2
  Contributors: theseed, hubrik, vtowel, yani.iliev
3
+ Donate link: http://theseednetwork.com/software/all-in-one-event-calendar-wordpress/
4
  Tags: calendar, event, events, ics, ics calendar, ical-feed, ics feed, wordpress ics importer, wordpress ical importer, upcoming events, todo, notes, journal, freebusy, availability, web calendar, web events, webcal, google calendar, ical, iCalendar, all-in-one, ai1ec, google calendar sync, ical sync, events sync, holiday calendar, calendar 2011, events 2011, widget, events widget, upcoming events widget, calendar widget, agenda widget
5
  Requires at least: 3.1.3
6
  Tested up to: 3.2.1
7
+ Stable tag: 1.1
8
 
9
  An event calendar system with month and agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
10
 
11
  == Description ==
12
 
13
+ Welcome to the [All-in-One Event Calendar Plugin](http://theseednetwork.com/software/all-in-one-event-calendar-wordpress/), from [The Seed Studio](http:/theseednetwork.com), a [web development](http://theseednetwork.com) company. The All-in-One Event Calendar is a new way to list your events in WordPress and easily share them with the rest of the world.
14
 
15
  Our new calendar system combines a clean visual design, solid architectural patterns and rigorous testing with a powerful set of features to create the most advanced calendar system available for WordPress and one of the most powerful website calendar systems in the world. Best of all: it’s completely free.
16
 
48
  * Each event links to the original calendar
49
  * Your calendar can be embedded into a WordPress page without needing to create template files or modify the theme
50
 
51
+ [Check out the DEMO »](http://demo.theseedstudio.com/)
52
 
53
  [Track the development process »](http://trac.the-seed.ca/roadmap)
54
 
55
  [Bug reports (only for registered users) »](http://trac.the-seed.ca/newticket)
56
 
57
+ [Get Premium Support »](http://theseednetwork.com/get-supported) from [The Seed Studio »](http:/theseednetwork.com/)
58
 
59
  == Changelog ==
60
+ = Version 1.1 =
61
+ * Feature: New recurrence UI when adding events [#40](http://trac.the-seed.ca/ticket/40)
62
+ * Feature: Translate recurrence rule to Human readable format that allows localization [#40](http://trac.the-seed.ca/ticket/40)
63
+ * Feature: Add Filter by Categories, Tags to Widget [#44](http://trac.the-seed.ca/ticket/44)
64
+ * Feature: Add option to keep all events expanded in the agenda view [#33](http://trac.the-seed.ca/ticket/33)
65
+ * Feature: Make it possible to globalize the date picker. Thank you josjo! [#52](http://trac.the-seed.ca/ticket/52)
66
+ * Fixed: On recurring events show the date time of the current event and NOT the original event [#39](http://trac.the-seed.ca/ticket/39)
67
+ * Fixed: Events posted in Standard time from Daylight Savings Time are wrong [#42](http://trac.the-seed.ca/ticket/42)
68
+ * Fixed: Multi-day Events listing twice [#56](http://trac.the-seed.ca/ticket/56)
69
+ * Fixed: %e is not supported in gmstrftime on Windows [#53](http://trac.the-seed.ca/ticket/53)
70
+ * Improved: IE9 Support [#11](http://trac.the-seed.ca/ticket/11)
71
+ * Improved: Corrected as many as possible HTML validation errors [#9](http://trac.the-seed.ca/ticket/9)
72
+ * Improved: Optimization changes for better performance.
73
+
74
  = Version 1.0.9 =
75
  * Fixed a problem with timezone dropdown list
76