mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-06-16 19:35:24 +02:00
Add voting statics to admin panel
This commit is contained in:
33
webapp/titanembeds/static/js/admin_voting.js
Normal file
33
webapp/titanembeds/static/js/admin_voting.js
Normal file
@ -0,0 +1,33 @@
|
||||
(function () {
|
||||
$('.timepicker').pickatime({
|
||||
default: 'now', // Set default time: 'now', '1:30AM', '16:30'
|
||||
fromnow: 0, // set default time to * milliseconds from now (using with default = 'now')
|
||||
twelvehour: true, // Use AM/PM or 24-hour format
|
||||
donetext: 'OK', // text for done-button
|
||||
cleartext: 'Clear', // text for clear-button
|
||||
canceltext: 'Cancel', // Text for cancel-button
|
||||
autoclose: true, // automatic close timepicker
|
||||
ampmclickable: true, // make AM PM clickable
|
||||
aftershow: function(){} //Function for after opening timepicker
|
||||
});
|
||||
|
||||
$('.datepicker').pickadate({
|
||||
selectMonths: true, // Creates a dropdown to control month
|
||||
selectYears: 15, // Creates a dropdown of 15 years to control year,
|
||||
today: 'Today',
|
||||
clear: 'Clear',
|
||||
close: 'Ok',
|
||||
closeOnSelect: true // Close upon selecting a date,
|
||||
});
|
||||
|
||||
$("#submit").click(function () {
|
||||
var params = {
|
||||
datestart: $("#datestart").val(),
|
||||
timestart: $("#timestart").val(),
|
||||
dateend: $("#dateend").val(),
|
||||
timeend: $("#timeend").val()
|
||||
}
|
||||
var formatted = $.param( params );
|
||||
location.assign("/admin/voting?" + formatted);
|
||||
});
|
||||
})();
|
Reference in New Issue
Block a user