diff --git a/src/app/lorax/directives/chart-data-portability.js b/src/app/lorax/directives/chart-data-portability.js index 60b8587..0a329e1 100644 --- a/src/app/lorax/directives/chart-data-portability.js +++ b/src/app/lorax/directives/chart-data-portability.js @@ -2,11 +2,11 @@ * @fileOverview Data Portability Chart directive * @author Chris James */ -define(['jquery', 'd3'], function ($, d3) { +define(function() { 'use strict'; /** - * Terms & Conditions Chart directive + * Data Portability Chart directive */ var ChartDataPortabilityDirective = function () { return { @@ -14,7 +14,6 @@ define(['jquery', 'd3'], function ($, d3) { replace: true, scope: true, controller: ChartDataPortabilityController, - link: ChartDataPortabilityLinkFn, templateUrl: '/app/lorax/directives/chart-data-portability.tpl.html' }; }; @@ -50,29 +49,5 @@ define(['jquery', 'd3'], function ($, d3) { '$timeout' ]; - /** - * Link function for Data Portability Chart directive - * @param {object} scope Angular scope. - * @param {JQuery} iElem jQuery element. - * @param {object} iAttrs Directive attributes. - * @param {object} controller Controller reference. - */ - var ChartDataPortabilityLinkFn = function (scope, iElem, iAttrs, controller) { - controller._$timeout(function() { - d3.selectAll('.data-portability__symbol') - .append('div') - .attr('class', function(d, i) { - var answer = controller._$scope.dataStandards.data[i].answer; - if (answer === 'Yes') { - return 'data-portability__symbol-yes'; - } else if (answer === 'Partial') { - return 'data-portability__symbol-partial'; - } else if (answer === 'No') { - return 'data-portability__symbol-no'; - } - }); - }.bind(controller)); - }; - return ChartDataPortabilityDirective; }); diff --git a/src/app/lorax/directives/chart-data-portability.tpl.html b/src/app/lorax/directives/chart-data-portability.tpl.html index 2ded63d..c30089a 100644 --- a/src/app/lorax/directives/chart-data-portability.tpl.html +++ b/src/app/lorax/directives/chart-data-portability.tpl.html @@ -1,18 +1,20 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +
{{::dataStandards.localeData.services}}{{::dataStandards.localeData.dataExtractable}}
{{::company.service}}
{{::company.answer}}. {{::company.comments}}
{{::dataStandards.localeData.services}}{{::dataStandards.localeData.dataExtractable}}
{{::company.service}} +
+
+ {{::company.answer}} +
diff --git a/src/app/lorax/directives/modal-issue.tpl.html b/src/app/lorax/directives/modal-issue.tpl.html index 8e5ccd2..699ba2c 100644 --- a/src/app/lorax/directives/modal-issue.tpl.html +++ b/src/app/lorax/directives/modal-issue.tpl.html @@ -16,7 +16,7 @@

{{modalIssue.issue.getTitle()}}

-
+

{{modalIssue.issue.getMozActionCopy()}}

    @@ -30,7 +30,7 @@
-
+

{{modalIssue.issue.getYourActionCopy()}}

diff --git a/src/data/base/main.json b/src/data/base/main.json index ecb7d9c..79dbb6e 100644 --- a/src/data/base/main.json +++ b/src/data/base/main.json @@ -50,7 +50,7 @@ }, "dataPortability": { "status": 1, - "infographicType": "data-lorax-chart-public-trust", + "infographicType": "data-lorax-chart-data-portability", "infographicOverflow": false, "infographicMap": false, "tags": [] diff --git a/src/data/i18n/infographics.json b/src/data/i18n/infographics.json index 01e7ff6..9401f56 100644 --- a/src/data/i18n/infographics.json +++ b/src/data/i18n/infographics.json @@ -357,117 +357,69 @@ } }, "dataPortability": { - "header": "Net positive view of industries", - "subheader": "Percent by Year", + "header": "Do key online services allow data portability?", + "subheader": "Ability to export user data from a given Internet service or application.", "source": { - "name": "", + "name": "Analysis by Mozilla", "src": "" }, "dataPoints": { - "dataLabels": [ - "Internet", - "Computing" - ], - "lineGraphData": [ + "dataStandards": [ { - "label": "2001", - "data": [ - 17, - 57 - ] + "service": "Twitter", + "answer": "Yes", + "comments": "" }, { - "label": "2002", - "data": [ - 22, - 55 - ] + "service": "WhatsApp", + "answer": "Yes", + "comments": "" }, { - "label": "2003", - "data": [ - 31, - 64 - ] + "service": "Wordpress", + "answer": "Yes", + "comments": "" }, { - "label": "2004", - "data": [ - 23, - 52 - ] + "service": "Google", + "answer": "Partial", + "comments": "An impressive number of products and services, but not search history" }, { - "label": "2005", - "data": [ - 24, - 47 - ] + "service": "Facebook", + "answer": "Partial", + "comments": "Almost all of your data, but not your search history" }, { - "label": "2006", - "data": [ - 29, - 50 - ] + "service": "LinkedIn", + "answer": "Partial", + "comments": "Contact export is allowed, which is core to LinkedIn's offer" }, { - "label": "2007", - "data": [ - 35, - 51 - ] + "service": "Reddit", + "answer": "No", + "comments": "" }, { - "label": "2008", - "data": [ - 32, - 54 - ] + "service": "Tumblr", + "answer": "No", + "comments": "" }, { - "label": "2009", - "data": [ - 30, - 53 - ] - }, - { - "label": "2010", - "data": [ - 28, - 49 - ] - }, - { - "label": "2011", - "data": [ - 40, - 62 - ] - }, - { - "label": "2012", - "data": [ - 36, - 63 - ] - }, - { - "label": "2013", - "data": [ - 34, - 56 - ] + "service": "Pinterest", + "answer": "No", + "comments": "" }, { - "label": "2014", - "data": [ - 27, - 58 - ] + "service": "Instagram", + "answer": "No", + "comments": "" } - ] + ], + "labels": { + "services": "Service", + "dataExtractable": "Extractable Data?" + } } }, "dataProtection": { diff --git a/src/styles/infographics/data-portability.less b/src/styles/infographics/data-portability.less new file mode 100644 index 0000000..8688c00 --- /dev/null +++ b/src/styles/infographics/data-portability.less @@ -0,0 +1,43 @@ +/* Data Portability + ========================================================================== */ + +.data-portability { + margin-left: @baseLine * 3; + border-collapse: collapse; + width: 80%; + th { + color: @black; + padding: 24px 32px 24px 0; + .font-size(1.7rem); + font-weight: 600; + text-align: left; + text-transform: uppercase; + } + td { + padding: 10px 10px 35px 0; + width: 10%; + .font-size(1.7rem); + text-align: center; + &:first-child { + width: 10%; + text-align: left; + } + &:last-child { + width: 80%; + font-weight: 600; + text-align: left; + text-transform: uppercase; + } + span { + display: block; + margin-top: 8px; + .font-size(1.4rem); + font-weight: 400; + text-transform: none; + } + } + .data-portability-line { + border-bottom: 1px solid @black; + width:80%; + } +} diff --git a/src/styles/main.less b/src/styles/main.less index 49662bf..7935a84 100644 --- a/src/styles/main.less +++ b/src/styles/main.less @@ -21,6 +21,7 @@ // Infographics @import 'infographics/accessible'; +@import 'infographics/data-portability'; // Animation @import 'animation'; diff --git a/src/styles/modules/infographics.less b/src/styles/modules/infographics.less index 76ca73a..c167243 100644 --- a/src/styles/modules/infographics.less +++ b/src/styles/modules/infographics.less @@ -544,70 +544,6 @@ color: #fff; } -/* Data Portability - ========================================================================== */ - -.data-portability { - border-collapse: separate; - - th { - .font-size(1.4rem); - color: @extra-dark-grey; - padding: 0; - text-align: left; - text-transform: uppercase; - padding-bottom: 10px; - } - - td { - padding-bottom: 35px; - } -} - -.data-portability__company { - padding: 0px; - .font-size(1.1rem); -} - -.data-portability__service { - width: 11%; -} - -.data-portability__line { - width: 12%; - - div { - border-bottom: 1px solid rgba(0,0,0,0.3); - } -} - -.data-portability__symbol { - width: 2%; - padding: 0 15px; - div { - width: 10px; - height: 10px; - border-radius: 10px; - } - - .data-portability__symbol-yes { - background: @white; - } - - .data-portability__symbol-partial { - background: transparent; - border: 2px solid @white; - } - - .data-portability__symbol-no { - background: @extra-dark-grey; - } -} - -.data-portability__answer { - width: 75%; -} - /* Open Source ========================================================================== */ diff --git a/src/styles/modules/modal-issue.less b/src/styles/modules/modal-issue.less index 165de3d..b4ff6bc 100644 --- a/src/styles/modules/modal-issue.less +++ b/src/styles/modules/modal-issue.less @@ -46,7 +46,7 @@ position: absolute; top: 0; left: 55%; - width: 40%; + width: 50%; @media only screen and (max-width: @breakTablet) { position: static;