Showing 62 of 155 total issues
Function setFieldIndex
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var setFieldIndex = function (columns) {
var i, j, k,
totalCol = 0,
flag = [];
Function keys
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Object.keys = (function() {
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
dontEnums = [
'toString',
Function applyPlacement
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tooltip.prototype.applyPlacement = function (offset, placement) {
var $tip = this.tip()
var width = $tip[0].offsetWidth
var height = $tip[0].offsetHeight
Function fetchUrl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var fetchUrl = function (article, callback) {
var delay = parseInt((Math.random() * 10000000) % 2000, 10);
conCurrencyCount++;
// console.log('并发数:' + conCurrencyCount + ',访问的页面是:' + article.authorHref + ',控制的延迟:' + delay);
getURL.getPageContent(article.authorHref, function (err, res) {
Function show
has 30 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 Selectpicker
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Selectpicker = function (element, options, e) {
// bootstrap-select has been initialized - revert valHooks.select.set back to its original function
if (!valHooks.useDefault) {
$.valHooks.select.set = valHooks._set;
valHooks.useDefault = true;
Function checkPosition
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var height = this.$element.height()
var offset = this.options.offset
Function getRowByUniqueId
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
BootstrapTable.prototype.getRowByUniqueId = function (id) {
var uniqueId = this.options.uniqueId,
len = this.options.data.length,
dataRow = null,
i, row, rowUniqueId;
Function hide
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Collapse.prototype.hide = function () {
if (this.transitioning || !this.$element.hasClass('in')) return
var startEvent = $.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
Function refresh
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ScrollSpy.prototype.refresh = function () {
var offsetMethod = 'offset'
var offsetBase = 0
if (!$.isWindow(this.$scrollElement[0])) {
Function startsWith
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var startsWith = function (search) {
if (this == null) {
throw new TypeError();
}
var string = String(this);
Function next
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
Consider simplifying this complex logical expression. Open
Open
if (!isActive && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105 || e.keyCode >= 65 && e.keyCode <= 90)) {
if (!that.options.container) {
that.setSize();
that.$menu.parent().addClass('open');
isActive = true;
Avoid deeply nested control flow statements. Open
Open
if (maxOptions && maxOptions == 1) {
$options.prop('selected', false);
$option.prop('selected', true);
that.$menuInner.find('.selected').removeClass('selected');
that.setSelected(clickedIndex, true);
Avoid deeply nested control flow statements. Open
Open
if ((value + '').toLowerCase() === s) {
return true;
}
Avoid deeply nested control flow statements. Open
Open
if ($prev[i].tagName === 'OPTGROUP') {
var optGroupDistance = 0;
// loop through the options in between the current option and the optgroup
// and check if they are hidden or disabled
Avoid deeply nested control flow statements. Open
Open
if ((value + '').toLowerCase().indexOf(s) !== -1) {
return true;
}
Consider simplifying this complex logical expression. Open
Open
if ((/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode.toString(10)) && !isActive)) {
that.$menu.parent().removeClass('open');
if (that.options.container) that.$newElement.removeClass('open');
that.$button.focus();
}
Avoid too many return
statements within this function. Open
Open
return order;
Avoid too many return
statements within this function. Open
Open
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'