T(-) Countdown - Version 2.2.11

Version Description

  • When setting jsplacment to inline, script is forced to print after countdown elements.
  • Escape characters no longer converted in widget tile
  • Fixed 'Top Scroll' issue: http://wordpress.org/support/topic/timer-working-but-top-scroll-feature-conflicting?replies=7
Download this release

Release Info

Developer baden03
Plugin Icon 128x128 T(-) Countdown
Version 2.2.11
Comparing to
See all releases

Code changes from version 2.2.10 to 2.2.11

countdown-timer.php CHANGED
@@ -5,13 +5,13 @@ Text Domain: tminus
5
  Domain Path: /languages
6
  Plugin URI: http://plugins.twinpictures.de/plugins/t-minus-countdown/
7
  Description: Display and configure multiple T(-) Countdown timers using a shortcode or sidebar widget.
8
- Version: 2.2.10
9
  Author: twinpictures, baden03
10
  Author URI: http://www.twinpictures.de/
11
  License: GPL2
12
  */
13
 
14
- /* Copyright 2013 Twinpictures (www.twinpictures.de)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License, version 2, as
@@ -29,31 +29,28 @@ License: GPL2
29
 
30
  //widget scripts
31
  function countdown_scripts(){
32
- $current_version = '2.2.10';
33
  $installed_version = get_option('t-minus_version');
34
 
35
  if($current_version != $installed_version){
36
  //delete the old style system
37
  delete_option( 't-minus_styles' );
38
  //add version check
39
- update_option('t-minus_version', '2.2.10');
40
 
41
  //reset rockstar option
42
  delete_option( 'rockstar' );
43
  add_option('rockstar', '');
44
  }
45
- $styles_arr = array("hoth","TIE-fighter","c-3po","c-3po-mini","carbonite","carbonite-responsive","carbonlite","darth","jedi");
46
  add_option('t-minus_styles', $styles_arr);
47
  $plugin_url = plugins_url() .'/'. dirname( plugin_basename(__FILE__) );
48
- wp_enqueue_script('jquery');
49
  if (is_admin() && $_SERVER["REQUEST_URI"] == '/wp-admin/widgets.php'){
50
  //jquery admin stuff
51
- wp_register_script('tminus-admin-script', $plugin_url.'/js/jquery.collapse.min.js', array ('jquery'), '1.1' );
52
  wp_enqueue_script('tminus-admin-script');
53
 
54
- wp_register_script('livequery-script', $plugin_url.'/js/jquery.livequery.min.js', array ('jquery'), '1.0' );
55
- wp_enqueue_script('livequery-script');
56
-
57
  wp_register_style('colapse-admin-css', $plugin_url.'/admin/collapse-style.css', array (), '1.0' );
58
  wp_enqueue_style('colapse-admin-css');
59
 
@@ -63,8 +60,7 @@ function countdown_scripts(){
63
  }
64
  else{
65
  //lwtCountdown script
66
- //wp_register_script('countdown-script', $plugin_url.'/js/jquery.t-countdown.js', array ('jquery'), '1.4' );
67
- wp_register_script('countdown-script', $plugin_url.'/js/jquery.t-countdown.min.js', array ('jquery'), '1.4' );
68
  wp_enqueue_script('countdown-script');
69
 
70
  //register all countdown styles for enqueue-as-needed
@@ -119,7 +115,7 @@ class CountDownTimer extends WP_Widget {
119
 
120
  $day = empty($instance['day']) ? 20 : apply_filters('widget_day', $instance['day']);
121
  $month = empty($instance['month']) ? 12 : apply_filters('widget_month', $instance['month']);
122
- $year = empty($instance['year']) ? 2013 : apply_filters('widget_year', $instance['year']);
123
 
124
  $date = empty($instance['date']) ? $year.'-'.$month.'-'.$day : apply_filters('widget_date', $instance['date']);
125
  $hour = empty($instance['hour']) ? 20 : apply_filters('widget_hour', $instance['hour']);
@@ -332,13 +328,25 @@ class CountDownTimer extends WP_Widget {
332
  }
333
 
334
  /** Update */
 
335
  function update($new_instance, $old_instance) {
336
  $instance = array_merge($old_instance, $new_instance);
337
  if($instance['isrockstar'] == 'rockstar'){
338
  update_option('rockstar', 'rockstar');
339
  }
 
340
  return array_map('mysql_real_escape_string', $instance);
341
  }
 
 
 
 
 
 
 
 
 
 
342
 
343
  /** Form */
344
  function form($instance) {
@@ -718,33 +726,32 @@ function tminuscountdown($atts, $content=null) {
718
  );
719
  }
720
  else{
721
- ?>
722
- <script language="javascript" type="text/javascript">
723
  jQuery(document).ready(function() {
724
- jQuery('#<?php echo $id; ?>-dashboard').countDown({
725
  targetDate: {
726
- 'day': <?php echo $day; ?>,
727
- 'month': <?php echo $month; ?>,
728
- 'year': <?php echo $year; ?>,
729
- 'hour': <?php echo $hour; ?>,
730
- 'min': <?php echo $min; ?>,
731
- 'sec': <?php echo $sec; ?>,
732
- 'localtime': '<?php echo $t; ?>',
733
- 'mysqltime': '<?php echo current_time('mysql'); ?>'
734
  },
735
- style: '<?php echo $style; ?>',
736
- launchtarget: '<?php echo $launchtarget; ?>',
737
- omitWeeks: <?php echo $omitweeks;
738
- if($content){
739
- echo ", onComplete: function() {
 
740
  jQuery('#".$id."-".$launchtarget."').css({'width' : '".$launchwidth."', 'height' : '".$launchheight."'});
741
  jQuery('#".$id."-".$launchtarget."').html('".do_shortcode($content)."');
742
  }";
743
- }?>
744
- });
745
  });
746
- </script>
747
- <?php
748
  }
749
  return $tminus;
750
  }
5
  Domain Path: /languages
6
  Plugin URI: http://plugins.twinpictures.de/plugins/t-minus-countdown/
7
  Description: Display and configure multiple T(-) Countdown timers using a shortcode or sidebar widget.
8
+ Version: 2.2.11
9
  Author: twinpictures, baden03
10
  Author URI: http://www.twinpictures.de/
11
  License: GPL2
12
  */
13
 
14
+ /* Copyright 2014 Twinpictures (www.twinpictures.de)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License, version 2, as
29
 
30
  //widget scripts
31
  function countdown_scripts(){
32
+ $current_version = '2.2.11';
33
  $installed_version = get_option('t-minus_version');
34
 
35
  if($current_version != $installed_version){
36
  //delete the old style system
37
  delete_option( 't-minus_styles' );
38
  //add version check
39
+ update_option('t-minus_version', '2.2.11');
40
 
41
  //reset rockstar option
42
  delete_option( 'rockstar' );
43
  add_option('rockstar', '');
44
  }
45
+ $styles_arr = array("hoth","TIE-fighter","c-3po","c-3po-mini","carbonite","carbonite-responsive","carbonlite","darth","jedi", "sith");
46
  add_option('t-minus_styles', $styles_arr);
47
  $plugin_url = plugins_url() .'/'. dirname( plugin_basename(__FILE__) );
48
+ //wp_enqueue_script('jquery');
49
  if (is_admin() && $_SERVER["REQUEST_URI"] == '/wp-admin/widgets.php'){
50
  //jquery admin stuff
51
+ wp_register_script('tminus-admin-script', $plugin_url.'/js/jquery.collapse.js', array ('jquery'), '1.2' );
52
  wp_enqueue_script('tminus-admin-script');
53
 
 
 
 
54
  wp_register_style('colapse-admin-css', $plugin_url.'/admin/collapse-style.css', array (), '1.0' );
55
  wp_enqueue_style('colapse-admin-css');
56
 
60
  }
61
  else{
62
  //lwtCountdown script
63
+ wp_register_script('countdown-script', $plugin_url.'/js/jquery.t-countdown.js', array ('jquery'), '1.5' );
 
64
  wp_enqueue_script('countdown-script');
65
 
66
  //register all countdown styles for enqueue-as-needed
115
 
116
  $day = empty($instance['day']) ? 20 : apply_filters('widget_day', $instance['day']);
117
  $month = empty($instance['month']) ? 12 : apply_filters('widget_month', $instance['month']);
118
+ $year = empty($instance['year']) ? 2014 : apply_filters('widget_year', $instance['year']);
119
 
120
  $date = empty($instance['date']) ? $year.'-'.$month.'-'.$day : apply_filters('widget_date', $instance['date']);
121
  $hour = empty($instance['hour']) ? 20 : apply_filters('widget_hour', $instance['hour']);
328
  }
329
 
330
  /** Update */
331
+ /*
332
  function update($new_instance, $old_instance) {
333
  $instance = array_merge($old_instance, $new_instance);
334
  if($instance['isrockstar'] == 'rockstar'){
335
  update_option('rockstar', 'rockstar');
336
  }
337
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
338
  return array_map('mysql_real_escape_string', $instance);
339
  }
340
+ */
341
+
342
+ function update( $new_instance, $old_instance ) {
343
+ $instance = array_merge($old_instance, $new_instance);
344
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
345
+ if($instance['isrockstar'] == 'rockstar'){
346
+ update_option('rockstar', 'rockstar');
347
+ }
348
+ return $instance;
349
+ }
350
 
351
  /** Form */
352
  function form($instance) {
726
  );
727
  }
728
  else{
729
+ $tminus .= "<script language='javascript' type='text/javascript'>
 
730
  jQuery(document).ready(function() {
731
+ jQuery('#".$id."-dashboard').countDown({
732
  targetDate: {
733
+ 'day': ".$day.",
734
+ 'month': ".$month.",
735
+ 'year': ".$year.",
736
+ 'hour': ".$hour.",
737
+ 'min': ".$min.",
738
+ 'sec': ".$sec.",
739
+ 'localtime': '".$t."',
740
+ 'mysqltime': '".current_time('mysql')."'
741
  },
742
+ style: '".$style."',
743
+ launchtarget: '".$launchtarget."',
744
+ omitWeeks: ".$omitweeks;
745
+
746
+ if($content){
747
+ $tminus .= ", onComplete: function() {
748
  jQuery('#".$id."-".$launchtarget."').css({'width' : '".$launchwidth."', 'height' : '".$launchheight."'});
749
  jQuery('#".$id."-".$launchtarget."').html('".do_shortcode($content)."');
750
  }";
751
+ }
752
+ $tminus .= "});
753
  });
754
+ </script>";
 
755
  }
756
  return $tminus;
757
  }
css/sith/style.css ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*above the dashboard*/
2
+ .sith-tophtml,.sith-bothtml {
3
+ margin: 0 auto;
4
+ padding: 0;
5
+ text-align: center;
6
+ text-shadow: 3px 3px 4px #000;
7
+ color:#eee;
8
+ font-weight: bold;
9
+ font-size: 18px;
10
+ }
11
+ .sith-bothtml{
12
+ font-size: 24px;
13
+ }
14
+
15
+ /*above the dashboard*/
16
+ .sith-dashboard {
17
+ height: 60px;
18
+ width: 360px;
19
+ margin: auto;
20
+ background: transparent;
21
+ padding: 5px 5px 5px 0;
22
+ border:3px solid #222;
23
+ background: #4c4c4c; /* old browsers */
24
+ background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* firefox */
25
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* webkit */
26
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* ie */
27
+ -moz-border-radius: 10px; -webkit-border-radius:10px; border-radius: 10px;
28
+ -webkit-box-shadow: 4px 4px 5px #000; -moz-box-shadow: 4px 4px 5px #000;box-shadow: 4px 4px 5px #000;
29
+ }
30
+
31
+ .sith-dash {
32
+ width: 65px;
33
+ height: 50px;
34
+ float: left;
35
+ margin-left: 18px;
36
+ padding-left:5px;
37
+ position: relative;
38
+ color: #333;
39
+ border:1px solid #333;
40
+ -moz-border-radius: 5px; -webkit-border-radius:5px; border-radius: 5px;
41
+ background: #FFFFFF; /* old browsers */
42
+ background: -moz-linear-gradient(top, #FFFFFF 0%, #D6D6D6 52%, #C9C9C9 57%, #E5E5E5 100%); /* firefox */
43
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(52%,#D6D6D6), color-stop(57%,#C9C9C9), color-stop(100%,#E5E5E5)); /* webkit */
44
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#E5E5E5',GradientType=0 ); /* ie */
45
+ -webkit-box-shadow: 2px 2px 5px #000; -moz-box-shadow: 2px 2px 5px #000;box-shadow: 2px 2px 5px #000;
46
+ }
47
+
48
+ .sith-tripdash {
49
+ width: 93px;
50
+ height: 44px;
51
+ float: left;
52
+ margin-left: 2px;
53
+ padding-left: 10px;
54
+ padding-top: 5px;
55
+ position: relative;
56
+ color: #333;
57
+ }
58
+
59
+ .sith-weeks_dash, .sith-days_dash, .sith-minutes_dash, .sith-seconds_dash {
60
+ /* background: transparent url('images/dark_bg_dash.png') 0 0 no-repeat;*/
61
+ }
62
+
63
+ .sith-weeks_trip_dash, .sith-days_trip_dash {
64
+ /* background: transparent url('images/dark_bg_trip_dash.png') 0 0 no-repeat; */
65
+ }
66
+
67
+ .sith-hours_dash {
68
+ /*clear: left;*/
69
+ /* background: transparent url('images/dark_bg_dash.png') 0 0 no-repeat;*/
70
+ }
71
+
72
+ .sith-digit {
73
+ font: bold 30pt Verdana;
74
+ font-weight: bold;
75
+ float: left;
76
+ width: 30px;
77
+ text-align: center;
78
+ position: relative;
79
+ height: 50px;
80
+ text-shadow: 3px 3px 4px #aaa;
81
+ }
82
+
83
+ .sith-dash_title {
84
+ -webkit-transform: rotate(-90deg);
85
+ -moz-transform: rotate(-90deg);
86
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
87
+ display: block;
88
+ position: absolute;
89
+ left: -35px;
90
+ top: 16px;
91
+ left: -20px\9;
92
+ top: 0px\9;
93
+ width:50px;
94
+ color: #fff;
95
+ text-align: left;
96
+ font-size: 12px;
97
+ margin: 0;
98
+ }
js/jquery.collapse.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * jQuery Collapse-O-Matic for T-Minus v1.1
3
  * http://www.twinpictures.de/
4
  *
5
- * Copyright 2012, Twinpictures
6
  *
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
  * of this software and associated documentation files (the "Software"), to deal
@@ -34,7 +34,7 @@ jQuery(document).ready(function() {
34
  jQuery('#target-'+thisid).css('display', 'none');
35
  });
36
 
37
- jQuery('.collapseomatic').livequery('click', function(event) {
38
  //alert('phones ringin dude');
39
  jQuery(this).toggleClass('colomat-close');
40
  var id = jQuery(this).attr('id');
@@ -43,7 +43,7 @@ jQuery(document).ready(function() {
43
  });
44
  });
45
 
46
- jQuery('.rockstar').livequery('click', function(event) {
47
  //alert('phones ringin dude');
48
  var id = jQuery(this).attr('id');
49
  var key = jQuery(this).val();
1
  /*!
2
+ * jQuery Collapse-O-Matic for T-Minus v1.2
3
  * http://www.twinpictures.de/
4
  *
5
+ * Copyright 2014, Twinpictures
6
  *
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
  * of this software and associated documentation files (the "Software"), to deal
34
  jQuery('#target-'+thisid).css('display', 'none');
35
  });
36
 
37
+ jQuery(document).on('click', '.collapseomatic', function(event) {
38
  //alert('phones ringin dude');
39
  jQuery(this).toggleClass('colomat-close');
40
  var id = jQuery(this).attr('id');
43
  });
44
  });
45
 
46
+ jQuery(document).on('click', '.rockstar', function(event) {
47
  //alert('phones ringin dude');
48
  var id = jQuery(this).attr('id');
49
  var key = jQuery(this).val();
js/jquery.collapse.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(document).ready(function(){jQuery('.t-datepicker').datepicker({dateFormat:'yy-mm-dd'});jQuery('.collapseomatic:not(.colomat-close)').each(function(index){var thisid=jQuery(this).attr('id');jQuery('#target-'+thisid).css('display','none')});jQuery('.collapseomatic').livequery('click',function(event){jQuery(this).toggleClass('colomat-close');var id=jQuery(this).attr('id');jQuery('#target-'+id).slideToggle('fast',function(){})});jQuery('.rockstar').livequery('click',function(event){var id=jQuery(this).attr('id');var key=jQuery(this).val();jQuery('.isrockstar').each(function(){jQuery(this).val('Rockstar Features:')})})});
 
js/jquery.livequery.min.js DELETED
@@ -1,9 +0,0 @@
1
- /* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2
- * Dual licensed under the MIT (MIT_LICENSE.txt)
3
- * and GPL Version 2 (GPL_LICENSE.txt) licenses.
4
- *
5
- * Version: 1.1.1
6
- * Requires jQuery 1.3+
7
- * Docs: http://docs.jquery.com/Plugins/livequery
8
- */
9
- (function(a){a.extend(a.fn,{livequery:function(e,d,c){var b=this,f;if(a.isFunction(e)){c=d,d=e,e=undefined}a.each(a.livequery.queries,function(g,h){if(b.selector==h.selector&&b.context==h.context&&e==h.type&&(!d||d.$lqguid==h.fn.$lqguid)&&(!c||c.$lqguid==h.fn2.$lqguid)){return(f=h)&&false}});f=f||new a.livequery(this.selector,this.context,e,d,c);f.stopped=false;f.run();return this},expire:function(e,d,c){var b=this;if(a.isFunction(e)){c=d,d=e,e=undefined}a.each(a.livequery.queries,function(f,g){if(b.selector==g.selector&&b.context==g.context&&(!e||e==g.type)&&(!d||d.$lqguid==g.fn.$lqguid)&&(!c||c.$lqguid==g.fn2.$lqguid)&&!this.stopped){a.livequery.stop(g.id)}});return this}});a.livequery=function(b,d,f,e,c){this.selector=b;this.context=d;this.type=f;this.fn=e;this.fn2=c;this.elements=[];this.stopped=false;this.id=a.livequery.queries.push(this)-1;e.$lqguid=e.$lqguid||a.livequery.guid++;if(c){c.$lqguid=c.$lqguid||a.livequery.guid++}return this};a.livequery.prototype={stop:function(){var b=this;if(this.type){this.elements.unbind(this.type,this.fn)}else{if(this.fn2){this.elements.each(function(c,d){b.fn2.apply(d)})}}this.elements=[];this.stopped=true},run:function(){if(this.stopped){return}var d=this;var e=this.elements,c=a(this.selector,this.context),b=c.not(e);this.elements=c;if(this.type){b.bind(this.type,this.fn);if(e.length>0){a.each(e,function(f,g){if(a.inArray(g,c)<0){a.event.remove(g,d.type,d.fn)}})}}else{b.each(function(){d.fn.apply(this)});if(this.fn2&&e.length>0){a.each(e,function(f,g){if(a.inArray(g,c)<0){d.fn2.apply(g)}})}}}};a.extend(a.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if(a.livequery.running&&a.livequery.queue.length){var b=a.livequery.queue.length;while(b--){a.livequery.queries[a.livequery.queue.shift()].run()}}},pause:function(){a.livequery.running=false},play:function(){a.livequery.running=true;a.livequery.run()},registerPlugin:function(){a.each(arguments,function(c,d){if(!a.fn[d]){return}var b=a.fn[d];a.fn[d]=function(){var e=b.apply(this,arguments);a.livequery.run();return e}})},run:function(b){if(b!=undefined){if(a.inArray(b,a.livequery.queue)<0){a.livequery.queue.push(b)}}else{a.each(a.livequery.queries,function(c){if(a.inArray(c,a.livequery.queue)<0){a.livequery.queue.push(c)}})}if(a.livequery.timeout){clearTimeout(a.livequery.timeout)}a.livequery.timeout=setTimeout(a.livequery.checkQueue,20)},stop:function(b){if(b!=undefined){a.livequery.queries[b].stop()}else{a.each(a.livequery.queries,function(c){a.livequery.queries[c].stop()})}}});a.livequery.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove","html");a(function(){a.livequery.play()})})(jQuery);
 
 
 
 
 
 
 
 
 
js/jquery.t-countdown.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * T- Countdown v1.4
3
  * http://plugins.twinpictures.de/plugins/t-minus-countdown/
4
  *
5
- * Copyright 2012, Twinpictures
6
  *
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
  * of this software and associated documentation files (the "Software"), to deal
1
  /*!
2
+ * T- Countdown v1.5
3
  * http://plugins.twinpictures.de/plugins/t-minus-countdown/
4
  *
5
+ * Copyright 2014, Twinpictures
6
  *
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
  * of this software and associated documentation files (the "Software"), to deal
js/jquery.t-countdown.min.js DELETED
@@ -1 +0,0 @@
1
- (function($){$.fn.countDown=function(options){config={};$.extend(config,options);diffSecs=this.setCountDown(config);before=new Date();$.data($(this)[0],'before',before);$.data($(this)[0],'status','play');style=config.style;$.data($(this)[0],'style',config.style);if(config.launchtarget){$.data($(this)[0],'launchtarget',config.launchtarget)}if(config.onComplete){$.data($(this)[0],'callback',config.onComplete)}if(config.hangtime){$.data($(this)[0],'hangtime',config.hangtime)}if(config.omitWeeks){$.data($(this)[0],'omitWeeks',config.omitWeeks)}$('#'+$(this).attr('id')+' .'+style+'-digit').html('<div class="top"></div><div class="bottom"></div>');$(this).doCountDown($(this).attr('id'),diffSecs,500);return this};$.fn.stopCountDown=function(){$.data(this[0],'status','stop')};$.fn.startCountDown=function(){$.data(this[0],'status','play');this.doCountDown($(this).attr('id'),$.data(this[0],'diffSecs'),500)};$.fn.setCountDown=function(options){var targetTime=new Date();if(options.targetDate){targetTime=new Date(options.targetDate.month+'/'+options.targetDate.day+'/'+options.targetDate.year+' '+options.targetDate.hour+':'+options.targetDate.min+':'+options.targetDate.sec+(options.targetDate.utc?' UTC':''))}else if(options.targetOffset){targetTime.setFullYear(options.targetOffset.year+targetTime.getFullYear());targetTime.setMonth(options.targetOffset.month+targetTime.getMonth());targetTime.setDate(options.targetOffset.day+targetTime.getDate());targetTime.setHours(options.targetOffset.hour+targetTime.getHours());targetTime.setMinutes(options.targetOffset.min+targetTime.getMinutes());targetTime.setSeconds(options.targetOffset.sec+targetTime.getSeconds())}var nowTime=new Date(options.targetDate.localtime);diffSecs=Math.floor((targetTime.valueOf()-nowTime.valueOf())/1000);$.data(this[0],'diffSecs',diffSecs);return diffSecs};$.fn.doCountDown=function(id,diffSecs,duration){$this=$('#'+id);if(diffSecs<=0){if($.data($this[0],'launchtarget')!='countup'){diffSecs=0;$.data($this[0],'status','stop')}}secs=Math.abs(diffSecs%60);mins=Math.floor(Math.abs(diffSecs/60)%60);hours=Math.floor(Math.abs(diffSecs/60/60)%24);if($.data($this[0],'omitWeeks')==true){days=Math.floor(Math.abs(diffSecs/60/60/24));weeks=Math.floor(Math.abs(diffSecs/60/60/24/7))}else{days=Math.floor(Math.abs(diffSecs/60/60/24)%7);weeks=Math.floor(Math.abs(diffSecs/60/60/24/7))}style=$.data($this[0],'style');$this.dashChangeTo(id,style+'-seconds_dash',secs,duration?duration:500);$this.dashChangeTo(id,style+'-minutes_dash',mins,duration?duration:1000);$this.dashChangeTo(id,style+'-hours_dash',hours,duration?duration:1000);$this.dashChangeTo(id,style+'-days_dash',days,duration?duration:1000);$this.dashChangeTo(id,style+'-days_trip_dash',days,duration?duration:1000);$this.dashChangeTo(id,style+'-weeks_dash',weeks,duration?duration:1000);$this.dashChangeTo(id,style+'-weeks_trip_dash',weeks,duration?duration:1000);$.data($this[0],'diffSecs',diffSecs);if(diffSecs>0||$.data($this[0],'launchtarget')=='countup'){if($.data($this[0],'status')=='play'){var delta=0;delay=1000;now=new Date();before=$.data($this[0],'before');elapsedTime=(now.getTime()-before.getTime());if(elapsedTime>=delay+1000){delta+=Math.floor(1*(elapsedTime/delay))}else{delta=1}before=new Date();$.data($this[0],'before',before);e=$this;t=setTimeout(function(){e.doCountDown(id,diffSecs-delta)},1000)}}else if($.data($this[0],'callback')){if($.data($this[0],'hangtime')){}$.data($this[0],'callback')()}};$.fn.dashChangeTo=function(id,dash,n,duration){$this=$('#'+id);style=$.data($this[0],'style');for(var i=($this.find('.'+dash+' .'+style+'-digit').length-1);i>=0;i--){var d=n%10;n=(n-d)/10;$this.digitChangeTo('#'+$this.attr('id')+' .'+dash+' .'+style+'-digit:eq('+i+')',d,duration)}};$.fn.digitChangeTo=function(digit,n,duration){if(!duration){duration=500}if($(digit+' div.top').html()!=n+''){$(digit+' div.top').css({'display':'none'});$(digit+' div.top').html((n?n:'0')).stop(true,true).slideDown(duration);$(digit+' div.bottom').stop(true,true).animate({'height':''},duration,function(){$(digit+' div.bottom').html($(digit+' div.top').html());$(digit+' div.bottom').css({'display':'block','height':''});$(digit+' div.top').hide().slideUp(10)})}}})(jQuery);
 
readme.txt CHANGED
@@ -3,9 +3,9 @@
3
  Contributors: twinpictures, baden03
4
  Donate link: http://plugins.twinpictures.de/plugins/t-minus-countdown/
5
  Tags: countdown, timer, clock, ticker, widget, event, counter, count down, twinpictures, t minus, t-minus, plugin-oven, pluginoven, G2, spaceBros, littlewebtings, jQuery, javascript
6
- Requires at least: 3.3
7
- Tested up to: 3.6-beta
8
- Stable tag: 2.2.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -13,7 +13,7 @@ T(-) Countdown will display a highly customizable, flash-free countdown timer as
13
 
14
  == Description ==
15
 
16
- T(-) Countdown will display a highly customizable jQuery countdown timer as a sidebar widget or in a post or page using a shortcode. Perfect for informing one's website visitors of an upcoming event, such as a pending space voyage. Using Jedi Mind-tricks and CSS... but mostly CSS, the countdown timer is highly customizable for your viewing pleasure. A <a href='http://plugins.twinpictures.de/plugins/t-minus-countdown/documentation/'>complete listing of shortcode options</a> are available, as well as <a href='http://wordpress.org/support/plugin/jquery-t-countdown-widget'>free community</a> and <a href='http://plugins.twinpictures.de/plugins/t-minus-countdown/support/'>premium support</a>. This plug-in was inspired by littlewebthings' CountDown jQuery plugin. Intergalactic planetary thanks to g2.de, siliconstudio.com and be.net/arturex for the included css styles.
17
 
18
  == Installation ==
19
 
@@ -63,6 +63,11 @@ The Daily Show with John Stewart
63
 
64
  == Changelog ==
65
 
 
 
 
 
 
66
  = 2.2.10 =
67
  * only load jQuery datepicker and related css on widgets admin page
68
  * countup will switch to triple digits for numbers above 100
@@ -176,6 +181,12 @@ The Daily Show with John Stewart
176
 
177
  == Upgrade Notice ==
178
 
 
 
 
 
 
 
179
  = 2.2.10 =
180
  * jQuery datepicker and related css will only load when needed
181
  * countup will use triple digit class for numbers above 100
3
  Contributors: twinpictures, baden03
4
  Donate link: http://plugins.twinpictures.de/plugins/t-minus-countdown/
5
  Tags: countdown, timer, clock, ticker, widget, event, counter, count down, twinpictures, t minus, t-minus, plugin-oven, pluginoven, G2, spaceBros, littlewebtings, jQuery, javascript
6
+ Requires at least: 3.5
7
+ Tested up to: 3.8
8
+ Stable tag: 2.2.11
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
13
 
14
  == Description ==
15
 
16
+ T(-) Countdown will display a highly customizable jQuery countdown timer as a sidebar widget or in a post or page using a shortcode. Perfect for informing one's website visitors of an upcoming event, such as a pending space voyage. Using Jedi Mind-tricks and CSS... but mostly CSS, the countdown timer is highly customizable for your viewing pleasure. A <a href='http://plugins.twinpictures.de/plugins/t-minus-countdown/documentation/'>complete listing of shortcode options</a> are available, as well as <a href='http://wordpress.org/support/plugin/jquery-t-countdown-widget'>free community</a> support. This plug-in was inspired by littlewebthings' CountDown jQuery plugin. Intergalactic planetary thanks to g2.de, siliconstudio.com and be.net/arturex for the included css styles.
17
 
18
  == Installation ==
19
 
63
 
64
  == Changelog ==
65
 
66
+ = 2.2.11 =
67
+ * When setting jsplacment to inline, script is forced to print after countdown elements.
68
+ * Escape characters no longer converted in widget tile
69
+ * Fixed 'Top Scroll' issue: http://wordpress.org/support/topic/timer-working-but-top-scroll-feature-conflicting?replies=7
70
+
71
  = 2.2.10 =
72
  * only load jQuery datepicker and related css on widgets admin page
73
  * countup will switch to triple digits for numbers above 100
181
 
182
  == Upgrade Notice ==
183
 
184
+ = 2.2.11 =
185
+ * added new style: sith
186
+ * jsplacment inline improved
187
+ * Escape characters no longer converted in widget tile
188
+ * Fixed 'Top Scroll' issue
189
+
190
  = 2.2.10 =
191
  * jQuery datepicker and related css will only load when needed
192
  * countup will use triple digit class for numbers above 100