Version Description
- Sticky Countdown Button close banner behavior
- Sticky countdown admin side improvement
Download this release
Release Info
Developer | adamskaat |
Plugin | Countdown, Coming Soon – Countdown & Clock |
Version | 2.1.5 |
Comparing to | |
See all releases |
Code changes from version 2.1.4 to 2.1.5
- assets/js/Sticky.js +18 -7
- assets/views/main/stickyMainView.php +16 -5
- config/config.php +6 -6
- countdown-builder.php +1 -1
- helpers/AdminHelper.php +12 -0
- readme.txt +6 -2
assets/js/Sticky.js
CHANGED
@@ -107,22 +107,29 @@ YcdSticky.prototype.initClose = function () {
|
|
107 |
if (!closeButton.length) {
|
108 |
return false;
|
109 |
}
|
|
|
110 |
|
111 |
closeButton.bind('click', function () {
|
112 |
var id = jQuery(this).parent().data('id');
|
113 |
-
|
114 |
-
|
115 |
-
if (currentHeader.length) {
|
116 |
-
currentHeader.hide();
|
117 |
-
jQuery(window).trigger('ycdStickyCountdownClose', [id]);
|
118 |
-
}
|
119 |
});
|
120 |
};
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
YcdSticky.prototype.buttonBehavior = function()
|
123 |
{
|
124 |
var header = jQuery('.ycd-sticky-header');
|
125 |
var settings = jQuery(header).data('settings');
|
|
|
|
|
126 |
jQuery('.ycd-sticky-button').bind('click', function (e) {
|
127 |
e.preventDefault();
|
128 |
var behavior = settings['ycd-sticky-expire-behavior'];
|
@@ -135,7 +142,7 @@ YcdSticky.prototype.buttonBehavior = function()
|
|
135 |
window.location = url;
|
136 |
}
|
137 |
}
|
138 |
-
if (behavior == 'copy') {
|
139 |
var textAreaId = 'ycd-copy-text-area-' + 1;
|
140 |
var value = settings['ycd-sticky-button-copy'];
|
141 |
var textArea = jQuery('<input>', {
|
@@ -154,6 +161,10 @@ YcdSticky.prototype.buttonBehavior = function()
|
|
154 |
alert(settings['ycd-sticky-alert-text']);
|
155 |
}
|
156 |
}
|
|
|
|
|
|
|
|
|
157 |
});
|
158 |
};
|
159 |
|
107 |
if (!closeButton.length) {
|
108 |
return false;
|
109 |
}
|
110 |
+
var that = this;
|
111 |
|
112 |
closeButton.bind('click', function () {
|
113 |
var id = jQuery(this).parent().data('id');
|
114 |
+
that.closeBannerById(id);
|
|
|
|
|
|
|
|
|
|
|
115 |
});
|
116 |
};
|
117 |
|
118 |
+
YcdSticky.prototype.closeBannerById = function (id) {
|
119 |
+
var currentHeader = jQuery('.ycd-sticky-header-'+id);
|
120 |
+
|
121 |
+
if (currentHeader.length) {
|
122 |
+
currentHeader.hide();
|
123 |
+
jQuery(window).trigger('ycdStickyCountdownClose', [id]);
|
124 |
+
}
|
125 |
+
};
|
126 |
+
|
127 |
YcdSticky.prototype.buttonBehavior = function()
|
128 |
{
|
129 |
var header = jQuery('.ycd-sticky-header');
|
130 |
var settings = jQuery(header).data('settings');
|
131 |
+
var that = this;
|
132 |
+
|
133 |
jQuery('.ycd-sticky-button').bind('click', function (e) {
|
134 |
e.preventDefault();
|
135 |
var behavior = settings['ycd-sticky-expire-behavior'];
|
142 |
window.location = url;
|
143 |
}
|
144 |
}
|
145 |
+
else if (behavior == 'copy') {
|
146 |
var textAreaId = 'ycd-copy-text-area-' + 1;
|
147 |
var value = settings['ycd-sticky-button-copy'];
|
148 |
var textArea = jQuery('<input>', {
|
161 |
alert(settings['ycd-sticky-alert-text']);
|
162 |
}
|
163 |
}
|
164 |
+
else if(behavior == 'closeBanner') {
|
165 |
+
that.closeBannerById(settings['id']);
|
166 |
+
}
|
167 |
+
|
168 |
});
|
169 |
};
|
170 |
|
assets/views/main/stickyMainView.php
CHANGED
@@ -54,11 +54,22 @@ $stickyExpiration = $defaultData['stickyButtonExpiration'];
|
|
54 |
</div>
|
55 |
</div>
|
56 |
</div>
|
57 |
-
<div class="
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</div>
|
63 |
<div id="ycd-sticky-expire-redirect-url" class="ycd-countdown-show-text ycd-sub-option ycd-hide">
|
64 |
<div class="row form-group">
|
54 |
</div>
|
55 |
</div>
|
56 |
</div>
|
57 |
+
<div class="row form-group">
|
58 |
+
<div class="col-md-6">
|
59 |
+
<label class="ycd-label-of-input" for="ycd-sticky-button-color"><?php _e('Button click behavior', YCD_TEXT_DOMAIN); ?></label>
|
60 |
+
</div>
|
61 |
+
<div class="col-md-5">
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
|
65 |
+
|
66 |
+
<div class="ycd-sub-option">
|
67 |
+
<div class="ycd-multichoice-wrapper">
|
68 |
+
<?php
|
69 |
+
$multipleChoiceButton = new MultipleChoiceButton($stickyExpiration, esc_attr($this->getOptionValue('ycd-sticky-expire-behavior')));
|
70 |
+
echo $multipleChoiceButton;
|
71 |
+
?>
|
72 |
+
</div>
|
73 |
</div>
|
74 |
<div id="ycd-sticky-expire-redirect-url" class="ycd-countdown-show-text ycd-sub-option ycd-hide">
|
75 |
<div class="row form-group">
|
config/config.php
CHANGED
@@ -75,8 +75,8 @@ class YcdCountdownConfig
|
|
75 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
76 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
77 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
78 |
-
self::addDefine('YCD_VERSION_PRO', 2.
|
79 |
-
self::addDefine('YCD_VERSION', 2.
|
80 |
self::addDefine('YCD_FREE_VERSION', 1);
|
81 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
82 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
@@ -84,13 +84,13 @@ class YcdCountdownConfig
|
|
84 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
85 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
86 |
|
87 |
-
$versionText = '2.1.
|
88 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
89 |
-
$versionText = '2.0.
|
90 |
}
|
91 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
92 |
-
self::addDefine('YCD_LAST_UPDATE', '
|
93 |
-
self::addDefine('YCD_NEXT_UPDATE', '
|
94 |
}
|
95 |
|
96 |
public static function displaySettings()
|
75 |
self::addDefine('YCD_CRON_REPEAT_INTERVAL', 1);
|
76 |
self::addDefine('YCD_AJAX_SUCCESS', 1);
|
77 |
self::addDefine('YCD_TABLE_LIMIT', 15);
|
78 |
+
self::addDefine('YCD_VERSION_PRO', 2.01);
|
79 |
+
self::addDefine('YCD_VERSION', 2.15);
|
80 |
self::addDefine('YCD_FREE_VERSION', 1);
|
81 |
self::addDefine('YCD_SILVER_VERSION', 2);
|
82 |
self::addDefine('YCD_GOLD_VERSION', 3);
|
84 |
self::addDefine('YCD_EXTENSION_VERSION', 99);
|
85 |
require_once(dirname(__FILE__).'/config-pkg.php');
|
86 |
|
87 |
+
$versionText = '2.1.5';
|
88 |
if (YCD_PKG_VERSION != YCD_FREE_VERSION) {
|
89 |
+
$versionText = '2.0.1';
|
90 |
}
|
91 |
self::addDefine('YCD_VERSION_TEXT', $versionText);
|
92 |
+
self::addDefine('YCD_LAST_UPDATE', 'Aug 16');
|
93 |
+
self::addDefine('YCD_NEXT_UPDATE', 'Aug 30');
|
94 |
}
|
95 |
|
96 |
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.1.
|
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.1.5
|
6 |
* Author: Adam Skaat
|
7 |
* Author URI: https://edmonsoft.com/countdown
|
8 |
* License: GPLv2
|
helpers/AdminHelper.php
CHANGED
@@ -654,6 +654,18 @@ class AdminHelper {
|
|
654 |
'label' => array(
|
655 |
'name' => __('Copy to clipboard', YCD_TEXT_DOMAIN)
|
656 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
657 |
)
|
658 |
)
|
659 |
);
|
654 |
'label' => array(
|
655 |
'name' => __('Copy to clipboard', YCD_TEXT_DOMAIN)
|
656 |
)
|
657 |
+
),
|
658 |
+
array(
|
659 |
+
'attr' => array(
|
660 |
+
'type' => 'radio',
|
661 |
+
'name' => 'ycd-sticky-expire-behavior',
|
662 |
+
'class' => 'ycd-sticky-expire-copy ycd-form-radio',
|
663 |
+
'data-attr-href' => '',
|
664 |
+
'value' => 'closeBanner'
|
665 |
+
),
|
666 |
+
'label' => array(
|
667 |
+
'name' => __('Close', YCD_TEXT_DOMAIN)
|
668 |
+
)
|
669 |
)
|
670 |
)
|
671 |
);
|
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.8
|
6 |
-
Stable tag: 2.1.
|
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,10 @@ 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.1.4 =
|
71 |
* Sticky button copy alert after copy
|
72 |
|
2 |
Contributors: adamskaat
|
3 |
Tags: countdown, timer, countdown timer
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 5.8.1
|
6 |
+
Stable tag: 2.1.5
|
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.1.5 =
|
71 |
+
* Sticky Countdown Button close banner behavior
|
72 |
+
* Sticky countdown admin side improvement
|
73 |
+
|
74 |
= 2.1.4 =
|
75 |
* Sticky button copy alert after copy
|
76 |
|