This commit is contained in:
Pierre 2022-12-29 19:51:47 +01:00
parent 5ccb68f6f3
commit 4c5c68528b
4 changed files with 26 additions and 18 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Countdown
Le plugin propose un widget qui affiche un compte à rebours vers une date à venir ou un chronomètre vers une date passée.
Documentation
L'affichage dynamique utilise le plugin jQuery Countdown (http://keith-wood.name/countdown.html) qui propose une syntaxe riche pour le formatage (http://keith-wood.name/countdownRef.html#format) et l'affichage (http://keith-wood.name/countdownRef.html#layout).

View File

@ -22,16 +22,17 @@
if (!defined('DC_RC_PATH')) {return;}
$this->registerModule(
/* Name */ "CountDown",
/* Description*/ "Countdown and stopwatch",
/* Author */ "Moe (http://gniark.net/), Pierre Van Glabeke",
/* Version */ '1.6',
/* Properties */
array(
'permissions' => 'admin',
'CountDown',
'Countdown and stopwatch',
'Moe (http://gniark.net/), Pierre Van Glabeke',
'2.0.0',
[
'requires' => [['core', '2.24']],
'permissions' => dcCore::app()->auth->makePermissions([
dcAuth::PERMISSION_ADMIN,
]),
'type' => 'plugin',
'dc_min' => '2.24',
'support' => 'http://lab.dotclear.org/wiki/plugin/countdown',
'support' => 'https://forum.dotclear.org/viewforum.php?id=16',
'details' => 'http://plugins.dotaddict.org/dc2/details/countdown'
)
]
);

View File

@ -223,12 +223,12 @@ class CountDownBehaviors
else
{
# dynamic display with Countdown for jQuery
if (!is_numeric($GLOBALS['_ctx']->countdown))
if (!is_numeric(dcCore::app()->ctx->countdown))
{
$GLOBALS['_ctx']->countdown = 0;
dcCore::app()->ctx->countdown = 0;
}
$id = $GLOBALS['_ctx']->countdown;
$GLOBALS['_ctx']->countdown += 1;
$id = dcCore::app()->ctx->countdown;
dcCore::app()->ctx->countdown += 1;
$script = '';

View File

@ -1,4 +1,4 @@
v1.6 - 20-12-2022 - Pierre Van Glabeke
v1.6 - 28-12-2022 - Pierre Van Glabeke
* màj partielle dc2.24
v1.5 - 29-07-2016 - Pierre Van Glabeke