Showing 18 of 113 total issues
Function call
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
call: function (apiPackage, apiMethod, urlParams, data, error, loading, synchronousOrSocket) {
var api = Api.list[apiPackage][apiMethod];
if (!api) {
return $.Deferred().reject('Api not found.');
Function constructor
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor: function (
name, value, required, validations, useCurrentPosition, submitOnChange, initFromQueryString, autocomplete) {
FormInputLocation.$super.call(this, name, value, required, validations, submitOnChange, initFromQueryString);
this.currentPosition = ko.observable(null);
Function constructor
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor: function (name, value, required, validations, submitOnChange, initFromQueryString) {
this.name = name;
this.value = ko.isObservable(value) ? value : ko.observable(Object.isFunction(value) ? value() : ((value !== undefined) ? value : ''));
if (initFromQueryString) {
this.fromQueryString();
Function init
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function (element, valueAccessor, allBindingsAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor()), allBindings = allBindingsAccessor();
if (!Object.isEmpty(value)) {
require(['cytoscape'], function (cytoscape) {
var cy = cytoscape(Object.merge({
Function init
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init: function (name, data, path, controller) {
this.loading = false;
name = name.toLowerCase();
Consider simplifying this complex logical expression. Open
Open
if (href && !href.startsWith('#') && ((origin === window.location.origin) || !origin) &&
($(this).attr('target') != '_blank') && !$(this).data('go') && !event.ctrlKey && !event.metaKey) {
event.preventDefault();
Page.loading = true;
router.setRoute(href);
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor: function (inputs, submit, initFromQueryString) {
this.inputs = {};
if (Object.isObject(inputs)) {
this.inputs = inputs;
} else if (Object.isArray(inputs)) {
Function getCurrentPosition
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getCurrentPosition: function (successCallback, errCallback) {
if (this.geolocationAvailable) {
this.gettingCurrentPosition(true);
this.currentPosition(null);
navigator.geolocation.getCurrentPosition(
Function flatten
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function flatten(object) {
var result = {};
function recurse(cur, prop) {
if (Object(cur) !== cur) {
Consider simplifying this complex logical expression. Open
Open
if (Object.isObject(synchronousOrSocket)) {
var deferred = $.Deferred();
require(['io'], function (io) {
Function constructor
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
name, value, required, validations, useCurrentPosition, submitOnChange, initFromQueryString, autocomplete) {
Function call
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
call: function (apiPackage, apiMethod, urlParams, data, error, loading, synchronousOrSocket) {
Function constructor
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
constructor: function (name, value, required, validations, submitOnChange, initFromQueryString) {
Function getDistanceFromLatLon
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
getDistanceFromLatLon: function (latitude1, longitude1, latitude2, longitude2, metric) {
Function makeErrorJson
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function makeErrorJson(message, file, line, column, error) {
Function onerror
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
window.onerror = function (message, file, line, column, error) {
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
return ajax;