Actualización

This commit is contained in:
Xes
2025-04-10 12:49:05 +02:00
parent 4aff98e77b
commit 1cdd00920f
9151 changed files with 1800913 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/*!
* Minute Style Countdown
* Copyright (c) 2009 Eric Garside (http://eric.garside.name)
* Copyright (c) 2012 Chamilo
* Dual licensed under:
* MIT: http://www.opensource.org/licenses/mit-license.php
* GPLv3: http://www.opensource.org/licenses/gpl-3.0.html
*/
/* Near to 0 seconds should be red */
.time_warning_one {
background-color: #FB3A35;
}
.time_warning_two {
background-color: #FFD700;
}
#exercise_clock_warning {
z-index: 10000;
}

View File

@@ -0,0 +1,48 @@
/*!
* minute countdown renderer for epiclock
*
* Copyright (c) Eric Garside
* Copyright (c) Chamilo team
* Dual licensed under:
* MIT: http://www.opensource.org/licenses/mit-license.php
* GPLv3: http://www.opensource.org/licenses/gpl-3.0.html
*/
"use strict";
/*global window, jQuery */
/*jslint white: true, browser: true, onevar: true, undef: true, eqeqeq: true, bitwise: true, regexp: true, strict: true, newcap: true, immed: true, maxerr: 50, indent: 4 */
(function ($) {
//constants
var epClock; // clock object
// Setup
$.epiclock.addRenderer('minute', function (element, value)
{
var currentTime = new Date().valueOf();
var dist = epClock.time+epClock.__offset - currentTime;
//Sets the value to the clock very important!
element.text(value);
var div_clock = $('#exercise_clock_warning');
// 60000 = 60 seconds
if (dist <= 300000) { //5min
if (!(div_clock.hasClass('time_warning_two'))) {
div_clock.addClass('time_warning_two');
}
}
if (dist <= 120000) { //2min
div_clock.removeClass('time_warning_two');
if (!(div_clock.hasClass('time_warning_one'))) {
div_clock.addClass('time_warning_one');
}
}
},
function ()
{
epClock = this;
});
}(jQuery));