Skip to content

Commit e5bce2b

Browse files
committed
Form flow bugfixes, more Codacy improvements
I've enabled some new Codacy patterns, so expect some additional commits focused on minor pattern fixes. #1884
1 parent 6f806e7 commit e5bce2b

File tree

17 files changed

+75
-80
lines changed

17 files changed

+75
-80
lines changed

Nebula-Child/resources/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//BEGIN automated edits. These will be automatically overwritten.
22
var THEME_NAME = 'nebula-child';
3-
var NEBULA_VERSION = 'v6.11.30.4061'; //Tuesday, April 30, 2019 10:46:48 AM
3+
var NEBULA_VERSION = 'v6.11.30.8837'; //Tuesday, April 30, 2019 9:12:33 PM
44
var OFFLINE_URL = 'https://gearside.com/nebula/offline/';
55
var OFFLINE_IMG = 'https://gearside.com/nebula/wp-content/themes/Nebula-master/assets/img/offline.svg';
66
var OFFLINE_GA_DIMENSION = 'cd2';

Nebula-Child/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/admin.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/critical.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/login.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/pre.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/admin.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ function nebulaUniqueSlugChecker(){
508508
allowTabChar(this);
509509
}
510510
}
511-
})
511+
});
512512
}
513513
return this;
514514
}
@@ -519,8 +519,8 @@ function keywordSearch(container, parent, value, filteredClass){
519519
if ( !filteredClass ){
520520
var filteredClass = 'filtereditem';
521521
}
522-
jQuery(container).find("*:not(:Contains(" + value + "))").closest(parent).addClass(filteredClass);
523-
jQuery(container).find("*:Contains(" + value + ")").closest(parent).removeClass(filteredClass);
522+
jQuery(container).find('*:not(:Contains(' + value + '))').closest(parent).addClass(filteredClass);
523+
jQuery(container).find('*:Contains(' + value + ')').closest(parent).removeClass(filteredClass);
524524
}
525525

526526
/*==========================
@@ -603,8 +603,8 @@ function removeQueryParameter(keys, sourceURL){
603603
}
604604

605605
//Custom CSS expression for a case-insensitive contains(). Source: https://css-tricks.com/snippets/jquery/make-jquery-contains-case-insensitive/
606-
//Call it with :Contains() - Ex: ...find("*:Contains(" + jQuery('.something').val() + ")")... -or- use the nebula function: keywordSearch(container, parent, value);
607-
jQuery.expr[":"].Contains=function(e,n,t){return(e.textContent||e.innerText||"").toUpperCase().indexOf(t[3].toUpperCase())>=0};
606+
//Call it with :Contains() - Ex: ...find('*:Contains(' + jQuery('.something').val() + ')')... -or- use the nebula function: keywordSearch(container, parent, value);
607+
jQuery.expr[':'].Contains=function(e,n,t){return(e.textContent||e.innerText||'').toUpperCase().indexOf(t[3].toUpperCase())>=0};
608608

609609

610610
//Nebula Options Functions
@@ -952,7 +952,7 @@ function performanceMetrics(){
952952
'duration': windowLoaded,
953953
'elapsed': windowLoaded
954954
}
955-
}
955+
};
956956

957957
console.groupCollapsed('Performance');
958958
console.table(jQuery.extend(nebula.site.timings, clientTimings));

assets/js/nebula.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,17 +2160,17 @@ function cf7Functions(){
21602160

21612161
//Form starts
21622162
if ( typeof formStarted[formID] === 'undefined' || !formStarted[formID] ){
2163-
thisEvent.label = 'Began filling out form ID: ' + thisEvent.formID + ' (' + thisEvent.Field + ')';
2163+
thisEvent.label = 'Began filling out form ID: ' + thisEvent.formID + ' (' + thisEvent.field + ')';
21642164

21652165
ga('set', nebula.analytics.metrics.formStarts, 1);
21662166
nebula.dom.document.trigger('nebula_event', thisEvent);
21672167
ga('send', 'event', thisEvent.category, thisEvent.action, thisEvent.label);
21682168
nv('identify', {'form_contacted': 'CF7 (' + thisEvent.formID + ') Started'}, false);
2169-
nv('event', 'Contact Form (' + thisEvent.formID + ') Started (' + thisEvent.Field + ')');
2169+
nv('event', 'Contact Form (' + thisEvent.formID + ') Started (' + thisEvent.field + ')');
21702170
formStarted[formID] = true;
21712171
}
21722172

2173-
updateFormFlow(thisEvent.formID, thisEvent.Field, thisEvent.fieldInfo);
2173+
updateFormFlow(thisEvent.formID, thisEvent.field, thisEvent.fieldInfo);
21742174

21752175
//Track each individual field focuses
21762176
if ( !jQuery(this).is('button') ){
@@ -2365,11 +2365,15 @@ function updateFormFlow(formID, field, info){
23652365
if ( !info ){
23662366
info = '';
23672367
} else {
2368+
if ( info.length > 25 ){
2369+
info = info.substring(0, 25) + '...'; //Truncate long info text
2370+
}
2371+
23682372
info = ' (' + info + ')';
23692373
}
23702374

23712375
if ( !formFlow[formID] ){
2372-
formFlow[formID] = field + info;
2376+
formFlow[formID] = formID + ': ' + field + info; //Start a new form flow string beginning with the form ID
23732377
} else {
23742378
formFlow[formID] += ' > ' + field + info;
23752379
}

assets/scss/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Description: Nebula is a springboard WordPress theme framework for developers. Like other WordPress startup themes, it has custom functionality built-in (like shortcodes, styles, and JS/PHP functions), but unlike other themes Nebula is not meant for the end-user.
55
Author: Pinckney Hugo Group
66
Author URI: http://www.pinckneyhugo.com
7-
Version: 6.11.30.4493
7+
Version: 6.11.30.8838
88
License: GNU General Public License v2.0 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010
Tags: one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, threaded-comments, theme-options, sticky-post, post-formats, microformats, full-width-template, front-page-post-form, flexible-header, featured-images, featured-image-header, editor-style, custom-menu, custom-colors, accessibility-ready

inc/data/nebula_theme.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "6.11.30.4061",
2+
"version": "6.11.30.6321",
33
"details_url": "https://github.com/chrisblakley/Nebula/commits/master",
44
"download_url": "https://github.com/chrisblakley/Nebula/archive/master.zip"
55
}

0 commit comments

Comments
 (0)