Showing 98 of 221 total issues
Function Dragdata
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Dragdata($log) {
this.converters = {
'test': function ($e) {
return {};
},
File Author.js
has 272 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/**
* A factory which creates article author model.
*
Function NestedSort
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function NestedSort($log) {
var service = this;
// exposed just for testability
this.sortByCreated = function (arr) {
function getDate(element) {
File images.js
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
angular.module('authoringEnvironmentApp').service('images', [
'pageTracker',
'$log',
'article',
Function changeSelectedStatus
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.changeSelectedStatus = function (status, deep, commentId) {
var comment = null,
displayed = self.displayed, // just an alias
i = 0,
len = displayed.length,
Function sort
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.sort = function (arr) {
var levels = [];
var currentLevel = 0;
var isOnCurrentLevel = function (element) {
return element.thread_level === currentLevel;
Function responseError
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
responseError: function (response) {
var configToRepeat,
failedRequestConfig,
retryDeferred,
userAuth,
Function upload
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NcImage.upload = function (image, onProgress) {
var deferred = $q.defer(),
fd = formDataFactory.makeInstance(),
parts,
rejectMsg = 'No x-location header in API response.';
Function slide
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Carousel.prototype.slide = function (type, next) {
var $active = this.$element.find('.item.active')
var $next = next || $active[type]()
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
Function addNewTopicToArticle
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addNewTopicToArticle = function (topicData) {
var newTopic;
$scope.addingNewTopic = true;
Function addNewSnippetToArticle
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.addNewSnippetToArticle = function (snippetData) {
var fields = {},
newSnippet;
$scope.addingNewSnippet = true;
Function liveSearchQuery
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Author.liveSearchQuery = function (options, isCallback) {
var isPaginationCall = (options.page > 1),
now = dateFactory.makeInstance(),
url;
Function liveSearchQuery
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Topic.liveSearchQuery = function (options, isCallback) {
var isPaginationCall = (options.page > 1),
now = dateFactory.makeInstance(),
url;
Function setSize
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
scope.setSize = function (size, initPhase) {
var width;
$parent = findParent();
if (size.match(/^\d+px$/)) {
Function imageCommentsToDivs
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function imageCommentsToDivs(text) {
// the extra backslash (\) is because of Javascript being picky
var imageReg = '<!'; // exact match
imageReg += '\\*\\*'; // exact match on **
imageReg += '[\\s]*'; // optional whitespace
Function show
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Tooltip.prototype.show = function () {
var e = $.Event('show.bs.'+ this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
Function serializeAlohaBlocks
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function serializeAlohaBlocks(text) {
var content,
allMatches,
sep;
Function addToArticle
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Author.prototype.addToArticle = function (number, language, roleId) {
var author = this,
deferred = $q.defer(),
linkHeader,
url;
Function setAlignment
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
scope.setAlignment = function (position) {
var cssFloat,
cssMargin;
switch (position) {
Function removeFromArticle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Author.prototype.removeFromArticle = function (
number, language, roleId
) {
var author = this,
deferred = $q.defer(),