Showing 98 of 221 total issues
Function confirmHideComments
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.confirmHideComments = function (commentId) {
var commentIdGiven = (typeof commentId !== 'undefined'),
modal,
title,
text;
Function snippetCommentsToDivs
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function snippetCommentsToDivs(text) {
// the extra backslash (\) is because of Javascript being picky
var snippetRex = '<--'; // exact match
snippetRex += '\\s'; // single whitespace
snippetRex += 'Snippet'; // exact match
Function backdrop
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.backdrop = function (callback) {
var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
Function setContainerEventHandlers
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setContainerEventHandlers($container, scope) {
$container.on('dragover', function (e) {
e.originalEvent.preventDefault(); // allow drop
e.originalEvent.dataTransfer.dropEffect = 'move';
});
Function confirmUnassignSlideshow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.confirmUnassignSlideshow = function (slideshow) {
var modal,
title,
text;
Function saveSwitches
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Article.prototype.saveSwitches = function (switchNames) {
var deferred = $q.defer(),
postData = {
article: {fields: {}}
},
Function addAllToArticle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NcImage.addAllToArticle = function (articleId, articleLang, images) {
var deferred = $q.defer(),
linkHeader = [];
images.forEach(function (item) {
Function postLink
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function postLink(scope, element, attrs) {
var isDisabled = (
Aloha.queryCommandSupported('formatBlock') &&
Aloha.queryCommandEnabled('formatBlock')
);
Function createFromApiData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.createFromApiData = function (data) {
var template = new SnippetTemplate();
['id', 'name', 'enabled', 'favourite'].forEach(function (attr) {
template[attr] = data[attr];
Function getAllByArticle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Snippet.getAllByArticle = function (number, language) {
var deferredGet = $q.defer(),
reqParams,
snippets = [];
Function confirmUnassignTopic
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.confirmUnassignTopic = function (topic) {
var modal,
title,
text;
Function getAllByArticle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
NcImage.getAllByArticle = function (articleId, language) {
var deferredGet = $q.defer(),
requestOptions,
images = [];
Function show
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
Function confirmRemoveSnippet
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.confirmRemoveSnippet = function (snippet) {
var modal,
title,
text;
Function load
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self.load = function (page) {
var deferred = $q.defer(),
sortingPart,
url;
Function detachImage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.detachImage = function (imageId) {
var modal,
title,
text;
Function removeRelatedArticle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Article.prototype.removeRelatedArticle = function(relatedArticle) {
var deferred = $q.defer(),
self = this,
linkHeader;
Function addRelatedArticle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Article.prototype.addRelatedArticle = function (relatedArticle) {
var deferred = $q.defer(),
self = this,
linkHeader = [];
Function removeFromArticle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Topic.prototype.removeFromArticle = function(number, language) {
var topic = this,
deferred = $q.defer(),
linkHeader;
Function save
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Article.prototype.save = function () {
var deferred = $q.defer(),
postData = {
article: {fields: {}}
},