1/** 2 * Namespace que permite validar las entradas recibidas a un spinner 3 * 4 * @author Carlos Ivan Calva Avalos 5 * @date 16-10-2017 6 */ 7var spinnerValidation = function() { 8 9 /* 10 * Validaciones de los tamaños que se reciben en los spinners, recibiendo un 11 * maximo y un minimo en los valores que recibe la funcion, si se ingresa 12 * algo mayor al maximo, se ajusta al maximo, analogo a un minimo. Si se 13 * ingresa una entrada invalida, se registra el valor minimo 14 */ 15 function validacionesSpinners(idSpinner, minimo, maximo) { 16 $("#" + idSpinner).bind( 17 'change', 18 function() { 19 if ($("#" + idSpinner).val() >= minimo 20 && $("#" + idSpinner).val() <= maximo 21 && !(0 === $("#" + idSpinner).val().length)) { 22 $("#" + idSpinner).val($("#" + idSpinner).val()); 23 } else if ($("#" + idSpinner).val() > maximo) { 24 $("#" + idSpinner).val(maximo); 25 } else { 26 $("#" + idSpinner).val(minimo); 27 } 28 }); 29 } 30 31 return { 32 validacionesSpinners : validacionesSpinners 33 }; 34}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.