timer workin, probz to rylon!
This commit is contained in:
parent
7c9fa6bcb8
commit
12a0879d67
50
lib/bootstrap/css/bootstrap.css
vendored
50
lib/bootstrap/css/bootstrap.css
vendored
@ -3540,57 +3540,7 @@ input[type="button"].btn-block {
|
||||
background-color: #222222;
|
||||
*background-color: #151515;
|
||||
}
|
||||
/*custom_button------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
.btn-green {
|
||||
background-color: hsl(97, 69%, 25%) !important;
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#68d326", endColorstr="#356b13");
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#68d326), to(#356b13));
|
||||
background-image: -moz-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: -ms-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #68d326), color-stop(100%, #356b13));
|
||||
background-image: -webkit-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: -o-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: linear-gradient(#68d326, #356b13);
|
||||
border-color: #356b13 #356b13 hsl(97, 69%, 19%);
|
||||
color: #fff !important;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.39);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.btn-red {
|
||||
background-color: hsl(0, 100%, 35%) !important;
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#fe2d2d", endColorstr="#b20000");
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#fe2d2d), to(#b20000));
|
||||
background-image: -moz-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: -ms-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fe2d2d), color-stop(100%, #b20000));
|
||||
background-image: -webkit-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: -o-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: linear-gradient(#fe2d2d, #b20000);
|
||||
border-color: #b20000 #b20000 hsl(0, 100%, 29%);
|
||||
color: #fff !important;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.39);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.btn-grey {
|
||||
background-color: hsl(70, 0%, 32%) !important;
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#999999", endColorstr="#515151");
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#999999), to(#515151));
|
||||
background-image: -moz-linear-gradient(top, #999999, #515151);
|
||||
background-image: -ms-linear-gradient(top, #999999, #515151);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #999999), color-stop(100%, #515151));
|
||||
background-image: -webkit-linear-gradient(top, #999999, #515151);
|
||||
background-image: -o-linear-gradient(top, #999999, #515151);
|
||||
background-image: linear-gradient(#999999, #515151);
|
||||
border-color: #515151 #515151 hsl(70, 0%, 25%);
|
||||
color: #fff !important;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.46);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
|
||||
.btn-inverse:active,
|
||||
|
||||
51
lib/custom/custom_buttons.css
Normal file
51
lib/custom/custom_buttons.css
Normal file
@ -0,0 +1,51 @@
|
||||
/*custom_button------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
.btn-green {
|
||||
background-color: hsl(97, 69%, 25%) !important;
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#68d326", endColorstr="#356b13");
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#68d326), to(#356b13));
|
||||
background-image: -moz-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: -ms-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #68d326), color-stop(100%, #356b13));
|
||||
background-image: -webkit-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: -o-linear-gradient(top, #68d326, #356b13);
|
||||
background-image: linear-gradient(#68d326, #356b13);
|
||||
border-color: #356b13 #356b13 hsl(97, 69%, 19%);
|
||||
color: #fff !important;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.39);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.btn-red {
|
||||
background-color: hsl(0, 100%, 35%) !important;
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#fe2d2d", endColorstr="#b20000");
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#fe2d2d), to(#b20000));
|
||||
background-image: -moz-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: -ms-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fe2d2d), color-stop(100%, #b20000));
|
||||
background-image: -webkit-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: -o-linear-gradient(top, #fe2d2d, #b20000);
|
||||
background-image: linear-gradient(#fe2d2d, #b20000);
|
||||
border-color: #b20000 #b20000 hsl(0, 100%, 29%);
|
||||
color: #fff !important;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.39);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.btn-grey {
|
||||
background-color: hsl(70, 0%, 32%) !important;
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#999999", endColorstr="#515151");
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#999999), to(#515151));
|
||||
background-image: -moz-linear-gradient(top, #999999, #515151);
|
||||
background-image: -ms-linear-gradient(top, #999999, #515151);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #999999), color-stop(100%, #515151));
|
||||
background-image: -webkit-linear-gradient(top, #999999, #515151);
|
||||
background-image: -o-linear-gradient(top, #999999, #515151);
|
||||
background-image: linear-gradient(#999999, #515151);
|
||||
border-color: #515151 #515151 hsl(70, 0%, 25%);
|
||||
color: #fff !important;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.46);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
12
lib/jquery.countdown/Makefile
Normal file
12
lib/jquery.countdown/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
dist: all
|
||||
@echo Done
|
||||
|
||||
all:
|
||||
@echo Compiling coffee script
|
||||
coffee -c -o ./ coffee/*.coffee
|
||||
|
||||
watch:
|
||||
@echo Watch coffee script files
|
||||
coffee -w -o ./ coffee/*.coffee
|
||||
|
||||
.PHONY: dist all watch
|
||||
95
lib/jquery.countdown/Readme.md
Normal file
95
lib/jquery.countdown/Readme.md
Normal file
@ -0,0 +1,95 @@
|
||||
# countdown
|
||||
|
||||
countdown is a jQuery plugin to render countdowns. Instead of unicorns this plugin does not have any magic, but if you like countdowns to be rendered the way you want, this plugin might become your best friend.
|
||||
|
||||
## Uber simple setup
|
||||
|
||||
To use the countdown plugin you need to load the current version of jQuery (testet with 1.7.2) and the javascript file of the plugin.
|
||||
Just add the following lines to the `head` of your website:
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/path/to/jquery.countdown.js"></script>
|
||||
|
||||
Then you have to initialize the plugin with your desired configuration:
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('.yourCountdownContainer').countdown({
|
||||
date: "June 7, 2087 15:03:26"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Yep, it's easy like that! Enjoy the time you saved!
|
||||
|
||||
## Options
|
||||
|
||||
You can pass a set of these options to set a custom behaviour and look for the plugin.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Property (Type)</th>
|
||||
<th>Default</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>date</strong></td>
|
||||
<td>new Date("June 7, 2087 15:03:25")</td>
|
||||
<td>The end time of your fancy countdown. Pass either a date object or a string/integer that will be used to create a new Date object. <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date" target="_blank">Here</a> you can find all accepted formats of this value.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>refresh</strong></td>
|
||||
<td>1000</td>
|
||||
<td>Refresh rate in milliseconds or false to avoid automatic updates.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>render</strong></td>
|
||||
<td colspan="2">With the render option you can set a function to change the output of the plugin. This function is called in the scope of the plugin, so you can access the <code>leadingZeros</code> method to format numbers as well as public variables and methods. A literal object will be passed to this function as an argument, containing the remaining time parts (years, days, hours, min, sec).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>onEnd</strong></td>
|
||||
<td colspan="2">Callback function that is called when the end date is reached</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
## Public plugin methods
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>method(arguments)</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>leadingZeros</strong>(<em>number, [length = 2]</em>)</td>
|
||||
<td>Add leading zeros to a number.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>update</strong>(<em>newDate</em>)</td>
|
||||
<td>Update the end time. The possible formats of the argument <code>newDate</code> are the same as described in the <code>date</code>-option above.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>render</strong>()</td>
|
||||
<td>Call the render method. This might be usefull if you set <code>refresh</code> to false.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>stop</strong>()</td>
|
||||
<td>Stops the refresh loop.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>start</strong>(<em>[refreshRate]</em>)</td>
|
||||
<td>Start the refresh loop. If you set a refresh rate in the options you can overwrite it with the argument <code>refreshRate</code>. If you don't pass an argument, the old value or the default value of 1 sec will be used.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Changelog
|
||||
|
||||
### Version 1.0.1 - <small>May 01, 2013</small>
|
||||
* Added callback function when the end date is reached
|
||||
|
||||
### Version 1.0.0 - <small>Aug 05, 2012</small>
|
||||
* Initial release
|
||||
|
||||
## License
|
||||
|
||||
`countdown` is dual licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) and [GPL-3.0](http://opensource.org/licenses/GPL-3.0) licenses.
|
||||
110
lib/jquery.countdown/coffee/jquery.countdown.coffee
Normal file
110
lib/jquery.countdown/coffee/jquery.countdown.coffee
Normal file
@ -0,0 +1,110 @@
|
||||
###
|
||||
countdown is a simple jquery plugin for countdowns
|
||||
|
||||
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
and GPL-3.0 (http://opensource.org/licenses/GPL-3.0) licenses.
|
||||
|
||||
@source: http://github.com/rendro/countdown/
|
||||
@autor: Robert Fleischmann
|
||||
@version: 1.0.1
|
||||
###
|
||||
|
||||
(($) ->
|
||||
$.countdown = (el, options) ->
|
||||
|
||||
@el = el
|
||||
@$el = $ el
|
||||
@$el.data "countdown", @
|
||||
|
||||
@init = =>
|
||||
@options = $.extend {}, $.countdown.defaultOptions, options
|
||||
if @options.refresh
|
||||
@interval = setInterval =>
|
||||
@render()
|
||||
, @options.refresh
|
||||
@render()
|
||||
@
|
||||
|
||||
getDateData = (endDate) =>
|
||||
endDate = Date.parse if $.isPlainObject @options.date then @options.date else new Date @options.date
|
||||
diff = (endDate - Date.parse(new Date)) / 1000
|
||||
|
||||
if diff <= 0
|
||||
diff = 0
|
||||
@stop() if @interval
|
||||
@options.onEnd.apply @
|
||||
|
||||
dateData = {
|
||||
years: 0
|
||||
days: 0
|
||||
hours: 0
|
||||
min: 0
|
||||
sec: 0
|
||||
millisec: 0
|
||||
}
|
||||
|
||||
if diff >= (365.25 * 86400)
|
||||
dateData.years = Math.floor diff / (365.25 * 86400)
|
||||
diff -= dateData.years * 365.25 * 86400
|
||||
|
||||
if diff >= 86400
|
||||
dateData.days = Math.floor diff / 86400
|
||||
diff -= dateData.days * 86400
|
||||
|
||||
if diff >= 3600
|
||||
dateData.hours = Math.floor diff / 3600
|
||||
diff -= dateData.hours * 3600
|
||||
|
||||
if diff >= 60
|
||||
dateData.min = Math.floor diff / 60
|
||||
diff -= dateData.min * 60
|
||||
|
||||
dateData.sec = diff
|
||||
|
||||
dateData
|
||||
|
||||
@leadingZeros = (num, length = 2) =>
|
||||
num = String num
|
||||
num = "0#{num}" while num.length < length
|
||||
num
|
||||
|
||||
@update = (newDate) =>
|
||||
@options.date = newDate
|
||||
@
|
||||
|
||||
@render = =>
|
||||
@options.render.apply @, [getDateData @options.date]
|
||||
@
|
||||
|
||||
@stop = =>
|
||||
clearInterval @interval if @interval
|
||||
@interval = null
|
||||
@
|
||||
|
||||
@start = (refresh = @options.refresh or $.countdown.defaultOptions.refresh) =>
|
||||
clearInterval @interval if @interval
|
||||
@render()
|
||||
@options.refresh = refresh
|
||||
@interval = setInterval =>
|
||||
@render()
|
||||
, @options.refresh
|
||||
@
|
||||
|
||||
@init()
|
||||
|
||||
$.countdown.defaultOptions =
|
||||
date: "June 7, 2087 15:03:25"
|
||||
refresh: 1000
|
||||
onEnd: $.noop
|
||||
render: (date) ->
|
||||
$(@el).html "#{date.years} years, #{date.days} days, #{@leadingZeros date.hours} hours, #{@leadingZeros date.min} min and #{@leadingZeros date.sec} sec"
|
||||
|
||||
$.fn.countdown = (options) ->
|
||||
$.each @, (i, el) ->
|
||||
$el = ($ el)
|
||||
|
||||
unless $el.data 'countdown'
|
||||
$el.data 'countdown', new $.countdown el, options
|
||||
|
||||
undefined
|
||||
)(jQuery)
|
||||
54
lib/jquery.countdown/examples/index.html
Normal file
54
lib/jquery.countdown/examples/index.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Countdown</title>
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../jquery.countdown.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="style.css" media="screen">
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var endDate = "June 7, 2087 15:03:25";
|
||||
|
||||
$('.countdown.simple').countdown({ date: endDate });
|
||||
|
||||
$('.countdown.styled').countdown({
|
||||
date: endDate,
|
||||
render: function(data) {
|
||||
$(this.el).html("<div>" + this.leadingZeros(data.years, 4) + " <span>years</span></div><div>" + this.leadingZeros(data.days, 3) + " <span>days</span></div><div>" + this.leadingZeros(data.hours, 2) + " <span>hrs</span></div><div>" + this.leadingZeros(data.min, 2) + " <span>min</span></div><div>" + this.leadingZeros(data.sec, 2) + " <span>sec</span></div>");
|
||||
}
|
||||
});
|
||||
|
||||
$('.countdown.callback').countdown({
|
||||
date: +(new Date) + 10000,
|
||||
render: function(data) {
|
||||
$(this.el).text(this.leadingZeros(data.sec, 2) + " sec");
|
||||
},
|
||||
onEnd: function() {
|
||||
$(this.el).addClass('ended');
|
||||
}
|
||||
}).on("click", function() {
|
||||
$(this).removeClass('ended').data('countdown').update(+(new Date) + 10000).start();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>COUNTDOWN</h1>
|
||||
|
||||
<h2>Simple text countdown</h2>
|
||||
<div class="countdown simple"></div>
|
||||
|
||||
<h2>Styled output</h2>
|
||||
<div class="countdown styled"></div>
|
||||
|
||||
<h2>Countdown with callback</h2>
|
||||
<p>Click on the green box to reset the counter to 10 sec.</p>
|
||||
<div class="countdown callback"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
72
lib/jquery.countdown/examples/style.css
Normal file
72
lib/jquery.countdown/examples/style.css
Normal file
@ -0,0 +1,72 @@
|
||||
body {
|
||||
font: 13px/1.4 'Helvetica Neue', 'Helvetica','Arial', sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
.container {
|
||||
width: 520px;
|
||||
margin: auto;
|
||||
}
|
||||
h1 {
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
h2{
|
||||
position: relative;;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
h2:before{
|
||||
content: '\2192';
|
||||
position: absolute;
|
||||
left: -20px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
a {
|
||||
color: #be2221;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.callback,
|
||||
.simple {
|
||||
font-size: 20px;
|
||||
background: #27ae60;
|
||||
padding: 0.5em 0.7em;
|
||||
color: #ecf0f1;
|
||||
margin-bottom: 50px;
|
||||
-webkit-transition: background 0.5s ease-out;
|
||||
transition: background 0.5s ease-out;
|
||||
}
|
||||
.callback{
|
||||
cursor: pointer;
|
||||
}
|
||||
.ended {
|
||||
background: #c0392b;
|
||||
}
|
||||
.styled{
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.styled div {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
font-size: 30px;
|
||||
font-weight: 100;
|
||||
line-height: 1;
|
||||
text-align: right;
|
||||
}
|
||||
/* IE7 inline-block hack */
|
||||
*+html .styled div{
|
||||
display: inline;
|
||||
zoom: 1;
|
||||
}
|
||||
.styled div:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
.styled div span {
|
||||
display: block;
|
||||
border-top: 1px solid #cecece;
|
||||
padding-top: 3px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
text-transform: uppercase;
|
||||
text-align: left;
|
||||
}
|
||||
133
lib/jquery.countdown/jquery.countdown.js
Normal file
133
lib/jquery.countdown/jquery.countdown.js
Normal file
@ -0,0 +1,133 @@
|
||||
// Generated by CoffeeScript 1.4.0
|
||||
|
||||
/*
|
||||
countdown is a simple jquery plugin for countdowns
|
||||
|
||||
Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
and GPL-3.0 (http://opensource.org/licenses/GPL-3.0) licenses.
|
||||
|
||||
@source: http://github.com/rendro/countdown/
|
||||
@autor: Robert Fleischmann
|
||||
@version: 1.0.1
|
||||
*/
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
(function($) {
|
||||
$.countdown = function(el, options) {
|
||||
var getDateData,
|
||||
_this = this;
|
||||
this.el = el;
|
||||
this.$el = $(el);
|
||||
this.$el.data("countdown", this);
|
||||
this.init = function() {
|
||||
_this.options = $.extend({}, $.countdown.defaultOptions, options);
|
||||
if (_this.options.refresh) {
|
||||
_this.interval = setInterval(function() {
|
||||
return _this.render();
|
||||
}, _this.options.refresh);
|
||||
}
|
||||
_this.render();
|
||||
return _this;
|
||||
};
|
||||
getDateData = function(endDate) {
|
||||
var dateData, diff;
|
||||
endDate = Date.parse($.isPlainObject(_this.options.date) ? _this.options.date : new Date(_this.options.date));
|
||||
diff = (endDate - Date.parse(new Date)) / 1000;
|
||||
if (diff <= 0) {
|
||||
diff = 0;
|
||||
if (_this.interval) {
|
||||
_this.stop();
|
||||
}
|
||||
_this.options.onEnd.apply(_this);
|
||||
}
|
||||
dateData = {
|
||||
years: 0,
|
||||
days: 0,
|
||||
hours: 0,
|
||||
min: 0,
|
||||
sec: 0,
|
||||
millisec: 0
|
||||
};
|
||||
if (diff >= (365.25 * 86400)) {
|
||||
dateData.years = Math.floor(diff / (365.25 * 86400));
|
||||
diff -= dateData.years * 365.25 * 86400;
|
||||
}
|
||||
if (diff >= 86400) {
|
||||
dateData.days = Math.floor(diff / 86400);
|
||||
diff -= dateData.days * 86400;
|
||||
}
|
||||
if (diff >= 3600) {
|
||||
dateData.hours = Math.floor(diff / 3600);
|
||||
diff -= dateData.hours * 3600;
|
||||
}
|
||||
if (diff >= 60) {
|
||||
dateData.min = Math.floor(diff / 60);
|
||||
diff -= dateData.min * 60;
|
||||
}
|
||||
dateData.sec = diff;
|
||||
return dateData;
|
||||
};
|
||||
this.leadingZeros = function(num, length) {
|
||||
if (length == null) {
|
||||
length = 2;
|
||||
}
|
||||
num = String(num);
|
||||
while (num.length < length) {
|
||||
num = "0" + num;
|
||||
}
|
||||
return num;
|
||||
};
|
||||
this.update = function(newDate) {
|
||||
_this.options.date = newDate;
|
||||
return _this;
|
||||
};
|
||||
this.render = function() {
|
||||
_this.options.render.apply(_this, [getDateData(_this.options.date)]);
|
||||
return _this;
|
||||
};
|
||||
this.stop = function() {
|
||||
if (_this.interval) {
|
||||
clearInterval(_this.interval);
|
||||
}
|
||||
_this.interval = null;
|
||||
return _this;
|
||||
};
|
||||
this.start = function(refresh) {
|
||||
if (refresh == null) {
|
||||
refresh = _this.options.refresh || $.countdown.defaultOptions.refresh;
|
||||
}
|
||||
if (_this.interval) {
|
||||
clearInterval(_this.interval);
|
||||
}
|
||||
_this.render();
|
||||
_this.options.refresh = refresh;
|
||||
_this.interval = setInterval(function() {
|
||||
return _this.render();
|
||||
}, _this.options.refresh);
|
||||
return _this;
|
||||
};
|
||||
return this.init();
|
||||
};
|
||||
$.countdown.defaultOptions = {
|
||||
date: "June 7, 2087 15:03:25",
|
||||
refresh: 1000,
|
||||
onEnd: $.noop,
|
||||
render: function(date) {
|
||||
return $(this.el).html("" + date.years + " years, " + date.days + " days, " + (this.leadingZeros(date.hours)) + " hours, " + (this.leadingZeros(date.min)) + " min and " + (this.leadingZeros(date.sec)) + " sec");
|
||||
}
|
||||
};
|
||||
$.fn.countdown = function(options) {
|
||||
return $.each(this, function(i, el) {
|
||||
var $el;
|
||||
$el = $(el);
|
||||
if (!$el.data('countdown')) {
|
||||
return $el.data('countdown', new $.countdown(el, options));
|
||||
}
|
||||
});
|
||||
};
|
||||
return void 0;
|
||||
})(jQuery);
|
||||
|
||||
}).call(this);
|
||||
File diff suppressed because one or more lines are too long
4
uVote/page/default_page/css/default_page.css
Normal file
4
uVote/page/default_page/css/default_page.css
Normal file
@ -0,0 +1,4 @@
|
||||
body {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
@ -7,11 +7,14 @@ class default_page extends SYSTEM\PAGE\Page {
|
||||
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PBOOTSTRAP(),'js/bootstrap.min.js').'"></script>'.
|
||||
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PVALIDATION(),'jqBootstrapValidation.js').'"></script>'.
|
||||
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PCRYPTOSHA(),'jquery.sha1.js').'"></script>'.
|
||||
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PCRYPTOSHA(),'jquery.md5.js').'"></script>'.
|
||||
// '<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/timer.js').'"></script>'.
|
||||
'<script type="text/javascript" language="JavaScript" src="'.SYSTEM\WEBPATH(new PLIB(),'jquery.countdown\jquery.countdown.js').'"></script>'.
|
||||
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/timer.js').'"></script>'.
|
||||
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/loadtexts.js').'"></script>';
|
||||
'<script src="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/js/account_create.js').'"></script>';
|
||||
}
|
||||
}
|
||||
|
||||
private function css(){
|
||||
return '<link href="'.SYSTEM\WEBPATH(new PPAGE(),'default_page\css\default_page.css').'" rel="stylesheet">';}
|
||||
|
||||
public function generate_votelist(){
|
||||
$result = "";
|
||||
@ -35,37 +38,12 @@ class default_page extends SYSTEM\PAGE\Page {
|
||||
|
||||
public function exchange_loginform(){
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/loggedinformtop.tpl'),array());}
|
||||
|
||||
//public function load_openvoteinfo(){
|
||||
// return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/openvoteinfo.tpl'),array());}
|
||||
|
||||
|
||||
// public function create_account(){
|
||||
// $result = "";
|
||||
// $accdata = data::getuserpersonaldata(1);
|
||||
// $vars = array('input')
|
||||
// return SYSTEM\SECURITY\Security::create($dbinfo, $username, $password, $email, $locale);}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function html(){
|
||||
//\SYSTEM\SECURITY\Security::available($dbinfo, $username) //account available
|
||||
//\SYSTEM\SECURITY\Security::check($dbinfo, $rightid) //recht prüfen
|
||||
//\SYSTEM\SECURITY\Security::create($dbinfo, $username, $password, $email, $locale) //account erstellen
|
||||
//\SYSTEM\SECURITY\Security::getUser() //nutzerinfos
|
||||
//\SYSTEM\SECURITY\Security::isLoggedIn() //ist eingeloggt?
|
||||
//\SYSTEM\SECURITY\Security::login($dbinfo, $username, $password_sha, $password_md5) //einloggen
|
||||
//\SYSTEM\SECURITY\Security::load($key) //wert aus session laden..
|
||||
//\SYSTEM\SECURITY\Security::save($key, $value) //wert in session speichern(nutzerbezogen, cookie)
|
||||
//\SYSTEM\SECURITY\Security::logout() //ausloggen
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars['js'] = $this->js();
|
||||
$vars['css'] = $this->css();
|
||||
$vars['votelist'] = $this->generate_votelist();
|
||||
// $vars['personaldata'] = $this->getuserpersonaldata();
|
||||
//$vars['openvoteinfo'] = $this->load_openvoteinfo();
|
||||
$vars['registerform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->getloggedinform() : $this->exchange_registerform();
|
||||
$vars['loginform'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? $this->exchange_loginform() : $this->getloginform() ;
|
||||
$vars['PIC_PATH'] = SYSTEM\WEBPATH(new PPAGE(),'default_page/pics/');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
function getuserpersonaldata()
|
||||
{
|
||||
var userInput = document.getElementById("userInput").value;
|
||||
document.write(userInput);
|
||||
}
|
||||
{
|
||||
var userInput = document.getElementById("userInput").value;
|
||||
document.write(userInput);
|
||||
}
|
||||
|
||||
|
||||
@ -1,53 +1,9 @@
|
||||
var jahr=2014, monat=01, tag=01, stunde=20, minute=00, sekunde=00;
|
||||
var zielDatum=new Date(jahr,monat-1,tag,stunde,minute,sekunde);
|
||||
|
||||
function count() {
|
||||
startDatum=new Date(); // Aktuelles Datum
|
||||
|
||||
if(startDatum<zielDatum) {
|
||||
|
||||
var jahre=0, monate=0, tage=0, stunden=0, minuten=0, sekunden=0;
|
||||
|
||||
while(startDatum<zielDatum) {
|
||||
jahre++;
|
||||
startDatum.setFullYear(startDatum.getFullYear()+1);
|
||||
}
|
||||
startDatum.setFullYear(startDatum.getFullYear()-1);
|
||||
jahre--;
|
||||
|
||||
while(startDatum<zielDatum) {
|
||||
monate++;
|
||||
startDatum.setMonth(startDatum.getMonth()+1);
|
||||
}
|
||||
startDatum.setMonth(startDatum.getMonth()-1);
|
||||
monate--;
|
||||
|
||||
while(startDatum.getTime()+(24*60*60*1000)<zielDatum) {
|
||||
tage++;
|
||||
startDatum.setTime(startDatum.getTime()+(24*60*60*1000));
|
||||
}
|
||||
|
||||
stunden=Math.floor((zielDatum-startDatum)/(60*60*1000));
|
||||
startDatum.setTime(startDatum.getTime()+stunden*60*60*1000);
|
||||
|
||||
minuten=Math.floor((zielDatum-startDatum)/(60*1000));
|
||||
startDatum.setTime(startDatum.getTime()+minuten*60*1000);
|
||||
|
||||
sekunden=Math.floor((zielDatum-startDatum)/1000);
|
||||
|
||||
(jahre!=1)?jahre=jahre+" Jahre, ":jahre=jahre+" Jahr, ";
|
||||
(monate!=1)?monate=monate+" Monate, ":monate=monate+" Monat, ";
|
||||
(tage!=1)?tage=tage+" Tage, ":tage=tage+" Tag, ";
|
||||
(stunden!=1)?stunden=stunden+" Stunden, ":stunden=stunden+" Stunde, ";
|
||||
(minuten!=1)?minuten=minuten+" Minuten und ":minuten=minuten+" Minute und ";
|
||||
if(sekunden<10) sekunden="0"+sekunden;
|
||||
(sekunden!=1)?sekunden=sekunden+" Sekunden":sekunden=sekunden+" Sekunde";
|
||||
|
||||
document.coolcccount.coolcc.value=
|
||||
jahre+monate+tage+stunden+minuten+sekunden;
|
||||
|
||||
setTimeout('count()',200);
|
||||
}
|
||||
else document.coolcccount.coolcc.value=
|
||||
"0 Jahre, 0 Monate, 0 Tage, 0 Stunden, 0 Minuten und 00 Sekunden";
|
||||
}
|
||||
$(function(){
|
||||
$('.countdown').countdown({
|
||||
date: "June 7, 2087 15:03:26",
|
||||
render: function(data) {
|
||||
$(this.el).text(this.leadingZeros(data.years, 4) + "j " + this.leadingZeros(data.days, 3) + "t " + this.leadingZeros(data.hours, 2) + "s " + this.leadingZeros(data.min, 2) + "m " + this.leadingZeros(data.sec, 2) + "s");
|
||||
$(this.el).parent().children('.countdownbar').width('70%');
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -1,37 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<title>iVote</title>
|
||||
<html>
|
||||
<head>
|
||||
<title>uVote</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
${js}
|
||||
|
||||
<!-- Le styles -->
|
||||
|
||||
<link href="lib/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="lib/custom/custom_buttons.css" rel="stylesheet">
|
||||
<link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 60px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
<link href="lib/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="../assets/js/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
${css}
|
||||
|
||||
${js}
|
||||
|
||||
<!-- Fav and touch icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
|
||||
<link rel="shortcut icon" href="../assets/ico/favicon.png">
|
||||
</head>
|
||||
|
||||
<body style="background-color: #f2f2f2;">
|
||||
@ -63,16 +48,16 @@
|
||||
|
||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||
<div id="site-content" style="padding: 0; margin: 0;">
|
||||
<div class="hero-unit" style="height: 180px; background: white; margin: 0; margin-top: -18px; -webkit-box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5); box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5);">
|
||||
<div class="row">
|
||||
<img src="${PIC_PATH}logo2.png" width="600" style="margin-top: -40px;" />
|
||||
<div class="hero-unit" style="margin: 0px; padding: 5px; float: right; margin-top: -61px; background-color: silver;">
|
||||
<div class="container" style="background: lightyellow; margin: 0; margin-top: -18px; -webkit-box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5); box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5);">
|
||||
|
||||
<img src="${PIC_PATH}logo2.png" width="600" style="margin-left: 20px;" />
|
||||
<div class="container" style="margin-right: 30px; float: right; width: 220px;">
|
||||
<!-- margin-left: 600px; margin-right: -60px; padding: 5px; margin-top: -240px;-->
|
||||
|
||||
${registerform}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <div class="hero-unit" style="height: 300px; padding: 5px; padding-top: 50px; width: 400px; margin-left: 700px; margin-top: -260px; background: white;">
|
||||
@ -89,14 +74,14 @@
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="navbar-inner" style="background: black;">
|
||||
|
||||
<div class="container" style="background: black; height: 40px; -webkit-box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5); box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5);">
|
||||
<form class="navbar-form pull-left">
|
||||
<input class="span2" type="password" placeholder="">
|
||||
<input class="span2" type="password" placeholder="" style="margin-left: 5px;">
|
||||
<button type="submit" class="btn" style="margin-top: 5px;">suchen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Example row of columns -->
|
||||
<div class="hero-unit" style="padding: 0px; padding-top: 5px">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<form class="form-vertical" id="form_register" style="padding: 0;">
|
||||
<form class="form-vertical" id="form_register" style="padding: 0; background: lightyellow">
|
||||
|
||||
<h3 style="margin-top: 0;" align="left">Accounterstellung</h3>
|
||||
|
||||
|
||||
@ -1,33 +1,29 @@
|
||||
<div class="hero-unit" style="padding: 5px; background: white; margin-bottom: 8px; -webkit-box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5);">
|
||||
<div class="hero-unit" style="padding: 5px; background: lightyellow; margin-bottom: 8px; -webkit-box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5); box-shadow: 1px 1px 4px 1px rgba(0, 0, 0, 0.5);">
|
||||
<div class="row" style="width: 100%; margin: 0; margin-top: 15px;">
|
||||
<button class="btn btn-mini btn_openvoteinfo" data-toggle="dropdown" poll_ID=${poll_ID} style="float: right;">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<div class="span6">
|
||||
<h3>${vote_title}</h3>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="span5" style="margin-top: 15px;">
|
||||
<a class="btn btn-large btn-green btnvote_yes" style="width: 110px;" poll_ID="${poll_ID}">Pro »
|
||||
|
||||
</a>
|
||||
|
||||
<a class="btn btn-large btn-green btnvote_yes" style="width: 110px;" poll_ID="${poll_ID}">Pro »</a>
|
||||
<a class="btn btn-large btn-red btnvote_no" style="width: 110px; background-color: red;" href="#" poll_ID="${poll_ID}">Contra »</a>
|
||||
<a class="btn btn-large btn-grey btnvote_off" style="width: 110px; background-color: grey;" href="#" poll_ID="${poll_ID}">Enthaltung »</a>
|
||||
|
||||
<!-- Countdown-Generator by www.coolplace.cc -->
|
||||
<form name="coolcccount">
|
||||
<input size="120" name="coolcc">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="progress">
|
||||
<div class="bar countdownbar" pollid="${poll_ID}" style="width: 0%;">
|
||||
</div>
|
||||
<div class="countdown"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span5" id="openvoteinfo${poll_ID}" style="margin: 0; display: none; width: 100%; margin-top: 15px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn dropdown-toggle btn_openvoteinfo" data-toggle="dropdown" poll_ID=${poll_ID} style="width: 100%; height: 15px; top: 0;">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
5
uVote/path/PLIB.php
Normal file
5
uVote/path/PLIB.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
class PLIB extends \SYSTEM\PATH {
|
||||
public static function getPath(){
|
||||
return \SYSTEM\C_ROOT.'lib/'.\SYSTEM\C_SUBPATH;}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user