Showing 75 of 125 total issues
Function winnow_results
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AbstractChosen.prototype.winnow_results = function() {
var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
this.no_results_clear();
results = 0;
searchText = this.get_search_text();
Function hide
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hide: function(callback) {
var self = this;
// save the method custom callback and cancel any show method custom callbacks
Function _update
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_update: function(content) {
var self = this;
// change the content
Function _autogrow
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
EpicEditor.prototype._autogrow = function () {
var editorHeight
, newHeight
, minHeight
, maxHeight
Function set_up_html
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.set_up_html = function() {
var container_classes, container_props;
container_classes = ["chosen-container"];
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
if (this.inherit_select_classes && this.form_field.className) {
Function getUsers
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getUsers() {
$.getJSON("/map/users", function(data) {
var i = 0,
row = {},
Consider simplifying this complex logical expression. Open
Open
if (typeof args[0] === 'string') {
var v = '#*$~&';
this.each(function() {
Function _mergeObjs
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _mergeObjs() {
// copy reference to target object
var target = arguments[0] || {}
, i = 1
, length = arguments.length
Function save
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
EpicEditor.prototype.save = function (_isPreviewDraft, _isAuto) {
var self = this
, storage
, isUpdate = false
, file = self.settings.file.name
Function result_select
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.result_select = function(evt) {
var high, item;
if (this.result_highlight) {
high = this.result_highlight;
this.result_clear_highlight();
Function keydown_checker
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.keydown_checker = function(evt) {
var stroke, _ref1;
stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
this.search_field_scale();
if (stroke !== 8 && this.pending_backstroke) {
Method selectAll
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function selectAll()
{
$postsQuery = $this->_localConfig->database()->select()
->from('posts', array(
'user_id',
Function keyup_checker
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AbstractChosen.prototype.keyup_checker = function(evt) {
var stroke, _ref;
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
this.search_field_scale();
switch (stroke) {
Function _exitFullscreen
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
self._exitFullscreen = function (el) {
this._fixScrollbars();
_saveStyleState(self.element, 'apply', _elementStates.element);
_saveStyleState(self.iframeElement, 'apply', _elementStates.iframeElement);
Function reflow
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
EpicEditor.prototype.reflow = function (kind, callback) {
var self = this
, widthDiff = _outerWidth(self.element) - self.element.offsetWidth
, heightDiff = _outerHeight(self.element) - self.element.offsetHeight
, elements = [self.iframeElement, self.editorIframe, self.previewerIframe]
Function shortcutHandler
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function shortcutHandler(e) {
if (e.keyCode == self.settings.shortcut.modifier) { isMod = true } // check for modifier press(default is alt key), save to var
if (e.keyCode == 17) { isCtrl = true } // check for ctrl/cmnd press, in order to catch ctrl/cmnd + s
// Check for alt+p and make sure were not in fullscreen - default shortcut to switch to preview
Method post
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function post($postId)
{
$imageUrl = isset($_POST['image_url']) ? $_POST['image_url'] : null;
$subject = isset($_POST['subject']) ? $_POST['subject'] : null;
Function result_add_option
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AbstractChosen.prototype.result_add_option = function(option) {
var classes, option_el;
if (!option.search_match) {
return '';
}
Method post
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function post()
{
$imageUrl = isset($_POST['image_url']) ? $_POST['image_url'] : null;
$subject = isset($_POST['subject']) ? $_POST['subject'] : null;
$body = isset($_POST['body']) ? $_POST['body'] : null;
Function _interval_set
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_interval_set: function() {
var self = this;
self.checkInterval = setInterval(function() {