client/cat3/customlib/angular-datatables.js
File angular-datatables.js
has 893 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* angular-datatables - v0.5.0
* https://github.com/l-lin/angular-datatables
* License: MIT
*/
Function dtPromiseRenderer
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtPromiseRenderer($q, $timeout, $log, DTRenderer, DTRendererService, DTInstanceFactory) {
/**
* Renderer for displaying with a promise
* @param options the options
* @returns {{options: *}} the renderer
Function create
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function create(options) {
var _oTable;
var _loadedPromise = null;
var _$elem;
Function dataTable
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dataTable($q, $http, DTRendererFactory, DTRendererService, DTPropertyUtil) {
compileDirective.$inject = ['tElm'];
ControllerDirective.$inject = ['$scope'];
return {
restrict: 'A',
Function dtPropertyUtil
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtPropertyUtil($q) {
return {
overrideProperties: overrideProperties,
deleteProperty: deleteProperty,
resolveObjectPromises: resolveObjectPromises,
Function initAngularDataTables
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initAngularDataTables() {
if ($.fn.DataTable.Api) {
/**
* Register an API to destroy a DataTable without detaching the tbody so that we can add new data
* when rendering with the "Angular way".
Function dtNGRenderer
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererService, DTInstanceFactory) {
/**
* Renderer for displaying the Angular way
* @param options
* @returns {{options: *}} the renderer
Function dtOptionsBuilder
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtOptionsBuilder() {
/**
* The wrapped datatables options class
* @param sAjaxSource the ajax source to fetch the data
* @param fnPromise the function that returns a promise to fetch the data
Function dtAjaxRenderer
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtAjaxRenderer($q, $timeout, DTRenderer, DTRendererService, DT_DEFAULT_OPTIONS, DTInstanceFactory) {
/**
* Renderer for displaying with Ajax
* @param options the options
* @returns {{options: *}} the renderer
Function ControllerDirective
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ControllerDirective($scope) {
var _dtInstance;
var vm = this;
vm.buildOptionsPromise = buildOptionsPromise;
vm.render = render;
Function create
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function create(options) {
var _staticHTML;
var _oTable;
var _$elem;
var _parentScope;
Function create
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function create(options) {
var _oTable;
var _$elem;
var renderer = Object.create(DTRenderer);
renderer.name = 'DTAjaxRenderer';
Function dtRendererService
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtRendererService(DTLoadingTemplate) {
var $loading = angular.element(DTLoadingTemplate.html);
var plugins = [];
var rendererService = {
getLoadingElem: getLoadingElem,
Function dtColumnBuilder
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtColumnBuilder() {
/**
* The wrapped datatables column
* @param mData the data to display of the column
* @param sTitle the sTitle of the column title to display in the DOM
Function dtDefaultOptions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtDefaultOptions() {
var options = {
bootstrapOptions: {},
setLanguageSource: setLanguageSource,
setLanguage: setLanguage,
Function buildOptionsPromise
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildOptionsPromise() {
var defer = $q.defer();
// Build options
$q.all([
$q.when($scope.dtOptions),
Function dtDefaultRenderer
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtDefaultRenderer($q, DTRenderer, DTRendererService, DTInstanceFactory) {
return {
create: create
};
Function resolveObjectPromises
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resolveObjectPromises(obj, excludedPropertiesName) {
var defer = $q.defer(),
promises = [],
resolvedObj = {},
excludedProp = excludedPropertiesName || [];
Function dtInstanceFactory
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function dtInstanceFactory() {
var DTInstance = {
reloadData: reloadData,
changeData: changeData,
rerender: rerender
Function create
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function create(options) {
var _oTable;
var _$elem;
var renderer = Object.create(DTRenderer);
renderer.name = 'DTDefaultRenderer';
Function dtNGRenderer
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererService, DTInstanceFactory) {
Function dtPromiseRenderer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dtPromiseRenderer($q, $timeout, $log, DTRenderer, DTRendererService, DTInstanceFactory) {
Function dtAjaxRenderer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dtAjaxRenderer($q, $timeout, DTRenderer, DTRendererService, DT_DEFAULT_OPTIONS, DTInstanceFactory) {
Function dataTable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function dataTable($q, $http, DTRendererFactory, DTRendererService, DTPropertyUtil) {
Avoid too many return
statements within this function. Open
Open
return DTDefaultRenderer.create();