Skip to content

Commit

Permalink
Version 5 launch, added another autotrack library, some bugfixes, lot…
Browse files Browse the repository at this point in the history
…s of other prep.
  • Loading branch information
chrisblakley committed Apr 27, 2017
1 parent c5651cc commit c9de4fb
Show file tree
Hide file tree
Showing 21 changed files with 415 additions and 202 deletions.
2 changes: 1 addition & 1 deletion Nebula-Child/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/dev.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

/* Processed on Monday, April 24, 2017 at 12:25am */
/* Processed on Thursday, April 27, 2017 at 6:49pm */
2 changes: 1 addition & 1 deletion assets/css/login.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/pre.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/tinymce.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/wireframing.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 8 additions & 20 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ function isGoogleAnalyticsReady(){
//Detect Battery Level
function nebulaBattery(){
nebula.user.client.device.battery = false;
if ( typeof Modernizr != 'undefined' && has(Modernizr, 'batteryapi') ){

if ( has(navigator, 'getBattery') ){
navigator.getBattery().then(function(battery){
nebulaBatteryData(battery);
jQuery(battery).on('chargingchange levelchange', function(){
Expand Down Expand Up @@ -414,15 +415,6 @@ function eventTracking(){
ga('send', 'event', 'Button Click', btnText, jQuery(this).attr('href'));
});

//Outbound Links
nebula.dom.document.on('mousedown touch tap', "a[rel*='external']", function(e){
eventIntent = ( e.which >= 2 )? 'Intent' : 'Explicit';
ga('set', gaCustomDimensions['eventIntent'], eventIntent);
ga('set', gaCustomDimensions['timestamp'], localTimestamp());
ga('send', 'event', 'Outbound Link', 'Click', jQuery(this).attr('href'));
nv('append', {'outbound_links': jQuery(this).attr('href')});
});

//PDF View/Download
nebula.dom.document.on('mousedown touch tap', "a[href$='.pdf']", function(e){
eventIntent = ( e.which >= 2 )? 'Intent' : 'Explicit';
Expand Down Expand Up @@ -1595,9 +1587,9 @@ function cf7Functions(){
}

//Track CF7 forms when they scroll into view (Autotrack). Currently not possible to change category/action/label for just these impressions.
jQuery('form.wpcf7-form').each(function(){
jQuery('form').each(function(){
ga('impressionTracker:observeElements', [{
'id': jQuery(this).closest('.wpcf7').attr('id'),
'id': jQuery(this).closest('.wpcf7').attr('id') || jQuery(this).attr('id'),
'threshold': 0.25
}]);
});
Expand All @@ -1606,7 +1598,7 @@ function cf7Functions(){
jQuery('.wpcf7-form input, .wpcf7-form textarea').on('focus', function(){
formID = jQuery(this).parents('div.wpcf7').attr('id');

if ( !jQuery('form').hasClass('.ignore-form') && !jQuery('form').find('.ignore-form').length && (typeof formStarted[formID] === 'undefined' || !formStarted[formID]) ){
if ( !jQuery('form').hasClass('.ignore-form') && !jQuery('form').find('.ignore-form').length && !jQuery('#' + e.target.id).parents('.ignore-form').length && (typeof formStarted[formID] === 'undefined' || !formStarted[formID]) ){
ga('set', gaCustomDimensions['timestamp'], localTimestamp());
ga('set', gaCustomMetrics['formStarts'], 1);
ga('send', 'event', 'CF7 Form', 'Started Form (Focus)', 'Began filling out form ID: ' + formID + ' (' + jQuery(this).attr('id') + ')');
Expand Down Expand Up @@ -1675,7 +1667,7 @@ function cf7Functions(){
//CF7 Mail Sent Success (CF7 AJAX response after submit success)
nebula.dom.document.on('wpcf7mailsent', function(e){
var formTime = nebulaTimer(e.target.id, 'end');
if ( !jQuery('#' + e.target.id).hasClass('.ignore-form') && !jQuery('#' + e.target.id).find('.ignore-form').length ){
if ( !jQuery('#' + e.target.id).hasClass('.ignore-form') && !jQuery('#' + e.target.id).find('.ignore-form').length && !jQuery('#' + e.target.id).parents('.ignore-form').length ){
ga('set', gaCustomMetrics['formSubmissions'], 1);
}
ga('set', gaCustomDimensions['contactMethod'], 'CF7 Form (Success)');
Expand Down Expand Up @@ -1745,10 +1737,6 @@ function cf7LocalStorage(){

//Form live (soft) validator
function nebulaLiveValidator(){
if ( !jQuery('.nebula-validate').length ){ //@TODO "Nebula" 0: This isn't necessarily required... Maybe remove this restriction?
return false;
}

//Standard text inputs and select menus
jQuery('.nebula-validate-text, .nebula-validate-select').on('keyup change blur', function(e){
if ( jQuery(this).val() === '' ){
Expand Down Expand Up @@ -2896,7 +2884,7 @@ function has(obj, prop){

//Functionality for selecting and copying text using Nebula Pre tags.
function nebulaPre(){
try { //@TODO "Nebula" 0: Use Modernizr check here instead.
try {
if ( document.queryCommandEnabled("SelectAll") ){ //@TODO "Nebula" 0: If using document.queryCommandSupported("copy") it always returns false (even though it does actually work when execCommand('copy') is called.
var selectCopyText = 'Copy to clipboard';
} else if ( document.body.createTextRange || window.getSelection ){
Expand Down Expand Up @@ -3081,7 +3069,7 @@ function nebulaVideoTracking(){

//Native HTML5 Video Tracking
function nebulaHTML5VideoTracking(){
if ( jQuery('video').is(':visible').length ){ //@TODO "Nebula" 0: Better detection for Modernizr's video polyfill?
if ( jQuery('video').is(':visible').length ){
jQuery('video').each(function(){
var oThis = jQuery(this);
var id = oThis.attr('id');
Expand Down
8 changes: 4 additions & 4 deletions assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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.
Author: Pinckney Hugo Group
Author URI: http://www.pinckneyhugo.com
Version: 4.11.22
Version: 5.0.0
License: GNU General Public License v2.0 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
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
Expand Down Expand Up @@ -86,7 +86,7 @@ form.nebula-search-iconable {position: relative; display: inline-block; margin:
.lte-ie9 &,
.ie10 & {background: #eee;}
}
.borderimage &:before {content: '\f002'; display: inline-block; position: absolute; top: 4px; left: 7px; width: 12px; height: 12px; pointer-events: none; font-family: "FontAwesome"; font-size: rem(12px); line-height: rem(20px); text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0);}
.borderimage &:before {content: '\f002'; display: inline-block; position: absolute; top: rem(9px); left: 7px; pointer-events: none; font-family: "FontAwesome"; font-size: rem(12px); line-height: 100%; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transform: translate(0, 0);}
.borderimage &.searching:before {content: '\f110'; @include prefix((animation: fa-spin 2s infinite linear), webkit moz);}
}

Expand Down Expand Up @@ -243,8 +243,8 @@ input:-ms-input-placeholder {font-weight: 300; color: $placeholder_color; @inclu
//jQuery UI Autocomplete Hero Search
div#nebula-hero-formcon {text-align: center; display: none; @include media("lg"){display: block;};}
form#nebula-hero-search {position: relative; margin: 0; width: 100%; max-width: 600px; text-align: center; z-index: 100; @include prefix((transition: all 0.5s));
&:before {top: 9px; left: 10px; width: 16px; height: 16px; font-size: rem(16px); line-height: 16px;}
input {display: block; width: 100%; font-size: rem(18px); line-height: 23px; padding: 5px 6px 5px 30px; @include background-color(#fff, 0.9); border-radius: 0; box-shadow: 0px 3px 16px rgba(0, 0, 0, 0.2);
&:before {left: 10px; font-size: rem(16px);}
input {display: block; width: 100%; font-size: rem(18px); line-height: 23px; padding: 5px 6px 5px 32px; @include background-color(#fff, 0.9); border-radius: 0; box-shadow: 0px 3px 16px rgba(0, 0, 0, 0.2);
&.active {@include background-color(#fff, 0.95); box-shadow: 0 0 25px rgba(red($primary_color), green($primary_color), blue($primary_color), 0.6);}
}
&.autocompleted input {border-bottom-left-radius: 0; border-bottom-right-radius: 0; border: none;}
Expand Down
Loading

0 comments on commit c9de4fb

Please sign in to comment.