Beautify javascript code

This commit is contained in:
coolneng 2020-07-16 03:32:09 +02:00
parent b0238cc9b0
commit 0b91047625
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
7 changed files with 122 additions and 117 deletions

View File

@ -1,7 +1,5 @@
$(document).ready(function()
{
$("#provincia").change(function()
{
$(document).ready(function() {
$("#provincia").change(function() {
var id_provincia = $(this).val();
var post_id = 'id=' + id_provincia;
@ -10,8 +8,7 @@ $(document).ready(function()
url: "ajax.php",
data: post_id,
cache: false,
success: function(response)
{
success: function(response) {
$("#localidad").html(response);
}
});

View File

@ -16,7 +16,10 @@
],
select: function(start, end) {
$("#dialog-form").dialog({ modal: true, width:450});
$("#dialog-form").dialog({
modal: true,
width: 450
});
var date = $.fullCalendar.formatDate(start, 'YYYY-MM-DD');
$("#fecha").val(date);
},
@ -58,7 +61,10 @@
$("#event-description").html("<b>Observaciones: </b>" + event.description);
$("#event-start").html("<b>Comienzo: </b>" + start);
$("#event-end").html("<b>Fin: </b>" + end);
$("#event-info").dialog({title: event.title, width:450});
$("#event-info").dialog({
title: event.title,
width: 450
});
}
});

View File

@ -1,5 +1,6 @@
function checkDNI(dni) {
var number, let, letter;
var number,
let, letter;
var regex = /^[XYZ]?\d{5,8}[A-Z]$/;
dni = dni.toUpperCase();
@ -13,7 +14,8 @@ function checkDNI(dni) {
number = number % 23;
letter = 'TRWAGMYFPDXBNJZSQVHLCKET';
letter = letter.substring(number, number + 1);
if (letter != let) {
if (letter !=
let) {
return false;
} else {
return true;