js/forms.js
File forms.js
has 584 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function ($) {
$(document).ready(function() {
// Function to update labels of text fields
Materialize.updateTextFields = function() {
Function material_select
has 232 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.material_select = function (callback) {
$(this).each(function(){
var $select = $(this);
if ($select.hasClass('browser-default')) {
Function autocomplete
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.autocomplete = function (options) {
// Defaults
var defaults = {
data: {},
limit: Infinity,
Function onKeyDown
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onKeyDown = function(e){
// TAB - switch to another input
if(e.which == 9){
$newSelect.trigger('close');
return;
Function textareaAutoResize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function textareaAutoResize($textarea) {
// Set font properties of hiddenDiv
var fontFamily = $textarea.css('font-family');
var fontSize = $textarea.css('font-size');
Avoid deeply nested control flow statements. Open
Open
if (data.hasOwnProperty(key) &&
key.toLowerCase().indexOf(val) !== -1) {
// Break if past limit
if (count >= options.limit) {
break;