Skip to content

Commit

Permalink
Merge pull request #3583 from craigcook/bug-1220844-donottrack-websit…
Browse files Browse the repository at this point in the history
…e-link

Fix bug 1220844 - remove site embed from SmartOn Tracking
  • Loading branch information
craigcook committed Nov 23, 2015
2 parents cc7d9e8 + d7141b3 commit a56879a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 44 deletions.
2 changes: 0 additions & 2 deletions bedrock/settings/static_media.py
Expand Up @@ -767,7 +767,6 @@
'smarton': {
'source_filenames': (
'css/base/mozilla-share-cta.less',
'css/base/mozilla-modal.less',
'css/teach/smarton.less',
),
'output_filename': 'css/smarton-bundle.css',
Expand Down Expand Up @@ -1550,7 +1549,6 @@
'smarton': {
'source_filenames': (
'js/base/mozilla-share-cta.js',
'js/base/mozilla-modal.js',
'js/base/mozilla-smoothscroll.js',
'js/libs/jquery.waypoints.min.js',
'js/libs/jquery.waypoints-sticky.min.js',
Expand Down
11 changes: 3 additions & 8 deletions bedrock/teach/templates/teach/smarton/tracking.html
Expand Up @@ -6,7 +6,7 @@

{% block page_title %}{{ _('Get smart on tracking') }}{% endblock %}
{% block page_desc %}{{ _('What you do online is your business, and you can keep it that way. Get smart on tracking.') }}{% endblock %}
{% block page_image %}{{ static('img/teach/smarton/tracking/tracking-hero-high-res.png') }}{% endblock %}
{% block page_image %}{{ static('img/teach/smarton/tracking/tracking-hero-white.jpg') }}{% endblock %}

{% block optimizely %}
{% if waffle.switch('smarton-tracking-optimizely') %}
Expand Down Expand Up @@ -61,19 +61,14 @@ <h2 class="section-title">{{ _('What is tracking?') }}</h2>
<figure class="video">
<div class="video-wrap">
<p class="video-frame">
<a class="video-open" href="https://donottrack-doc.com/" title="{{ _('Watch the documentary at donottrack-doc.com.') }}" data-element-id="video-donottrack" data-embed-src="https://episode1.donottrack-doc.com/embed/mozilla">
<a class="video-open" href="https://episode1.donottrack-doc.com/" title="{{ _('Watch the documentary at donottrack-doc.com.') }}" target="_blank">
{{ high_res_img('teach/smarton/tracking/donottrackdoc-poster.jpg', {'alt': _('Watch the documentary at donottrack-doc.com.'), 'width': '620', 'height': '349'}) }}
</a>
</p>
{# Hide the interactive embed
<div id="video-donottrack" class="modal-video-wrap ratio-4x3">
<iframe class="modal-video-frame" frameborder="0" allowfullscreen></iframe>
</div>
#}
</div>
<figcaption>
<p>
{{ _('To get a good look at how tracking works, be sure to check out the first episode of Brett Gaylor’s documentary series, <a href="{url}"><cite>Do Not Track</cite></a>.').format(url='https://donottrack-doc.com/')|safe }}
{{ _('To get a good look at how tracking works, be sure to check out the first episode of Brett Gaylor’s documentary series, <a href="{url}"><cite>Do Not Track</cite></a>.').format(url='https://episode1.donottrack-doc.com/')|safe }}
</p>
</figcaption>
</figure>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 0 additions & 34 deletions media/js/teach/smarton.js
Expand Up @@ -208,40 +208,6 @@
});
});

// Open embed in a new tab/window
$('a.video-open').on('click', function(e) {
e.preventDefault();
window.open(this.href);
});

/* Hide the embed for now
// Play videos in a modal
$('a.video-open').attr('role', 'button').on('click', function(e) {
e.preventDefault();
var $this = $(this);
var embedSrc = $this.data('embed-src');
var embedWrap = $('#' + $this.data('element-id'));
Mozilla.Modal.createModal(this, embedWrap, {
title: '',
onCreate: function() {
embedWrap.find('.modal-video-frame').attr('src', embedSrc);
},
onDestroy: function() {
embedWrap.find('.modal-video-frame').removeAttr('src');
}
});
// Track the click and record the video ID
window.dataLayer.push({
'event': 'smarton-interactions',
'interaction': 'video modal open',
'video': $this.data('element-id')
});
});
*/

// Track user scrolling through each section down the page
$('.main .section').each(function() {
var sectionId = $(this).attr('id');
Expand Down

0 comments on commit a56879a

Please sign in to comment.