gopheracademy/gcon

View on GitHub
assets/admin/global/plugins/bootstrap-summernote/summernote.js

Summary

Maintainability
F
2 mos
Test Coverage

File summernote.js has 4785 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Super simple wysiwyg editor v0.8.1
 * http://summernote.org/
 *
 * summernote.js
Severity: Major
Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 wk to fix

    Function Buttons has 595 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var Buttons = function (context) {
        var self = this;
        var ui = $.summernote.ui;
    
        var $toolbar = context.layoutInfo.toolbar;
    Severity: Major
    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 days to fix

      Function dom has 582 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var dom = (function () {
          /**
           * @method isEditable
           *
           * returns whether node is `note-editable` or not.
      Severity: Major
      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 days to fix

        Function range has 483 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var range = (function () {
        
            /**
             * return boundaryPoint from TextRange, inspired by Andy Na's HuskyRange.js
             *
        Severity: Major
        Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 days to fix

          Function Editor has 442 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var Editor = function (context) {
              var self = this;
          
              var $note = context.layoutInfo.note;
              var $editor = context.layoutInfo.editor;
          Severity: Major
          Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 days to fix

            Function addToolbarButtons has 386 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                this.addToolbarButtons = function () {
                  context.memo('button.style', function () {
                    return ui.buttonGroup([
                      ui.button({
                        className: 'dropdown-toggle',
            Severity: Major
            Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 day to fix

              Function WrappedRange has 321 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var WrappedRange = function (sc, so, ec, eo) {
                    this.sc = sc;
                    this.so = so;
                    this.ec = ec;
                    this.eo = eo;
              Severity: Major
              Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 day to fix

                Function HintPopover has 185 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  var HintPopover = function (context) {
                    var self = this;
                    var ui = $.summernote.ui;
                
                    var POPOVER_DIST = 5;
                Severity: Major
                Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 7 hrs to fix

                  Function Context has 152 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    var Context = function ($note, options) {
                      var self = this;
                  
                      var ui = $.summernote.ui;
                      this.memos = {};
                  Severity: Major
                  Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 6 hrs to fix

                    Function VideoDialog has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      var VideoDialog = function (context) {
                        var self = this;
                        var ui = $.summernote.ui;
                    
                        var $editor = context.layoutInfo.editor;
                    Severity: Major
                    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 5 hrs to fix

                      Function Bullet has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        var Bullet = function () {
                          var self = this;
                      
                          /**
                           * toggle ordered list
                      Severity: Major
                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 5 hrs to fix

                        Function LinkDialog has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var LinkDialog = function (context) {
                            var self = this;
                            var ui = $.summernote.ui;
                        
                            var $editor = context.layoutInfo.editor;
                        Severity: Major
                        Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 3 hrs to fix

                          Function list has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            var list = (function () {
                              /**
                               * returns the first item of an array.
                               *
                               * @param {Array} array
                          Severity: Major
                          Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 3 hrs to fix

                            Function Style has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              var Style = function () {
                                /**
                                 * @method jQueryCSS
                                 *
                                 * [workaround] for old jQuery
                            Severity: Major
                            Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 3 hrs to fix

                              Function ImageDialog has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                var ImageDialog = function (context) {
                                  var self = this;
                                  var ui = $.summernote.ui;
                              
                                  var $editor = context.layoutInfo.editor;
                              Severity: Major
                              Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 3 hrs to fix

                                Function Handle has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  var Handle = function (context) {
                                    var self = this;
                                
                                    var $document = $(document);
                                    var $editingArea = context.layoutInfo.editingArea;
                                Severity: Major
                                Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 3 hrs to fix

                                  Function func has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    var func = (function () {
                                      var eq = function (itemA) {
                                        return function (itemB) {
                                          return itemA === itemB;
                                        };
                                  Severity: Major
                                  Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 3 hrs to fix

                                    Function Clipboard has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      var Clipboard = function (context) {
                                        var self = this;
                                    
                                        var $editable = context.layoutInfo.editable;
                                    
                                    
                                    Severity: Major
                                    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                      Function Dropzone has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        var Dropzone = function (context) {
                                          var $document = $(document);
                                          var $editor = context.layoutInfo.editor;
                                          var $editable = context.layoutInfo.editable;
                                          var options = context.options;
                                      Severity: Major
                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                        Function Codeview has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          var Codeview = function (context) {
                                            var $editor = context.layoutInfo.editor;
                                            var $editable = context.layoutInfo.editable;
                                            var $codable = context.layoutInfo.codable;
                                            var options = context.options;
                                        Severity: Major
                                        Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                          Function createVideoNode has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              this.createVideoNode = function (url) {
                                                // video url patterns(youtube, instagram, vimeo, dailymotion, youku, mp4, ogg, webm)
                                                var ytRegExp = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
                                                var ytMatch = url.match(ytRegExp);
                                          
                                          
                                          Severity: Major
                                          Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                      if ((dom.isVisiblePoint(point) && !dom.isEdgePoint(point)) ||
                                                          (dom.isVisiblePoint(point) && dom.isRightEdgePoint(point) && !isLeftToRight) ||
                                                          (dom.isVisiblePoint(point) && dom.isLeftEdgePoint(point) && isLeftToRight) ||
                                                          (dom.isVisiblePoint(point) && dom.isBlock(point.node) && dom.isEmpty(point.node))) {
                                                        return point;
                                            Severity: Critical
                                            Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                              Function HelpDialog has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                var HelpDialog = function (context) {
                                                  var self = this;
                                                  var ui = $.summernote.ui;
                                              
                                                  var $editor = context.layoutInfo.editor;
                                              Severity: Major
                                              Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                                Function key has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  var key = (function () {
                                                    var keyMap = {
                                                      'BACKSPACE': 8,
                                                      'TAB': 9,
                                                      'ENTER': 13,
                                                Severity: Major
                                                Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                                  Function History has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                    var History = function ($editable) {
                                                      var stack = [], stackOffset = -1;
                                                      var editable = $editable[0];
                                                  
                                                      var makeSnapshot = function () {
                                                  Severity: Major
                                                  Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                                    Function AirPopover has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                      var AirPopover = function (context) {
                                                        var self = this;
                                                        var ui = $.summernote.ui;
                                                    
                                                        var options = context.options;
                                                    Severity: Major
                                                    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                                      Function LinkPopover has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                        var LinkPopover = function (context) {
                                                          var self = this;
                                                          var ui = $.summernote.ui;
                                                      
                                                          var options = context.options;
                                                      Severity: Major
                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                                        Function Toolbar has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                          var Toolbar = function (context) {
                                                            var ui = $.summernote.ui;
                                                        
                                                            var $note = context.layoutInfo.note;
                                                            var $toolbar = context.layoutInfo.toolbar;
                                                        Severity: Minor
                                                        Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 2 hrs to fix

                                                          Function addImagePopoverButtons has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                              this.addImagePopoverButtons = function () {
                                                                // Image Size Buttons
                                                                context.memo('button.imageSize100', function () {
                                                                  return ui.button({
                                                                    contents: '<span class="note-fontsize-10">100%</span>',
                                                          Severity: Minor
                                                          Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                            Function updateCurrentStyle has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                this.updateCurrentStyle = function () {
                                                                  var styleInfo = context.invoke('editor.currentStyle');
                                                                  this.updateBtnStates({
                                                                    '.note-btn-bold': function () {
                                                                      return styleInfo['font-bold'] === 'bold';
                                                            Severity: Minor
                                                            Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                              Function attachDragAndDropEvent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  this.attachDragAndDropEvent = function () {
                                                                    var collection = $(),
                                                                        $dropzoneMessage = $dropzone.find('.note-dropzone-message');
                                                              
                                                                    // show dropzone on dragenter when dragging a object to document
                                                              Severity: Minor
                                                              Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                Function showLinkDialog has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    this.showLinkDialog = function (linkInfo) {
                                                                      return $.Deferred(function (deferred) {
                                                                        var $linkText = self.$dialog.find('.note-link-text'),
                                                                        $linkUrl = self.$dialog.find('.note-link-url'),
                                                                        $linkBtn = self.$dialog.find('.note-link-btn'),
                                                                Severity: Minor
                                                                Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                  Function AutoLink has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                    var AutoLink = function (context) {
                                                                      var self = this;
                                                                      var defaultScheme = 'http://';
                                                                      var linkPattern = /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i;
                                                                  
                                                                  
                                                                  Severity: Minor
                                                                  Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                    Function initialize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                        this.initialize = function () {
                                                                          // bind custom events
                                                                          $editable.on('keydown', function (event) {
                                                                            if (event.keyCode === key.code.ENTER) {
                                                                              context.triggerEvent('enter', event);
                                                                    Severity: Minor
                                                                    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                      Function Typing has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                        var Typing = function () {
                                                                      
                                                                          // a Bullet instance to toggle lists off
                                                                          var bullet = new Bullet();
                                                                      
                                                                      
                                                                      Severity: Minor
                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                        Function releaseList has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            this.releaseList = function (clustereds, isEscapseToBody) {
                                                                              var releasedParas = [];
                                                                        
                                                                              $.each(clustereds, function (idx, paras) {
                                                                                var head = list.head(paras);
                                                                        Severity: Minor
                                                                        Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                          Function createLink has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                              this.createLink = this.wrapCommand(function (linkInfo) {
                                                                                var linkUrl = linkInfo.url;
                                                                                var linkText = linkInfo.text;
                                                                                var isNewWindow = linkInfo.isNewWindow;
                                                                                var rng = linkInfo.range || this.createRange();
                                                                          Severity: Minor
                                                                          Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                            Function textRangeToPoint has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                var textRangeToPoint = function (textRange, isStart) {
                                                                                  var container = textRange.parentElement(), offset;
                                                                              
                                                                                  var tester = document.body.createTextRange(), prevContainer;
                                                                                  var childNodes = list.from(container.childNodes);
                                                                            Severity: Minor
                                                                            Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                              Function initialize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                  this.initialize = function () {
                                                                                    this.$handle = $([
                                                                                      '<div class="note-handle">',
                                                                                      '<div class="note-control-selection">',
                                                                                      '<div class="note-control-selection-bg"></div>',
                                                                              Severity: Minor
                                                                              Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                Function handleKeyup has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                    this.handleKeyup = function (e) {
                                                                                      if (list.contains([key.code.ENTER, key.code.UP, key.code.DOWN], e.keyCode)) {
                                                                                        if (e.keyCode === key.code.ENTER) {
                                                                                          if (this.$popover.is(':visible')) {
                                                                                            return;
                                                                                Severity: Minor
                                                                                Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                  Function Fullscreen has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                    var Fullscreen = function (context) {
                                                                                      var $editor = context.layoutInfo.editor;
                                                                                      var $toolbar = context.layoutInfo.toolbar;
                                                                                      var $editable = context.layoutInfo.editable;
                                                                                      var $codable = context.layoutInfo.codable;
                                                                                  Severity: Minor
                                                                                  Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                    Function styleNodes has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                        this.styleNodes = function (rng, options) {
                                                                                          rng = rng.splitText();
                                                                                    
                                                                                          var nodeName = options && options.nodeName || 'SPAN';
                                                                                          var expandClosestSibling = !!(options && options.expandClosestSibling);
                                                                                    Severity: Minor
                                                                                    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                      Function insertParagraph has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                          this.insertParagraph = function (editable) {
                                                                                            var rng = range.create(editable);
                                                                                      
                                                                                            // deleteContents on range.
                                                                                            rng = rng.deleteContents();
                                                                                      Severity: Minor
                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                        Function Renderer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                          var Renderer = function (markup, children, options, callback) {
                                                                                            this.render = function ($parent) {
                                                                                              var $node = $(markup);
                                                                                        
                                                                                              if (options && options.contents) {
                                                                                        Severity: Minor
                                                                                        Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                          Function createFromSelection has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                                createFromSelection: function () {
                                                                                                  var sc, so, ec, eo;
                                                                                                  if (agent.isW3CRangeSupport) {
                                                                                                    var selection = document.getSelection();
                                                                                                    if (!selection || selection.rangeCount === 0) {
                                                                                          Severity: Minor
                                                                                          Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                            Function tableMoveHandler has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                this.tableMoveHandler = function (event) {
                                                                                                  var PX_PER_EM = 18;
                                                                                                  var $picker = $(event.target.parentNode); // target is mousecatcher
                                                                                                  var $dimensionDisplay = $picker.next();
                                                                                                  var $catcher = $picker.find('.note-dimension-picker-mousecatcher');
                                                                                            Severity: Minor
                                                                                            Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                              Function showImageDialog has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                  this.showImageDialog = function () {
                                                                                                    return $.Deferred(function (deferred) {
                                                                                                      var $imageInput = self.$dialog.find('.note-image-input'),
                                                                                                          $imageUrl = self.$dialog.find('.note-image-url'),
                                                                                                          $imageBtn = self.$dialog.find('.note-image-btn');
                                                                                              Severity: Minor
                                                                                              Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                Function async has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                  var async = (function () {
                                                                                                    /**
                                                                                                     * @method readFileAsDataURL
                                                                                                     *
                                                                                                     * read contents of file as representing URL
                                                                                                Severity: Minor
                                                                                                Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                  Function render has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      this.render = function ($parent) {
                                                                                                        var $node = $(markup);
                                                                                                  
                                                                                                        if (options && options.contents) {
                                                                                                          $node.html(options.contents);
                                                                                                  Severity: Minor
                                                                                                  Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                    Function current has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                        this.current = function (rng) {
                                                                                                          var $cont = $(!dom.isElement(rng.sc) ? rng.sc.parentNode : rng.sc);
                                                                                                          var styleInfo = this.fromNode($cont);
                                                                                                    
                                                                                                          // document.queryCommandState for toggle state
                                                                                                    Severity: Minor
                                                                                                    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                      Function ImagePopover has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                        var ImagePopover = function (context) {
                                                                                                          var ui = $.summernote.ui;
                                                                                                      
                                                                                                          var options = context.options;
                                                                                                      
                                                                                                      
                                                                                                      Severity: Minor
                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                        Function nodes has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                              this.nodes = function (pred, options) {
                                                                                                                pred = pred || func.ok;
                                                                                                        
                                                                                                                var includeAncestor = options && options.includeAncestor;
                                                                                                                var fullyContains = options && options.fullyContains;
                                                                                                        Severity: Minor
                                                                                                        Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                          Function pointToTextRange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                              var pointToTextRange = function (point) {
                                                                                                                var textRangeInfo = function (container, offset) {
                                                                                                                  var node, isCollapseToStart;
                                                                                                            
                                                                                                                  if (dom.isText(container)) {
                                                                                                          Severity: Minor
                                                                                                          Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                            Function Placeholder has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                              var Placeholder = function (context) {
                                                                                                                var self = this;
                                                                                                                var $editingArea = context.layoutInfo.editingArea;
                                                                                                                var options = context.options;
                                                                                                            
                                                                                                            
                                                                                                            Severity: Minor
                                                                                                            Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                              Function normalize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                    this.normalize = function () {
                                                                                                              
                                                                                                                      /**
                                                                                                                       * @param {BoundaryPoint} point
                                                                                                                       * @param {Boolean} isLeftToRight
                                                                                                              Severity: Minor
                                                                                                              Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                                Function deleteContents has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                      this.deleteContents = function () {
                                                                                                                        if (this.isCollapsed()) {
                                                                                                                          return this;
                                                                                                                        }
                                                                                                                
                                                                                                                
                                                                                                                Severity: Minor
                                                                                                                Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                                  Function Table has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                    var Table = function () {
                                                                                                                      /**
                                                                                                                       * handle tab key
                                                                                                                       *
                                                                                                                       * @param {WrappedRange} rng
                                                                                                                  Severity: Minor
                                                                                                                  Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 1 hr to fix

                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                    Open

                                                                                                                              if (((dom.isLeftEdgePointOf(point, block) || dom.isVoid(dom.prevPoint(point).node)) && !isLeftToRight) ||
                                                                                                                                  ((dom.isRightEdgePointOf(point, block) || dom.isVoid(dom.nextPoint(point).node)) && isLeftToRight)) {
                                                                                                                    
                                                                                                                                // returns point already on visible point
                                                                                                                                if (dom.isVisiblePoint(point)) {
                                                                                                                    Severity: Major
                                                                                                                    Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js - About 40 mins to fix

                                                                                                                      TODO found
                                                                                                                      Open

                                                                                                                              // TODO compare points and sort

                                                                                                                      FIXME found
                                                                                                                      Open

                                                                                                                              // FIXME: HintPopover must be front of autolink

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.moveDown = function () {
                                                                                                                            var $current = this.$content.find('.note-hint-item.active');
                                                                                                                            var $next = $current.next();
                                                                                                                      
                                                                                                                            if ($next.length) {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6548..6563

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 161.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.moveUp = function () {
                                                                                                                            var $current = this.$content.find('.note-hint-item.active');
                                                                                                                            var $prev = $current.prev();
                                                                                                                      
                                                                                                                            if ($prev.length) {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6531..6546

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 161.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.underline', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'note-btn-underline',
                                                                                                                                contents: ui.icon(options.icons.underline),
                                                                                                                                tooltip: lang.font.underline + representShortcut('underline'),
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5123..5130
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5132..5139
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5158..5165

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 96.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.italic', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'note-btn-italic',
                                                                                                                                contents: ui.icon(options.icons.italic),
                                                                                                                                tooltip: lang.font.italic + representShortcut('italic'),
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5123..5130
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5141..5148
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5158..5165

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 96.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.strikethrough', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'note-btn-strikethrough',
                                                                                                                                contents: ui.icon(options.icons.strikethrough),
                                                                                                                                tooltip: lang.font.strikethrough + representShortcut('strikethrough'),
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5123..5130
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5132..5139
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5141..5148

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 96.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.bold', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'note-btn-bold',
                                                                                                                                contents: ui.icon(options.icons.bold),
                                                                                                                                tooltip: lang.font.bold + representShortcut('bold'),
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5132..5139
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5141..5148
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5158..5165

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 96.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.initialize = function () {
                                                                                                                            this.$popover = ui.popover({
                                                                                                                              className: 'note-air-popover'
                                                                                                                            }).render().appendTo('body');
                                                                                                                            var $content = this.$popover.find('.popover-content');
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6124..6131

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 96.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.initialize = function () {
                                                                                                                            this.$popover = ui.popover({
                                                                                                                              className: 'note-image-popover'
                                                                                                                            }).render().appendTo('body');
                                                                                                                            var $content = this.$popover.find('.popover-content');
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6439..6446

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 96.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.clear', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.eraser),
                                                                                                                                tooltip: lang.font.clear + representShortcut('removeFormat'),
                                                                                                                                click: context.createInvokeHandler('editor.removeFormat')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5307..5313
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5315..5321
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5465..5471
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5491..5497
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5499..5505

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 91.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.ul',  function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.unorderedlist),
                                                                                                                                tooltip: lang.lists.unordered + representShortcut('insertUnorderedList'),
                                                                                                                                click: context.createInvokeHandler('editor.insertUnorderedList')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5150..5156
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5315..5321
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5465..5471
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5491..5497
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5499..5505

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 91.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.undo', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.undo),
                                                                                                                                tooltip: lang.history.undo + representShortcut('undo'),
                                                                                                                                click: context.createInvokeHandler('editor.undo')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5150..5156
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5307..5313
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5315..5321
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5465..5471
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5491..5497

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 91.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.ol', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.orderedlist),
                                                                                                                                tooltip: lang.lists.ordered + representShortcut('insertOrderedList'),
                                                                                                                                click:  context.createInvokeHandler('editor.insertOrderedList')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5150..5156
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5307..5313
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5465..5471
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5491..5497
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5499..5505

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 91.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.hr', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.minus),
                                                                                                                                tooltip: lang.hr.insert + representShortcut('insertHorizontalRule'),
                                                                                                                                click: context.createInvokeHandler('editor.insertHorizontalRule')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5150..5156
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5307..5313
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5315..5321
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5491..5497
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5499..5505

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 91.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.redo', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.redo),
                                                                                                                                tooltip: lang.history.redo + representShortcut('redo'),
                                                                                                                                click: context.createInvokeHandler('editor.redo')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5150..5156
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5307..5313
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5315..5321
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5465..5471
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5499..5505

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 91.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.superscript', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'note-btn-superscript',
                                                                                                                                contents: ui.icon(options.icons.superscript),
                                                                                                                                tooltip: lang.font.superscript,
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5176..5183
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5473..5480
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5482..5489

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 88.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.fullscreen', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'btn-fullscreen',
                                                                                                                                contents: ui.icon(options.icons.arrowsAlt),
                                                                                                                                tooltip: lang.options.fullscreen,
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5167..5174
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5176..5183
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5482..5489

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 88.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.subscript', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'note-btn-subscript',
                                                                                                                                contents: ui.icon(options.icons.subscript),
                                                                                                                                tooltip: lang.font.subscript,
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5167..5174
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5473..5480
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5482..5489

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 88.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.codeview', function () {
                                                                                                                              return ui.button({
                                                                                                                                className: 'btn-codeview',
                                                                                                                                contents: ui.icon(options.icons.code),
                                                                                                                                tooltip: lang.options.codeview,
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5167..5174
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5176..5183
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5473..5480

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 88.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                ui.button({
                                                                                                                                  className: 'dropdown-toggle',
                                                                                                                                  contents: ui.icon(options.icons.magic) + ' ' + ui.icon(options.icons.caret, 'span'),
                                                                                                                                  tooltip: lang.style.style,
                                                                                                                                  data: {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5368..5375
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5391..5398
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5410..5417

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 85.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                ui.button({
                                                                                                                                  className: 'dropdown-toggle',
                                                                                                                                  contents: ui.icon(options.icons.alignLeft) + ' ' + ui.icon(options.icons.caret, 'span'),
                                                                                                                                  tooltip: lang.paragraph.paragraph,
                                                                                                                                  data: {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5094..5101
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5391..5398
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5410..5417

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 85.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                ui.button({
                                                                                                                                  className: 'dropdown-toggle',
                                                                                                                                  contents: ui.icon(options.icons.textHeight) + ' ' + ui.icon(options.icons.caret, 'span'),
                                                                                                                                  tooltip: lang.font.height,
                                                                                                                                  data: {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5094..5101
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5368..5375
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5410..5417

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 85.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                ui.button({
                                                                                                                                  className: 'dropdown-toggle',
                                                                                                                                  contents: ui.icon(options.icons.table) + ' ' + ui.icon(options.icons.caret, 'span'),
                                                                                                                                  tooltip: lang.table.table,
                                                                                                                                  data: {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5094..5101
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5368..5375
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5391..5398

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 85.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var listNext = function (node, pred) {
                                                                                                                            pred = pred || func.fail;
                                                                                                                      
                                                                                                                            var nodes = [];
                                                                                                                            while (node) {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 750..760

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 85.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var listPrev = function (node, pred) {
                                                                                                                            pred = pred || func.fail;
                                                                                                                      
                                                                                                                            var nodes = [];
                                                                                                                            while (node) {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 768..778

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 85.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.video', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.video),
                                                                                                                                tooltip: lang.video.video,
                                                                                                                                click: context.createInvokeHandler('videoDialog.show')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5441..5447
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5449..5455
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5507..5513
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5583..5589
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5591..5597

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.linkDialogShow', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.link),
                                                                                                                                tooltip: lang.link.edit,
                                                                                                                                click: context.createInvokeHandler('linkDialog.show')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5441..5447
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5449..5455
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5457..5463
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5507..5513
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5591..5597

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.picture', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.picture),
                                                                                                                                tooltip: lang.image.image,
                                                                                                                                click: context.createInvokeHandler('imageDialog.show')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5441..5447
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5457..5463
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5507..5513
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5583..5589
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5591..5597

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.help', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.question),
                                                                                                                                tooltip: lang.options.help,
                                                                                                                                click: context.createInvokeHandler('helpDialog.show')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5441..5447
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5449..5455
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5457..5463
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5583..5589
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5591..5597

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.link', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.link),
                                                                                                                                tooltip: lang.link.link,
                                                                                                                                click: context.createInvokeHandler('linkDialog.show')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5449..5455
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5457..5463
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5507..5513
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5583..5589
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5591..5597

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.unlink', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.unlink),
                                                                                                                                tooltip: lang.link.unlink,
                                                                                                                                click: context.createInvokeHandler('editor.unlink')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5441..5447
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5449..5455
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5457..5463
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5507..5513
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5583..5589

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.floatRight', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.alignRight),
                                                                                                                                tooltip: lang.image.floatRight,
                                                                                                                                click: context.createInvokeHandler('editor.floatMe', 'right')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5548..5554
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5564..5570

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.floatNone', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.alignJustify),
                                                                                                                                tooltip: lang.image.floatNone,
                                                                                                                                click: context.createInvokeHandler('editor.floatMe', 'none')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5548..5554
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5556..5562

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.floatLeft', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: ui.icon(options.icons.alignLeft),
                                                                                                                                tooltip: lang.image.floatLeft,
                                                                                                                                click: context.createInvokeHandler('editor.floatMe', 'left')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5556..5562
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5564..5570

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 83.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                              $toolbar.find('.dropdown-fontsize li a').each(function () {
                                                                                                                                // always compare with string to avoid creating another func.
                                                                                                                                var isChecked = ($(this).data('value') + '') === (fontSize + '');
                                                                                                                                this.className = isChecked ? 'checked' : '';
                                                                                                                              });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5651..5655
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5671..5675

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 74.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                              $toolbar.find('.dropdown-fontname li a').each(function () {
                                                                                                                                // always compare string to avoid creating another func.
                                                                                                                                var isChecked = ($(this).data('value') + '') === (fontName + '');
                                                                                                                                this.className = isChecked ? 'checked' : '';
                                                                                                                              });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5661..5665
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5671..5675

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 74.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                              $toolbar.find('.dropdown-line-height li a').each(function () {
                                                                                                                                // always compare with string to avoid creating another func.
                                                                                                                                var isChecked = ($(this).data('value') + '') === (lineHeight + '');
                                                                                                                                this.className = isChecked ? 'checked' : '';
                                                                                                                              });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5651..5655
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5661..5665

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 74.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            var indent = ui.button({
                                                                                                                              contents: ui.icon(options.icons.indent),
                                                                                                                              tooltip: lang.paragraph.indent + representShortcut('indent'),
                                                                                                                              click: context.createInvokeHandler('editor.indent')
                                                                                                                            });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5323..5327
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5329..5333
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5335..5339
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5341..5345
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5347..5351

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 71.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            var justifyCenter = ui.button({
                                                                                                                              contents: ui.icon(options.icons.alignCenter),
                                                                                                                              tooltip: lang.paragraph.center + representShortcut('justifyCenter'),
                                                                                                                              click: context.createInvokeHandler('editor.justifyCenter')
                                                                                                                            });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5323..5327
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5335..5339
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5341..5345
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5347..5351
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5353..5357

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 71.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            var outdent = ui.button({
                                                                                                                              contents: ui.icon(options.icons.outdent),
                                                                                                                              tooltip: lang.paragraph.outdent + representShortcut('outdent'),
                                                                                                                              click: context.createInvokeHandler('editor.outdent')
                                                                                                                            });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5323..5327
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5329..5333
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5335..5339
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5341..5345
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5353..5357

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 71.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            var justifyLeft = ui.button({
                                                                                                                              contents: ui.icon(options.icons.alignLeft),
                                                                                                                              tooltip: lang.paragraph.left + representShortcut('justifyLeft'),
                                                                                                                              click: context.createInvokeHandler('editor.justifyLeft')
                                                                                                                            });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5329..5333
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5335..5339
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5341..5345
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5347..5351
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5353..5357

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 71.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            var justifyRight = ui.button({
                                                                                                                              contents: ui.icon(options.icons.alignRight),
                                                                                                                              tooltip: lang.paragraph.right + representShortcut('justifyRight'),
                                                                                                                              click: context.createInvokeHandler('editor.justifyRight')
                                                                                                                            });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5323..5327
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5329..5333
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5341..5345
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5347..5351
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5353..5357

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 71.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 6 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            var justifyFull = ui.button({
                                                                                                                              contents: ui.icon(options.icons.alignJustify),
                                                                                                                              tooltip: lang.paragraph.justify + representShortcut('justifyFull'),
                                                                                                                              click: context.createInvokeHandler('editor.justifyFull')
                                                                                                                            });
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5323..5327
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5329..5333
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5335..5339
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5347..5351
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5353..5357

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 71.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.bindEnterKey = function ($input, $btn) {
                                                                                                                            $input.on('keypress', function (event) {
                                                                                                                              if (event.keyCode === key.code.ENTER) {
                                                                                                                                $btn.trigger('click');
                                                                                                                              }
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6185..6191

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 70.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.bindEnterKey = function ($input, $btn) {
                                                                                                                            $input.on('keypress', function (event) {
                                                                                                                              if (event.keyCode === key.code.ENTER) {
                                                                                                                                $btn.trigger('click');
                                                                                                                              }
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6039..6045

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 70.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                              var $linkText = self.$dialog.find('.note-link-text'),
                                                                                                                              $linkUrl = self.$dialog.find('.note-link-url'),
                                                                                                                              $linkBtn = self.$dialog.find('.note-link-btn'),
                                                                                                                              $openInNewWindow = self.$dialog.find('input[type=checkbox]');
                                                                                                                      assets/admin/global/plugins/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js on lines 30..33

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 70.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          return {
                                                                                                                            eq: eq,
                                                                                                                            eq2: eq2,
                                                                                                                            peq2: peq2,
                                                                                                                            ok: ok,
                                                                                                                      assets/admin/global/plugins/plupload/js/moxie.js on lines 461..475

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 69.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.activate = function (isIncludeCodeview) {
                                                                                                                            var $btn = $toolbar.find('button');
                                                                                                                            if (!isIncludeCodeview) {
                                                                                                                              $btn = $btn.not('.btn-codeview');
                                                                                                                            }
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5784..5790

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 68.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.deactivate = function (isIncludeCodeview) {
                                                                                                                            var $btn = $toolbar.find('button');
                                                                                                                            if (!isIncludeCodeview) {
                                                                                                                              $btn = $btn.not('.btn-codeview');
                                                                                                                            }
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5776..5782

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 68.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.imageSize50', function () {
                                                                                                                              return  ui.button({
                                                                                                                                contents: '<span class="note-fontsize-10">50%</span>',
                                                                                                                                tooltip: lang.image.resizeHalf,
                                                                                                                                click: context.createInvokeHandler('editor.resize', '0.5')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5525..5531
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5539..5545

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 67.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.imageSize100', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: '<span class="note-fontsize-10">100%</span>',
                                                                                                                                tooltip: lang.image.resizeFull,
                                                                                                                                click: context.createInvokeHandler('editor.resize', '1')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5532..5538
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5539..5545

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 67.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            context.memo('button.imageSize25', function () {
                                                                                                                              return ui.button({
                                                                                                                                contents: '<span class="note-fontsize-10">25%</span>',
                                                                                                                                tooltip: lang.image.resizeQuarter,
                                                                                                                                click: context.createInvokeHandler('editor.resize', '0.25')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5525..5531
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5532..5538

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 67.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            this.$dialog = ui.dialog({
                                                                                                                              title: lang.video.insert,
                                                                                                                              fade: options.dialogsFade,
                                                                                                                              body: body,
                                                                                                                              footer: footer
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6026..6031

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 67.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            this.$dialog = ui.dialog({
                                                                                                                              title: lang.image.insert,
                                                                                                                              fade: options.dialogsFade,
                                                                                                                              body: body,
                                                                                                                              footer: footer
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6172..6177

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 67.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.redo = function () {
                                                                                                                            context.triggerEvent('before.command', $editable.html());
                                                                                                                            history.redo();
                                                                                                                            context.triggerEvent('change', $editable.html());
                                                                                                                          };
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 3895..3899

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 66.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.undo = function () {
                                                                                                                            context.triggerEvent('before.command', $editable.html());
                                                                                                                            history.undo();
                                                                                                                            context.triggerEvent('change', $editable.html());
                                                                                                                          };
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 3905..3909

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 66.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                ui.button({
                                                                                                                                  className: 'dropdown-toggle',
                                                                                                                                  contents: '<span class="note-current-fontname"/> ' + ui.icon(options.icons.caret, 'span'),
                                                                                                                                  tooltip: lang.font.name,
                                                                                                                                  data: {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5209..5216

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 65.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                ui.button({
                                                                                                                                  className: 'dropdown-toggle',
                                                                                                                                  contents: '<span class="note-current-fontsize"/>' + ui.icon(options.icons.caret, 'span'),
                                                                                                                                  tooltip: lang.font.size,
                                                                                                                                  data: {
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5187..5194

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 65.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            for (var idx = 0, len = array.length; idx < len; idx ++) {
                                                                                                                              if (!contains(results, array[idx])) {
                                                                                                                                results.push(array[idx]);
                                                                                                                              }
                                                                                                                            }
                                                                                                                      assets/admin/global/plugins/wysihtml/lib/rangy/rangy-core.js on lines 3483..3487

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 65.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            if (3 < dim.r && dim.r < options.insertTableMaxSize.row) {
                                                                                                                              $unhighlighted.css({ height: dim.r + 1 + 'em'});
                                                                                                                            }
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5716..5718

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 64.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            if (3 < dim.c && dim.c < options.insertTableMaxSize.col) {
                                                                                                                              $unhighlighted.css({ width: dim.c + 1 + 'em'});
                                                                                                                            }
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5720..5722

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 64.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            } else if (dmMatch && dmMatch[2].length) {
                                                                                                                              $video = $('<iframe>')
                                                                                                                                  .attr('frameborder', 0)
                                                                                                                                  .attr('src', '//www.dailymotion.com/embed/video/' + dmMatch[2])
                                                                                                                                  .attr('width', '640').attr('height', '360');
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6242..6265

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 59.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            } else if (vimMatch && vimMatch[3].length) {
                                                                                                                              $video = $('<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>')
                                                                                                                                  .attr('frameborder', 0)
                                                                                                                                  .attr('src', '//player.vimeo.com/video/' + vimMatch[3])
                                                                                                                                  .attr('width', '640').attr('height', '360');
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6247..6265

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 59.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                              $video = $('<iframe>')
                                                                                                                                  .attr('frameborder', 0)
                                                                                                                                  .attr('src', igMatch[0] + '/embed/')
                                                                                                                                  .attr('width', '612').attr('height', '710')
                                                                                                                                  .attr('scrolling', 'no')
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6237..6241

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 58.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                              $video = $('<iframe>')
                                                                                                                                  .attr('frameborder', 0)
                                                                                                                                  .attr('src', vMatch[0] + '/embed/simple')
                                                                                                                                  .attr('width', '600').attr('height', '600')
                                                                                                                                  .attr('class', 'vine-embed');
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6230..6234

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 58.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var detachEvents = function ($node, events) {
                                                                                                                            Object.keys(events).forEach(function (key) {
                                                                                                                              $node.off(key, events[key]);
                                                                                                                            });
                                                                                                                          };
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 1405..1409

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 55.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var attachEvents = function ($node, events) {
                                                                                                                            Object.keys(events).forEach(function (key) {
                                                                                                                              $node.on(key, events[key]);
                                                                                                                            });
                                                                                                                          };
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 1411..1415

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 55.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var nextPointUntil = function (point, pred) {
                                                                                                                            while (point) {
                                                                                                                              if (pred(point)) {
                                                                                                                                return point;
                                                                                                                              }
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 55 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 1052..1062

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 53.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var prevPointUntil = function (point, pred) {
                                                                                                                            while (point) {
                                                                                                                              if (pred(point)) {
                                                                                                                                return point;
                                                                                                                              }
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 55 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 1071..1081

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 53.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.events = {
                                                                                                                            'summernote.init summernote.change': function () {
                                                                                                                              self.update();
                                                                                                                            },
                                                                                                                            'summernote.codeview.toggled': function () {
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5937..5944

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 52.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            for (var idx = 0, len = array.length; idx < len; idx ++) {
                                                                                                                              if (!pred(array[idx])) {
                                                                                                                                return false;
                                                                                                                              }
                                                                                                                            }
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                      assets/admin/global/plugins/wysihtml/lib/rangy/rangy-textrange.js on lines 625..629

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 52.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.events = {
                                                                                                                            'summernote.keyup summernote.mouseup summernote.change summernote.scroll': function () {
                                                                                                                              self.update();
                                                                                                                            },
                                                                                                                            'summernote.dialog.shown': function () {
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5017..5024

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 52.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var prev = function (array, item) {
                                                                                                                            var idx = indexOf(array, item);
                                                                                                                            if (idx === -1) { return null; }
                                                                                                                      
                                                                                                                            return array[idx - 1];
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 331..336

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 52.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          var next = function (array, item) {
                                                                                                                            var idx = indexOf(array, item);
                                                                                                                            if (idx === -1) { return null; }
                                                                                                                      
                                                                                                                            return array[idx + 1];
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 50 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 342..347

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 52.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            isMove: function (keyCode) {
                                                                                                                              return list.contains([
                                                                                                                                keyMap.LEFT,
                                                                                                                                keyMap.UP,
                                                                                                                                keyMap.RIGHT,
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 2223..2230

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 46.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                            isEdit: function (keyCode) {
                                                                                                                              return list.contains([
                                                                                                                                keyMap.BACKSPACE,
                                                                                                                                keyMap.TAB,
                                                                                                                                keyMap.ENTER,
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 2237..2244

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 46.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.destroy = function () {
                                                                                                                            ui.hideDialog(this.$dialog);
                                                                                                                            this.$dialog.remove();
                                                                                                                          };
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 2 other locations - About 30 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5828..5831
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6180..6183

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 45.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.destroy = function () {
                                                                                                                            ui.hideDialog(this.$dialog);
                                                                                                                            this.$dialog.remove();
                                                                                                                          };
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 2 other locations - About 30 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 5828..5831
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6034..6037

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 45.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                          this.destroy = function () {
                                                                                                                            ui.hideDialog(this.$dialog);
                                                                                                                            this.$dialog.remove();
                                                                                                                          };
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 2 other locations - About 30 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6034..6037
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6180..6183

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 45.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                $videoBtn.click(function (event) {
                                                                                                                                  event.preventDefault();
                                                                                                                      
                                                                                                                                  deferred.resolve($videoUrl.val());
                                                                                                                                });
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 30 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6087..6091

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 45.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                      Open

                                                                                                                                $imageBtn.click(function (event) {
                                                                                                                                  event.preventDefault();
                                                                                                                      
                                                                                                                                  deferred.resolve($imageUrl.val());
                                                                                                                                });
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/admin/global/plugins/bootstrap-summernote/summernote.js and 1 other location - About 30 mins to fix
                                                                                                                      assets/admin/global/plugins/bootstrap-summernote/summernote.js on lines 6310..6314

                                                                                                                      Duplicated Code

                                                                                                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 45.

                                                                                                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      There are no issues that match your filters.

                                                                                                                      Category
                                                                                                                      Status