Showing 16 of 70 total issues
File slider.js
has 679 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Material Slider
*
* $.materialSlider(options)
*
Function events
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Range.prototype.events = function events() {
this.$selector1.on('mousedown', function () {
this.mouseDown(1);
}.bind(this));
this.$selector2.on('mousedown', function () {
Function toggle
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Dropdown.prototype.toggle = function (e) {
var $this = $(this);
if ($this.is('.disabled, :disabled')) return;
Function init
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Range.prototype.init = function init(opts) {
opts = $.extend({}, opts, this.roundValues(opts.value1, opts.value2, opts));
if (!materialColors[opts.color]) {
this.color = 'indigo';
Function events
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Selector.prototype.events = function events() {
this.$selector.bind('mousedown', function () {
this.mouseDown();
}.bind(this));
$(document).bind('mousemove', function (e) {
Function init
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Slider.prototype.init = function init(opts) {
var color = opts.color;
// controls on value
if (!opts.value) {
opts.value = opts.min;
Function Element
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Element(options) {
var defaultOptions = {
min : 0,
max : 100,
value : 0,
Function activate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active');
var transition = callback
&& $.support.transition
&& $active.hasClass('fade');
Function resizeSlider
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Range.prototype.resizeSlider = function resizeSlider() {
var originalWidth = this.$element.width(),
width = originalWidth;
// placement
Function create
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Selector.prototype.create = function create() {
this.$element.addClass('material-slider ' + this.color);
if (this.opts.disabled === true) {
this.$element.addClass('disabled');
Function InputGroupFocus
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function InputGroupFocus(options) {
return this.each(function () {
var $this = $(this),
$addon = $this.find('.text-field-group-addon'),
$input = $this.find('input');
Function show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tab.prototype.show = function () {
var $this = this.element;
var $ul = $this.closest('ul:not(.dropdown-menu)');
var selector = $this.data('target');
Function mouseMoveRight
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Range.prototype.mouseMoveRight = function mouseMoveRight(e) {
if (this.pressed2 === true && this.opts.disabled !== true) {
if (this.prevX2 == 0) {
this.prevX2 = e.pageX;
this.left2 = +this.$selector2.css('left').replace('px', '');
Function events
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Slider.prototype.events = function events() {
this.$selector.bind('mousedown', function () {
this.mouseDown();
}.bind(this));
$(document).bind('mousemove', function (e) {
Function mouseMoveLeft
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Range.prototype.mouseMoveLeft = function mouseMoveLeft(e) {
if (this.pressed1 === true && this.opts.disabled !== true) {
if (this.prevX1 == 0) {
this.prevX1 = e.pageX;
this.left1 = +this.$selector1.css('left').replace('px', '');
Function init
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Selector.prototype.init = function init(opts) {
opts.value = common.roundValue(opts.value, opts);
if (!materialColors[opts.color]) {
this.color = 'indigo';