Showing 3,654 of 3,654 total issues
Function getActionsBulk
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function getActionsBulk(articles: Array<IArticle>) {
const someItemsLocked = articles.some(isLocked);
const someItemsLockedInOtherSession = articles.some(isLockedInOtherSession);
if (articles.some((article) => !canChangeMarkedUser(superdesk, article))) {
Function getEditor3RichTextFormattingOptions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getEditor3RichTextFormattingOptions = (): {[MEMBER in RICH_FORMATTING_OPTION]: string} => {
return {
'h1': gettext('h1'),
'h2': gettext('h2'),
'h3': gettext('h3'),
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<AuthoringWidgetLayout
header={(
<AuthoringWidgetHeading
Function component
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onClick={() => {
showModal(({closeModal}) => (
<Modal
visible
size="small"
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(): React.ReactNode {
const state = this.state;
if (!state.initialized) {
return null;
Function ActionPicker
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ActionPicker(desks, macros) {
return {
scope: {
desk: '=',
stage: '=',
Function CreateTemplateController
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function CreateTemplateController(
item,
templates,
api,
desks,
Function link
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, elem, attr) {
scope.$watch('item', (item) => {
scope.selectedSubscribers = {items: []};
if (item && !scope.customSubscribers) {
Function itemActions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.itemActions = function(item, userDesks) {
var currentItem = this._getCurrentItem(item);
var userPrivileges = privileges.privileges;
var action = angular.extend({}, helpers.DEFAULT_ACTIONS);
var itemOnReadOnlyStage = item && item.task && item.task.stage && desks.isReadOnlyStage(item.task.stage);
Function correction
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.correction = function correction(item: IPublishedArticle, handleIsCorrection, removeCorrection = false) {
var authoringWorkspace: AuthoringWorkspaceService = $injector.get('authoringWorkspace');
let extDiff = {};
desks.initialize()
Function descheduled
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const descheduled = () => {
const errors = [];
const success = [];
Promise.all(
Function constructor
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props: IProps) {
super(props);
this.state = {
itemsList: [],
Function doPublish
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
doPublish(applyDestination?: boolean): void {
this.props.handleUnsavedChanges()
.then((item) => {
const emptyPatches: Array<Partial<IArticle>> = [{}];
Function loadMore
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loadMore(
/**
* A Parameter is accepted to support {@link IExposedFromVirtualList.reloadAll}
* Otherwise {@link items} that are already in scope could be used.
*/
Function waitForMediaToLoad
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
new Promise((resolve) => {
const filteredElements = elements.filter((element) => {
if (isImage(element)) {
return element.complete === false;
} else if (isAudio(element) || isVideo(element)) {
Function getCell
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getCell(data: IEditor3TableData, row, col, currentStyle, selection): EditorState {
const decorator = new CompositeDecorator([LinkDecorator]);
const {cells} = data;
let cellEditorState;
Function DeployConfigFactory
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function DeployConfigFactory(api, $q) {
/**
* Deploy config service
*
* provides deployment related config from server
Function replaceAllForEachBlock
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function replaceAllForEachBlock(
contentState: ContentState,
regex: RegExp, // a global regex must be passed
replaceWith: string,
): ContentState {
Function insertMedia
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function insertMedia(files?, targetBlockKey = null) {
const superdesk = ng.get('superdesk');
const renditions = ng.get('renditions');
const editedMedia = [];
Function updateText
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateText(
editorState: EditorState,
contentState: ContentState,
block: ContentBlock,
newText: string,