betajs/betajs-browser

View on GitHub

Showing 26 of 83 total issues

File dom.js has 597 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Scoped.define("module:Dom", [
    "base:Types",
    "base:Objs",
    "module:Info",
    "base:Async"
Severity: Major
Found in src/dom/dom.js - About 1 day to fix

    File info.js has 488 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    Scoped.define("module:Info", [
        "base:Objs", "module:FlashDetect"
    ], function(Objs, FlashDetect) {
        return {
    
    
    Severity: Minor
    Found in src/browser/info.js - About 7 hrs to fix

      Function exports has 109 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(grunt) {
      
          var pkg = grunt.file.readJSON('package.json');
          var gruntHelper = require('betajs-compile');
          var dist = 'betajs-browser';
      Severity: Major
      Found in Gruntfile.js - About 4 hrs to fix

        Function embedTemplate has 94 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                embedTemplate: function(options) {
                    options = options || {};
                    var params = [];
                    params.push({
                        "objectKey": "classid",
        Severity: Major
        Found in src/browser/flash.js - About 3 hrs to fix

          Function _upload has 69 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _upload: function() {
                      var self = this;
                      var iframe = document.createElement("iframe");
                      var id = "upload-iframe-" + this.cid();
                      iframe.id = id;
          Severity: Major
          Found in src/uploads/form_iframe_file_uploader.js - About 2 hrs to fix

            Function execute has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    execute: function(options, progress, progressCtx, xmlhttp) {
                        var uri = Uri.appendUriParams(options.uri, options.query || {});
                        if (!options.methodSupportsPayload)
                            uri = Uri.appendUriParams(uri, options.data || {});
                        var promise = Promise.create();
            Severity: Major
            Found in src/ajax/xml_http_request_ajax.js - About 2 hrs to fix

              File flash.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
              Copyright (c) Copyright (c) 2007, Carl S. Yestrau All rights reserved.
              Code licensed under the BSD License: http://www.featureblend.com/license.txt
              Version: 1.0.4
              */
              Severity: Minor
              Found in src/browser/flash.js - About 2 hrs to fix

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

                        execute: function(options) {
                            var postmessageName = "postmessage_" + Tokens.generate_token() + "_" + (id++);
                            var params = Objs.objectBy(options.postmessage, postmessageName);
                            params = Objs.extend(params, options.query);
                            var uri = Uri.appendUriParams(options.uri, params);
                Severity: Major
                Found in src/ajax/iframe_postmessage_ajax.js - About 2 hrs to fix

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

                          execute: function(options) {
                              var callbackName = "jsonp_" + Tokens.generate_token() + "_" + (id++);
                              var params = Objs.objectBy(options.jsonp, callbackName);
                              params = Objs.extend(params, options.query);
                              params = Objs.extend(params, options.data);
                  Severity: Minor
                  Found in src/ajax/jsonp_script_ajax.js - About 2 hrs to fix

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

                            handleKeyEvent: function(hotkey, e, options) {
                                options = Objs.extend({
                                    "disable_in_input": false,
                                    "keycode": false
                                }, options);
                    Severity: Minor
                    Found in src/browser/hotkeys.js - About 1 hr to fix

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

                              triggerDomEvent: function(element, eventName, parameters, customEventParams) {
                                  element = this.unbox(element);
                                  eventName = eventName.toLowerCase();
                                  var onEvent = "on" + eventName;
                                  var onEventHandler = null;
                      Severity: Minor
                      Found in src/dom/dom.js - About 1 hr to fix

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

                                    _upload: function() {
                                        var file = this._options.isBlob ? this._options.source : this._options.source.files[0];
                                        if (!S3Support.validateFileSize(file.size)) {
                                            this._setState("error", "File size is too big");
                                            return;
                        Severity: Minor
                        Found in src/uploads/s3/multipart_file_uploader.js - About 1 hr to fix

                          Function elementDimensions has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  elementDimensions: function(element) {
                                      element = this.unbox(element);
                                      var cs, w, h;
                                      if (element && window.getComputedStyle) {
                                          try {
                          Severity: Minor
                          Found in src/dom/dom.js - About 1 hr to fix

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

                                        _updateState: function() {
                                            if (this.state() !== "uploading")
                                                return;
                                            this._uploadingCount = 0;
                                            var error = false;
                            Severity: Minor
                            Found in src/uploads/multi_uploader.js - About 1 hr to fix

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

                                          _upload: function() {
                                              var identifier = this.__generateIdentifier();
                                              var file = this._options.isBlob ? this._options.source : this._options.source.files[0];
                                              Blobs.loadFileIntoArrayBuffer(file).success(function(arrayBuffer) {
                                                  var chunkNumber = 0;
                              Severity: Minor
                              Found in src/uploads/chunked_file_uploader.js - About 1 hr to fix

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

                                        elementsByTemplate: function(template) {
                                            template = template.trim();
                                            var polyfill = Info.isInternetExplorer() && Info.internetExplorerVersion() < 9;
                                            /*
                                             * TODO: This is probably not a good fix.
                                Severity: Minor
                                Found in src/dom/dom.js - About 1 hr to fix

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

                                          execute: function(options) {
                                              var uri = Uri.appendUriParams(options.uri, options.query || {});
                                              if (options.method === "GET")
                                                  uri = Uri.appendUriParams(uri, options.data || {});
                                              var promise = Promise.create();
                                  Severity: Minor
                                  Found in src/ajax/xdomain_request_ajax.js - About 1 hr to fix

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

                                            embedFlashObject: function(container, options) {
                                                container = Dom.unbox(container);
                                                options = options || {};
                                                if (options.parentBgcolor) {
                                                    try {
                                    Severity: Minor
                                    Found in src/browser/flash.js - About 1 hr to fix

                                      Function set has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                              set: function(key, value, end, path, domain, secure, sameSite) {
                                      Severity: Major
                                      Found in src/browser/cookies.js - About 50 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                    if (element && element.currentStyle) {
                                                        cs = element.currentStyle;
                                                        w = element.clientWidth - parseInt(cs.paddingLeft || 0, 10) - parseInt(cs.paddingRight || 0, 10);
                                                        h = element.clientHeight - parseInt(cs.paddingTop || 0, 10) - parseInt(cs.paddingTop || 0, 10);
                                                        if (w && h) {
                                        Severity: Major
                                        Found in src/dom/dom.js - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language