Calendar by WD – Responsive Event Calendar - Version 1.4.20

Version Description

bug in color picker fixed

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Calendar by WD – Responsive Event Calendar
Version 1.4.20
Comparing to
See all releases

Code changes from version 1.4.19 to 1.4.20

calendar.php CHANGED
@@ -4,11 +4,11 @@
4
  Plugin Name: Spider Event Calendar
5
  Plugin URI: https://web-dorado.com/products/wordpress-calendar.html
6
  Description: Spider Event Calendar is a highly configurable product which allows you to have multiple organized events. Spider Event Calendar is an extraordinary user friendly extension.
7
- Version: 1.4.19
8
  Author: https://web-dorado.com/
9
  License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
11
-
12
  // LANGUAGE localization.
13
  function sp_calendar_language_load() {
14
  load_plugin_textdomain('sp_calendar', FALSE, basename(dirname(__FILE__)) . '/languages');
@@ -18,11 +18,10 @@ add_action('init', 'sp_calendar_language_load');
18
  add_action('init', 'sp_cal_registr_some_scripts');
19
 
20
  function sp_cal_registr_some_scripts(){
21
- wp_register_script("Canlendar_upcoming", plugins_url("elements/calendar.js", __FILE__), array(), '1.4.16');
22
- wp_register_script("calendnar-setup_upcoming", plugins_url("elements/calendar-setup.js", __FILE__), array(), '1.4.16');
23
- wp_register_script("calenndar_function_upcoming", plugins_url("elements/calendar_function.js", __FILE__), array(), '1.4.16');
24
-
25
-
26
  }
27
 
28
  // Include widget.
@@ -501,40 +500,46 @@ function Spider_calendar_Licensing() {
501
  }
502
 
503
  function spider_calendar_themes_admin_styles_scripts() {
 
504
  wp_enqueue_script("jquery");
505
- wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset.js', __FILE__), array(), '1.4.16');
506
- wp_enqueue_script("colcor_js", plugins_url('jscolor/jscolor.js', __FILE__), array(), '1.4.16');
 
507
  if (isset($_GET['task'])) {
508
  if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
509
- wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__), array(), '1.4.16');
510
  }
511
  }
512
  }
513
 
514
  function spider_widget_calendar_themes_admin_styles_scripts() {
 
515
  wp_enqueue_script("jquery");
516
- wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset_widget.js', __FILE__), array(), '1.4.16');
517
- wp_enqueue_script("colcor_js", plugins_url('jscolor/jscolor.js', __FILE__), array(), '1.4.16');
 
518
  if (isset($_GET['task'])) {
519
  if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
520
- wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__), array(), '1.4.16');
521
  }
522
  }
523
  }
524
 
525
  function spider_calendar_admin_styles_scripts() {
526
- wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), array(), '1.4.16', FALSE);
527
- wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), array(), '1.4.16', FALSE);
528
- wp_enqueue_script("calendar_function", plugins_url("elements/calendar_function.js", __FILE__), array(), '1.4.16', FALSE);
529
- wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), array(), '1.4.16', FALSE);
 
530
  }
531
 
532
  function spider_calendar_event_category_admin_styles_scripts(){
533
- wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), array(), '1.4.16', FALSE);
534
- wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), array(), '1.4.16', FALSE);
535
- wp_enqueue_script("calendar_function", plugins_url("elements/calendar_function.js", __FILE__), array(), '1.4.16', FALSE);
536
- wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), array(), '1.4.16', FALSE);
537
- wp_enqueue_script("colcor_js", plugins_url('jscolor/jscolor.js', __FILE__), array(), '1.4.16');
 
538
  }
539
 
540
  add_filter('admin_head', 'spide_ShowTinyMCE');
@@ -986,8 +991,9 @@ function Uninstall_sp_calendar() {
986
  }
987
  }
988
 
989
- function calendar_Featured_themes_styles() {
990
- wp_enqueue_style("Featured_themes", plugins_url("featured_themes.css", __FILE__), array(), '1.4.16');
 
991
  }
992
 
993
  function calendar_Featured_themes() { ?>
@@ -1108,7 +1114,8 @@ function calendar_Featured_themes() { ?>
1108
  <?php }
1109
 
1110
  function calendar_Featured_Plugins_styles() {
1111
- wp_enqueue_style("Featured_Plugins", plugins_url("featured_plugins.css", __FILE__), array(), '1.4.16');
 
1112
  }
1113
  function calendar_Featured_Plugins() { ?>
1114
  <div id="main_featured_plugins_page">
4
  Plugin Name: Spider Event Calendar
5
  Plugin URI: https://web-dorado.com/products/wordpress-calendar.html
6
  Description: Spider Event Calendar is a highly configurable product which allows you to have multiple organized events. Spider Event Calendar is an extraordinary user friendly extension.
7
+ Version: 1.4.20
8
  Author: https://web-dorado.com/
9
  License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
11
+ $wd_spider_calendar_version="1.4.20";
12
  // LANGUAGE localization.
13
  function sp_calendar_language_load() {
14
  load_plugin_textdomain('sp_calendar', FALSE, basename(dirname(__FILE__)) . '/languages');
18
  add_action('init', 'sp_cal_registr_some_scripts');
19
 
20
  function sp_cal_registr_some_scripts(){
21
+ global $wd_spider_calendar_version;
22
+ wp_register_script("Canlendar_upcoming", plugins_url("elements/calendar.js", __FILE__), array(), $wd_spider_calendar_version);
23
+ wp_register_script("calendnar-setup_upcoming", plugins_url("elements/calendar-setup.js", __FILE__), array(), $wd_spider_calendar_version);
24
+ wp_register_script("calenndar_function_upcoming", plugins_url("elements/calendar_function.js", __FILE__), array(), $wd_spider_calendar_version);
 
25
  }
26
 
27
  // Include widget.
500
  }
501
 
502
  function spider_calendar_themes_admin_styles_scripts() {
503
+ global $wd_spider_calendar_version;
504
  wp_enqueue_script("jquery");
505
+ wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset.js', __FILE__), array(), $wd_spider_calendar_version);
506
+ wp_enqueue_script('wp-color-picker');
507
+ wp_enqueue_style( 'wp-color-picker' );
508
  if (isset($_GET['task'])) {
509
  if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
510
+ wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__), array(), $wd_spider_calendar_version);
511
  }
512
  }
513
  }
514
 
515
  function spider_widget_calendar_themes_admin_styles_scripts() {
516
+ global $wd_spider_calendar_version;
517
  wp_enqueue_script("jquery");
518
+ wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset_widget.js', __FILE__), array(), $wd_spider_calendar_version);
519
+ wp_enqueue_script('wp-color-picker');
520
+ wp_enqueue_style( 'wp-color-picker' );
521
  if (isset($_GET['task'])) {
522
  if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
523
+ wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__), array(), $wd_spider_calendar_version);
524
  }
525
  }
526
  }
527
 
528
  function spider_calendar_admin_styles_scripts() {
529
+ global $wd_spider_calendar_version;
530
+ wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
531
+ wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
532
+ wp_enqueue_script("calendar_function", plugins_url("elements/calendar_function.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
533
+ wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), array(), $wd_spider_calendar_version, FALSE);
534
  }
535
 
536
  function spider_calendar_event_category_admin_styles_scripts(){
537
+ global $wd_spider_calendar_version;
538
+ wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
539
+ wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
540
+ wp_enqueue_script('wp-color-picker');
541
+ wp_enqueue_style( 'wp-color-picker' );
542
+ wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), array(), $wd_spider_calendar_version, FALSE);
543
  }
544
 
545
  add_filter('admin_head', 'spide_ShowTinyMCE');
991
  }
992
  }
993
 
994
+ function calendar_Featured_themes_styles() {
995
+ global $wd_spider_calendar_version;
996
+ wp_enqueue_style("Featured_themes", plugins_url("featured_themes.css", __FILE__), array(), $wd_spider_calendar_version);
997
  }
998
 
999
  function calendar_Featured_themes() { ?>
1114
  <?php }
1115
 
1116
  function calendar_Featured_Plugins_styles() {
1117
+ global $wd_spider_calendar_version;
1118
+ wp_enqueue_style("Featured_Plugins", plugins_url("featured_plugins.css", __FILE__), array(), $wd_spider_calendar_version);
1119
  }
1120
  function calendar_Featured_Plugins() { ?>
1121
  <div id="main_featured_plugins_page">
calendar_functions.html.php CHANGED
@@ -738,8 +738,34 @@ $row=$wpdb->get_row($wpdb->prepare ("SELECT * FROM " . $wpdb->prefix . "spiderca
738
  document.getElementById('adminForm').submit();
739
  }
740
  }
 
 
 
741
  </script>
742
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
743
  <table>
744
  <tr>
745
  <td align="right"><input type="button" onClick="submitbutton('save_category_event')" value="Save" class="button-secondary action"></td>
@@ -773,8 +799,11 @@ $row=$wpdb->get_row($wpdb->prepare ("SELECT * FROM " . $wpdb->prefix . "spiderca
773
  <tr>
774
  <td class="key" ><label for="message"><?php echo 'Category Color'; ?>:</label> </td>
775
 
776
- <td><input type="text" name="color" id="color" class="color" style="width:134px;" value="<?php if(isset($row->color)) echo htmlspecialchars($row->color);
777
- ?>"/></td>
 
 
 
778
  </tr>
779
 
780
 
738
  document.getElementById('adminForm').submit();
739
  }
740
  }
741
+ jQuery(document).ready(function() {
742
+ jQuery('.color_input').wpColorPicker();
743
+ });
744
  </script>
745
+ <style>
746
+ .wp-picker-holder{
747
+ position: absolute;
748
+ z-index: 2;
749
+ top: 20px;
750
+ }
751
+ .wp-color-result {
752
+ background-color: transparent;
753
+ width: 85px;
754
+ }
755
+ .wp-color-result:focus{
756
+ outline: none;
757
+ }
758
+ .color_for_this {
759
+ height: 24px;
760
+ top: 0px;
761
+ position: relative;
762
+ width: 35px;
763
+ left: 2px;
764
+ }
765
+ .wp-color-result:hover{
766
+ background-color: transparent;
767
+ }
768
+ </style>
769
  <table>
770
  <tr>
771
  <td align="right"><input type="button" onClick="submitbutton('save_category_event')" value="Save" class="button-secondary action"></td>
799
  <tr>
800
  <td class="key" ><label for="message"><?php echo 'Category Color'; ?>:</label> </td>
801
 
802
+ <td>
803
+ <div class="color_for_this" style="background-color: #<?php if(isset($row->color)) echo htmlspecialchars($row->color); ?>">
804
+ <input type="text" name="color" id="color" class="color_input wp-color-picker" style="width:134px;" value="<?php if(isset($row->color)) echo htmlspecialchars($row->color); ?>"/>
805
+ </div>
806
+ </td>
807
  </tr>
808
 
809
 
front_end/bigcalendarday.php CHANGED
@@ -86,25 +86,24 @@ $cat_ids = substr($cat_ids, 0,-1);
86
 
87
  ///////////////////////////////////////////////////////////////////////////////////////////////////////
88
 
89
- $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
90
  $cal_width = $theme->width;
91
- $show_cat = $theme->show_cat;
92
- $bg_top = '#' . $theme->bg_top;
93
- $bg_bottom = '#' . $theme->bg_bottom;
94
- $border_color = '#' . $theme->border_color;
95
- $text_color_year = '#' . $theme->text_color_year;
96
- $text_color_month = '#' . $theme->text_color_month;
97
- $color_week_days = '#' . $theme->text_color_week_days;
98
- $text_color_other_months = '#' . $theme->text_color_other_months;
99
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
100
- $evented_color = '#' . $theme->text_color_this_month_evented;
101
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
102
- $color_arrow_year = '#' . $theme->arrow_color_year;
103
- $color_arrow_month = '#' . $theme->arrow_color_month;
104
- $sun_days = '#' . $theme->text_color_sun_days;
105
- $event_title_color = '#' . $theme->event_title_color;
106
- $current_day_border_color = '#' . $theme->current_day_border_color;
107
- $cell_border_color = '#' . $theme->cell_border_color;
108
  $cell_height = $theme->cell_height;
109
  $popup_width = $theme->popup_width;
110
  $popup_height = $theme->popup_height;
@@ -114,11 +113,11 @@ $cat_ids = substr($cat_ids, 0,-1);
114
  $weekdays_font_size = $theme->weekdays_font_size;
115
  $border_width = $theme->border_width;
116
  $top_height = $theme->top_height;
117
- $bg_color_other_months = '#' . $theme->bg_color_other_months;
118
- $sundays_bg_color = '#' . $theme->sundays_bg_color;
119
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
120
  $weekstart = $theme->week_start_day;
121
- $weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
122
  $border_radius = $theme->border_radius;
123
  $border_radius2 = $border_radius-$border_width;
124
  $week_days_cell_height = $theme->week_days_cell_height;
@@ -126,32 +125,42 @@ $cat_ids = substr($cat_ids, 0,-1);
126
  $month_font_size = $theme->month_font_size;
127
  $arrow_size = $theme->arrow_size;
128
  $arrow_size_hover = $arrow_size + 5;
129
- $next_month_text_color = '#' . $theme->next_month_text_color;
130
- $prev_month_text_color = '#' . $theme->prev_month_text_color;
131
- $next_month_arrow_color = '#' . $theme->next_month_arrow_color;
132
- $prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
133
  $next_month_font_size = $theme->next_month_font_size;
134
  $prev_month_font_size = $theme->prev_month_font_size;
135
  $month_type = $theme->month_type;
136
- $date_bg_color = '#' . $theme->date_bg_color;
137
- $event_bg_color1 = '#' . $theme->event_bg_color1;
138
- $event_bg_color2 = '#' . $theme->event_bg_color2;
139
- $event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
140
- $event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
141
- $event_num_color = '#' . $theme->event_num_color;
142
  $date_font_size = $theme->date_font_size;
143
  $event_num_font_size = $theme->event_num_font_size;
144
  $event_table_height = $theme->event_table_height;
145
  $date_height = $theme->date_height;
146
  $day_month_font_size = $theme->day_month_font_size;
147
  $week_font_size = $theme->week_font_size;
148
- $day_month_font_color = '#' . $theme->day_month_font_color;
149
- $week_font_color = '#' . $theme->week_font_color;
150
- $views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
151
- $views_tabs_text_color = '#' . $theme->views_tabs_text_color;
152
  $views_tabs_font_size = $theme->views_tabs_font_size;
 
 
 
 
 
 
 
 
 
153
  $show_numbers_for_events = $theme->day_start;
154
 
 
155
  __('January', 'sp_calendar');
156
  __('February', 'sp_calendar');
157
  __('March', 'sp_calendar');
@@ -318,7 +327,7 @@ $cat_ids = substr($cat_ids, 0,-1);
318
  margin: inherit !important;
319
  padding: inherit !important;
320
  }
321
- #bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
322
  color: <?php echo $sun_days ?> !important;
323
  border: 1px solid <?php echo $cell_border_color; ?> !important;
324
  <?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
@@ -693,7 +702,7 @@ position: relative;
693
  'cat_ids' => $cat_ids,
694
  'widget' => $widget,
695
  ), $site_url);
696
- ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9664;
697
  </a>
698
  </td>
699
  <td style="text-align:center; margin:0;" width="40%">
@@ -734,7 +743,7 @@ position: relative;
734
  'cat_ids' => $cat_ids,
735
  'widget' => $widget,
736
  ), $site_url);
737
- ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9654;
738
  </a>
739
  </td>
740
  <td width="15%">
@@ -853,7 +862,7 @@ position: relative;
853
 
854
  echo '<table style="margin: 0;border-spacing:0;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . ';" class="day_ev">
855
  <tr>
856
- <td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:#' . $cat_color->color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
857
  <td>
858
  <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $event_title_color . '; "
859
  href="' . add_query_arg(array(
@@ -941,13 +950,13 @@ position: relative;
941
  .categories2
942
  {
943
  position:relative;
944
- left: -9px;
945
  cursor:pointer;
946
  }
947
  .categories2:first-letter
948
  {
949
  color:#fff;
950
-
951
  }
952
  </style>
953
  <?php
@@ -975,8 +984,6 @@ echo'
975
  if($cat_ids=='')
976
  $cat_ids='';
977
 
978
- if($show_cat==1)
979
- {
980
  echo '<ul id="cats" style="list-style-type:none;">';
981
 
982
 
@@ -985,7 +992,7 @@ foreach($categories as $category)
985
 
986
  ?>
987
 
988
- <li style="float:left;"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
989
  'action' => 'spiderbigcalendar_day',
990
  'theme_id' => $theme_id,
991
  'calendar' => $calendar_id,
@@ -1003,7 +1010,7 @@ foreach($categories as $category)
1003
  }
1004
  if (!empty($categories)) {
1005
  ?>
1006
- <li style="float:left;"><p class="categories1" style="background-color:<?php echo $bg_top;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:<?php echo $bg_top; ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1007
  'action' => 'spiderbigcalendar_day',
1008
  'theme_id' => $theme_id,
1009
  'calendar' => $calendar_id,
@@ -1016,7 +1023,6 @@ if (!empty($categories)) {
1016
  'widget' => $widget,
1017
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
1018
  <?php echo '</ul>';
1019
- }
1020
  }
1021
  die();
1022
  }
86
 
87
  ///////////////////////////////////////////////////////////////////////////////////////////////////////
88
 
89
+ $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
90
  $cal_width = $theme->width;
91
+ $bg_top = '#' . str_replace('#','',$theme->bg_top);
92
+ $bg_bottom = '#' . str_replace('#','',$theme->bg_bottom);
93
+ $border_color = '#' . str_replace('#','',$theme->border_color);
94
+ $text_color_year = '#' . str_replace('#','',$theme->text_color_year);
95
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
96
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
97
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
98
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
99
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
100
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
101
+ $color_arrow_year = '#' . str_replace('#','',$theme->arrow_color_year);
102
+ $color_arrow_month = '#' . str_replace('#','',$theme->arrow_color_month);
103
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
104
+ $event_title_color = '#' . str_replace('#','',$theme->event_title_color);
105
+ $current_day_border_color = '#' . str_replace('#','',$theme->current_day_border_color);
106
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
 
107
  $cell_height = $theme->cell_height;
108
  $popup_width = $theme->popup_width;
109
  $popup_height = $theme->popup_height;
113
  $weekdays_font_size = $theme->weekdays_font_size;
114
  $border_width = $theme->border_width;
115
  $top_height = $theme->top_height;
116
+ $bg_color_other_months = '#' . str_replace('#','',$theme->bg_color_other_months);
117
+ $sundays_bg_color = '#' . str_replace('#','',$theme->sundays_bg_color);
118
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
119
  $weekstart = $theme->week_start_day;
120
+ $weekday_sunday_bg_color = '#' . str_replace('#','',$theme->weekday_sunday_bg_color);
121
  $border_radius = $theme->border_radius;
122
  $border_radius2 = $border_radius-$border_width;
123
  $week_days_cell_height = $theme->week_days_cell_height;
125
  $month_font_size = $theme->month_font_size;
126
  $arrow_size = $theme->arrow_size;
127
  $arrow_size_hover = $arrow_size + 5;
128
+ $next_month_text_color = '#' . str_replace('#','',$theme->next_month_text_color);
129
+ $prev_month_text_color = '#' . str_replace('#','',$theme->prev_month_text_color);
130
+ $next_month_arrow_color = '#' . str_replace('#','',$theme->next_month_arrow_color);
131
+ $prev_month_arrow_color = '#' . str_replace('#','',$theme->prev_month_arrow_color);
132
  $next_month_font_size = $theme->next_month_font_size;
133
  $prev_month_font_size = $theme->prev_month_font_size;
134
  $month_type = $theme->month_type;
135
+ $date_bg_color = '#' . str_replace('#','',$theme->date_bg_color);
136
+ $event_bg_color1 = '#' . str_replace('#','',$theme->event_bg_color1);
137
+ $event_bg_color2 = '#' . str_replace('#','',$theme->event_bg_color2);
138
+ $event_num_bg_color1 = '#' . str_replace('#','',$theme->event_num_bg_color1);
139
+ $event_num_bg_color2 = '#' . str_replace('#','',$theme->event_num_bg_color2);
140
+ $event_num_color = '#' . str_replace('#','',$theme->event_num_color);
141
  $date_font_size = $theme->date_font_size;
142
  $event_num_font_size = $theme->event_num_font_size;
143
  $event_table_height = $theme->event_table_height;
144
  $date_height = $theme->date_height;
145
  $day_month_font_size = $theme->day_month_font_size;
146
  $week_font_size = $theme->week_font_size;
147
+ $day_month_font_color = '#' . str_replace('#','',$theme->day_month_font_color);
148
+ $week_font_color = '#' . str_replace('#','',$theme->week_font_color);
149
+ $views_tabs_bg_color = '#' . str_replace('#','',$theme->views_tabs_bg_color);
150
+ $views_tabs_text_color = '#' . str_replace('#','',$theme->views_tabs_text_color);
151
  $views_tabs_font_size = $theme->views_tabs_font_size;
152
+
153
+ $date_bg_color = '#' . str_replace('#','',$theme->date_bg_color);
154
+ $event_bg_color1 = '#' . str_replace('#','',$theme->event_bg_color1);
155
+ $event_bg_color2 = '#' . str_replace('#','',$theme->event_bg_color2);
156
+ $event_num_bg_color1 = '#' . str_replace('#','',$theme->event_num_bg_color1);
157
+ $event_num_bg_color2 = '#' . str_replace('#','',$theme->event_num_bg_color2);
158
+ $event_num_color = '#' . str_replace('#','',$theme->event_num_color);
159
+ $date_font_size = $theme->date_font_size;
160
+ $event_num_font_size = $theme->event_num_font_size;
161
  $show_numbers_for_events = $theme->day_start;
162
 
163
+
164
  __('January', 'sp_calendar');
165
  __('February', 'sp_calendar');
166
  __('March', 'sp_calendar');
327
  margin: inherit !important;
328
  padding: inherit !important;
329
  }
330
+ #bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
331
  color: <?php echo $sun_days ?> !important;
332
  border: 1px solid <?php echo $cell_border_color; ?> !important;
333
  <?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
702
  'cat_ids' => $cat_ids,
703
  'widget' => $widget,
704
  ), $site_url);
705
+ ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9668;
706
  </a>
707
  </td>
708
  <td style="text-align:center; margin:0;" width="40%">
743
  'cat_ids' => $cat_ids,
744
  'widget' => $widget,
745
  ), $site_url);
746
+ ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9658;
747
  </a>
748
  </td>
749
  <td width="15%">
862
 
863
  echo '<table style="margin: 0;border-spacing:0;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . ';" class="day_ev">
864
  <tr>
865
+ <td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color: #' . str_replace('#','',$cat_color->color) . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
866
  <td>
867
  <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $event_title_color . '; "
868
  href="' . add_query_arg(array(
950
  .categories2
951
  {
952
  position:relative;
953
+ left: -10px;
954
  cursor:pointer;
955
  }
956
  .categories2:first-letter
957
  {
958
  color:#fff;
959
+ letter-spacing: 3px;
960
  }
961
  </style>
962
  <?php
984
  if($cat_ids=='')
985
  $cat_ids='';
986
 
 
 
987
  echo '<ul id="cats" style="list-style-type:none;">';
988
 
989
 
992
 
993
  ?>
994
 
995
+ <li style="float:left;"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
996
  'action' => 'spiderbigcalendar_day',
997
  'theme_id' => $theme_id,
998
  'calendar' => $calendar_id,
1010
  }
1011
  if (!empty($categories)) {
1012
  ?>
1013
+ <li style="float:left;"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$bg_top); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo str_replace('#','',$bg_top); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1014
  'action' => 'spiderbigcalendar_day',
1015
  'theme_id' => $theme_id,
1016
  'calendar' => $calendar_id,
1023
  'widget' => $widget,
1024
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
1025
  <?php echo '</ul>';
 
1026
  }
1027
  die();
1028
  }
front_end/bigcalendarday_widget.php CHANGED
@@ -88,27 +88,26 @@ $cat_ids = substr($cat_ids, 0,-1);
88
 
89
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
90
  $weekstart = $theme->week_start_day;
91
- $bg = '#' . $theme->header_bgcolor;
92
- $show_cat = $theme->show_cat;
93
- $bg_color_selected = '#' . $theme->bg_color_selected;
94
- $color_arrow = '#' . $theme->arrow_color;
95
- $evented_color = '#' . $theme->text_color_this_month_evented;
96
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
97
- $sun_days = '#' . $theme->text_color_sun_days;
98
- $text_color_other_months = '#' . $theme->text_color_other_months;
99
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
100
- $text_color_month = '#' . $theme->text_color_month;
101
- $color_week_days = '#' . $theme->text_color_week_days;
102
- $text_color_selected = '#' . $theme->text_color_selected;
103
- $border_day = '#' . $theme->border_day;
104
  $calendar_width = $theme->width;
105
- $calendar_bg = '#' . $theme->footer_bgcolor;
106
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
107
- $weekday_su_bg_color = '#' . $theme->su_bg_color;
108
- $cell_border_color = '#' . $theme->cell_border_color;
109
  $year_font_size = $theme->year_font_size;
110
- $year_font_color = '#' . $theme->year_font_color;
111
- $year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
112
  $font_year = $theme->font_year;
113
  $font_month = $theme->font_month;
114
  $font_day = $theme->font_day;
@@ -291,8 +290,6 @@ $cat_ids = substr($cat_ids, 0,-1);
291
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
292
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
293
  {
294
-
295
- background-color: ".$views_tabs_bg_color.";
296
  width: 120px;
297
  text-align: center;
298
  cursor: pointer;
@@ -312,11 +309,6 @@ position: relative;
312
 
313
  }
314
 
315
- #drop_down_views >li:hover .views_select, #drop_down_views >li.active .views_select
316
- {
317
- background:<?php echo $bg_top ?>;
318
- }
319
-
320
  #drop_down_views >li
321
  {
322
  border-bottom:1px solid #fff !important;
@@ -555,9 +547,9 @@ position: relative;
555
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
556
  echo '<table style="border-spacing:0;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
557
  <tr>
558
- <td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:#' . $cat_color->color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
559
  <td>
560
- <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:#' . $ev_title_color . '; "
561
  href="' . add_query_arg(array(
562
  'action' => 'spidercalendarbig',
563
  'theme_id' => $theme_id,
@@ -640,13 +632,13 @@ position: relative;
640
  .categories2
641
  {
642
  position:relative;
643
- left: -9px;
644
  cursor:pointer;
645
  }
646
  .categories2:first-letter
647
  {
648
  color:#fff;
649
-
650
  }
651
  </style>
652
  <?php
@@ -674,7 +666,6 @@ echo'
674
  if($cat_ids=='')
675
  $cat_ids='';
676
 
677
- if($show_cat==1){
678
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
679
 
680
  foreach($categories as $category)
@@ -682,7 +673,7 @@ foreach($categories as $category)
682
 
683
  ?>
684
 
685
- <li style="height:30px"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
686
  'action' => 'spiderbigcalendar_day_widget',
687
  'theme_id' => $theme_id,
688
  'calendar' => $calendar_id,
@@ -716,7 +707,6 @@ if (!empty($categories)) {
716
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
717
 
718
  <?php echo '</ul>';
719
- }
720
  }
721
  die();
722
  }
88
 
89
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
90
  $weekstart = $theme->week_start_day;
91
+ $bg = '#' . str_replace('#','',$theme->header_bgcolor);
92
+ $bg_color_selected = '#' . str_replace('#','',$theme->bg_color_selected);
93
+ $color_arrow = '#' . str_replace('#','',$theme->arrow_color);
94
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
95
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
96
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
97
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
98
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
99
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
100
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
101
+ $text_color_selected = '#' . str_replace('#','',$theme->text_color_selected);
102
+ $border_day = '#' . str_replace('#','',$theme->border_day);
 
103
  $calendar_width = $theme->width;
104
+ $calendar_bg = '#' . str_replace('#','',$theme->footer_bgcolor);
105
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
106
+ $weekday_su_bg_color = '#' . str_replace('#','',$theme->su_bg_color);
107
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
108
  $year_font_size = $theme->year_font_size;
109
+ $year_font_color = '#' . str_replace('#','',$theme->year_font_color);
110
+ $year_tabs_bg_color = '#' . str_replace('#','',$theme->year_tabs_bg_color);
111
  $font_year = $theme->font_year;
112
  $font_month = $theme->font_month;
113
  $font_day = $theme->font_day;
290
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
291
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
292
  {
 
 
293
  width: 120px;
294
  text-align: center;
295
  cursor: pointer;
309
 
310
  }
311
 
 
 
 
 
 
312
  #drop_down_views >li
313
  {
314
  border-bottom:1px solid #fff !important;
547
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
548
  echo '<table style="border-spacing:0;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
549
  <tr>
550
+ <td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:#' . str_replace('#','',$cat_color->color) . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
551
  <td>
552
+ <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $ev_title_color . '; "
553
  href="' . add_query_arg(array(
554
  'action' => 'spidercalendarbig',
555
  'theme_id' => $theme_id,
632
  .categories2
633
  {
634
  position:relative;
635
+ left: -10px;
636
  cursor:pointer;
637
  }
638
  .categories2:first-letter
639
  {
640
  color:#fff;
641
+ letter-spacing: 3px;
642
  }
643
  </style>
644
  <?php
666
  if($cat_ids=='')
667
  $cat_ids='';
668
 
 
669
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
670
 
671
  foreach($categories as $category)
673
 
674
  ?>
675
 
676
+ <li style="height:30px"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
677
  'action' => 'spiderbigcalendar_day_widget',
678
  'theme_id' => $theme_id,
679
  'calendar' => $calendar_id,
707
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
708
 
709
  <?php echo '</ul>';
 
710
  }
711
  die();
712
  }
front_end/bigcalendarlist.php CHANGED
@@ -86,23 +86,22 @@ $cat_ids = substr($cat_ids, 0,-1);
86
 
87
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
88
  $cal_width = $theme->width;
89
- $show_cat = $theme->show_cat;
90
- $bg_top = '#' . $theme->bg_top;
91
- $bg_bottom = '#' . $theme->bg_bottom;
92
- $border_color = '#' . $theme->border_color;
93
- $text_color_year = '#' . $theme->text_color_year;
94
- $text_color_month = '#' . $theme->text_color_month;
95
- $color_week_days = '#' . $theme->text_color_week_days;
96
- $text_color_other_months = '#' . $theme->text_color_other_months;
97
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
98
- $evented_color = '#' . $theme->text_color_this_month_evented;
99
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
100
- $color_arrow_year = '#' . $theme->arrow_color_year;
101
- $color_arrow_month = '#' . $theme->arrow_color_month;
102
- $sun_days = '#' . $theme->text_color_sun_days;
103
- $event_title_color = '#' . $theme->event_title_color;
104
- $current_day_border_color = '#' . $theme->current_day_border_color;
105
- $cell_border_color = '#' . $theme->cell_border_color;
106
  $cell_height = $theme->cell_height;
107
  $popup_width = $theme->popup_width;
108
  $popup_height = $theme->popup_height;
@@ -112,11 +111,11 @@ $cat_ids = substr($cat_ids, 0,-1);
112
  $weekdays_font_size = $theme->weekdays_font_size;
113
  $border_width = $theme->border_width;
114
  $top_height = $theme->top_height;
115
- $bg_color_other_months = '#' . $theme->bg_color_other_months;
116
- $sundays_bg_color = '#' . $theme->sundays_bg_color;
117
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
118
  $weekstart = $theme->week_start_day;
119
- $weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
120
  $border_radius = $theme->border_radius;
121
  $border_radius2 = $border_radius-$border_width;
122
  $week_days_cell_height = $theme->week_days_cell_height;
@@ -124,37 +123,37 @@ $cat_ids = substr($cat_ids, 0,-1);
124
  $month_font_size = $theme->month_font_size;
125
  $arrow_size = $theme->arrow_size;
126
  $arrow_size_hover = $arrow_size + 5;
127
- $next_month_text_color = '#' . $theme->next_month_text_color;
128
- $prev_month_text_color = '#' . $theme->prev_month_text_color;
129
- $next_month_arrow_color = '#' . $theme->next_month_arrow_color;
130
- $prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
131
  $next_month_font_size = $theme->next_month_font_size;
132
  $prev_month_font_size = $theme->prev_month_font_size;
133
  $month_type = $theme->month_type;
134
- $date_bg_color = '#' . $theme->date_bg_color;
135
- $event_bg_color1 = '#' . $theme->event_bg_color1;
136
- $event_bg_color2 = '#' . $theme->event_bg_color2;
137
- $event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
138
- $event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
139
- $event_num_color = '#' . $theme->event_num_color;
140
  $date_font_size = $theme->date_font_size;
141
  $event_num_font_size = $theme->event_num_font_size;
142
  $event_table_height = $theme->event_table_height;
143
  $date_height = $theme->date_height;
144
  $day_month_font_size = $theme->day_month_font_size;
145
  $week_font_size = $theme->week_font_size;
146
- $day_month_font_color = '#' . $theme->day_month_font_color;
147
- $week_font_color = '#' . $theme->week_font_color;
148
- $views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
149
- $views_tabs_text_color = '#' . $theme->views_tabs_text_color;
150
  $views_tabs_font_size = $theme->views_tabs_font_size;
151
 
152
- $date_bg_color = '#' . $theme->date_bg_color;
153
- $event_bg_color1 = '#' . $theme->event_bg_color1;
154
- $event_bg_color2 = '#' . $theme->event_bg_color2;
155
- $event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
156
- $event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
157
- $event_num_color = '#' . $theme->event_num_color;
158
  $date_font_size = $theme->date_font_size;
159
  $event_num_font_size = $theme->event_num_font_size;
160
  $show_numbers_for_events = $theme->day_start;
@@ -288,7 +287,7 @@ $cat_ids = substr($cat_ids, 0,-1);
288
  #bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
289
  color: <?php echo $text_color_this_month_unevented; ?> !important;
290
  }
291
- #bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
292
  font-size: 24px !important;
293
  font-weight: bold !important;
294
  color: <?php echo $text_color_year; ?> !important;
@@ -672,7 +671,7 @@ position: relative;
672
  'cat_id' => '',
673
  'cat_ids' => $cat_ids,
674
  'widget' => $widget,
675
- ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9664;
676
  </a>
677
  </td>
678
  <td style="text-align:center; margin:0;" width="40%">
@@ -698,7 +697,7 @@ position: relative;
698
  'cat_id' => '',
699
  'cat_ids' => $cat_ids,
700
  'widget' => $widget,
701
- ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9654;
702
  </a>
703
  </td>
704
  <td width="15%">
@@ -804,7 +803,7 @@ position: relative;
804
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
805
  echo '<table class="last_table" style="overflow:hidden;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . ';">
806
  <tr>
807
- <td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:#' . $cat_color->color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
808
  <td>
809
  <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $event_title_color . ';"
810
  href="' . add_query_arg(array(
@@ -892,13 +891,13 @@ position: relative;
892
  .categories2
893
  {
894
  position:relative;
895
- left: -9px;
896
  cursor:pointer;
897
  }
898
  .categories2:first-letter
899
  {
900
  color:#fff;
901
-
902
  }
903
  </style>
904
  <?php
@@ -925,9 +924,7 @@ echo'
925
 
926
  if($cat_ids=='')
927
  $cat_ids='';
928
-
929
- if($show_cat==1)
930
- {
931
  echo '<ul id="cats" style="list-style-type:none;">';
932
 
933
  foreach($categories as $category)
@@ -935,7 +932,7 @@ foreach($categories as $category)
935
 
936
  ?>
937
 
938
- <li style="float:left;"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
939
  'action' => 'spiderbigcalendar_list',
940
  'theme_id' => $theme_id,
941
  'calendar' => $calendar_id,
@@ -967,8 +964,6 @@ if (!empty($categories)) {
967
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
968
  <?php echo '</ul>';
969
  }
970
- }
971
-
972
  die();
973
  }
974
  ?>
86
 
87
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
88
  $cal_width = $theme->width;
89
+ $bg_top = '#' . str_replace('#','',$theme->bg_top);
90
+ $bg_bottom = '#' . str_replace('#','',$theme->bg_bottom);
91
+ $border_color = '#' . str_replace('#','',$theme->border_color);
92
+ $text_color_year = '#' . str_replace('#','',$theme->text_color_year);
93
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
94
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
95
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
96
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
97
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
98
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
99
+ $color_arrow_year = '#' . str_replace('#','',$theme->arrow_color_year);
100
+ $color_arrow_month = '#' . str_replace('#','',$theme->arrow_color_month);
101
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
102
+ $event_title_color = '#' . str_replace('#','',$theme->event_title_color);
103
+ $current_day_border_color = '#' . str_replace('#','',$theme->current_day_border_color);
104
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
 
105
  $cell_height = $theme->cell_height;
106
  $popup_width = $theme->popup_width;
107
  $popup_height = $theme->popup_height;
111
  $weekdays_font_size = $theme->weekdays_font_size;
112
  $border_width = $theme->border_width;
113
  $top_height = $theme->top_height;
114
+ $bg_color_other_months = '#' . str_replace('#','',$theme->bg_color_other_months);
115
+ $sundays_bg_color = '#' . str_replace('#','',$theme->sundays_bg_color);
116
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
117
  $weekstart = $theme->week_start_day;
118
+ $weekday_sunday_bg_color = '#' . str_replace('#','',$theme->weekday_sunday_bg_color);
119
  $border_radius = $theme->border_radius;
120
  $border_radius2 = $border_radius-$border_width;
121
  $week_days_cell_height = $theme->week_days_cell_height;
123
  $month_font_size = $theme->month_font_size;
124
  $arrow_size = $theme->arrow_size;
125
  $arrow_size_hover = $arrow_size + 5;
126
+ $next_month_text_color = '#' . str_replace('#','',$theme->next_month_text_color);
127
+ $prev_month_text_color = '#' . str_replace('#','',$theme->prev_month_text_color);
128
+ $next_month_arrow_color = '#' . str_replace('#','',$theme->next_month_arrow_color);
129
+ $prev_month_arrow_color = '#' . str_replace('#','',$theme->prev_month_arrow_color);
130
  $next_month_font_size = $theme->next_month_font_size;
131
  $prev_month_font_size = $theme->prev_month_font_size;
132
  $month_type = $theme->month_type;
133
+ $date_bg_color = '#' . str_replace('#','',$theme->date_bg_color);
134
+ $event_bg_color1 = '#' . str_replace('#','',$theme->event_bg_color1);
135
+ $event_bg_color2 = '#' . str_replace('#','',$theme->event_bg_color2);
136
+ $event_num_bg_color1 = '#' . str_replace('#','',$theme->event_num_bg_color1);
137
+ $event_num_bg_color2 = '#' . str_replace('#','',$theme->event_num_bg_color2);
138
+ $event_num_color = '#' . str_replace('#','',$theme->event_num_color);
139
  $date_font_size = $theme->date_font_size;
140
  $event_num_font_size = $theme->event_num_font_size;
141
  $event_table_height = $theme->event_table_height;
142
  $date_height = $theme->date_height;
143
  $day_month_font_size = $theme->day_month_font_size;
144
  $week_font_size = $theme->week_font_size;
145
+ $day_month_font_color = '#' . str_replace('#','',$theme->day_month_font_color);
146
+ $week_font_color = '#' . str_replace('#','',$theme->week_font_color);
147
+ $views_tabs_bg_color = '#' . str_replace('#','',$theme->views_tabs_bg_color);
148
+ $views_tabs_text_color = '#' . str_replace('#','',$theme->views_tabs_text_color);
149
  $views_tabs_font_size = $theme->views_tabs_font_size;
150
 
151
+ $date_bg_color = '#' . str_replace('#','',$theme->date_bg_color);
152
+ $event_bg_color1 = '#' . str_replace('#','',$theme->event_bg_color1);
153
+ $event_bg_color2 = '#' . str_replace('#','',$theme->event_bg_color2);
154
+ $event_num_bg_color1 = '#' . str_replace('#','',$theme->event_num_bg_color1);
155
+ $event_num_bg_color2 = '#' . str_replace('#','',$theme->event_num_bg_color2);
156
+ $event_num_color = '#' . str_replace('#','',$theme->event_num_color);
157
  $date_font_size = $theme->date_font_size;
158
  $event_num_font_size = $theme->event_num_font_size;
159
  $show_numbers_for_events = $theme->day_start;
287
  #bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
288
  color: <?php echo $text_color_this_month_unevented; ?> !important;
289
  }
290
+ #bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
291
  font-size: 24px !important;
292
  font-weight: bold !important;
293
  color: <?php echo $text_color_year; ?> !important;
671
  'cat_id' => '',
672
  'cat_ids' => $cat_ids,
673
  'widget' => $widget,
674
+ ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9668;
675
  </a>
676
  </td>
677
  <td style="text-align:center; margin:0;" width="40%">
697
  'cat_id' => '',
698
  'cat_ids' => $cat_ids,
699
  'widget' => $widget,
700
+ ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9658;
701
  </a>
702
  </td>
703
  <td width="15%">
803
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
804
  echo '<table class="last_table" style="overflow:hidden;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . ';">
805
  <tr>
806
+ <td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color: #' . str_replace('#','',$cat_color->color) . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
807
  <td>
808
  <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $event_title_color . ';"
809
  href="' . add_query_arg(array(
891
  .categories2
892
  {
893
  position:relative;
894
+ left: -10px;
895
  cursor:pointer;
896
  }
897
  .categories2:first-letter
898
  {
899
  color:#fff;
900
+ letter-spacing: 3px;
901
  }
902
  </style>
903
  <?php
924
 
925
  if($cat_ids=='')
926
  $cat_ids='';
927
+
 
 
928
  echo '<ul id="cats" style="list-style-type:none;">';
929
 
930
  foreach($categories as $category)
932
 
933
  ?>
934
 
935
+ <li style="float:left;"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
936
  'action' => 'spiderbigcalendar_list',
937
  'theme_id' => $theme_id,
938
  'calendar' => $calendar_id,
964
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
965
  <?php echo '</ul>';
966
  }
 
 
967
  die();
968
  }
969
  ?>
front_end/bigcalendarlist_widget.php CHANGED
@@ -87,27 +87,26 @@ $cat_ids = substr($cat_ids, 0,-1);
87
 
88
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
89
  $weekstart = $theme->week_start_day;
90
- $bg = '#' . $theme->header_bgcolor;
91
- $show_cat = $theme->show_cat;
92
- $bg_color_selected = '#' . $theme->bg_color_selected;
93
- $color_arrow = '#' . $theme->arrow_color;
94
- $evented_color = '#' . $theme->text_color_this_month_evented;
95
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
96
- $sun_days = '#' . $theme->text_color_sun_days;
97
- $text_color_other_months = '#' . $theme->text_color_other_months;
98
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
99
- $text_color_month = '#' . $theme->text_color_month;
100
- $color_week_days = '#' . $theme->text_color_week_days;
101
- $text_color_selected = '#' . $theme->text_color_selected;
102
- $border_day = '#' . $theme->border_day;
103
  $calendar_width = $theme->width;
104
- $calendar_bg = '#' . $theme->footer_bgcolor;
105
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
106
- $weekday_su_bg_color = '#' . $theme->su_bg_color;
107
- $cell_border_color = '#' . $theme->cell_border_color;
108
  $year_font_size = $theme->year_font_size;
109
- $year_font_color = '#' . $theme->year_font_color;
110
- $year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
111
  $font_year = $theme->font_year;
112
  $font_month = $theme->font_month;
113
  $font_day = $theme->font_day;
@@ -267,8 +266,6 @@ $cat_ids = substr($cat_ids, 0,-1);
267
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
268
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
269
  {
270
-
271
- background-color: <?php $views_tabs_bg_color?>;
272
  width: 120px;
273
  text-align: center;
274
  cursor: pointer;
@@ -288,11 +285,6 @@ position: relative;
288
 
289
  }
290
 
291
- #drop_down_views >li:hover .views_select, #drop_down_views >li.active .views_select
292
- {
293
- background:<?php echo $bg_top ?>;
294
- }
295
-
296
  #drop_down_views >li
297
  {
298
  border-bottom:1px solid #fff !important;
@@ -513,9 +505,9 @@ position: relative;
513
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
514
  echo '<table class="last_table" style="overflow:hidden;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
515
  <tr>
516
- <td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:#' . $cat_color->color . ';color:' . $calendar_bg . '">' . ($j +1 ) . '</td>
517
  <td>
518
- <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:#' . $ev_title_color . ';"
519
  href="' . add_query_arg(array(
520
  'action' => 'spidercalendarbig',
521
  'theme_id' => $theme_id,
@@ -598,13 +590,13 @@ position: relative;
598
  .categories2
599
  {
600
  position:relative;
601
- left: -9px;
602
  cursor:pointer;
603
  }
604
  .categories2:first-letter
605
  {
606
  color:#fff;
607
-
608
  }
609
  </style>
610
  <?php
@@ -632,7 +624,6 @@ echo'
632
  if($cat_ids=='')
633
  $cat_ids='';
634
 
635
- if($show_cat==1){
636
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
637
 
638
  foreach($categories as $category)
@@ -640,7 +631,7 @@ foreach($categories as $category)
640
 
641
  ?>
642
 
643
- <li style="height:30px"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
644
  'action' => 'spiderbigcalendar_list_widget',
645
  'theme_id' => $theme_id,
646
  'calendar' => $calendar_id,
@@ -659,7 +650,7 @@ foreach($categories as $category)
659
  }
660
  if (!empty($categories)) {
661
  ?>
662
- <li style="height:30px"><p class="categories1" style="background-color:<?php echo $bg;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:<?php echo $bg; ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
663
  'action' => 'spiderbigcalendar_list_widget',
664
  'theme_id' => $theme_id,
665
  'calendar' => $calendar_id,
@@ -673,7 +664,6 @@ if (!empty($categories)) {
673
  'TB_iframe' => 1,
674
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
675
  <?php echo '</ul>';
676
- }
677
  }
678
  die();
679
  }
87
 
88
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
89
  $weekstart = $theme->week_start_day;
90
+ $bg = '#' . str_replace('#','',$theme->header_bgcolor);
91
+ $bg_color_selected = '#' . str_replace('#','',$theme->bg_color_selected);
92
+ $color_arrow = '#' . str_replace('#','',$theme->arrow_color);
93
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
94
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
95
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
96
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
97
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
98
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
99
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
100
+ $text_color_selected = '#' . str_replace('#','',$theme->text_color_selected);
101
+ $border_day = '#' . str_replace('#','',$theme->border_day);
 
102
  $calendar_width = $theme->width;
103
+ $calendar_bg = '#' . str_replace('#','',$theme->footer_bgcolor);
104
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
105
+ $weekday_su_bg_color = '#' . str_replace('#','',$theme->su_bg_color);
106
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
107
  $year_font_size = $theme->year_font_size;
108
+ $year_font_color = '#' . str_replace('#','',$theme->year_font_color);
109
+ $year_tabs_bg_color = '#' . str_replace('#','',$theme->year_tabs_bg_color);
110
  $font_year = $theme->font_year;
111
  $font_month = $theme->font_month;
112
  $font_day = $theme->font_day;
266
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
267
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
268
  {
 
 
269
  width: 120px;
270
  text-align: center;
271
  cursor: pointer;
285
 
286
  }
287
 
 
 
 
 
 
288
  #drop_down_views >li
289
  {
290
  border-bottom:1px solid #fff !important;
505
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
506
  echo '<table class="last_table" style="overflow:hidden;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
507
  <tr>
508
+ <td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:#' . str_replace('#','',$cat_color->color) . ';color:' . $calendar_bg . '">' . ($j +1 ) . '</td>
509
  <td>
510
+ <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $ev_title_color . ';"
511
  href="' . add_query_arg(array(
512
  'action' => 'spidercalendarbig',
513
  'theme_id' => $theme_id,
590
  .categories2
591
  {
592
  position:relative;
593
+ left: -10px;
594
  cursor:pointer;
595
  }
596
  .categories2:first-letter
597
  {
598
  color:#fff;
599
+ letter-spacing: 3px;
600
  }
601
  </style>
602
  <?php
624
  if($cat_ids=='')
625
  $cat_ids='';
626
 
 
627
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
628
 
629
  foreach($categories as $category)
631
 
632
  ?>
633
 
634
+ <li style="height:30px"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color);?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
635
  'action' => 'spiderbigcalendar_list_widget',
636
  'theme_id' => $theme_id,
637
  'calendar' => $calendar_id,
650
  }
651
  if (!empty($categories)) {
652
  ?>
653
+ <li style="height:30px"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$bg);?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo str_replace('#','',$bg); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
654
  'action' => 'spiderbigcalendar_list_widget',
655
  'theme_id' => $theme_id,
656
  'calendar' => $calendar_id,
664
  'TB_iframe' => 1,
665
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
666
  <?php echo '</ul>';
 
667
  }
668
  die();
669
  }
front_end/bigcalendarmonth.php CHANGED
@@ -86,30 +86,24 @@ $cat_ids = substr($cat_ids, 0,-1);
86
 
87
  ///////////////////////////////////////////////////////////////////////////////////////////////////////
88
 
89
-
90
-
91
-
92
-
93
-
94
-
95
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
96
  $cal_width = $theme->width;
97
- $bg_top = '#' . $theme->bg_top;
98
- $bg_bottom = '#' . $theme->bg_bottom;
99
- $border_color = '#' . $theme->border_color;
100
- $text_color_year = '#' . $theme->text_color_year;
101
- $text_color_month = '#' . $theme->text_color_month;
102
- $color_week_days = '#' . $theme->text_color_week_days;
103
- $text_color_other_months = '#' . $theme->text_color_other_months;
104
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
105
- $evented_color = '#' . $theme->text_color_this_month_evented;
106
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
107
- $color_arrow_year = '#' . $theme->arrow_color_year;
108
- $color_arrow_month = '#' . $theme->arrow_color_month;
109
- $sun_days = '#' . $theme->text_color_sun_days;
110
- $event_title_color = '#' . $theme->event_title_color;
111
- $current_day_border_color = '#' . $theme->current_day_border_color;
112
- $cell_border_color = '#' . $theme->cell_border_color;
113
  $cell_height = $theme->cell_height;
114
  $popup_width = $theme->popup_width;
115
  $popup_height = $theme->popup_height;
@@ -119,11 +113,11 @@ $cat_ids = substr($cat_ids, 0,-1);
119
  $weekdays_font_size = $theme->weekdays_font_size;
120
  $border_width = $theme->border_width;
121
  $top_height = $theme->top_height;
122
- $bg_color_other_months = '#' . $theme->bg_color_other_months;
123
- $sundays_bg_color = '#' . $theme->sundays_bg_color;
124
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
125
  $weekstart = $theme->week_start_day;
126
- $weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
127
  $border_radius = $theme->border_radius;
128
  $border_radius2 = $border_radius-$border_width;
129
  $week_days_cell_height = $theme->week_days_cell_height;
@@ -131,33 +125,34 @@ $cat_ids = substr($cat_ids, 0,-1);
131
  $month_font_size = $theme->month_font_size;
132
  $arrow_size = $theme->arrow_size;
133
  $arrow_size_hover = $arrow_size + 5;
134
- $next_month_text_color = '#' . $theme->next_month_text_color;
135
- $prev_month_text_color = '#' . $theme->prev_month_text_color;
136
- $next_month_arrow_color = '#' . $theme->next_month_arrow_color;
137
- $prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
138
  $next_month_font_size = $theme->next_month_font_size;
139
  $prev_month_font_size = $theme->prev_month_font_size;
140
  $month_type = $theme->month_type;
141
- $ev_title_bg_color = '#'.$theme->ev_title_bg_color;
142
-
143
- $date_bg_color = '#' . $theme->date_bg_color;
144
- $event_bg_color1 = '#' . $theme->event_bg_color1;
145
- $event_bg_color2 = '#' . $theme->event_bg_color2;
146
- $event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
147
- $event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
148
- $event_num_color = '#' . $theme->event_num_color;
149
  $date_font_size = $theme->date_font_size;
150
  $event_num_font_size = $theme->event_num_font_size;
151
  $event_table_height = $theme->event_table_height;
152
  $date_height = $theme->date_height;
153
  $day_month_font_size = $theme->day_month_font_size;
154
  $week_font_size = $theme->week_font_size;
155
- $day_month_font_color = '#' . $theme->day_month_font_color;
156
- $week_font_color = '#' . $theme->week_font_color;
157
- $views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
158
- $views_tabs_text_color = '#' . $theme->views_tabs_text_color;
159
  $views_tabs_font_size = $theme->views_tabs_font_size;
160
  $show_numbers_for_events = $theme->day_start;
 
161
  $ev_color = $theme->event_title_color;
162
 
163
  __('January', 'sp_calendar');
@@ -609,7 +604,7 @@ min-height: 30px;
609
  'cat_ids' => $cat_ids,
610
  'widget' => $widget,
611
  ), $site_url);
612
- ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9664;
613
  </a>
614
  </td>
615
  <td style="text-align:center; margin:0;" width="40%">
@@ -636,7 +631,7 @@ min-height: 30px;
636
  'cat_ids' => $cat_ids,
637
  'widget' => $widget,
638
  ), $site_url);
639
- ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9654;
640
  </a>
641
  </td>
642
  <td width="15%">
@@ -1230,13 +1225,13 @@ if (in_array($i, $array_days)) {
1230
  .categories2
1231
  {
1232
  position:relative;
1233
- left: -9px;
1234
  cursor:pointer;
1235
  }
1236
  .categories2:first-letter
1237
  {
1238
  color:#fff;
1239
-
1240
  }
1241
  </style>
1242
  <?php
@@ -1272,7 +1267,7 @@ foreach($categories as $category)
1272
 
1273
  ?>
1274
 
1275
- <li style="float:left;"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1276
  'action' => 'spiderbigcalendar_month',
1277
  'theme_id' => $theme_id,
1278
  'calendar' => $calendar_id,
@@ -1289,7 +1284,7 @@ foreach($categories as $category)
1289
  <?php }
1290
  if (!empty($categories)) {
1291
  ?>
1292
- <li style="float:left;"><p class="categories1" style="background-color:<?php echo $bg_top;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo $bg_top; ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1293
  'action' => 'spiderbigcalendar_month',
1294
  'theme_id' => $theme_id,
1295
  'calendar' => $calendar_id,
86
 
87
  ///////////////////////////////////////////////////////////////////////////////////////////////////////
88
 
 
 
 
 
 
 
89
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
90
  $cal_width = $theme->width;
91
+ $bg_top = '#' . str_replace('#','',$theme->bg_top);
92
+ $bg_bottom = '#' . str_replace('#','',$theme->bg_bottom);
93
+ $border_color = '#' . str_replace('#','',$theme->border_color);
94
+ $text_color_year = '#' . str_replace('#','',$theme->text_color_year);
95
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
96
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
97
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
98
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
99
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
100
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
101
+ $color_arrow_year = '#' . str_replace('#','',$theme->arrow_color_year);
102
+ $color_arrow_month = '#' . str_replace('#','',$theme->arrow_color_month);
103
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
104
+ $event_title_color = '#' . str_replace('#','',$theme->event_title_color);
105
+ $current_day_border_color = '#' . str_replace('#','',$theme->current_day_border_color);
106
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
107
  $cell_height = $theme->cell_height;
108
  $popup_width = $theme->popup_width;
109
  $popup_height = $theme->popup_height;
113
  $weekdays_font_size = $theme->weekdays_font_size;
114
  $border_width = $theme->border_width;
115
  $top_height = $theme->top_height;
116
+ $bg_color_other_months = '#' . str_replace('#','',$theme->bg_color_other_months);
117
+ $sundays_bg_color = '#' . str_replace('#','',$theme->sundays_bg_color);
118
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
119
  $weekstart = $theme->week_start_day;
120
+ $weekday_sunday_bg_color = '#' . str_replace('#','',$theme->weekday_sunday_bg_color);
121
  $border_radius = $theme->border_radius;
122
  $border_radius2 = $border_radius-$border_width;
123
  $week_days_cell_height = $theme->week_days_cell_height;
125
  $month_font_size = $theme->month_font_size;
126
  $arrow_size = $theme->arrow_size;
127
  $arrow_size_hover = $arrow_size + 5;
128
+ $next_month_text_color = '#' . str_replace('#','',$theme->next_month_text_color);
129
+ $prev_month_text_color = '#' . str_replace('#','',$theme->prev_month_text_color);
130
+ $next_month_arrow_color = '#' . str_replace('#','',$theme->next_month_arrow_color);
131
+ $prev_month_arrow_color = '#' . str_replace('#','',$theme->prev_month_arrow_color);
132
  $next_month_font_size = $theme->next_month_font_size;
133
  $prev_month_font_size = $theme->prev_month_font_size;
134
  $month_type = $theme->month_type;
135
+ $ev_title_bg_color = '#' . str_replace('#','',$theme->ev_title_bg_color);
136
+
137
+ $date_bg_color = '#' . str_replace('#','',$theme->date_bg_color);
138
+ $event_bg_color1 = '#' . str_replace('#','',$theme->event_bg_color1);
139
+ $event_bg_color2 = '#' . str_replace('#','',$theme->event_bg_color2);
140
+ $event_num_bg_color1 = '#' . str_replace('#','',$theme->event_num_bg_color1);
141
+ $event_num_bg_color2 = '#' . str_replace('#','',$theme->event_num_bg_color2);
142
+ $event_num_color = '#' . str_replace('#','',$theme->event_num_color);
143
  $date_font_size = $theme->date_font_size;
144
  $event_num_font_size = $theme->event_num_font_size;
145
  $event_table_height = $theme->event_table_height;
146
  $date_height = $theme->date_height;
147
  $day_month_font_size = $theme->day_month_font_size;
148
  $week_font_size = $theme->week_font_size;
149
+ $day_month_font_color = '#' . str_replace('#','',$theme->day_month_font_color);
150
+ $week_font_color = '#' . str_replace('#','',$theme->week_font_color);
151
+ $views_tabs_bg_color = '#' . str_replace('#','',$theme->views_tabs_bg_color);
152
+ $views_tabs_text_color = '#' . str_replace('#','',$theme->views_tabs_text_color);
153
  $views_tabs_font_size = $theme->views_tabs_font_size;
154
  $show_numbers_for_events = $theme->day_start;
155
+ $text_color_year = '#' . str_replace('#','',$theme->text_color_year);
156
  $ev_color = $theme->event_title_color;
157
 
158
  __('January', 'sp_calendar');
604
  'cat_ids' => $cat_ids,
605
  'widget' => $widget,
606
  ), $site_url);
607
+ ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9668;
608
  </a>
609
  </td>
610
  <td style="text-align:center; margin:0;" width="40%">
631
  'cat_ids' => $cat_ids,
632
  'widget' => $widget,
633
  ), $site_url);
634
+ ?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9658;
635
  </a>
636
  </td>
637
  <td width="15%">
1225
  .categories2
1226
  {
1227
  position:relative;
1228
+ left: -10px;
1229
  cursor:pointer;
1230
  }
1231
  .categories2:first-letter
1232
  {
1233
  color:#fff;
1234
+ letter-spacing: 3px;
1235
  }
1236
  </style>
1237
  <?php
1267
 
1268
  ?>
1269
 
1270
+ <li style="float:left;"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color);?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1271
  'action' => 'spiderbigcalendar_month',
1272
  'theme_id' => $theme_id,
1273
  'calendar' => $calendar_id,
1284
  <?php }
1285
  if (!empty($categories)) {
1286
  ?>
1287
+ <li style="float:left;"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$bg_top); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo str_replace('#','',$bg_top); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1288
  'action' => 'spiderbigcalendar_month',
1289
  'theme_id' => $theme_id,
1290
  'calendar' => $calendar_id,
front_end/bigcalendarmonth_widget.php CHANGED
@@ -9,7 +9,7 @@ function big_calendar_month_widget() {
9
  $date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
10
  $view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
11
  $path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
12
- $site_url = get_option( "home", get_site_url()).'/wp-admin/admin-ajax.php';
13
  ///////////////////////////////////////////////////////////////////////////////////
14
 
15
 
@@ -86,34 +86,32 @@ $cat_ids = substr($cat_ids, 0,-1);
86
 
87
  ///////////////////////////////////////////////////////////////////////////////////////////////////////
88
 
89
-
90
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
91
  $weekstart = $theme->week_start_day;
92
- $bg = '#' . $theme->header_bgcolor;
93
- $bg_color_selected = '#' . $theme->bg_color_selected;
94
- $color_arrow = '#' . $theme->arrow_color;
95
- $evented_color = '#' . $theme->text_color_this_month_evented;
96
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
97
- $sun_days = '#' . $theme->text_color_sun_days;
98
- $text_color_other_months = '#' . $theme->text_color_other_months;
99
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
100
- $text_color_month = '#' . $theme->text_color_month;
101
- $color_week_days = '#' . $theme->text_color_week_days;
102
- $text_color_selected = '#' . $theme->text_color_selected;
103
- $border_day = '#' . $theme->border_day;
104
  $calendar_width = $theme->width;
105
- $calendar_bg = '#' . $theme->footer_bgcolor;
106
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
107
- $weekday_su_bg_color = '#' . $theme->su_bg_color;
108
- $cell_border_color = '#' . $theme->cell_border_color;
109
  $year_font_size = $theme->year_font_size;
110
- $year_font_color = '#' . $theme->year_font_color;
111
- $year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
112
  $font_year = $theme->font_year;
113
  $font_month = $theme->font_month;
114
  $font_day = $theme->font_day;
115
  $font_weekday = $theme->font_weekday;
116
-
117
  $popup_width = $theme->popup_width;
118
  $popup_height = $theme->popup_height;
119
 
@@ -264,8 +262,6 @@ $cat_ids = substr($cat_ids, 0,-1);
264
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
265
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
266
  {
267
-
268
- background-color: <?php echo $views_tabs_bg_color?> ;
269
  width: 120px;
270
  text-align: center;
271
  cursor: pointer;
@@ -285,11 +281,6 @@ $cat_ids = substr($cat_ids, 0,-1);
285
 
286
  }
287
 
288
- #drop_down_views >li:hover .views_select, #drop_down_views >li.active .views_select
289
- {
290
- background:<?php echo $bg_top ?>;
291
- }
292
-
293
  #drop_down_views >li
294
  {
295
  border-bottom:1px solid #fff !important;
@@ -514,13 +505,9 @@ $cat_ids = substr($cat_ids, 0,-1);
514
  $k=0;
515
 
516
  if(isset($ev_ids_inline)){
517
- if($cat_ids!='')
518
- $query = $wpdb->prepare ("SELECT DISTINCT sec.color FROM " . $wpdb->prefix . "spidercalendar_event AS se JOIN
519
- " . $wpdb->prefix . "spidercalendar_event_category AS sec ON se.category=sec.id WHERE se.published='1' AND sec.published='1' AND se.calendar=%d AND se.id IN (%s) ",$calendar_id,$ev_ids_inline);
520
- else
521
  $query = $wpdb->prepare ("SELECT DISTINCT sec.color FROM " . $wpdb->prefix . "spidercalendar_event AS se JOIN
522
- " . $wpdb->prefix . "spidercalendar_event_category AS sec ON se.category=sec.id WHERE se.published='1' AND sec.published='1' AND se.calendar=%d AND se.id IN (%s) ",$calendar_id,$ev_ids_inline);
523
-
524
  $categ_color=$wpdb->get_results($query);
525
  }
526
 
@@ -571,7 +558,7 @@ $cat_ids = substr($cat_ids, 0,-1);
571
  </a>';
572
  echo '<table style="width:100%; border:0;margin: 0"><tr>';
573
  foreach($categ_color as $color){
574
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
575
  }
576
  echo '</tr></table>';
577
  echo '</td>';
@@ -597,7 +584,7 @@ $cat_ids = substr($cat_ids, 0,-1);
597
  </a>';
598
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
599
  foreach($categ_color as $color){
600
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
601
  }
602
  echo '</tr></table>';
603
  echo '</td>';
@@ -635,7 +622,7 @@ $cat_ids = substr($cat_ids, 0,-1);
635
  </a>';
636
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
637
  foreach($categ_color as $color){
638
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
639
  }
640
  echo '</tr></table>';
641
  echo '</td>';
@@ -662,7 +649,7 @@ $cat_ids = substr($cat_ids, 0,-1);
662
  </a>';
663
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
664
  foreach($categ_color as $color){
665
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
666
  }
667
  echo '</tr></table>';
668
  echo '</td>';
@@ -701,7 +688,7 @@ if (in_array ($i,$array_days)) {
701
  </a>';
702
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
703
  foreach($categ_color as $color){
704
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
705
  }
706
  echo '</tr></table>';
707
  echo '</td>';
@@ -744,7 +731,7 @@ if (in_array ($i,$array_days)) {
744
  </a>';
745
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
746
  foreach($categ_color as $color){
747
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
748
  }
749
  echo '</tr></table>';
750
  echo '</td>';
@@ -770,7 +757,7 @@ if (in_array ($i,$array_days)) {
770
  ), $site_url) . '"><b>' . $i . '</b></a>';
771
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
772
  foreach($categ_color as $color){
773
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
774
  }
775
  echo '</tr></table>';
776
  echo '</td>';
@@ -806,7 +793,7 @@ if (in_array ($i,$array_days)) {
806
  </a>';
807
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
808
  foreach($categ_color as $color){
809
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
810
  }
811
  echo '</tr></table>';
812
  echo '</td>';
@@ -832,7 +819,7 @@ if (in_array ($i,$array_days)) {
832
  ';
833
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
834
  foreach($categ_color as $color){
835
- echo '<td id="cat_width" style="border:0; border-top:2px solid #'.$color->color.'; display:table-cell;"></td>';
836
  }
837
  echo '</tr></table>';
838
  echo '</td>';
@@ -953,7 +940,6 @@ echo'
953
  if($cat_ids=='')
954
  $cat_ids='';
955
 
956
-
957
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
958
 
959
  foreach($categories as $category)
@@ -961,7 +947,7 @@ foreach($categories as $category)
961
 
962
  ?>
963
 
964
- <li style="height:30px"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
965
  'action' => 'spiderbigcalendar_month_widget',
966
  'theme_id' => $theme_id,
967
  'calendar' => $calendar_id,
@@ -977,7 +963,7 @@ foreach($categories as $category)
977
  }
978
  if (!empty($categories)) {
979
  ?>
980
- <li style="height:30px"><p class="categories1" style="background-color:<?php echo $bg;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo $bg; ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
981
  'action' => 'spiderbigcalendar_month_widget',
982
  'theme_id' => $theme_id,
983
  'calendar' => $calendar_id,
@@ -989,7 +975,8 @@ if (!empty($categories)) {
989
  'cat_ids' => '',
990
  'widget' => $widget,
991
  ), $site_url);?>','<?php echo $many_sp_calendar ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
992
- <?php echo '</ul><br><br>';
 
993
  }
994
  die();
995
  }
9
  $date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
10
  $view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
11
  $path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
12
+ $site_url = get_site_url().'/wp-admin/admin-ajax.php';
13
  ///////////////////////////////////////////////////////////////////////////////////
14
 
15
 
86
 
87
  ///////////////////////////////////////////////////////////////////////////////////////////////////////
88
 
 
89
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
90
  $weekstart = $theme->week_start_day;
91
+ $bg = '#' . str_replace('#','',$theme->header_bgcolor);
92
+ $bg_color_selected = '#' . str_replace('#','',$theme->bg_color_selected);
93
+ $color_arrow = '#' . str_replace('#','',$theme->arrow_color);
94
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
95
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
96
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
97
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
98
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
99
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
100
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
101
+ $text_color_selected = '#' . str_replace('#','',$theme->text_color_selected);
102
+ $border_day = '#' . str_replace('#','',$theme->border_day);
103
  $calendar_width = $theme->width;
104
+ $calendar_bg = '#' . str_replace('#','',$theme->footer_bgcolor);
105
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
106
+ $weekday_su_bg_color = '#' . str_replace('#','',$theme->su_bg_color);
107
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
108
  $year_font_size = $theme->year_font_size;
109
+ $year_font_color = '#' . str_replace('#','',$theme->year_font_color);
110
+ $year_tabs_bg_color = '#' . str_replace('#','',$theme->year_tabs_bg_color);
111
  $font_year = $theme->font_year;
112
  $font_month = $theme->font_month;
113
  $font_day = $theme->font_day;
114
  $font_weekday = $theme->font_weekday;
 
115
  $popup_width = $theme->popup_width;
116
  $popup_height = $theme->popup_height;
117
 
262
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
263
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
264
  {
 
 
265
  width: 120px;
266
  text-align: center;
267
  cursor: pointer;
281
 
282
  }
283
 
 
 
 
 
 
284
  #drop_down_views >li
285
  {
286
  border-bottom:1px solid #fff !important;
505
  $k=0;
506
 
507
  if(isset($ev_ids_inline)){
508
+ if(preg_match("/^[0-9\,]+$/", $ev_ids_inline))
 
 
 
509
  $query = $wpdb->prepare ("SELECT DISTINCT sec.color FROM " . $wpdb->prefix . "spidercalendar_event AS se JOIN
510
+ " . $wpdb->prefix . "spidercalendar_event_category AS sec ON se.category=sec.id WHERE se.published='1' AND sec.published='1' AND se.calendar=%d AND se.id IN (".$ev_ids_inline.") ",$calendar_id);
 
511
  $categ_color=$wpdb->get_results($query);
512
  }
513
 
558
  </a>';
559
  echo '<table style="width:100%; border:0;margin: 0"><tr>';
560
  foreach($categ_color as $color){
561
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
562
  }
563
  echo '</tr></table>';
564
  echo '</td>';
584
  </a>';
585
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
586
  foreach($categ_color as $color){
587
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
588
  }
589
  echo '</tr></table>';
590
  echo '</td>';
622
  </a>';
623
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
624
  foreach($categ_color as $color){
625
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
626
  }
627
  echo '</tr></table>';
628
  echo '</td>';
649
  </a>';
650
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
651
  foreach($categ_color as $color){
652
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
653
  }
654
  echo '</tr></table>';
655
  echo '</td>';
688
  </a>';
689
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
690
  foreach($categ_color as $color){
691
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
692
  }
693
  echo '</tr></table>';
694
  echo '</td>';
731
  </a>';
732
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
733
  foreach($categ_color as $color){
734
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
735
  }
736
  echo '</tr></table>';
737
  echo '</td>';
757
  ), $site_url) . '"><b>' . $i . '</b></a>';
758
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
759
  foreach($categ_color as $color){
760
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
761
  }
762
  echo '</tr></table>';
763
  echo '</td>';
793
  </a>';
794
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
795
  foreach($categ_color as $color){
796
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
797
  }
798
  echo '</tr></table>';
799
  echo '</td>';
819
  ';
820
  echo '<table style="width:100%; border:0;margin:0;"><tr>';
821
  foreach($categ_color as $color){
822
+ echo '<td id="cat_width" style="border:0; border-top:2px solid #'.str_replace('#','',$color->color).'; display:table-cell;"></td>';
823
  }
824
  echo '</tr></table>';
825
  echo '</td>';
940
  if($cat_ids=='')
941
  $cat_ids='';
942
 
 
943
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
944
 
945
  foreach($categories as $category)
947
 
948
  ?>
949
 
950
+ <li style="height:30px"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color);?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
951
  'action' => 'spiderbigcalendar_month_widget',
952
  'theme_id' => $theme_id,
953
  'calendar' => $calendar_id,
963
  }
964
  if (!empty($categories)) {
965
  ?>
966
+ <li style="height:30px"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$bg);?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo str_replace('#','',$bg); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
967
  'action' => 'spiderbigcalendar_month_widget',
968
  'theme_id' => $theme_id,
969
  'calendar' => $calendar_id,
975
  'cat_ids' => '',
976
  'widget' => $widget,
977
  ), $site_url);?>','<?php echo $many_sp_calendar ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
978
+ <?php echo '</ul>';
979
+
980
  }
981
  die();
982
  }
front_end/bigcalendarweek.php CHANGED
@@ -87,23 +87,22 @@ $cat_ids = substr($cat_ids, 0,-1);
87
 
88
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
89
  $cal_width = $theme->width;
90
- $bg_top = '#' . $theme->bg_top;
91
- $show_cat = $theme->show_cat;
92
- $bg_bottom = '#' . $theme->bg_bottom;
93
- $border_color = '#' . $theme->border_color;
94
- $text_color_year = '#' . $theme->text_color_year;
95
- $text_color_month = '#' . $theme->text_color_month;
96
- $color_week_days = '#' . $theme->text_color_week_days;
97
- $text_color_other_months = '#' . $theme->text_color_other_months;
98
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
99
- $evented_color = '#' . $theme->text_color_this_month_evented;
100
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
101
- $color_arrow_year = '#' . $theme->arrow_color_year;
102
- $color_arrow_month = '#' . $theme->arrow_color_month;
103
- $sun_days = '#' . $theme->text_color_sun_days;
104
- $event_title_color = '#' . $theme->event_title_color;
105
- $current_day_border_color = '#' . $theme->current_day_border_color;
106
- $cell_border_color = '#' . $theme->cell_border_color;
107
  $cell_height = $theme->cell_height;
108
  $popup_width = $theme->popup_width;
109
  $popup_height = $theme->popup_height;
@@ -113,11 +112,11 @@ $cat_ids = substr($cat_ids, 0,-1);
113
  $weekdays_font_size = $theme->weekdays_font_size;
114
  $border_width = $theme->border_width;
115
  $top_height = $theme->top_height;
116
- $bg_color_other_months = '#' . $theme->bg_color_other_months;
117
- $sundays_bg_color = '#' . $theme->sundays_bg_color;
118
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
119
  $weekstart = $theme->week_start_day;
120
- $weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
121
  $border_radius = $theme->border_radius;
122
  $border_radius2 = $border_radius-$border_width;
123
  $week_days_cell_height = $theme->week_days_cell_height;
@@ -125,31 +124,41 @@ $cat_ids = substr($cat_ids, 0,-1);
125
  $month_font_size = $theme->month_font_size;
126
  $arrow_size = $theme->arrow_size;
127
  $arrow_size_hover = $arrow_size + 5;
128
- $next_month_text_color = '#' . $theme->next_month_text_color;
129
- $prev_month_text_color = '#' . $theme->prev_month_text_color;
130
- $next_month_arrow_color = '#' . $theme->next_month_arrow_color;
131
- $prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
132
  $next_month_font_size = $theme->next_month_font_size;
133
  $prev_month_font_size = $theme->prev_month_font_size;
134
  $month_type = $theme->month_type;
135
- $date_bg_color = '#' . $theme->date_bg_color;
136
- $event_bg_color1 = '#' . $theme->event_bg_color1;
137
- $event_bg_color2 = '#' . $theme->event_bg_color2;
138
- $event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
139
- $event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
140
- $event_num_color = '#' . $theme->event_num_color;
141
  $date_font_size = $theme->date_font_size;
142
  $event_num_font_size = $theme->event_num_font_size;
143
  $event_table_height = $theme->event_table_height;
144
  $date_height = $theme->date_height;
145
  $day_month_font_size = $theme->day_month_font_size;
146
  $week_font_size = $theme->week_font_size;
147
- $day_month_font_color = '#' . $theme->day_month_font_color;
148
- $week_font_color = '#' . $theme->week_font_color;
149
- $views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
150
- $views_tabs_text_color = '#' . $theme->views_tabs_text_color;
151
  $views_tabs_font_size = $theme->views_tabs_font_size;
 
 
 
 
 
 
 
 
 
152
  $show_numbers_for_events = $theme->day_start;
 
153
 
154
  __('January', 'sp_calendar');
155
  __('February', 'sp_calendar');
@@ -317,10 +326,10 @@ $cat_ids = substr($cat_ids, 0,-1);
317
  border: 1px solid <?php echo $cell_border_color; ?> !important;
318
  <?php echo 'vertical-align:top !important;'; ?>
319
  }
320
- #bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
321
  color: <?php echo $text_color_this_month_unevented; ?> !important;
322
  }
323
- #bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
324
  font-size: 24px !important;
325
  font-weight: bold !important;
326
  color: <?php echo $text_color_year; ?> !important;
@@ -340,7 +349,7 @@ $cat_ids = substr($cat_ids, 0,-1);
340
  margin: inherit !important;
341
  padding: inherit !important;
342
  }
343
- #bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
344
  color: <?php echo $sun_days; ?> !important;
345
  border: 1px solid <?php echo $cell_border_color; ?> !important;
346
  <?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
@@ -701,7 +710,7 @@ position: relative;
701
  'cat_id' => '',
702
  'cat_ids' => $cat_ids,
703
  'widget' => $widget,
704
- ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9664;
705
  </a>
706
  </td>
707
  <?php
@@ -730,7 +739,7 @@ position: relative;
730
  'cat_id' => '',
731
  'cat_ids' => $cat_ids,
732
  'widget' => $widget,
733
- ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9654;
734
  </a>
735
  </td>
736
  <td width="15%">
@@ -867,7 +876,7 @@ position: relative;
867
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
868
  echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '" class="week_list">
869
  <tr>
870
- <td class="week_ev" style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:#' . $cat_color->color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
871
  <td>
872
  <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $event_title_color . ';"
873
  href="' . add_query_arg(array(
@@ -964,13 +973,13 @@ position: relative;
964
  .categories2
965
  {
966
  position:relative;
967
- left: -9px;
968
  cursor:pointer;
969
  }
970
  .categories2:first-letter
971
  {
972
  color:#fff;
973
-
974
  }
975
  </style>
976
  <?php
@@ -998,8 +1007,6 @@ echo'
998
  if($cat_ids=='')
999
  $cat_ids='';
1000
 
1001
- if($show_cat==1)
1002
- {
1003
  echo '<ul id="cats" style="list-style-type:none;">';
1004
 
1005
  foreach($categories as $category)
@@ -1007,7 +1014,7 @@ foreach($categories as $category)
1007
 
1008
  ?>
1009
 
1010
- <li style="float:left;"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1011
  'action' => 'spiderbigcalendar_week',
1012
  'theme_id' => $theme_id,
1013
  'calendar' => $calendar_id,
@@ -1026,7 +1033,7 @@ foreach($categories as $category)
1026
  }
1027
  if (!empty($categories)) {
1028
  ?>
1029
- <li style="float:left;"><p class="categories1" style="background-color:<?php echo $bg_top;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:<?php echo $bg_top; ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1030
  'action' => 'spiderbigcalendar_week',
1031
  'theme_id' => $theme_id,
1032
  'calendar' => $calendar_id,
@@ -1041,8 +1048,6 @@ if (!empty($categories)) {
1041
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
1042
  <?php echo '</ul>';
1043
  }
1044
- }
1045
-
1046
  die();
1047
  }
1048
 
87
 
88
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
89
  $cal_width = $theme->width;
90
+ $bg_top = '#' . str_replace('#','',$theme->bg_top);
91
+ $bg_bottom = '#' . str_replace('#','',$theme->bg_bottom);
92
+ $border_color = '#' . str_replace('#','',$theme->border_color);
93
+ $text_color_year = '#' . str_replace('#','',$theme->text_color_year);
94
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
95
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
96
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
97
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
98
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
99
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
100
+ $color_arrow_year = '#' . str_replace('#','',$theme->arrow_color_year);
101
+ $color_arrow_month = '#' . str_replace('#','',$theme->arrow_color_month);
102
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
103
+ $event_title_color = '#' . str_replace('#','',$theme->event_title_color);
104
+ $current_day_border_color = '#' . str_replace('#','',$theme->current_day_border_color);
105
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
 
106
  $cell_height = $theme->cell_height;
107
  $popup_width = $theme->popup_width;
108
  $popup_height = $theme->popup_height;
112
  $weekdays_font_size = $theme->weekdays_font_size;
113
  $border_width = $theme->border_width;
114
  $top_height = $theme->top_height;
115
+ $bg_color_other_months = '#' . str_replace('#','',$theme->bg_color_other_months);
116
+ $sundays_bg_color = '#' . str_replace('#','',$theme->sundays_bg_color);
117
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
118
  $weekstart = $theme->week_start_day;
119
+ $weekday_sunday_bg_color = '#' . str_replace('#','',$theme->weekday_sunday_bg_color);
120
  $border_radius = $theme->border_radius;
121
  $border_radius2 = $border_radius-$border_width;
122
  $week_days_cell_height = $theme->week_days_cell_height;
124
  $month_font_size = $theme->month_font_size;
125
  $arrow_size = $theme->arrow_size;
126
  $arrow_size_hover = $arrow_size + 5;
127
+ $next_month_text_color = '#' . str_replace('#','',$theme->next_month_text_color);
128
+ $prev_month_text_color = '#' . str_replace('#','',$theme->prev_month_text_color);
129
+ $next_month_arrow_color = '#' . str_replace('#','',$theme->next_month_arrow_color);
130
+ $prev_month_arrow_color = '#' . str_replace('#','',$theme->prev_month_arrow_color);
131
  $next_month_font_size = $theme->next_month_font_size;
132
  $prev_month_font_size = $theme->prev_month_font_size;
133
  $month_type = $theme->month_type;
134
+ $date_bg_color = '#' . str_replace('#','',$theme->date_bg_color);
135
+ $event_bg_color1 = '#' . str_replace('#','',$theme->event_bg_color1);
136
+ $event_bg_color2 = '#' . str_replace('#','',$theme->event_bg_color2);
137
+ $event_num_bg_color1 = '#' . str_replace('#','',$theme->event_num_bg_color1);
138
+ $event_num_bg_color2 = '#' . str_replace('#','',$theme->event_num_bg_color2);
139
+ $event_num_color = '#' . str_replace('#','',$theme->event_num_color);
140
  $date_font_size = $theme->date_font_size;
141
  $event_num_font_size = $theme->event_num_font_size;
142
  $event_table_height = $theme->event_table_height;
143
  $date_height = $theme->date_height;
144
  $day_month_font_size = $theme->day_month_font_size;
145
  $week_font_size = $theme->week_font_size;
146
+ $day_month_font_color = '#' . str_replace('#','',$theme->day_month_font_color);
147
+ $week_font_color = '#' . str_replace('#','',$theme->week_font_color);
148
+ $views_tabs_bg_color = '#' . str_replace('#','',$theme->views_tabs_bg_color);
149
+ $views_tabs_text_color = '#' . str_replace('#','',$theme->views_tabs_text_color);
150
  $views_tabs_font_size = $theme->views_tabs_font_size;
151
+
152
+ $date_bg_color = '#' . str_replace('#','',$theme->date_bg_color);
153
+ $event_bg_color1 = '#' . str_replace('#','',$theme->event_bg_color1);
154
+ $event_bg_color2 = '#' . str_replace('#','',$theme->event_bg_color2);
155
+ $event_num_bg_color1 = '#' . str_replace('#','',$theme->event_num_bg_color1);
156
+ $event_num_bg_color2 = '#' . str_replace('#','',$theme->event_num_bg_color2);
157
+ $event_num_color = '#' . str_replace('#','',$theme->event_num_color);
158
+ $date_font_size = $theme->date_font_size;
159
+ $event_num_font_size = $theme->event_num_font_size;
160
  $show_numbers_for_events = $theme->day_start;
161
+
162
 
163
  __('January', 'sp_calendar');
164
  __('February', 'sp_calendar');
326
  border: 1px solid <?php echo $cell_border_color; ?> !important;
327
  <?php echo 'vertical-align:top !important;'; ?>
328
  }
329
+ #bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
330
  color: <?php echo $text_color_this_month_unevented; ?> !important;
331
  }
332
+ #bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
333
  font-size: 24px !important;
334
  font-weight: bold !important;
335
  color: <?php echo $text_color_year; ?> !important;
349
  margin: inherit !important;
350
  padding: inherit !important;
351
  }
352
+ #bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
353
  color: <?php echo $sun_days; ?> !important;
354
  border: 1px solid <?php echo $cell_border_color; ?> !important;
355
  <?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
710
  'cat_id' => '',
711
  'cat_ids' => $cat_ids,
712
  'widget' => $widget,
713
+ ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9668;
714
  </a>
715
  </td>
716
  <?php
739
  'cat_id' => '',
740
  'cat_ids' => $cat_ids,
741
  'widget' => $widget,
742
+ ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')">&#9658;
743
  </a>
744
  </td>
745
  <td width="15%">
876
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
877
  echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '" class="week_list">
878
  <tr>
879
+ <td class="week_ev" style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color: #' . str_replace('#','',$cat_color->color) . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
880
  <td>
881
  <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $event_title_color . ';"
882
  href="' . add_query_arg(array(
973
  .categories2
974
  {
975
  position:relative;
976
+ left: -10px;
977
  cursor:pointer;
978
  }
979
  .categories2:first-letter
980
  {
981
  color:#fff;
982
+ letter-spacing: 3px;
983
  }
984
  </style>
985
  <?php
1007
  if($cat_ids=='')
1008
  $cat_ids='';
1009
 
 
 
1010
  echo '<ul id="cats" style="list-style-type:none;">';
1011
 
1012
  foreach($categories as $category)
1014
 
1015
  ?>
1016
 
1017
+ <li style="float:left;"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1018
  'action' => 'spiderbigcalendar_week',
1019
  'theme_id' => $theme_id,
1020
  'calendar' => $calendar_id,
1033
  }
1034
  if (!empty($categories)) {
1035
  ?>
1036
+ <li style="float:left;"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$bg_top); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo str_replace('#','',$bg_top); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
1037
  'action' => 'spiderbigcalendar_week',
1038
  'theme_id' => $theme_id,
1039
  'calendar' => $calendar_id,
1048
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
1049
  <?php echo '</ul>';
1050
  }
 
 
1051
  die();
1052
  }
1053
 
front_end/bigcalendarweek_widget.php CHANGED
@@ -89,27 +89,26 @@ $cat_ids = substr($cat_ids, 0,-1);
89
 
90
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
91
  $weekstart = $theme->week_start_day;
92
- $show_cat = $theme->show_cat;
93
- $bg = '#' . $theme->header_bgcolor;
94
- $bg_color_selected = '#' . $theme->bg_color_selected;
95
- $color_arrow = '#' . $theme->arrow_color;
96
- $evented_color = '#' . $theme->text_color_this_month_evented;
97
- $evented_color_bg = '#' . $theme->bg_color_this_month_evented;
98
- $sun_days = '#' . $theme->text_color_sun_days;
99
- $text_color_other_months = '#' . $theme->text_color_other_months;
100
- $text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
101
- $text_color_month = '#' . $theme->text_color_month;
102
- $color_week_days = '#' . $theme->text_color_week_days;
103
- $text_color_selected = '#' . $theme->text_color_selected;
104
- $border_day = '#' . $theme->border_day;
105
  $calendar_width = $theme->width;
106
- $calendar_bg = '#' . $theme->footer_bgcolor;
107
- $weekdays_bg_color = '#' . $theme->weekdays_bg_color;
108
- $weekday_su_bg_color = '#' . $theme->su_bg_color;
109
- $cell_border_color = '#' . $theme->cell_border_color;
110
  $year_font_size = $theme->year_font_size;
111
- $year_font_color = '#' . $theme->year_font_color;
112
- $year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
113
  $font_year = $theme->font_year;
114
  $font_month = $theme->font_month;
115
  $font_day = $theme->font_day;
@@ -268,7 +267,6 @@ $cat_ids = substr($cat_ids, 0,-1);
268
  #calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
269
  font-size:24px;
270
  font-weight:bold;
271
- color:<?php echo $text_color_year; ?>;
272
  }
273
  #calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
274
  color:<?php echo $sun_days; ?>;
@@ -297,8 +295,6 @@ $cat_ids = substr($cat_ids, 0,-1);
297
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
298
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
299
  {
300
-
301
- background-color: <?php $views_tabs_bg_color?>;
302
  width: 120px;
303
  text-align: center;
304
  cursor: pointer;
@@ -318,11 +314,6 @@ position: relative;
318
 
319
  }
320
 
321
- #drop_down_views >li:hover .views_select, #drop_down_views >li.active .views_select
322
- {
323
- background:<?php echo $bg_top ?>;
324
- }
325
-
326
  #drop_down_views >li
327
  {
328
  border-bottom:1px solid #fff !important;
@@ -579,9 +570,9 @@ position: relative;
579
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
580
  echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
581
  <tr>
582
- <td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:#' . $cat_color->color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
583
  <td>
584
- <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:#' . $ev_title_color . ';"
585
  href="' . add_query_arg(array(
586
  'action' => 'spidercalendarbig',
587
  'theme_id' => $theme_id,
@@ -675,13 +666,13 @@ position: relative;
675
  .categories2
676
  {
677
  position:relative;
678
- left: -9px;
679
  cursor:pointer;
680
  }
681
  .categories2:first-letter
682
  {
683
  color:#fff;
684
-
685
  }
686
  </style>
687
  <?php
@@ -708,14 +699,13 @@ echo'
708
 
709
  if($cat_ids=='')
710
  $cat_ids='';
711
-
712
- if($show_cat==1){
713
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
714
 
715
  foreach($categories as $category)
716
  {
717
  ?>
718
- <li style="height:30px"><p class="categories1" style="background-color:#<?php echo $category->color;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo $category->color?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
719
  'action' => 'spiderbigcalendar_week_widget',
720
  'theme_id' => $theme_id,
721
  'calendar' => $calendar_id,
@@ -733,7 +723,7 @@ foreach($categories as $category)
733
  }
734
  if (!empty($categories)) {
735
  ?>
736
- <li style="height:30px"><p class="categories1" style="background-color:<?php echo $bg;?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:<?php echo $bg; ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
737
  'action' => 'spiderbigcalendar_week_widget',
738
  'theme_id' => $theme_id,
739
  'calendar' => $calendar_id,
@@ -748,7 +738,6 @@ if (!empty($categories)) {
748
  'TB_iframe' => 1,
749
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
750
  <?php echo '</ul>';
751
- }
752
  }
753
  die();
754
  }
89
 
90
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
91
  $weekstart = $theme->week_start_day;
92
+ $bg = '#' . str_replace('#','',$theme->header_bgcolor);
93
+ $bg_color_selected = '#' . str_replace('#','',$theme->bg_color_selected);
94
+ $color_arrow = '#' . str_replace('#','',$theme->arrow_color);
95
+ $evented_color = '#' . str_replace('#','',$theme->text_color_this_month_evented);
96
+ $evented_color_bg = '#' . str_replace('#','',$theme->bg_color_this_month_evented);
97
+ $sun_days = '#' . str_replace('#','',$theme->text_color_sun_days);
98
+ $text_color_other_months = '#' . str_replace('#','',$theme->text_color_other_months);
99
+ $text_color_this_month_unevented = '#' . str_replace('#','',$theme->text_color_this_month_unevented);
100
+ $text_color_month = '#' . str_replace('#','',$theme->text_color_month);
101
+ $color_week_days = '#' . str_replace('#','',$theme->text_color_week_days);
102
+ $text_color_selected = '#' . str_replace('#','',$theme->text_color_selected);
103
+ $border_day = '#' . str_replace('#','',$theme->border_day);
 
104
  $calendar_width = $theme->width;
105
+ $calendar_bg = '#' . str_replace('#','',$theme->footer_bgcolor);
106
+ $weekdays_bg_color = '#' . str_replace('#','',$theme->weekdays_bg_color);
107
+ $weekday_su_bg_color = '#' . str_replace('#','',$theme->su_bg_color);
108
+ $cell_border_color = '#' . str_replace('#','',$theme->cell_border_color);
109
  $year_font_size = $theme->year_font_size;
110
+ $year_font_color = '#' . str_replace('#','',$theme->year_font_color);
111
+ $year_tabs_bg_color = '#' . str_replace('#','',$theme->year_tabs_bg_color);
112
  $font_year = $theme->font_year;
113
  $font_month = $theme->font_month;
114
  $font_day = $theme->font_day;
267
  #calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
268
  font-size:24px;
269
  font-weight:bold;
 
270
  }
271
  #calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
272
  color:<?php echo $sun_days; ?>;
295
  #calendar_<?php echo $many_sp_calendar; ?> .views_select ,
296
  #calendar_<?php echo $many_sp_calendar; ?> #views_select
297
  {
 
 
298
  width: 120px;
299
  text-align: center;
300
  cursor: pointer;
314
 
315
  }
316
 
 
 
 
 
 
317
  #drop_down_views >li
318
  {
319
  border-bottom:1px solid #fff !important;
570
  if(!isset($cat_color->color)) { $cat_color = new stdClass; $cat_color->color="";};
571
  echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
572
  <tr>
573
+ <td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color: #' . str_replace('#','',$cat_color->color) . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
574
  <td>
575
+ <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $ev_title_color . ';"
576
  href="' . add_query_arg(array(
577
  'action' => 'spidercalendarbig',
578
  'theme_id' => $theme_id,
666
  .categories2
667
  {
668
  position:relative;
669
+ left: -10px;
670
  cursor:pointer;
671
  }
672
  .categories2:first-letter
673
  {
674
  color:#fff;
675
+ letter-spacing: 3px;
676
  }
677
  </style>
678
  <?php
699
 
700
  if($cat_ids=='')
701
  $cat_ids='';
702
+
 
703
  echo '<ul id="cats_widget_'.$many_sp_calendar.'" style="list-style-type:none;">';
704
 
705
  foreach($categories as $category)
706
  {
707
  ?>
708
+ <li style="height:30px"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$category->color);?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php echo $category->id ?>" style="color:#<?php echo str_replace('#','',$category->color); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
709
  'action' => 'spiderbigcalendar_week_widget',
710
  'theme_id' => $theme_id,
711
  'calendar' => $calendar_id,
723
  }
724
  if (!empty($categories)) {
725
  ?>
726
+ <li style="height:30px"><p class="categories1" style="background-color:#<?php echo str_replace('#','',$bg); ?>">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php echo str_replace('#','',$bg); ?>" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
727
  'action' => 'spiderbigcalendar_week_widget',
728
  'theme_id' => $theme_id,
729
  'calendar' => $calendar_id,
738
  'TB_iframe' => 1,
739
  ), $site_url);?>','<?php echo $many_sp_calendar; ?>','<?php echo $widget; ?>')"><?php echo __('All categories', 'sp_calendar'); ?></p></li>
740
  <?php echo '</ul>';
 
741
  }
742
  die();
743
  }
functions_for_xml_and_ajax.php CHANGED
@@ -190,13 +190,13 @@ function seemore() {
190
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
191
  $show_event = $theme->day_start;
192
  }
193
- $title_color = '#' . $theme->title_color;
194
  $title_size = $theme->title_font_size;
195
- $show_event_bgcolor = '#' . $theme->show_event_bgcolor;
196
  $popup_width = $theme->popup_width;
197
  $popup_height = $theme->popup_height;
198
 
199
- $date_color = '#' . $theme->date_color;
200
  $date_size = $theme->date_size;
201
  $date_font = $theme->date_font;
202
  // $date_format = '';
@@ -294,7 +294,7 @@ WHERE " . $wpdb->prefix . "spidercalendar_event.published=1 AND " . $wpdb->pref
294
  echo '<div >';
295
  echo '<div style="display: table-cell;">';
296
  if(!isset($row->color)) $row->color = "";
297
- echo ' <div style="border-top: 1px solid #FFF;height: 76px;border-right: 2px solid #'.$row->color.';display: table-cell;font-size: 25px;background-color: #E8E8E8;">'.($i + 1).'&nbsp;</div>';
298
  echo '<a style="display: table-cell;text-decoration: none;font-size: 20px;color:' . $title_color . '; line-height:30px"
299
  href="' . add_query_arg(array(
300
  'action' => 'spidercalendarbig',
@@ -318,7 +318,7 @@ WHERE " . $wpdb->prefix . "spidercalendar_event.published=1 AND " . $wpdb->pref
318
  {
319
  echo '<div >';
320
  echo '<div style="display: table-cell;">';
321
- echo '<div style="border-top: 1px solid #FFF;height: 76px;border-right: 2px solid #'.$row->color.';display: table-cell;font-size: 25px;background-color: #E8E8E8;">&nbsp; &nbsp;&nbsp;</div>';
322
  echo '<a style="display: table-cell;text-decoration: none;font-size: 20px;color:' . $title_color . '; line-height:30px"
323
  href="' . add_query_arg(array(
324
  'action' => 'spidercalendarbig',
@@ -438,17 +438,17 @@ function spiderbigcalendar() {
438
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
439
  }
440
 
441
- $title_color = '#' . $theme->title_color;
442
  $title_size = $theme->title_font_size;
443
  $title_font = $theme->title_font;
444
  $title_style = $theme->title_style;
445
- $date_color = '#' . $theme->date_color;
446
  $date_size = $theme->date_size;
447
  $date_font = $theme->date_font;
448
  $date_style = $theme->date_style;
449
- $next_prev_event_bgcolor = '#' . $theme->next_prev_event_bgcolor;
450
- $next_prev_event_arrowcolor = '#' . $theme->next_prev_event_arrowcolor;
451
- $show_event_bgcolor = '#' . $theme->show_event_bgcolor;
452
  $popup_width = $theme->popup_width;
453
  $popup_height = $theme->popup_height;
454
  $date_format = $theme->date_format;
@@ -647,7 +647,7 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
647
  else
648
  $row_color = "";
649
 
650
- echo '<div style="border-left: 7px solid #'.$row_color.';color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . ' ">' . $row_title . '</div>';
651
  if ($row->text_for_date != '') {
652
  echo '<div style="line-height:20px">' . wpautop($row->text_for_date) . '</div>';
653
  }
190
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
191
  $show_event = $theme->day_start;
192
  }
193
+ $title_color = '#' . str_replace('#','',$theme->title_color);
194
  $title_size = $theme->title_font_size;
195
+ $show_event_bgcolor = '#' . str_replace('#','',$theme->show_event_bgcolor);
196
  $popup_width = $theme->popup_width;
197
  $popup_height = $theme->popup_height;
198
 
199
+ $date_color = '#' . str_replace('#','',$theme->date_color);
200
  $date_size = $theme->date_size;
201
  $date_font = $theme->date_font;
202
  // $date_format = '';
294
  echo '<div >';
295
  echo '<div style="display: table-cell;">';
296
  if(!isset($row->color)) $row->color = "";
297
+ echo ' <div style="border-top: 1px solid #FFF;height: 76px;border-right: 2px solid #'.str_replace('#','',$row->color).';display: table-cell;font-size: 25px;background-color: #E8E8E8;">'.($i + 1).'&nbsp;</div>';
298
  echo '<a style="display: table-cell;text-decoration: none;font-size: 20px;color:' . $title_color . '; line-height:30px"
299
  href="' . add_query_arg(array(
300
  'action' => 'spidercalendarbig',
318
  {
319
  echo '<div >';
320
  echo '<div style="display: table-cell;">';
321
+ echo '<div style="border-top: 1px solid #FFF;height: 76px;border-right: 2px solid #'.str_replace('#','',$row->color).';display: table-cell;font-size: 25px;background-color: #E8E8E8;">&nbsp; &nbsp;&nbsp;</div>';
322
  echo '<a style="display: table-cell;text-decoration: none;font-size: 20px;color:' . $title_color . '; line-height:30px"
323
  href="' . add_query_arg(array(
324
  'action' => 'spidercalendarbig',
438
  $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
439
  }
440
 
441
+ $title_color = '#' . str_replace('#','',$theme->title_color);
442
  $title_size = $theme->title_font_size;
443
  $title_font = $theme->title_font;
444
  $title_style = $theme->title_style;
445
+ $date_color = '#' . str_replace('#','',$theme->date_color);
446
  $date_size = $theme->date_size;
447
  $date_font = $theme->date_font;
448
  $date_style = $theme->date_style;
449
+ $next_prev_event_bgcolor = '#' . str_replace('#','',$theme->next_prev_event_bgcolor);
450
+ $next_prev_event_arrowcolor = '#' . str_replace('#','',$theme->next_prev_event_arrowcolor);
451
+ $show_event_bgcolor = '#' . str_replace('#','',$theme->show_event_bgcolor);
452
  $popup_width = $theme->popup_width;
453
  $popup_height = $theme->popup_height;
454
  $date_format = $theme->date_format;
647
  else
648
  $row_color = "";
649
 
650
+ echo '<div style="border-left: 7px solid #'.str_replace('#','',$row_color).';color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . ' ">' . $row_title . '</div>';
651
  if ($row->text_for_date != '') {
652
  echo '<div style="line-height:20px">' . wpautop($row->text_for_date) . '</div>';
653
  }
jscolor/arrow.gif DELETED
Binary file
jscolor/cross.gif DELETED
Binary file
jscolor/demo.html DELETED
@@ -1,12 +0,0 @@
1
- <html>
2
- <head>
3
- <title>jscolor demo</title>
4
- </head>
5
- <body>
6
-
7
- <script type="text/javascript" src="jscolor.js"></script>
8
-
9
- Click here: <input class="color" value="66ff00">
10
-
11
- </body>
12
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
jscolor/hs.png DELETED
Binary file
jscolor/hv.png DELETED
Binary file
jscolor/jscolor.js DELETED
@@ -1,926 +0,0 @@
1
- /**
2
- * jscolor, JavaScript Color Picker
3
- *
4
- * @version 1.3.11
5
- * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
6
- * @author Jan Odvarko, http://odvarko.cz
7
- * @created 2008-06-15
8
- * @updated 2011-11-07
9
- * @link http://jscolor.com
10
- */
11
-
12
-
13
- var jscolor = {
14
-
15
-
16
- dir : '', // location of jscolor directory (leave empty to autodetect)
17
- bindClass : 'color', // class name
18
- binding : true, // automatic binding via <input class="...">
19
- preloading : true, // use image preloading?
20
-
21
-
22
- install : function() {
23
- jscolor.addEvent(window, 'load', jscolor.init);
24
- },
25
-
26
-
27
- init : function() {
28
- if(jscolor.binding) {
29
- jscolor.bind();
30
- }
31
- if(jscolor.preloading) {
32
- jscolor.preload();
33
- }
34
- },
35
-
36
-
37
- getDir : function() {
38
- if(!jscolor.dir) {
39
- var detected = jscolor.detectDir();
40
- jscolor.dir = detected!==false ? detected : 'jscolor/';
41
- }
42
- return jscolor.dir;
43
- },
44
-
45
-
46
- detectDir : function() {
47
- var base = location.href;
48
-
49
- var e = document.getElementsByTagName('base');
50
- for(var i=0; i<e.length; i+=1) {
51
- if(e[i].href) { base = e[i].href; }
52
- }
53
-
54
- var e = document.getElementsByTagName('script');
55
- for(var i=0; i<e.length; i+=1) {
56
- if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
57
- var src = new jscolor.URI(e[i].src);
58
- var srcAbs = src.toAbsolute(base);
59
- srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
60
- srcAbs.query = null;
61
- srcAbs.fragment = null;
62
- return srcAbs.toString();
63
- }
64
- }
65
- return false;
66
- },
67
-
68
-
69
- bind : function() {
70
- var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')\\s*(\\{[^}]*\\})?', 'i');
71
- var e = document.getElementsByTagName('input');
72
- for(var i=0; i<e.length; i+=1) {
73
- var m;
74
- if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
75
- var prop = {};
76
- if(m[3]) {
77
- try {
78
- eval('prop='+m[3]);
79
- } catch(eInvalidProp) {}
80
- }
81
- e[i].color = new jscolor.color(e[i], prop);
82
- }
83
- }
84
- },
85
-
86
-
87
- preload : function() {
88
- for(var fn in jscolor.imgRequire) {
89
- if(jscolor.imgRequire.hasOwnProperty(fn)) {
90
- jscolor.loadImage(fn);
91
- }
92
- }
93
- },
94
-
95
-
96
- images : {
97
- pad : [ 181, 101 ],
98
- sld : [ 16, 101 ],
99
- cross : [ 15, 15 ],
100
- arrow : [ 7, 11 ]
101
- },
102
-
103
-
104
- imgRequire : {},
105
- imgLoaded : {},
106
-
107
-
108
- requireImage : function(filename) {
109
- jscolor.imgRequire[filename] = true;
110
- },
111
-
112
-
113
- loadImage : function(filename) {
114
- if(!jscolor.imgLoaded[filename]) {
115
- jscolor.imgLoaded[filename] = new Image();
116
- jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
117
- }
118
- },
119
-
120
-
121
- fetchElement : function(mixed) {
122
- return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
123
- },
124
-
125
-
126
- addEvent : function(el, evnt, func) {
127
- if(el.addEventListener) {
128
- el.addEventListener(evnt, func, false);
129
- } else if(el.attachEvent) {
130
- el.attachEvent('on'+evnt, func);
131
- }
132
- },
133
-
134
-
135
- fireEvent : function(el, evnt) {
136
- if(!el) {
137
- return;
138
- }
139
- if(document.createEvent) {
140
- var ev = document.createEvent('HTMLEvents');
141
- ev.initEvent(evnt, true, true);
142
- el.dispatchEvent(ev);
143
- } else if(document.createEventObject) {
144
- var ev = document.createEventObject();
145
- el.fireEvent('on'+evnt, ev);
146
- } else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
147
- el['on'+evnt]();
148
- }
149
- },
150
-
151
-
152
- getElementPos : function(e) {
153
- var e1=e, e2=e;
154
- var x=0, y=0;
155
- if(e1.offsetParent) {
156
- do {
157
- x += e1.offsetLeft;
158
- y += e1.offsetTop;
159
- } while(e1 = e1.offsetParent);
160
- }
161
- while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
162
- x -= e2.scrollLeft;
163
- y -= e2.scrollTop;
164
- }
165
- return [x, y];
166
- },
167
-
168
-
169
- getElementSize : function(e) {
170
- return [e.offsetWidth, e.offsetHeight];
171
- },
172
-
173
-
174
- getRelMousePos : function(e) {
175
- var x = 0, y = 0;
176
- if (!e) { e = window.event; }
177
- if (typeof e.offsetX === 'number') {
178
- x = e.offsetX;
179
- y = e.offsetY;
180
- } else if (typeof e.layerX === 'number') {
181
- x = e.layerX;
182
- y = e.layerY;
183
- }
184
- return { x: x, y: y };
185
- },
186
-
187
-
188
- getViewPos : function() {
189
- if(typeof window.pageYOffset === 'number') {
190
- return [window.pageXOffset, window.pageYOffset];
191
- } else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
192
- return [document.body.scrollLeft, document.body.scrollTop];
193
- } else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
194
- return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
195
- } else {
196
- return [0, 0];
197
- }
198
- },
199
-
200
-
201
- getViewSize : function() {
202
- if(typeof window.innerWidth === 'number') {
203
- return [window.innerWidth, window.innerHeight];
204
- } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
205
- return [document.body.clientWidth, document.body.clientHeight];
206
- } else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
207
- return [document.documentElement.clientWidth, document.documentElement.clientHeight];
208
- } else {
209
- return [0, 0];
210
- }
211
- },
212
-
213
-
214
- URI : function(uri) { // See RFC3986
215
-
216
- this.scheme = null;
217
- this.authority = null;
218
- this.path = '';
219
- this.query = null;
220
- this.fragment = null;
221
-
222
- this.parse = function(uri) {
223
- var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
224
- this.scheme = m[3] ? m[2] : null;
225
- this.authority = m[5] ? m[6] : null;
226
- this.path = m[7];
227
- this.query = m[9] ? m[10] : null;
228
- this.fragment = m[12] ? m[13] : null;
229
- return this;
230
- };
231
-
232
- this.toString = function() {
233
- var result = '';
234
- if(this.scheme !== null) { result = result + this.scheme + ':'; }
235
- if(this.authority !== null) { result = result + '//' + this.authority; }
236
- if(this.path !== null) { result = result + this.path; }
237
- if(this.query !== null) { result = result + '?' + this.query; }
238
- if(this.fragment !== null) { result = result + '#' + this.fragment; }
239
- return result;
240
- };
241
-
242
- this.toAbsolute = function(base) {
243
- var base = new jscolor.URI(base);
244
- var r = this;
245
- var t = new jscolor.URI;
246
-
247
- if(base.scheme === null) { return false; }
248
-
249
- if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
250
- r.scheme = null;
251
- }
252
-
253
- if(r.scheme !== null) {
254
- t.scheme = r.scheme;
255
- t.authority = r.authority;
256
- t.path = removeDotSegments(r.path);
257
- t.query = r.query;
258
- } else {
259
- if(r.authority !== null) {
260
- t.authority = r.authority;
261
- t.path = removeDotSegments(r.path);
262
- t.query = r.query;
263
- } else {
264
- if(r.path === '') { // TODO: == or === ?
265
- t.path = base.path;
266
- if(r.query !== null) {
267
- t.query = r.query;
268
- } else {
269
- t.query = base.query;
270
- }
271
- } else {
272
- if(r.path.substr(0,1) === '/') {
273
- t.path = removeDotSegments(r.path);
274
- } else {
275
- if(base.authority !== null && base.path === '') { // TODO: == or === ?
276
- t.path = '/'+r.path;
277
- } else {
278
- t.path = base.path.replace(/[^\/]+$/,'')+r.path;
279
- }
280
- t.path = removeDotSegments(t.path);
281
- }
282
- t.query = r.query;
283
- }
284
- t.authority = base.authority;
285
- }
286
- t.scheme = base.scheme;
287
- }
288
- t.fragment = r.fragment;
289
-
290
- return t;
291
- };
292
-
293
- function removeDotSegments(path) {
294
- var out = '';
295
- while(path) {
296
- if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
297
- path = path.replace(/^\.+/,'').substr(1);
298
- } else if(path.substr(0,3)==='/./' || path==='/.') {
299
- path = '/'+path.substr(3);
300
- } else if(path.substr(0,4)==='/../' || path==='/..') {
301
- path = '/'+path.substr(4);
302
- out = out.replace(/\/?[^\/]*$/, '');
303
- } else if(path==='.' || path==='..') {
304
- path = '';
305
- } else {
306
- var rm = path.match(/^\/?[^\/]*/)[0];
307
- path = path.substr(rm.length);
308
- out = out + rm;
309
- }
310
- }
311
- return out;
312
- }
313
-
314
- if(uri) {
315
- this.parse(uri);
316
- }
317
-
318
- },
319
-
320
-
321
- /*
322
- * Usage example:
323
- * var myColor = new jscolor.color(myInputElement)
324
- */
325
-
326
- color : function(target, prop) {
327
-
328
-
329
- this.required = true; // refuse empty values?
330
- this.adjust = true; // adjust value to uniform notation?
331
- this.hash = false; // prefix color with # symbol?
332
- this.caps = true; // uppercase?
333
- this.slider = true; // show the value/saturation slider?
334
- this.valueElement = target; // value holder
335
- this.styleElement = target; // where to reflect current color
336
- this.onImmediateChange = null; // onchange callback (can be either string or function)
337
- this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
338
- this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
339
-
340
- this.pickerOnfocus = true; // display picker on focus?
341
- this.pickerMode = 'HSV'; // HSV | HVS
342
- this.pickerPosition = 'bottom'; // left | right | top | bottom
343
- this.pickerSmartPosition = true; // automatically adjust picker position when necessary
344
- this.pickerButtonHeight = 20; // px
345
- this.pickerClosable = false;
346
- this.pickerCloseText = 'Close';
347
- this.pickerButtonColor = 'ButtonText'; // px
348
- this.pickerFace = 10; // px
349
- this.pickerFaceColor = 'ThreeDFace'; // CSS color
350
- this.pickerBorder = 1; // px
351
- this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
352
- this.pickerInset = 1; // px
353
- this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
354
- this.pickerZIndex = 10000;
355
-
356
-
357
- for(var p in prop) {
358
- if(prop.hasOwnProperty(p)) {
359
- this[p] = prop[p];
360
- }
361
- }
362
-
363
-
364
- this.hidePicker = function() {
365
- if(isPickerOwner()) {
366
- removePicker();
367
- }
368
- };
369
-
370
-
371
- this.showPicker = function() {
372
- if(!isPickerOwner()) {
373
- var tp = jscolor.getElementPos(target); // target pos
374
- var ts = jscolor.getElementSize(target); // target size
375
- var vp = jscolor.getViewPos(); // view pos
376
- var vs = jscolor.getViewSize(); // view size
377
- var ps = getPickerDims(this); // picker size
378
- var a, b, c;
379
- switch(this.pickerPosition.toLowerCase()) {
380
- case 'left': a=1; b=0; c=-1; break;
381
- case 'right':a=1; b=0; c=1; break;
382
- case 'top': a=0; b=1; c=-1; break;
383
- default: a=0; b=1; c=1; break;
384
- }
385
- var l = (ts[b]+ps[b])/2;
386
-
387
- // picker pos
388
- if (!this.pickerSmartPosition) {
389
- var pp = [
390
- tp[a],
391
- tp[b]+ts[b]-l+l*c
392
- ];
393
- } else {
394
- var pp = [
395
- -vp[a]+tp[a]+ps[a] > vs[a] ?
396
- (-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
397
- tp[a],
398
- -vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
399
- (-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
400
- (tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
401
- ];
402
- }
403
- drawPicker(pp[a], pp[b]);
404
- }
405
- };
406
-
407
-
408
- this.importColor = function() {
409
- if(!valueElement) {
410
- this.exportColor();
411
- } else {
412
- if(!this.adjust) {
413
- if(!this.fromString(valueElement.value, leaveValue)) {
414
- styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
415
- styleElement.style.color = styleElement.jscStyle.color;
416
- this.exportColor(leaveValue | leaveStyle);
417
- }
418
- } else if(!this.required && /^\s*$/.test(valueElement.value)) {
419
- valueElement.value = '';
420
- styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
421
- styleElement.style.color = styleElement.jscStyle.color;
422
- this.exportColor(leaveValue | leaveStyle);
423
-
424
- } else if(this.fromString(valueElement.value)) {
425
- // OK
426
- } else {
427
- this.exportColor();
428
- }
429
- }
430
- };
431
-
432
-
433
- this.exportColor = function(flags) {
434
- if(!(flags & leaveValue) && valueElement) {
435
- var value = this.toString();
436
- if(this.caps) { value = value.toUpperCase(); }
437
- if(this.hash) { value = '#'+value; }
438
- valueElement.value = value;
439
- }
440
- if(!(flags & leaveStyle) && styleElement) {
441
- styleElement.style.backgroundColor =
442
- '#'+this.toString();
443
- styleElement.style.color =
444
- 0.213 * this.rgb[0] +
445
- 0.715 * this.rgb[1] +
446
- 0.072 * this.rgb[2]
447
- < 0.5 ? '#FFF' : '#000';
448
- }
449
- if(!(flags & leavePad) && isPickerOwner()) {
450
- redrawPad();
451
- }
452
- if(!(flags & leaveSld) && isPickerOwner()) {
453
- redrawSld();
454
- }
455
- };
456
-
457
-
458
- this.fromHSV = function(h, s, v, flags) { // null = don't change
459
- h<0 && (h=0) || h>6 && (h=6);
460
- s<0 && (s=0) || s>1 && (s=1);
461
- v<0 && (v=0) || v>1 && (v=1);
462
- this.rgb = HSV_RGB(
463
- h===null ? this.hsv[0] : (this.hsv[0]=h),
464
- s===null ? this.hsv[1] : (this.hsv[1]=s),
465
- v===null ? this.hsv[2] : (this.hsv[2]=v)
466
- );
467
- this.exportColor(flags);
468
- };
469
-
470
-
471
- this.fromRGB = function(r, g, b, flags) { // null = don't change
472
- r<0 && (r=0) || r>1 && (r=1);
473
- g<0 && (g=0) || g>1 && (g=1);
474
- b<0 && (b=0) || b>1 && (b=1);
475
- var hsv = RGB_HSV(
476
- r===null ? this.rgb[0] : (this.rgb[0]=r),
477
- g===null ? this.rgb[1] : (this.rgb[1]=g),
478
- b===null ? this.rgb[2] : (this.rgb[2]=b)
479
- );
480
- if(hsv[0] !== null) {
481
- this.hsv[0] = hsv[0];
482
- }
483
- if(hsv[2] !== 0) {
484
- this.hsv[1] = hsv[1];
485
- }
486
- this.hsv[2] = hsv[2];
487
- this.exportColor(flags);
488
- };
489
-
490
-
491
- this.fromString = function(hex, flags) {
492
- var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
493
- if(!m) {
494
- return false;
495
- } else {
496
- if(m[1].length === 6) { // 6-char notation
497
- this.fromRGB(
498
- parseInt(m[1].substr(0,2),16) / 255,
499
- parseInt(m[1].substr(2,2),16) / 255,
500
- parseInt(m[1].substr(4,2),16) / 255,
501
- flags
502
- );
503
- } else { // 3-char notation
504
- this.fromRGB(
505
- parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
506
- parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
507
- parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
508
- flags
509
- );
510
- }
511
- return true;
512
- }
513
- };
514
-
515
-
516
- this.toString = function() {
517
- return (
518
- (0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
519
- (0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
520
- (0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
521
- );
522
- };
523
-
524
-
525
- function RGB_HSV(r, g, b) {
526
- var n = Math.min(Math.min(r,g),b);
527
- var v = Math.max(Math.max(r,g),b);
528
- var m = v - n;
529
- if(m === 0) { return [ null, 0, v ]; }
530
- var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
531
- return [ h===6?0:h, m/v, v ];
532
- }
533
-
534
-
535
- function HSV_RGB(h, s, v) {
536
- if(h === null) { return [ v, v, v ]; }
537
- var i = Math.floor(h);
538
- var f = i%2 ? h-i : 1-(h-i);
539
- var m = v * (1 - s);
540
- var n = v * (1 - s*f);
541
- switch(i) {
542
- case 6:
543
- case 0: return [v,n,m];
544
- case 1: return [n,v,m];
545
- case 2: return [m,v,n];
546
- case 3: return [m,n,v];
547
- case 4: return [n,m,v];
548
- case 5: return [v,m,n];
549
- }
550
- }
551
-
552
-
553
- function removePicker() {
554
- delete jscolor.picker.owner;
555
- document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
556
- }
557
-
558
-
559
- function drawPicker(x, y) {
560
- if(!jscolor.picker) {
561
- jscolor.picker = {
562
- box : document.createElement('div'),
563
- boxB : document.createElement('div'),
564
- pad : document.createElement('div'),
565
- padB : document.createElement('div'),
566
- padM : document.createElement('div'),
567
- sld : document.createElement('div'),
568
- sldB : document.createElement('div'),
569
- sldM : document.createElement('div'),
570
- btn : document.createElement('div'),
571
- btnS : document.createElement('span'),
572
- btnT : document.createTextNode(THIS.pickerCloseText)
573
- };
574
- for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
575
- var seg = document.createElement('div');
576
- seg.style.height = segSize+'px';
577
- seg.style.fontSize = '1px';
578
- seg.style.lineHeight = '0';
579
- jscolor.picker.sld.appendChild(seg);
580
- }
581
- jscolor.picker.sldB.appendChild(jscolor.picker.sld);
582
- jscolor.picker.box.appendChild(jscolor.picker.sldB);
583
- jscolor.picker.box.appendChild(jscolor.picker.sldM);
584
- jscolor.picker.padB.appendChild(jscolor.picker.pad);
585
- jscolor.picker.box.appendChild(jscolor.picker.padB);
586
- jscolor.picker.box.appendChild(jscolor.picker.padM);
587
- jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
588
- jscolor.picker.btn.appendChild(jscolor.picker.btnS);
589
- jscolor.picker.box.appendChild(jscolor.picker.btn);
590
- jscolor.picker.boxB.appendChild(jscolor.picker.box);
591
- }
592
-
593
- var p = jscolor.picker;
594
-
595
- // controls interaction
596
- p.box.onmouseup =
597
- p.box.onmouseout = function() { target.focus(); };
598
- p.box.onmousedown = function() { abortBlur=true; };
599
- p.box.onmousemove = function(e) {
600
- if (holdPad || holdSld) {
601
- holdPad && setPad(e);
602
- holdSld && setSld(e);
603
- if (document.selection) {
604
- document.selection.empty();
605
- } else if (window.getSelection) {
606
- window.getSelection().removeAllRanges();
607
- }
608
- dispatchImmediateChange();
609
- }
610
- };
611
- p.padM.onmouseup =
612
- p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
613
- p.padM.onmousedown = function(e) {
614
- holdPad=true;
615
- setPad(e);
616
- dispatchImmediateChange();
617
- };
618
- p.sldM.onmouseup =
619
- p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
620
- p.sldM.onmousedown = function(e) {
621
- holdSld=true;
622
- setSld(e);
623
- dispatchImmediateChange();
624
- };
625
-
626
- // picker
627
- var dims = getPickerDims(THIS);
628
- p.box.style.width = dims[0] + 'px';
629
- p.box.style.height = dims[1] + 'px';
630
-
631
- // picker border
632
- p.boxB.style.position = 'absolute';
633
- p.boxB.style.clear = 'both';
634
- p.boxB.style.left = x+'px';
635
- p.boxB.style.top = y+'px';
636
- p.boxB.style.zIndex = THIS.pickerZIndex;
637
- p.boxB.style.border = THIS.pickerBorder+'px solid';
638
- p.boxB.style.borderColor = THIS.pickerBorderColor;
639
- p.boxB.style.background = THIS.pickerFaceColor;
640
-
641
- // pad image
642
- p.pad.style.width = jscolor.images.pad[0]+'px';
643
- p.pad.style.height = jscolor.images.pad[1]+'px';
644
-
645
- // pad border
646
- p.padB.style.position = 'absolute';
647
- p.padB.style.left = THIS.pickerFace+'px';
648
- p.padB.style.top = THIS.pickerFace+'px';
649
- p.padB.style.border = THIS.pickerInset+'px solid';
650
- p.padB.style.borderColor = THIS.pickerInsetColor;
651
-
652
- // pad mouse area
653
- p.padM.style.position = 'absolute';
654
- p.padM.style.left = '0';
655
- p.padM.style.top = '0';
656
- p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
657
- p.padM.style.height = p.box.style.height;
658
- p.padM.style.cursor = 'crosshair';
659
-
660
- // slider image
661
- p.sld.style.overflow = 'hidden';
662
- p.sld.style.width = jscolor.images.sld[0]+'px';
663
- p.sld.style.height = jscolor.images.sld[1]+'px';
664
-
665
- // slider border
666
- p.sldB.style.display = THIS.slider ? 'block' : 'none';
667
- p.sldB.style.position = 'absolute';
668
- p.sldB.style.right = THIS.pickerFace+'px';
669
- p.sldB.style.top = THIS.pickerFace+'px';
670
- p.sldB.style.border = THIS.pickerInset+'px solid';
671
- p.sldB.style.borderColor = THIS.pickerInsetColor;
672
-
673
- // slider mouse area
674
- p.sldM.style.display = THIS.slider ? 'block' : 'none';
675
- p.sldM.style.position = 'absolute';
676
- p.sldM.style.right = '0';
677
- p.sldM.style.top = '0';
678
- p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
679
- p.sldM.style.height = p.box.style.height;
680
- try {
681
- p.sldM.style.cursor = 'pointer';
682
- } catch(eOldIE) {
683
- p.sldM.style.cursor = 'hand';
684
- }
685
-
686
- // "close" button
687
- function setBtnBorder() {
688
- var insetColors = THIS.pickerInsetColor.split(/\s+/);
689
- var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
690
- p.btn.style.borderColor = pickerOutsetColor;
691
- }
692
- p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
693
- p.btn.style.position = 'absolute';
694
- p.btn.style.left = THIS.pickerFace + 'px';
695
- p.btn.style.bottom = THIS.pickerFace + 'px';
696
- p.btn.style.padding = '0 15px';
697
- p.btn.style.height = '18px';
698
- p.btn.style.border = THIS.pickerInset + 'px solid';
699
- setBtnBorder();
700
- p.btn.style.color = THIS.pickerButtonColor;
701
- p.btn.style.font = '12px sans-serif';
702
- p.btn.style.textAlign = 'center';
703
- try {
704
- p.btn.style.cursor = 'pointer';
705
- } catch(eOldIE) {
706
- p.btn.style.cursor = 'hand';
707
- }
708
- p.btn.onmousedown = function () {
709
- THIS.hidePicker();
710
- };
711
- p.btnS.style.lineHeight = p.btn.style.height;
712
-
713
- // load images in optimal order
714
- switch(modeID) {
715
- case 0: var padImg = 'hs.png'; break;
716
- case 1: var padImg = 'hv.png'; break;
717
- }
718
- p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
719
- p.padM.style.backgroundRepeat = "no-repeat";
720
- p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
721
- p.sldM.style.backgroundRepeat = "no-repeat";
722
- p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
723
- p.pad.style.backgroundRepeat = "no-repeat";
724
- p.pad.style.backgroundPosition = "0 0";
725
-
726
- // place pointers
727
- redrawPad();
728
- redrawSld();
729
-
730
- jscolor.picker.owner = THIS;
731
- document.getElementsByTagName('body')[0].appendChild(p.boxB);
732
- }
733
-
734
-
735
- function getPickerDims(o) {
736
- var dims = [
737
- 2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
738
- (o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
739
- o.pickerClosable ?
740
- 4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
741
- 2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
742
- ];
743
- return dims;
744
- }
745
-
746
-
747
- function redrawPad() {
748
- // redraw the pad pointer
749
- switch(modeID) {
750
- case 0: var yComponent = 1; break;
751
- case 1: var yComponent = 2; break;
752
- }
753
- var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
754
- var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
755
- jscolor.picker.padM.style.backgroundPosition =
756
- (THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
757
- (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
758
-
759
- // redraw the slider image
760
- var seg = jscolor.picker.sld.childNodes;
761
-
762
- switch(modeID) {
763
- case 0:
764
- var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
765
- for(var i=0; i<seg.length; i+=1) {
766
- seg[i].style.backgroundColor = 'rgb('+
767
- (rgb[0]*(1-i/seg.length)*100)+'%,'+
768
- (rgb[1]*(1-i/seg.length)*100)+'%,'+
769
- (rgb[2]*(1-i/seg.length)*100)+'%)';
770
- }
771
- break;
772
- case 1:
773
- var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
774
- var i = Math.floor(THIS.hsv[0]);
775
- var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
776
- switch(i) {
777
- case 6:
778
- case 0: rgb=[0,1,2]; break;
779
- case 1: rgb=[1,0,2]; break;
780
- case 2: rgb=[2,0,1]; break;
781
- case 3: rgb=[2,1,0]; break;
782
- case 4: rgb=[1,2,0]; break;
783
- case 5: rgb=[0,2,1]; break;
784
- }
785
- for(var i=0; i<seg.length; i+=1) {
786
- s = 1 - 1/(seg.length-1)*i;
787
- c[1] = c[0] * (1 - s*f);
788
- c[2] = c[0] * (1 - s);
789
- seg[i].style.backgroundColor = 'rgb('+
790
- (c[rgb[0]]*100)+'%,'+
791
- (c[rgb[1]]*100)+'%,'+
792
- (c[rgb[2]]*100)+'%)';
793
- }
794
- break;
795
- }
796
- }
797
-
798
-
799
- function redrawSld() {
800
- // redraw the slider pointer
801
- switch(modeID) {
802
- case 0: var yComponent = 2; break;
803
- case 1: var yComponent = 1; break;
804
- }
805
- var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
806
- jscolor.picker.sldM.style.backgroundPosition =
807
- '0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
808
- }
809
-
810
-
811
- function isPickerOwner() {
812
- return jscolor.picker && jscolor.picker.owner === THIS;
813
- }
814
-
815
-
816
- function blurTarget() {
817
- if(valueElement === target) {
818
- THIS.importColor();
819
- }
820
- if(THIS.pickerOnfocus) {
821
- THIS.hidePicker();
822
- }
823
- }
824
-
825
-
826
- function blurValue() {
827
- if(valueElement !== target) {
828
- THIS.importColor();
829
- }
830
- }
831
-
832
-
833
- function setPad(e) {
834
- var mpos = jscolor.getRelMousePos(e);
835
- var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
836
- var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
837
- switch(modeID) {
838
- case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
839
- case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
840
- }
841
- }
842
-
843
-
844
- function setSld(e) {
845
- var mpos = jscolor.getRelMousePos(e);
846
- var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
847
- switch(modeID) {
848
- case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
849
- case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
850
- }
851
- }
852
-
853
-
854
- function dispatchImmediateChange() {
855
- if (THIS.onImmediateChange) {
856
- if (typeof THIS.onImmediateChange === 'string') {
857
- eval(THIS.onImmediateChange);
858
- } else {
859
- THIS.onImmediateChange(THIS);
860
- }
861
- }
862
- }
863
-
864
-
865
- var THIS = this;
866
- var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
867
- var abortBlur = false;
868
- var
869
- valueElement = jscolor.fetchElement(this.valueElement),
870
- styleElement = jscolor.fetchElement(this.styleElement);
871
- var
872
- holdPad = false,
873
- holdSld = false;
874
- var
875
- leaveValue = 1<<0,
876
- leaveStyle = 1<<1,
877
- leavePad = 1<<2,
878
- leaveSld = 1<<3;
879
-
880
- // target
881
- jscolor.addEvent(target, 'focus', function() {
882
- if(THIS.pickerOnfocus) { THIS.showPicker(); }
883
- });
884
- jscolor.addEvent(target, 'blur', function() {
885
- if(!abortBlur) {
886
- window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
887
- } else {
888
- abortBlur = false;
889
- }
890
- });
891
-
892
- // valueElement
893
- if(valueElement) {
894
- var updateField = function() {
895
- THIS.fromString(valueElement.value, leaveValue);
896
- dispatchImmediateChange();
897
- };
898
- jscolor.addEvent(valueElement, 'keyup', updateField);
899
- jscolor.addEvent(valueElement, 'input', updateField);
900
- jscolor.addEvent(valueElement, 'blur', blurValue);
901
- valueElement.setAttribute('autocomplete', 'off');
902
- }
903
-
904
- // styleElement
905
- if(styleElement) {
906
- styleElement.jscStyle = {
907
- backgroundColor : styleElement.style.backgroundColor,
908
- color : styleElement.style.color
909
- };
910
- }
911
-
912
- // require images
913
- switch(modeID) {
914
- case 0: jscolor.requireImage('hs.png'); break;
915
- case 1: jscolor.requireImage('hv.png'); break;
916
- }
917
- jscolor.requireImage('cross.gif');
918
- jscolor.requireImage('arrow.gif');
919
-
920
- this.importColor();
921
- }
922
-
923
- };
924
-
925
-
926
- jscolor.install();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WordPress Event Calendar ===
2
  Contributors: webdorado
3
  Donate link: http://web-dorado.com/products/wordpress-calendar.html
4
- Tags: calendar, calendars, event, event calendar, event manager, events calendar,calendar widget, event registration, event management,events, Kalender, agenda, calendario, availability calendar,online calendar,holiday calendar , scheduling, free calendar, Calender, upcoming events , event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting , appointment, event tracking, event organizer, upcoming events widget, event page, event bookings, recurring, recurring events, conference, date, dates, schedule, times, venue, AJAX, responsive, shortcode, seminar, summit, tribe
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
- Stable tag: 1.4.19
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -17,7 +17,6 @@ WordPress event calendar is a FREE user-friendly responsive plugin to manage mul
17
  [Demo](http://wpdemo.web-dorado.com/spider-calendar/)
18
  [Demo Admin](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=SpiderCalendar)
19
  [User Manual](http://web-dorado.com/spider-calendar-wordpress-guide-step-1.html)
20
- [Frequently Asked Questions](http://web-dorado.com/forum/spider-calendar-wordpress/1033-spider-calendar-faq.html)
21
 
22
 
23
  Spider Event Calendar is a highly configurable plugin which allows you to have multiple organized events in a calendar. This plugin is one of the best WordPress Calendar available in WordPress Directory. If you have problem with organizing your WordPress Calendar events and displaying them in a calendar format, then Spider Wordpress Calendar Plugin is the best solution. Maybe you just want to have a quick look at your calendar to remind yourself about the future appointments? It will be great if calendar extension will be able to show all events, display them in a widget as a beautiful and customizable calendar on your website. Spider WordPress Calendar is an extraordinary user friendly calendar.
@@ -32,8 +31,7 @@ Different categories created for the calendar will be displayed as a legend belo
32
  * You can add unlimited number of calendars, event categories and unlimited number of events for each calendar.
33
  * [WordPress Calendar](http://web-dorado.com/products/wordpress-calendar.html) can be used as a widget as well.
34
  * Separate upcoming events widget to display upcoming events in a list. The widget features are customizable.
35
- * With a simple click on the date on the Calendar you will see the events and their descriptions recorded for that day.
36
- * Spider Event Calendar supports events that last more than one day.
37
  * Possibility to set the month and the year initially displayed on the calendar (option to display any particular month instead of the current month on the calendar).
38
  * Possibility of displaying events repeating on a specific day of week on a weekly, monthly and even yearly basis.
39
  * Possibility of displaying single-day events.
@@ -144,6 +142,9 @@ Vietnamese (vi)
144
 
145
  == Changelog ==
146
 
 
 
 
147
  = 1.4.19 =
148
  Add featured themes
149
 
1
  === WordPress Event Calendar ===
2
  Contributors: webdorado
3
  Donate link: http://web-dorado.com/products/wordpress-calendar.html
4
+ Tags: calendar, calendars, event, event calendar, event manager, events calendar,calendar widget, event registration, event management,events, Kalender, agenda, calendario, availability calendar,o nline calendar, holiday calendar, scheduling, free calendar, Calender, upcoming events, event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting, appointment, event tracking, event organizer, upcoming events widget, event page, event bookings, recurring, recurring events, conference, date, dates, schedule, times, venue, AJAX, responsive, shortcode, seminar, summit
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
+ Stable tag: 1.4.20
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
17
  [Demo](http://wpdemo.web-dorado.com/spider-calendar/)
18
  [Demo Admin](http://wpdemo.web-dorado.com/wp-admin/admin.php?page=SpiderCalendar)
19
  [User Manual](http://web-dorado.com/spider-calendar-wordpress-guide-step-1.html)
 
20
 
21
 
22
  Spider Event Calendar is a highly configurable plugin which allows you to have multiple organized events in a calendar. This plugin is one of the best WordPress Calendar available in WordPress Directory. If you have problem with organizing your WordPress Calendar events and displaying them in a calendar format, then Spider Wordpress Calendar Plugin is the best solution. Maybe you just want to have a quick look at your calendar to remind yourself about the future appointments? It will be great if calendar extension will be able to show all events, display them in a widget as a beautiful and customizable calendar on your website. Spider WordPress Calendar is an extraordinary user friendly calendar.
31
  * You can add unlimited number of calendars, event categories and unlimited number of events for each calendar.
32
  * [WordPress Calendar](http://web-dorado.com/products/wordpress-calendar.html) can be used as a widget as well.
33
  * Separate upcoming events widget to display upcoming events in a list. The widget features are customizable.
34
+ * With a simple click on the date on the Calendar you will see the events and their descriptions recorded for that day.
 
35
  * Possibility to set the month and the year initially displayed on the calendar (option to display any particular month instead of the current month on the calendar).
36
  * Possibility of displaying events repeating on a specific day of week on a weekly, monthly and even yearly basis.
37
  * Possibility of displaying single-day events.
142
 
143
  == Changelog ==
144
 
145
+ = 1.4.20 =
146
+ bug in color picker fixed
147
+
148
  = 1.4.19 =
149
  Add featured themes
150
 
spidercalendar_upcoming_events_widget.php CHANGED
@@ -2,13 +2,14 @@
2
  $sonan=1;
3
  add_action( 'wp_print_scripts', 'cal_scripts' );
4
 
5
-
6
  function cal_scripts(){
7
- wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), array(), '1.4.16', FALSE);
8
- wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), array(), '1.4.16', FALSE);
9
- wp_enqueue_script("calendar_function", plugins_url("elements/calendar_function.js", __FILE__), array(), '1.4.16', FALSE);
10
- wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), array(), '1.4.16', FALSE);
11
- wp_enqueue_script('spider_color',plugins_url('jscolor/jscolor.js',__FILE__), array(), '1.4.16');
 
 
12
  }
13
 
14
  if (!class_exists('WP_Widget')) {
@@ -346,7 +347,7 @@ $id = $this->get_field_id('title');
346
  <style type="text/css">
347
 
348
  #event_repeat<?php echo $id?>{
349
- color:#<?php echo $repeat_color ?>;
350
  padding-top:14px;
351
  <?php if($show_eventtext==0){?>
352
  padding-bottom:14px!important;
@@ -364,7 +365,7 @@ border-collapse:collapse;
364
 
365
  #event_text<?php echo $id?>{
366
  padding:15px;
367
- color:#<?php echo $text_color?>;
368
  padding-bottom:14px!important;
369
  <?php if($show_repeat==0) {?>
370
  padding-top:14px!important;
@@ -375,7 +376,7 @@ padding-left: 8px;
375
 
376
  #event_date<?php echo $id?>
377
  {
378
- color:#<?php echo $date_color?>;
379
  <?php if($show_eventtext==0){?>
380
  padding-bottom:14px!important;
381
  <?php } ?>
@@ -391,7 +392,7 @@ padding-bottom:14px!important;
391
  {
392
  font-size:<?php echo $title_size?>px;
393
  font-family:<?php echo $title_font?>;
394
- color:#<?php echo $title_color?> !important;
395
  text-decoration:none;
396
 
397
  }
@@ -413,7 +414,7 @@ padding-top:2px;
413
  }
414
  #divider<?php echo $id?>
415
  {
416
- background-color:#<?php echo $instance['divider_color']?>;
417
  border:none;
418
  height:1px;
419
  }
@@ -427,7 +428,7 @@ padding-bottom:14px;
427
 
428
  .module<?php echo $id?>
429
  {
430
- background-color:#<?php echo $bg_color?>;
431
  width:<?php echo $width?>px;
432
  border:1px ;
433
  border-radius:8px;
@@ -446,8 +447,6 @@ border:2px solid #6A6A6A;;
446
  <?php
447
  $query1= "SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE published='1' LIMIT 0,".$event_from_current_day;
448
  $rows = $wpdb->get_results($query1);
449
-
450
-
451
  $daysarray = array();
452
 
453
  foreach($rows as $row)
@@ -492,7 +491,6 @@ echo '<div class="module'.$id.'">';
492
  {
493
  $query="SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=".$calendar_id." AND published='1' ORDER BY date";
494
  $evs = $wpdb->get_results($query);
495
-
496
  $st_date=date('Y-m-d');
497
  $dates=array();
498
  foreach($evs as $ev)
@@ -1984,20 +1982,23 @@ $ev++;
1984
  $id = $this->get_field_id('title');
1985
 
1986
  ?>
1987
- <script>jscolor.bind();
1988
-
 
 
1989
  function selectcal(x)
1990
  {
1991
-
1992
-
1993
-
1994
- a=x.parentNode.parentNode.parentNode.childNodes[29].childNodes[3].childNodes[1]
1995
- selectcalendarvalue=x.value;
1996
- a.href=a.href+'&upcalendar_id='+selectcalendarvalue;
1997
  }
1998
 
1999
  </script>
2000
  <style>
 
 
 
 
2001
  #wd_admin_form .calendar .wd_button{
2002
  display: table-cell !important;
2003
  }
@@ -2005,6 +2006,49 @@ $ev++;
2005
  #wd_admin_form div.calendar{
2006
  margin-left: -101px;
2007
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2008
  </style>
2009
  <p>
2010
 
@@ -2291,7 +2335,7 @@ function addcal(x,y,z,f)
2291
 
2292
  <hr>
2293
 
2294
- <table width="100%" class="paramlist admintable" cellpadding="3">
2295
  <tbody>
2296
  <tr>
2297
  <td style="width:120px" class="paramlist_key">
@@ -2310,7 +2354,9 @@ function addcal(x,y,z,f)
2310
  </span>
2311
  </td>
2312
  <td class="paramlist_value">
2313
- <input class="color" id="<?php echo $this->get_field_id('bg_color'); ?>" name="<?php echo $this->get_field_name('bg_color'); ?>" value="<?php echo $instance['bg_color'];?>" />
 
 
2314
  </td>
2315
  </tr>
2316
  <tr>
@@ -2320,7 +2366,9 @@ function addcal(x,y,z,f)
2320
  </span>
2321
  </td>
2322
  <td class="paramlist_value">
2323
- <input class="color" id="<?php echo $this->get_field_id('title_color'); ?>" name="<?php echo $this->get_field_name('title_color'); ?>" value="<?php echo $instance['title_color'];?>" />
 
 
2324
  </td>
2325
  </tr>
2326
  <tr>
@@ -2357,7 +2405,9 @@ function addcal(x,y,z,f)
2357
  </span>
2358
  </td>
2359
  <td class="paramlist_value">
2360
- <input class="color" id="<?php echo $this->get_field_id('date_color'); ?>" name="<?php echo $this->get_field_name('date_color'); ?>" value="<?php echo $instance['date_color'];?>" />
 
 
2361
  </td>
2362
  </tr>
2363
  <tr>
@@ -2376,8 +2426,8 @@ function addcal(x,y,z,f)
2376
  <label style="font-size:10px" for="<?php echo $this->get_field_id('repeat_color'); ?>" class="hasTip">Event Repeat Rate Color:</label>
2377
  </span>
2378
  </td>
2379
- <td class="paramlist_value">
2380
- <input class="color" id="<?php echo $this->get_field_id('repeat_color'); ?>" name="<?php echo $this->get_field_name('repeat_color'); ?>" value="<?php echo $instance['repeat_color'];?>" />
2381
  </td>
2382
  </tr>
2383
 
@@ -2389,7 +2439,9 @@ function addcal(x,y,z,f)
2389
  </span>
2390
  </td>
2391
  <td class="paramlist_value">
2392
- <input class="color" id="<?php echo $this->get_field_id('text_color'); ?>" name="<?php echo $this->get_field_name('text_color'); ?>" value="<?php echo $instance['text_color'];?>" />
 
 
2393
  </td>
2394
  </tr>
2395
 
@@ -2400,7 +2452,9 @@ function addcal(x,y,z,f)
2400
  </span>
2401
  </td>
2402
  <td class="paramlist_value">
2403
- <input class="color" id="<?php echo $this->get_field_id('divider_color'); ?>" name="<?php echo $this->get_field_name('divider_color'); ?>" value="<?php echo $instance['divider_color'];?>" />
 
 
2404
  </td>
2405
  </tr>
2406
  </tbody>
2
  $sonan=1;
3
  add_action( 'wp_print_scripts', 'cal_scripts' );
4
 
 
5
  function cal_scripts(){
6
+ global $wd_spider_calendar_version;
7
+ wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
8
+ wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
9
+ wp_enqueue_script("calendar_function", plugins_url("elements/calendar_function.js", __FILE__), array(), $wd_spider_calendar_version, FALSE);
10
+ wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), array(), $wd_spider_calendar_version, FALSE);
11
+ wp_enqueue_script('wp-color-picker');
12
+ wp_enqueue_style( 'wp-color-picker' );
13
  }
14
 
15
  if (!class_exists('WP_Widget')) {
347
  <style type="text/css">
348
 
349
  #event_repeat<?php echo $id?>{
350
+ color:#<?php echo str_replace('#','',$repeat_color); ?>;
351
  padding-top:14px;
352
  <?php if($show_eventtext==0){?>
353
  padding-bottom:14px!important;
365
 
366
  #event_text<?php echo $id?>{
367
  padding:15px;
368
+ color:#<?php echo str_replace('#','',$text_color); ?>;
369
  padding-bottom:14px!important;
370
  <?php if($show_repeat==0) {?>
371
  padding-top:14px!important;
376
 
377
  #event_date<?php echo $id?>
378
  {
379
+ color:#<?php echo str_replace('#','',$date_color); ?>;
380
  <?php if($show_eventtext==0){?>
381
  padding-bottom:14px!important;
382
  <?php } ?>
392
  {
393
  font-size:<?php echo $title_size?>px;
394
  font-family:<?php echo $title_font?>;
395
+ color:#<?php echo str_replace('#','',$title_color); ?> !important;
396
  text-decoration:none;
397
 
398
  }
414
  }
415
  #divider<?php echo $id?>
416
  {
417
+ background-color:#<?php echo str_replace('#','',$instance['divider_color']); ?>;
418
  border:none;
419
  height:1px;
420
  }
428
 
429
  .module<?php echo $id?>
430
  {
431
+ background-color:#<?php echo str_replace('#','',$bg_color);?>;
432
  width:<?php echo $width?>px;
433
  border:1px ;
434
  border-radius:8px;
447
  <?php
448
  $query1= "SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE published='1' LIMIT 0,".$event_from_current_day;
449
  $rows = $wpdb->get_results($query1);
 
 
450
  $daysarray = array();
451
 
452
  foreach($rows as $row)
491
  {
492
  $query="SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=".$calendar_id." AND published='1' ORDER BY date";
493
  $evs = $wpdb->get_results($query);
 
494
  $st_date=date('Y-m-d');
495
  $dates=array();
496
  foreach($evs as $ev)
1982
  $id = $this->get_field_id('title');
1983
 
1984
  ?>
1985
+ <script>
1986
+ jQuery(document).ready(function() {
1987
+ jQuery('.color_input').wpColorPicker();
1988
+ });
1989
  function selectcal(x)
1990
  {
1991
+ a=x.parentNode.parentNode.parentNode.childNodes[29].childNodes[3].childNodes[1]
1992
+ selectcalendarvalue=x.value;
1993
+ a.href=a.href+'&upcalendar_id='+selectcalendarvalue;
 
 
 
1994
  }
1995
 
1996
  </script>
1997
  <style>
1998
+ .wp-color-result:focus{
1999
+ outline: none;
2000
+ }
2001
+ .wp-picker-container:has(.wp-picker-open) { color: red; }
2002
  #wd_admin_form .calendar .wd_button{
2003
  display: table-cell !important;
2004
  }
2006
  #wd_admin_form div.calendar{
2007
  margin-left: -101px;
2008
  }
2009
+
2010
+ .wp-picker-container{
2011
+ position: absolute;
2012
+ left: 5px;
2013
+ top: 0px;
2014
+ }
2015
+ .paramlist_value{
2016
+ position: relative;
2017
+ }
2018
+ .color_input.wp-color-picker{
2019
+ height: 23px;
2020
+ }
2021
+ .wp-picker-holder{
2022
+ top: -11px;
2023
+ position: relative;
2024
+ z-index: 3;
2025
+ }
2026
+ .wp-color-result:after{
2027
+ width: 73px;
2028
+ }
2029
+ .paramlist_value > .wp-picker-container > a{
2030
+ left: -1px;
2031
+ }
2032
+ .wp-picker-container .wp-picker-container > a{
2033
+ left: -11px;
2034
+ }
2035
+ .wp-color-result{
2036
+ background-color: transparent;
2037
+ left: -6px;
2038
+ }
2039
+ .wp-color-result:hover{
2040
+ background-color: transparent;
2041
+ }
2042
+ .color_for_this{
2043
+ height: 24px;
2044
+ top: 0px;
2045
+ position: relative;
2046
+ width: 35px;
2047
+ left: 2px;
2048
+ }
2049
+ #repeat_rate_col .wp-picker-container .wp-picker-container > a{
2050
+ left: -6px;
2051
+ }
2052
  </style>
2053
  <p>
2054
 
2335
 
2336
  <hr>
2337
 
2338
+ <table width="100%" class="paramlist admintable" cellpadding="4">
2339
  <tbody>
2340
  <tr>
2341
  <td style="width:120px" class="paramlist_key">
2354
  </span>
2355
  </td>
2356
  <td class="paramlist_value">
2357
+ <div class="color_for_this" style="background-color: #<?php echo str_replace('#','',$instance['bg_color']);?>">
2358
+ <input class="color_input wp-color-picker" id="<?php echo $this->get_field_id('bg_color'); ?>" name="<?php echo $this->get_field_name('bg_color'); ?>" value="<?php echo $instance['bg_color'];?>" />
2359
+ </div>
2360
  </td>
2361
  </tr>
2362
  <tr>
2366
  </span>
2367
  </td>
2368
  <td class="paramlist_value">
2369
+ <div class="color_for_this" style="background-color: #<?php echo str_replace('#','',$instance['title_color']);?>">
2370
+ <input class="color_input wp-color-picker" id="<?php echo $this->get_field_id('title_color'); ?>" name="<?php echo $this->get_field_name('title_color'); ?>" value="<?php echo $instance['title_color'];?>" />
2371
+ </div>
2372
  </td>
2373
  </tr>
2374
  <tr>
2405
  </span>
2406
  </td>
2407
  <td class="paramlist_value">
2408
+ <div class="color_for_this" style="background-color: #<?php echo str_replace('#','',$instance['date_color']);?>">
2409
+ <input class="color_input wp-color-picker" id="<?php echo $this->get_field_id('date_color'); ?>" name="<?php echo $this->get_field_name('date_color'); ?>" value="<?php echo $instance['date_color'];?>" />
2410
+ </div>
2411
  </td>
2412
  </tr>
2413
  <tr>
2426
  <label style="font-size:10px" for="<?php echo $this->get_field_id('repeat_color'); ?>" class="hasTip">Event Repeat Rate Color:</label>
2427
  </span>
2428
  </td>
2429
+ <td class="paramlist_value" id="repeat_rate_col">
2430
+ <input class="color_input wp-color-picker" id="<?php echo $this->get_field_id('repeat_color'); ?>" name="<?php echo $this->get_field_name('repeat_color'); ?>" value="<?php echo $instance['repeat_color'];?>" />
2431
  </td>
2432
  </tr>
2433
 
2439
  </span>
2440
  </td>
2441
  <td class="paramlist_value">
2442
+ <div class="color_for_this" style="background-color: #<?php echo str_replace('#','',$instance['text_color']);?>">
2443
+ <input class="color_input wp-color-picker" id="<?php echo $this->get_field_id('text_color'); ?>" name="<?php echo $this->get_field_name('text_color'); ?>" value="<?php echo $instance['text_color'];?>" />
2444
+ </div>
2445
  </td>
2446
  </tr>
2447
 
2452
  </span>
2453
  </td>
2454
  <td class="paramlist_value">
2455
+ <div class="color_for_this" style="background-color: #<?php echo str_replace('#','',$instance['divider_color']);?>">
2456
+ <input class="color_input wp-color-picker" id="<?php echo $this->get_field_id('divider_color'); ?>" name="<?php echo $this->get_field_name('divider_color'); ?>" value="<?php echo $instance['divider_color'];?>" />
2457
+ </div>
2458
  </td>
2459
  </tr>
2460
  </tbody>