Some JavaScript cleanups.

Adding some missing and remove some unnecessary semicolons.
Change some comparing operators.
Changed access to objects with dot operator.
This commit is contained in:
Klaus Weidenbach
2015-03-15 22:18:59 +01:00
parent fdcbb61bcb
commit 792e475a78
13 changed files with 1229 additions and 1315 deletions

View File

@@ -1,35 +1,34 @@
/**
* JavaScript for mod/events
*/
$(document).ready( function() { showHideFinishDate(); });
function showHideFinishDate() {
if( $('#id_nofinish').is(':checked'))
$('#event-finish-wrapper').hide();
else
$('#event-finish-wrapper').show();
}
function eventGetStart() {
//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
$('#startModal').modal();
$('#start-modal-OKButton').on('click', function() {
reply=$('#start-date').val();
if(reply && reply.length) {
function showHideFinishDate() {
if( $('#id_nofinish').is(':checked'))
$('#event-finish-wrapper').hide();
else
$('#event-finish-wrapper').show();
}
function eventGetStart() {
//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
$('#startModal').modal();
$('#start-modal-OKButton').on('click', function() {
reply=$('#start-date').val();
if(reply && reply.length) {
$('#start-text').val(reply);
$('#startModal').modal('hide');
}
})
}
function eventGetFinish() {
//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
$('#finishModal').modal();
$('#finish-modal-OKButton').on('click', function() {
reply=$('#finish-date').val();
if(reply && reply.length) {
});
}
function eventGetFinish() {
//reply = prompt("{{$expirewhen}}", $('#jot-expire').val());
$('#finishModal').modal();
$('#finish-modal-OKButton').on('click', function() {
reply=$('#finish-date').val();
if(reply && reply.length) {
$('#finish-text').val(reply);
$('#finishModal').modal('hide');
}
})
}
});
}