Version Description
- Fixed Simple Countdown type after expiration issue
- Fixed Simple Countdown type responsiveness issue
- Fixed Admin side live preview box dragable issue
- Fixed Simple Countdown And Subscription type issue
- Fixed Simple Countdown type dots font size issue
Download this release
Release Info
| Developer | adamskaat |
| Plugin | |
| Version | 2.0.5 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.4 to 2.0.5
- assets/css/simpleCountdown.css +8 -0
- assets/js/Admin.js +4 -2
- assets/js/YcdSimpleCountdown.js +43 -7
- classes/countdown/SimpleCountdown.php +4 -2
- config/config.php +6 -6
- countdown-builder.php +1 -1
- readme.txt +11 -1
assets/css/simpleCountdown.css
CHANGED
|
@@ -29,4 +29,12 @@
|
|
| 29 |
.ycd-simple-countdown-label {
|
| 30 |
font-size: 12px;
|
| 31 |
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 29 |
.ycd-simple-countdown-label {
|
| 30 |
font-size: 12px;
|
| 31 |
text-align: center;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.ycd-simple-content-wrapper {
|
| 35 |
+
white-space: nowrap;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.ycd-simple-container {
|
| 39 |
+
transform-origin: top left;
|
| 40 |
}
|
assets/js/Admin.js
CHANGED
|
@@ -452,8 +452,10 @@ YcdAdmin.prototype.livePreview = function() {
|
|
| 452 |
|
| 453 |
preview.draggable({
|
| 454 |
stop: function(e, ui) {
|
| 455 |
-
|
| 456 |
-
|
|
|
|
|
|
|
| 457 |
});
|
| 458 |
};
|
| 459 |
|
| 452 |
|
| 453 |
preview.draggable({
|
| 454 |
stop: function(e, ui) {
|
| 455 |
+
},
|
| 456 |
+
drag: function () {
|
| 457 |
+
jQuery('.ycd-live-preview').css({'right': 'inherit', 'bottom': 'inherit'})
|
| 458 |
+
}
|
| 459 |
});
|
| 460 |
};
|
| 461 |
|
assets/js/YcdSimpleCountdown.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
function YcdSimpleCountdown()
|
| 2 |
{
|
|
|
|
| 3 |
this.seconds = 0;
|
| 4 |
this.id = 0;
|
| 5 |
this.doubeleDigits = false;
|
|
@@ -35,6 +36,31 @@ YcdSimpleCountdown.prototype.init = function()
|
|
| 35 |
this.livePreview();
|
| 36 |
};
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
YcdSimpleCountdown.prototype.changeDate = function() {
|
| 39 |
var datePicker = jQuery('#ycd-date-time-picker');
|
| 40 |
if(!datePicker.length) {
|
|
@@ -235,6 +261,7 @@ YcdSimpleCountdown.prototype.render = function()
|
|
| 235 |
{
|
| 236 |
this.addTimeToClock();
|
| 237 |
this.countdown();
|
|
|
|
| 238 |
};
|
| 239 |
|
| 240 |
YcdSimpleCountdown.prototype.countdown = function()
|
|
@@ -242,6 +269,8 @@ YcdSimpleCountdown.prototype.countdown = function()
|
|
| 242 |
var unites = ['days', 'hours', 'minutes', 'seconds'];
|
| 243 |
var that = this;
|
| 244 |
var id = that.id;
|
|
|
|
|
|
|
| 245 |
var countdownWrapper = jQuery('.ycd-simple-wrapper-'+this.id);
|
| 246 |
var runCountdown = function() {
|
| 247 |
|
|
@@ -250,7 +279,12 @@ YcdSimpleCountdown.prototype.countdown = function()
|
|
| 250 |
|
| 251 |
// Find the distance between now and the count down date
|
| 252 |
var distance = that.seconds;
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
// Time calculations for days, hours, minutes and seconds
|
| 255 |
var unitesValues = {};
|
| 256 |
unitesValues.days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
|
@@ -267,13 +301,15 @@ YcdSimpleCountdown.prototype.countdown = function()
|
|
| 267 |
}
|
| 268 |
jQuery(selector).text(currentUniteValue);
|
| 269 |
}
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
that.
|
|
|
|
|
|
|
|
|
|
| 275 |
}
|
| 276 |
-
that.seconds -= 1000;
|
| 277 |
};
|
| 278 |
runCountdown();
|
| 279 |
|
| 1 |
function YcdSimpleCountdown()
|
| 2 |
{
|
| 3 |
+
this.countdownRun = true;
|
| 4 |
this.seconds = 0;
|
| 5 |
this.id = 0;
|
| 6 |
this.doubeleDigits = false;
|
| 36 |
this.livePreview();
|
| 37 |
};
|
| 38 |
|
| 39 |
+
YcdSimpleCountdown.prototype.responsive = function() {
|
| 40 |
+
var scale = function () {
|
| 41 |
+
jQuery('.ycd-simple-content-wrapper').each(function () {
|
| 42 |
+
var wrapperWidth = jQuery('.ycd-simple-mode-textUnderCountdown', this).get(0).scrollWidth;
|
| 43 |
+
var scaleDegree = jQuery(this).width()/wrapperWidth;
|
| 44 |
+
|
| 45 |
+
if(wrapperWidth > jQuery(this).width()) {
|
| 46 |
+
jQuery('.ycd-simple-container', this).css({
|
| 47 |
+
'transform': 'scale('+ scaleDegree +', '+scaleDegree+')'
|
| 48 |
+
});
|
| 49 |
+
}
|
| 50 |
+
else {
|
| 51 |
+
jQuery('.ycd-simple-container', this).css({
|
| 52 |
+
'transform': 'scale('+ 1 +', '+1+')'
|
| 53 |
+
});
|
| 54 |
+
}
|
| 55 |
+
});
|
| 56 |
+
};
|
| 57 |
+
|
| 58 |
+
scale();
|
| 59 |
+
jQuery(window).resize(function () {
|
| 60 |
+
scale();
|
| 61 |
+
})
|
| 62 |
+
};
|
| 63 |
+
|
| 64 |
YcdSimpleCountdown.prototype.changeDate = function() {
|
| 65 |
var datePicker = jQuery('#ycd-date-time-picker');
|
| 66 |
if(!datePicker.length) {
|
| 261 |
{
|
| 262 |
this.addTimeToClock();
|
| 263 |
this.countdown();
|
| 264 |
+
this.responsive();
|
| 265 |
};
|
| 266 |
|
| 267 |
YcdSimpleCountdown.prototype.countdown = function()
|
| 269 |
var unites = ['days', 'hours', 'minutes', 'seconds'];
|
| 270 |
var that = this;
|
| 271 |
var id = that.id;
|
| 272 |
+
var options = this.options;
|
| 273 |
+
|
| 274 |
var countdownWrapper = jQuery('.ycd-simple-wrapper-'+this.id);
|
| 275 |
var runCountdown = function() {
|
| 276 |
|
| 279 |
|
| 280 |
// Find the distance between now and the count down date
|
| 281 |
var distance = that.seconds;
|
| 282 |
+
// If the count down is finished, write some text
|
| 283 |
+
if (distance <= 0) {
|
| 284 |
+
clearInterval(x);
|
| 285 |
+
that.endBehavior(countdownWrapper, that.options);
|
| 286 |
+
return;
|
| 287 |
+
}
|
| 288 |
// Time calculations for days, hours, minutes and seconds
|
| 289 |
var unitesValues = {};
|
| 290 |
unitesValues.days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
| 301 |
}
|
| 302 |
jQuery(selector).text(currentUniteValue);
|
| 303 |
}
|
| 304 |
+
if (options['ycd-countdown-expire-behavior'] == 'countToUp' && that.seconds <= 1000) {
|
| 305 |
+
that.countdownRun = false;
|
| 306 |
+
}
|
| 307 |
+
if (!that.countdownRun) {
|
| 308 |
+
that.seconds += 1000;
|
| 309 |
+
}
|
| 310 |
+
else {
|
| 311 |
+
that.seconds -= 1000;
|
| 312 |
}
|
|
|
|
| 313 |
};
|
| 314 |
runCountdown();
|
| 315 |
|
classes/countdown/SimpleCountdown.php
CHANGED
|
@@ -86,7 +86,8 @@ class SimpleCountdown extends Countdown
|
|
| 86 |
ob_start();
|
| 87 |
?>
|
| 88 |
<style>
|
| 89 |
-
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-number
|
|
|
|
| 90 |
font-size: <?php echo $numberFontSize; ?>;
|
| 91 |
}
|
| 92 |
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-label {
|
|
@@ -190,7 +191,7 @@ class SimpleCountdown extends Countdown
|
|
| 190 |
$options = json_encode($options);
|
| 191 |
ob_start();
|
| 192 |
?>
|
| 193 |
-
<div class="ycd-countdown-wrapper ycd-simple-content-wrapper-<?php echo esc_attr($id); ?>">
|
| 194 |
<div class="ycd-simple-time ycd-simple-container ycd-simple-wrapper-<?php echo esc_attr($id); ?>" data-options='<?php echo $options; ?>' data-id="<?php echo esc_attr($id); ?>">
|
| 195 |
<?php echo $this->render(); ?>
|
| 196 |
</div>
|
|
@@ -198,6 +199,7 @@ class SimpleCountdown extends Countdown
|
|
| 198 |
<?php
|
| 199 |
$content = ob_get_contents();
|
| 200 |
ob_end_clean();
|
|
|
|
| 201 |
$content .= $this->getStyles();
|
| 202 |
|
| 203 |
return $content;
|
| 86 |
ob_start();
|
| 87 |
?>
|
| 88 |
<style>
|
| 89 |
+
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-number,
|
| 90 |
+
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-timer-dots {
|
| 91 |
font-size: <?php echo $numberFontSize; ?>;
|
| 92 |
}
|
| 93 |
.ycd-simple-content-wrapper-<?php echo $id; ?> .ycd-simple-countdown-label {
|
| 191 |
$options = json_encode($options);
|
| 192 |
ob_start();
|
| 193 |
?>
|
| 194 |
+
<div class="ycd-countdown-wrapper ycd-simple-content-wrapper ycd-simple-content-wrapper-<?php echo esc_attr($id); ?>">
|
| 195 |
<div class="ycd-simple-time ycd-simple-container ycd-simple-wrapper-<?php echo esc_attr($id); ?>" data-options='<?php echo $options; ?>' data-id="<?php echo esc_attr($id); ?>">
|
| 196 |
<?php echo $this->render(); ?>
|
| 197 |
</div>
|
| 199 |
<?php
|
| 200 |
$content = ob_get_contents();
|
| 201 |
ob_end_clean();
|
| 202 |
+
$content .= $this->additionalFunctionality();
|
| 203 |
$content .= $this->getStyles();
|
| 204 |
|
| 205 |
return $content;
|
config/config.php
CHANGED
|
@@ -74,8 +74,8 @@ class YcdCountdownConfig
|
|
| 74 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 75 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 76 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 77 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
| 78 |
-
self::addDefine('YCD_VERSION', 2.
|
| 79 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 80 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 81 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
|
@@ -83,13 +83,13 @@ class YcdCountdownConfig
|
|
| 83 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
| 84 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
| 85 |
|
| 86 |
-
$versionText = '2.0.
|
| 87 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
| 88 |
-
$versionText = '1.9.
|
| 89 |
}
|
| 90 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
| 91 |
-
self::addDefine('YCD_LAST_UPDATE', '
|
| 92 |
-
self::addDefine('YCD_NEXT_UPDATE', '
|
| 93 |
}
|
| 94 |
|
| 95 |
public static function displaySettings()
|
| 74 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 75 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 76 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 77 |
+
self::addDefine('YCD_VERSION_PRO', 1.92);
|
| 78 |
+
self::addDefine('YCD_VERSION', 2.06);
|
| 79 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 80 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 81 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
| 83 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
| 84 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
| 85 |
|
| 86 |
+
$versionText = '2.0.6';
|
| 87 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
| 88 |
+
$versionText = '1.9.2';
|
| 89 |
}
|
| 90 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
| 91 |
+
self::addDefine('YCD_LAST_UPDATE', 'April 17');
|
| 92 |
+
self::addDefine('YCD_NEXT_UPDATE', 'April 24');
|
| 93 |
}
|
| 94 |
|
| 95 |
public static function displaySettings()
|
countdown-builder.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/**
|
| 3 |
* Plugin Name: Countdown builder
|
| 4 |
* Description: The best countdown plugin by Adam skaat
|
| 5 |
-
* Version: 2.0.
|
| 6 |
* Author: Adam Skaat
|
| 7 |
* Author URI: https://edmonsoft.com/countdown
|
| 8 |
* License: GPLv2
|
| 2 |
/**
|
| 3 |
* Plugin Name: Countdown builder
|
| 4 |
* Description: The best countdown plugin by Adam skaat
|
| 5 |
+
* Version: 2.0.6
|
| 6 |
* Author: Adam Skaat
|
| 7 |
* Author URI: https://edmonsoft.com/countdown
|
| 8 |
* License: GPLv2
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: adamskaat
|
|
| 3 |
Tags: countdown, timer, countdown timer
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 5.7
|
| 6 |
-
Stable tag: 2.0.
|
| 7 |
Requires PHP: 5.3
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
@@ -67,6 +67,16 @@ Yes you can, we have Circle and Flipclock countdown popups.
|
|
| 67 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
| 68 |
|
| 69 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
= 2.0.4 =
|
| 71 |
* Multiple Simple countdowns dates confilict fixed
|
| 72 |
|
| 3 |
Tags: countdown, timer, countdown timer
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 5.7
|
| 6 |
+
Stable tag: 2.0.6
|
| 7 |
Requires PHP: 5.3
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
| 67 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
| 68 |
|
| 69 |
== Changelog ==
|
| 70 |
+
= 2.0.6 =
|
| 71 |
+
* Fixed Simple Countdown tyoe count up functionality
|
| 72 |
+
|
| 73 |
+
= 2.0.5 =
|
| 74 |
+
* Fixed Simple Countdown type after expiration issue
|
| 75 |
+
* Fixed Simple Countdown type responsiveness issue
|
| 76 |
+
* Fixed Admin side live preview box dragable issue
|
| 77 |
+
* Fixed Simple Countdown And Subscription type issue
|
| 78 |
+
* Fixed Simple Countdown type dots font size issue
|
| 79 |
+
|
| 80 |
= 2.0.4 =
|
| 81 |
* Multiple Simple countdowns dates confilict fixed
|
| 82 |
|
