File footable.all.min.js
has 1114 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* FooTable - Awesome Responsive Tables
* Version : 2.0.3
* http://fooplugins.com/plugins/footable-jquery/
*
Function i
has 285 lines of code (exceeds 25 allowed). Consider refactoring. Open
function i(i, o, n) {
var r = this;
r.id = n, r.table = i, r.options = o, r.breakpoints = [], r.breakpointNames = "", r.columns = {}, r.plugins = t.footable.plugins.load(r);
var l = r.options,
d = l.classes,
Function s
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
function s() {
function t(t, a, o) {
var i = e("<td>");
return t.formatter ? i.html(t.formatter(a, i, o)) : i.html(a || ""), i
}
Consider simplifying this complex logical expression. Open
if (f.cols) {
a.footable = t;
var u = e(t.table);
u.data("grid", a), e.isPlainObject(f.data) && u.data(f.data), a._items = [], r(f.cols), f.showCheckbox && (f.multiSelect = !0, f.cols.unshift({
title: f.checkboxFormatter(!0),
Function i
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function i() {
var t = this;
t.name = "Footable Paginate", t.init = function(a) {
if (a.options.paginate === !0) {
if (e(a.table).data("page") === !1) return;
Function a
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function a() {
var e = this;
e.name = "Footable Sortable", e.init = function(a) {
e.footable = a, a.options.sort === !0 && t(a.table).unbind(".sorting").bind({
"footable_initialized.sorting": function() {
Function a
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function a() {
var e = this;
e.name = "Footable Filter", e.init = function(a) {
if (e.footable = a, a.options.filter.enabled === !0) {
if (t(a.table).data("filter") === !1) return;
Function o
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function o() {
var e = this;
e.name = "Footable LucidBookmarkable", e.init = function(e) {
e.options.bookmarkable.enabled && t(e.table).bind({
footable_initialized: function() {
Function init
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
a.name = "Footable Grid", a.init = function(t) {
var d = t.options.classes.toggle,
s = t.options.classes.detail,
f = t.options.grid;
if (f.cols) {
Function init
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
e.name = "Footable LucidBookmarkable", e.init = function(e) {
e.options.bookmarkable.enabled && t(e.table).bind({
footable_initialized: function() {
var i = e.table.id,
o = a(i + "_f"),
Function getColumnData
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, r.getColumnData = function(t) {
var a = e(t),
i = a.data("hide"),
o = a.index();
i = i || "", i = jQuery.map(i.split(","), function(e) {
Consider simplifying this complex logical expression. Open
if (e.footable = a, a.options.filter.enabled === !0) {
if (t(a.table).data("filter") === !1) return;
a.timers.register("filter"), t(a.table).unbind(".filtering").bind({
"footable_initialized.filtering": function() {
var i = t(a.table),
Function init
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
e.name = "Footable Sortable", e.init = function(a) {
e.footable = a, a.options.sort === !0 && t(a.table).unbind(".sorting").bind({
"footable_initialized.sorting": function() {
var i, o, n = t(a.table),
r = (n.find("> tbody"), a.options.classes.sort);
Function createNavigation
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, t.createNavigation = function(a) {
var i = e(a.table).find(a.pageInfo.pageNavigation);
if (0 === i.length) {
if (i = e(a.pageInfo.pageNavigation), i.parents("table:first").length > 0 && i.parents("table:first") !== e(a.table)) return;
i.length > 1 && a.options.debug === !0 && console.error("More than one pagination control was found!")
Function createOrUpdateDetailRow
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, r.createOrUpdateDetailRow = function(t) {
var a, i = e(t),
o = i.next(),
n = [];
if (i.data("detail_created") === !0) return !0;
Consider simplifying this complex logical expression. Open
if (0 !== i.length) {
i.is("ul") || (0 === i.find("ul:first").length && i.append("<ul />"), i = i.find("ul")), i.find("li").remove();
var o = a.pageInfo;
o.control = i, o.pages.length > 0 && (i.append('<li class="footable-page-arrow"><a data-page="first" href="#first">' + a.pageInfo.firstText + "</a>"), i.append('<li class="footable-page-arrow"><a data-page="prev" href="#prev">' + a.pageInfo.previousText + "</a></li>"), o.limit && i.append('<li class="footable-page-arrow"><a data-page="limit-prev" href="#limit-prev">' + a.pageInfo.limitPreviousText + "</a></li>"), o.limit || e.each(o.pages, function(e, t) {
t.length > 0 && i.append('<li class="footable-page"><a data-page="' + e + '" href="#">' + (e + 1) + "</a></li>")
Function resize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, r.resize = function() {
var t = e(r.table);
if (t.is(":visible")) {
if (!r.hasAnyBreakpointColumn()) return t.trigger(u.redraw), undefined;
var a = {
Function init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
e.name = "Footable Filter", e.init = function(a) {
if (e.footable = a, a.options.filter.enabled === !0) {
if (t(a.table).data("filter") === !1) return;
a.timers.register("filter"), t(a.table).unbind(".filtering").bind({
"footable_initialized.filtering": function() {
Function init
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, r.init = function() {
var a = e(t),
i = e(r.table);
if (t.footable.plugins.init(r), i.hasClass(d.loaded)) return r.raise(s.alreadyInitialized), undefined;
r.raise(s.initializing), i.addClass(d.loading), i.find(l.columnDataSelector).each(function() {
Function redraw
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, r.redraw = function() {
r.addRowToggle(), r.bindToggleSelectors(), r.setColumnClasses();
var t = e(r.table),
a = t.data("breakpoint"),
i = r.hasBreakpointColumn(a);
Consider simplifying this complex logical expression. Open
if (r.raise(s.rowDetailUpdating, {
row: i,
detail: o
}), i.find("> td:hidden").each(function() {
var t = e(this).index(),
Consider simplifying this complex logical expression. Open
if ("footable_row_expanded" == a.type && (u = a.row, u && (p = t(e.table).data("expanded_rows"), c = [], p && (c = p.split(",")), c.push(u.rowIndex), t(e.table).data("expanded_rows", c.join(",")))), "footable_row_collapsed" == a.type && (u = a.row)) {
p = t(e.table).data("expanded_rows"), c = [], p && (c = p.split(","));
var g = [];
for (var b in c)
if (c[b] == u.rowIndex) {
Function createDetail
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createDetail: function(t, a, i, o, n) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
n.hasClass("breakpoint") && i.hasClass("footable-detail-show") && o.hasClass("footable-row-detail") ? (i.add(o).show(), a.createOrUpdateDetailRow(t)) : i.show()
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 72.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
events: {
alreadyInitialized: "footable_already_initialized",
initializing: "footable_initializing",
initialized: "footable_initialized",
resizing: "footable_resizing",
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 72.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
i.is(":visible") || (n.hasClass("breakpoint") && i.hasClass("footable-detail-show") && o.hasClass("footable-row-detail") ? (i.add(o).show(), a.createOrUpdateDetailRow(e)) : i.show())
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 72.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
e.find("li.footable-page > a[data-page=" + t + "]").parent().addClass("active"), t >= a - 1 && (e.find('li.footable-page-arrow > a[data-page="next"]').parent().addClass("disabled"), e.find('li.footable-page-arrow > a[data-page="last"]').parent().addClass("disabled")), 1 > t && (e.find('li.footable-page-arrow > a[data-page="first"]').parent().addClass("disabled"), e.find('li.footable-page-arrow > a[data-page="prev"]').parent().addClass("disabled"))
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 51.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
return a.footable.raise(a.footable.options.grid.events.removed, {
item: n,
index: t
}), n
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 50.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
return a.footable.raise(a.footable.options.grid.events.removed, {
item: n,
index: t
}), n
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 50.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
return "string" != typeof i.name ? (t.footable.options.debug === !0 && console.error('Validation failed, plugin does not implement a string property called "name".', i), !1) : e.isFunction(i.init) ? (t.footable.options.debug === !0 && console.log('Validation succeeded for plugin "' + i.name + '".', i), !0) : (t.footable.options.debug === !0 && console.error('Validation failed, plugin "' + i.name + '" does not implement a function called "init".', i), !1)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 49.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
null != i && (e(t).is(":visible") ? e(i).is(":empty") || e(t).html(e(i).contents().detach()) : e(t).is(":empty") || e(i).html(e(t).contents().detach()))
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 47.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
}), t.find("> thead > tr > th.footable-last-column, > tbody > tr > td.footable-last-column").removeClass("footable-last-column"), t.find("> thead > tr > th.footable-first-column, > tbody > tr > td.footable-first-column").removeClass("footable-first-column"), t.find("> thead > tr, > tbody > tr").find("> th.footable-visible:last, > td.footable-visible:last").addClass("footable-last-column").end().find("> th.footable-visible:first, > td.footable-visible:first").addClass("footable-first-column"), r.raise(s.redrawn)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 45.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76