Showing 26 of 83 total issues
File dom.js
has 597 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
Scoped.define("module:Dom", [
"base:Types",
"base:Objs",
"module:Info",
"base:Async"
File info.js
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
Scoped.define("module:Info", [
"base:Objs", "module:FlashDetect"
], function(Objs, FlashDetect) {
return {
Function exports
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
var gruntHelper = require('betajs-compile');
var dist = 'betajs-browser';
Function embedTemplate
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
embedTemplate: function(options) {
options = options || {};
var params = [];
params.push({
"objectKey": "classid",
Function _upload
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_upload: function() {
var self = this;
var iframe = document.createElement("iframe");
var id = "upload-iframe-" + this.cid();
iframe.id = id;
Function execute
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
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();
File flash.js
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
*/
Function execute
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Function execute
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
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);
Function handleKeyEvent
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleKeyEvent: function(hotkey, e, options) {
options = Objs.extend({
"disable_in_input": false,
"keycode": false
}, options);
Function triggerDomEvent
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
triggerDomEvent: function(element, eventName, parameters, customEventParams) {
element = this.unbox(element);
eventName = eventName.toLowerCase();
var onEvent = "on" + eventName;
var onEventHandler = null;
Function _upload
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function elementDimensions
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
elementDimensions: function(element) {
element = this.unbox(element);
var cs, w, h;
if (element && window.getComputedStyle) {
try {
Function _updateState
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_updateState: function() {
if (this.state() !== "uploading")
return;
this._uploadingCount = 0;
var error = false;
Function _upload
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function elementsByTemplate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
elementsByTemplate: function(template) {
template = template.trim();
var polyfill = Info.isInternetExplorer() && Info.internetExplorerVersion() < 9;
/*
* TODO: This is probably not a good fix.
Function execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
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();
Function embedFlashObject
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
embedFlashObject: function(container, options) {
container = Dom.unbox(container);
options = options || {};
if (options.parentBgcolor) {
try {
Function set
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
set: function(key, value, end, path, domain, secure, sameSite) {
Consider simplifying this complex logical expression. Open
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) {