Version Description
- Circle Countdown switch Number And Text (new)
Download this release
Release Info
| Developer | adamskaat |
| Plugin | |
| Version | 1.6.6 |
| Comparing to | |
| See all releases | |
Code changes from version 1.6.5 to 1.6.6
- assets/js/Countdown.js +14 -0
- assets/js/TimeCircles.js +15 -5
- assets/views/cricleMainView.php +11 -0
- classes/countdown/CircleCountdown.php +1 -0
- config/config.php +2 -2
- config/optionsConfig.php +1 -0
- countdown-builder.php +1 -1
- readme.txt +4 -2
assets/js/Countdown.js
CHANGED
|
@@ -253,6 +253,7 @@ YcdCountdown.prototype.livePreview = function() {
|
|
| 253 |
this.changeCountsDirection();
|
| 254 |
this.changeBackgroundCircle();
|
| 255 |
this.changeDimension();
|
|
|
|
| 256 |
this.changeTimesStatus();
|
| 257 |
this.changeTimesText();
|
| 258 |
this.changeBackgroundImage();
|
|
@@ -549,6 +550,19 @@ YcdCountdown.prototype.changeBackgroundImage = function() {
|
|
| 549 |
});
|
| 550 |
};
|
| 551 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 552 |
YcdCountdown.prototype.changeTimesText = function() {
|
| 553 |
var times = jQuery('.js-ycd-time-text');
|
| 554 |
if(!times) {
|
| 253 |
this.changeCountsDirection();
|
| 254 |
this.changeBackgroundCircle();
|
| 255 |
this.changeDimension();
|
| 256 |
+
this.changeSwitchTextAndNumber();
|
| 257 |
this.changeTimesStatus();
|
| 258 |
this.changeTimesText();
|
| 259 |
this.changeBackgroundImage();
|
| 550 |
});
|
| 551 |
};
|
| 552 |
|
| 553 |
+
YcdCountdown.prototype.changeSwitchTextAndNumber = function () {
|
| 554 |
+
var switchNumber = jQuery('#ycd-countdown-switch-number');
|
| 555 |
+
if(!switchNumber) {
|
| 556 |
+
return false;
|
| 557 |
+
}
|
| 558 |
+
var that = this;
|
| 559 |
+
switchNumber.bind('change', function () {
|
| 560 |
+
var isChecked = jQuery(this).is(':checked');
|
| 561 |
+
that.changeOption('ycd-countdown-switch-number', isChecked);
|
| 562 |
+
that.build();
|
| 563 |
+
});
|
| 564 |
+
};
|
| 565 |
+
|
| 566 |
YcdCountdown.prototype.changeTimesText = function() {
|
| 567 |
var times = jQuery('.js-ycd-time-text');
|
| 568 |
if(!times) {
|
assets/js/TimeCircles.js
CHANGED
|
@@ -413,7 +413,7 @@
|
|
| 413 |
for (var key in this.data.text_elements) {
|
| 414 |
if (!this.config.time[key].show)
|
| 415 |
continue;
|
| 416 |
-
|
| 417 |
var textElement = $("<div>");
|
| 418 |
textElement.addClass('textDiv_' + key);
|
| 419 |
textElement.css("top", Math.round(0.35 * this.data.attributes.item_size));
|
|
@@ -421,15 +421,25 @@
|
|
| 421 |
textElement.css("width", this.data.attributes.item_size);
|
| 422 |
textElement.appendTo(this.container);
|
| 423 |
|
| 424 |
-
var
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 428 |
|
| 429 |
var numberElement = $("<span>");
|
| 430 |
numberElement.css("font-size", Math.round(this.config.number_size * this.data.attributes.item_size));
|
| 431 |
numberElement.appendTo(textElement);
|
| 432 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
this.data.text_elements[key] = numberElement;
|
| 434 |
}
|
| 435 |
|
| 413 |
for (var key in this.data.text_elements) {
|
| 414 |
if (!this.config.time[key].show)
|
| 415 |
continue;
|
| 416 |
+
|
| 417 |
var textElement = $("<div>");
|
| 418 |
textElement.addClass('textDiv_' + key);
|
| 419 |
textElement.css("top", Math.round(0.35 * this.data.attributes.item_size));
|
| 421 |
textElement.css("width", this.data.attributes.item_size);
|
| 422 |
textElement.appendTo(this.container);
|
| 423 |
|
| 424 |
+
var that = this;
|
| 425 |
+
var addTextElement = function () {
|
| 426 |
+
var headerElement = $("<h4>");
|
| 427 |
+
headerElement.text(that.config.time[key].text); // Options
|
| 428 |
+
headerElement.css("font-size", Math.round(that.config.text_size * that.data.attributes.item_size));
|
| 429 |
+
headerElement.appendTo(textElement);
|
| 430 |
+
};
|
| 431 |
+
if (!this.config['ycd-countdown-switch-number']) {
|
| 432 |
+
addTextElement();
|
| 433 |
+
}
|
| 434 |
|
| 435 |
var numberElement = $("<span>");
|
| 436 |
numberElement.css("font-size", Math.round(this.config.number_size * this.data.attributes.item_size));
|
| 437 |
numberElement.appendTo(textElement);
|
| 438 |
|
| 439 |
+
if (this.config['ycd-countdown-switch-number']) {
|
| 440 |
+
addTextElement()
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
this.data.text_elements[key] = numberElement;
|
| 444 |
}
|
| 445 |
|
assets/views/cricleMainView.php
CHANGED
|
@@ -570,6 +570,17 @@ if (YCD_PKG_VERSION > YCD_FREE_VERSION) {
|
|
| 570 |
</div>
|
| 571 |
</div>
|
| 572 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 573 |
<div class="row form-group">
|
| 574 |
<div class="col-md-5">
|
| 575 |
<label for="ycd-countdown-content-click" class="ycd-label-of-switch"><?php _e('Action on countdown content click', YCD_TEXT_DOMAIN); ?></label>
|
| 570 |
</div>
|
| 571 |
</div>
|
| 572 |
</div>
|
| 573 |
+
<div class="row form-group">
|
| 574 |
+
<div class="col-md-5">
|
| 575 |
+
<label for="ycd-countdown-content-click" class="ycd-label-of-switch"><?php _e('Switch Text And Number', YCD_TEXT_DOMAIN); ?></label>
|
| 576 |
+
</div>
|
| 577 |
+
<div class="col-md-7 ycd-circles-width-wrapper ycd-option-wrapper">
|
| 578 |
+
<label class="ycd-switch">
|
| 579 |
+
<input type="checkbox" id="ycd-countdown-switch-number" name="ycd-countdown-switch-number" class="js-ycd-countdown-switch-number" <?php echo $typeObj->getOptionValue('ycd-countdown-switch-number'); ?>>
|
| 580 |
+
<span class="ycd-slider ycd-round"></span>
|
| 581 |
+
</label>
|
| 582 |
+
</div>
|
| 583 |
+
</div>
|
| 584 |
<div class="row form-group">
|
| 585 |
<div class="col-md-5">
|
| 586 |
<label for="ycd-countdown-content-click" class="ycd-label-of-switch"><?php _e('Action on countdown content click', YCD_TEXT_DOMAIN); ?></label>
|
classes/countdown/CircleCountdown.php
CHANGED
|
@@ -95,6 +95,7 @@ class CircleCountdown extends Countdown {
|
|
| 95 |
$options['ycd-schedule-start-from'] = $this->getOptionValue('ycd-schedule-start-from');
|
| 96 |
$options['ycd-countdown-showing-limitation'] = $this->getOptionValue('ycd-countdown-showing-limitation');
|
| 97 |
$options['ycd-countdown-expiration-time'] = $this->getOptionValue('ycd-countdown-expiration-time');
|
|
|
|
| 98 |
|
| 99 |
$options['time'] = array(
|
| 100 |
'Years' => array(
|
| 95 |
$options['ycd-schedule-start-from'] = $this->getOptionValue('ycd-schedule-start-from');
|
| 96 |
$options['ycd-countdown-showing-limitation'] = $this->getOptionValue('ycd-countdown-showing-limitation');
|
| 97 |
$options['ycd-countdown-expiration-time'] = $this->getOptionValue('ycd-countdown-expiration-time');
|
| 98 |
+
$options['ycd-countdown-switch-number'] = $this->getOptionValue('ycd-countdown-switch-number');
|
| 99 |
|
| 100 |
$options['time'] = array(
|
| 101 |
'Years' => array(
|
config/config.php
CHANGED
|
@@ -63,8 +63,8 @@ class YcdCountdownConfig {
|
|
| 63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 66 |
-
self::addDefine('YCD_VERSION_PRO', 1.
|
| 67 |
-
self::addDefine('YCD_VERSION', 1.
|
| 68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
| 63 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
| 64 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
| 65 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
| 66 |
+
self::addDefine('YCD_VERSION_PRO', 1.52);
|
| 67 |
+
self::addDefine('YCD_VERSION', 1.66);
|
| 68 |
self::addDefine('YCD_FREE_VERSION', 1);
|
| 69 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
| 70 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
config/optionsConfig.php
CHANGED
|
@@ -216,6 +216,7 @@ class YcdCountdownOptionsConfig {
|
|
| 216 |
$options[] = array('name' => 'ycd-form-submit-color', 'type' => 'text', 'defaultValue' => __('#3274d1', YCD_TEXT_DOMAIN));
|
| 217 |
$options[] = array('name' => 'ycd-stick-countdown-font-size', 'type' => 'text', 'defaultValue' => __('25', YCD_TEXT_DOMAIN));
|
| 218 |
$options[] = array('name' => 'ycd-countdown-content-click', 'type' => 'checkbox', 'defaultValue' => '');
|
|
|
|
| 219 |
$options[] = array('name' => 'ycd-countdown-showing-limitation', 'type' => 'checkbox', 'defaultValue' => '');
|
| 220 |
$options[] = array('name' => 'ycd-countdown-expiration-time', 'type' => 'text', 'defaultValue' => '1');
|
| 221 |
$options[] = array('name' => 'ycd-countdown-showing-animation', 'type' => 'checkbox', 'defaultValue' => '');
|
| 216 |
$options[] = array('name' => 'ycd-form-submit-color', 'type' => 'text', 'defaultValue' => __('#3274d1', YCD_TEXT_DOMAIN));
|
| 217 |
$options[] = array('name' => 'ycd-stick-countdown-font-size', 'type' => 'text', 'defaultValue' => __('25', YCD_TEXT_DOMAIN));
|
| 218 |
$options[] = array('name' => 'ycd-countdown-content-click', 'type' => 'checkbox', 'defaultValue' => '');
|
| 219 |
+
$options[] = array('name' => 'ycd-countdown-switch-number', 'type' => 'checkbox', 'defaultValue' => '');
|
| 220 |
$options[] = array('name' => 'ycd-countdown-showing-limitation', 'type' => 'checkbox', 'defaultValue' => '');
|
| 221 |
$options[] = array('name' => 'ycd-countdown-expiration-time', 'type' => 'text', 'defaultValue' => '1');
|
| 222 |
$options[] = array('name' => 'ycd-countdown-showing-animation', 'type' => 'checkbox', 'defaultValue' => '');
|
countdown-builder.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/**
|
| 3 |
* Plugin Name: Countdown builder
|
| 4 |
* Description: The best countdown plugin
|
| 5 |
-
* Version: 1.6.
|
| 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
|
| 5 |
+
* Version: 1.6.6
|
| 6 |
* Author: Adam Skaat
|
| 7 |
* Author URI: https://edmonsoft.com/countdown
|
| 8 |
* License: GPLv2
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: adamskaat
|
| 3 |
Tags: countdown, timer, countdown timer
|
| 4 |
Requires at least: 3.8
|
| 5 |
-
Tested up to: 5.3
|
| 6 |
-
Stable tag: 1.6.
|
| 7 |
Requires PHP: 5.3
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
@@ -64,6 +64,8 @@ Yes you can, we have Circle and Flipclock countdown popups.
|
|
| 64 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
| 65 |
|
| 66 |
== Changelog ==
|
|
|
|
|
|
|
| 67 |
|
| 68 |
= 1.6.5 =
|
| 69 |
* Coming Soon add Countdown (new)
|
| 2 |
Contributors: adamskaat
|
| 3 |
Tags: countdown, timer, countdown timer
|
| 4 |
Requires at least: 3.8
|
| 5 |
+
Tested up to: 5.3.2
|
| 6 |
+
Stable tag: 1.6.6
|
| 7 |
Requires PHP: 5.3
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
| 64 |
You need to select the .zip file, there is no need to extract the zip file, just upload it.
|
| 65 |
|
| 66 |
== Changelog ==
|
| 67 |
+
= 1.6.6 =
|
| 68 |
+
* Circle Countdown switch Number And Text (new)
|
| 69 |
|
| 70 |
= 1.6.5 =
|
| 71 |
* Coming Soon add Countdown (new)
|
