pageflow-chart 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +1 -0
- data/.jshintrc +22 -0
- data/.travis.yml +14 -0
- data/CHANGELOG.md +37 -0
- data/Gemfile +2 -0
- data/README.md +4 -0
- data/Rakefile +3 -0
- data/app/assets/images/pageflow/chart/themes/default/pictograms/sprite.png +0 -0
- data/app/assets/images/pageflow/chart/themes/default/pictograms/wide.png +0 -0
- data/app/assets/javascripts/pageflow/chart/asset_urls.js.erb +2 -1
- data/app/assets/javascripts/pageflow/chart/editor/templates/datawrapper_ad.jst.ejs +4 -0
- data/app/assets/javascripts/pageflow/chart/editor/views/configuration_editor.js +2 -0
- data/app/assets/javascripts/pageflow/chart/editor/views/datawrapper_ad_view.js +4 -0
- data/app/assets/javascripts/pageflow/chart/editor/views/embedded/iframe_embedded_view.js +4 -3
- data/app/assets/javascripts/pageflow/chart/page_type.js +56 -17
- data/app/assets/javascripts/pageflow/chart.js +2 -0
- data/app/assets/stylesheets/pageflow/chart/editor.css.scss +12 -1
- data/app/assets/stylesheets/pageflow/chart/themes/default.css.scss +2 -0
- data/app/assets/stylesheets/pageflow/chart/transparent_background.css.erb +7 -0
- data/app/assets/stylesheets/pageflow/chart.css.scss +11 -6
- data/app/helpers/pageflow/chart/scraped_sites_helper.rb +18 -2
- data/app/jobs/pageflow/chart/scrape_site_job.rb +17 -4
- data/app/models/pageflow/chart/scraped_site.rb +5 -0
- data/app/views/pageflow/chart/page.html +2 -11
- data/bin/rake +16 -0
- data/bin/rspec +16 -0
- data/chart.gemspec +9 -2
- data/config/locales/de.yml +5 -5
- data/config/locales/en.yml +2 -5
- data/config/locales/new/datawrapper_ad.de.yml +10 -0
- data/config/locales/new/datawrapper_ad.en.yml +10 -0
- data/config/locales/new/full_width.de.yml +7 -0
- data/config/locales/new/full_width.en.yml +7 -0
- data/db/migrate/20160211085234_add_use_custom_theme_to_scraped_sites.rb +5 -0
- data/lib/generators/pageflow_chart/install/install_generator.rb +7 -0
- data/lib/pageflow/chart/configuration.rb +27 -1
- data/lib/pageflow/chart/downloader.rb +3 -0
- data/lib/pageflow/chart/engine.rb +4 -1
- data/lib/pageflow/chart/version.rb +5 -0
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/models/pageflow/chart/scraped_site_spec.rb +11 -0
- data/spec/pageflow/chart/downloader_spec.rb +16 -0
- metadata +76 -32
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZDNhYTYzOThiOTk1Njg3ODRiNzM3ZjIzMmI1NGRjNmNjYzEwM2JkMA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6b8214ac8aa74aef666927a7e0885bf08cd11dfb
|
4
|
+
data.tar.gz: f8742d5353918f09393681e95a80b5ab07f60cd4
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MzNhYmY2ZmQ4ZjcxYWMzZWRmODZmNDJiZjdiM2YxOTRmYjc0NmYyYmNmNTFl
|
11
|
-
OTliYTNiMTIxOGMzMWYyZmQ5N2E4NzkxZDgzN2EzZjc3ODRhYWE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YzA5MzExNmQ4ZGQ1MTI0M2NmOWMyYWY4ZWUxOGJiMWFkZjMzNmZiMGVmN2Ni
|
14
|
-
ZTE3NjAxYTM2NzFmN2MxY2VlMDliZGU2YzNhNTc1Y2UwZDEwODg2ZDZkY2I1
|
15
|
-
NzM1ZTgyZDRhYTk4NWM5Mzk3MmUwZDdmMmVhOGJiNjg5OTUzNmE=
|
6
|
+
metadata.gz: 55d71e4e9ecd1b741a289c1a5ab0e76527928c69beaf6bbe72b0148ed66633ceb0589f1f21fe55f358aee76d3a9e40b005cd7b57c8d6c5727f2f8fd489852c13
|
7
|
+
data.tar.gz: 6d834f287f3db679deff54c09575b18b4db50a3e4f7dfa1930cde69ca4f0217542b69f3e3c040d0dcdbfbca8b4b90241270ef4b6b9aa6747374816cfc186d8a0
|
data/.gitignore
CHANGED
data/.jshintrc
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"browser": true,
|
3
|
+
"undef": true,
|
4
|
+
"immed": true,
|
5
|
+
"trailing": true,
|
6
|
+
"globals": {
|
7
|
+
"jQuery": true,
|
8
|
+
"$": true,
|
9
|
+
"Backbone": true,
|
10
|
+
"Cocktail": true,
|
11
|
+
"_": true,
|
12
|
+
"vjs": true,
|
13
|
+
"Audio5js": true,
|
14
|
+
"I18n": true,
|
15
|
+
|
16
|
+
"pageflow": true,
|
17
|
+
"editor": true,
|
18
|
+
|
19
|
+
"confirm": true,
|
20
|
+
"alert": true
|
21
|
+
}
|
22
|
+
}
|
data/.travis.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm: 2.1
|
3
|
+
|
4
|
+
# User container based travis infrastructure which allows caching
|
5
|
+
# features for open source projects.
|
6
|
+
sudo: false
|
7
|
+
cache: bundler
|
8
|
+
|
9
|
+
services:
|
10
|
+
- redis-server
|
11
|
+
|
12
|
+
script:
|
13
|
+
- bin/rake app:db:setup app:db:test:load
|
14
|
+
- bin/rspec
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,44 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
### Version 0.2.0
|
4
|
+
|
5
|
+
2016-06-09
|
6
|
+
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow-chart/compare/v0.1.0...v0.2.0)
|
8
|
+
|
9
|
+
- Feature full width
|
10
|
+
([#23](https://github.com/codevise/pageflow-chart/pull/23))
|
11
|
+
- Fix toggle button position
|
12
|
+
([#22](https://github.com/codevise/pageflow-chart/pull/22))
|
13
|
+
- Remove padding of iframe container
|
14
|
+
([#21](https://github.com/codevise/pageflow-chart/pull/21))
|
15
|
+
- Bug fix: Improve iframe event propagation on mobile
|
16
|
+
([#20](https://github.com/codevise/pageflow-chart/pull/20))
|
17
|
+
- Allow configuring themes with transparent background
|
18
|
+
([#19](https://github.com/codevise/pageflow-chart/pull/19))
|
19
|
+
- Add 'create chart' button to configuration editor
|
20
|
+
([#18](https://github.com/codevise/pageflow-chart/pull/18))
|
21
|
+
- Add config option to stop using the custom theme
|
22
|
+
([#17](https://github.com/codevise/pageflow-chart/pull/17))
|
23
|
+
- Use configurable page type pictograms
|
24
|
+
([#16](https://github.com/codevise/pageflow-chart/pull/16))
|
25
|
+
- Add datawrapper.dwcdn.net to supported hosts
|
26
|
+
([#15](https://github.com/codevise/pageflow-chart/pull/15))
|
27
|
+
- Add pageflow-public-i18n gem dependency
|
28
|
+
([#14](https://github.com/codevise/pageflow-chart/pull/14))
|
29
|
+
- Extract publicly visible i18n strings from locale
|
30
|
+
([#11](https://github.com/codevise/pageflow-chart/pull/11))
|
31
|
+
- Bug fix: Do not abort js execution on exception in chart
|
32
|
+
([#25](https://github.com/codevise/pageflow-chart/pull/25))
|
33
|
+
- Add .idea entry to .gitignore
|
34
|
+
([#12](https://github.com/codevise/pageflow-chart/pull/12))
|
35
|
+
- Add .jshintrc
|
36
|
+
([#24](https://github.com/codevise/pageflow-chart/pull/24))
|
37
|
+
|
3
38
|
### Version 0.1.1
|
4
39
|
|
40
|
+
2015-07-02
|
41
|
+
|
5
42
|
[Compare changes](https://github.com/codevise/pageflow-chart/compare/v0.1.0...v0.1.1)
|
6
43
|
|
7
44
|
- Bug fix: Support new datawrapper host name.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Pageflow Chart
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/pageflow-chart.svg)](http://badge.fury.io/rb/pageflow-chart)
|
4
|
+
[![Build Status](https://travis-ci.org/codevise/pageflow-chart.svg?branch=master)](https://travis-ci.org/codevise/pageflow-chart)
|
4
5
|
|
5
6
|
Page type showing scraped svg diagramms from Datawrapper.
|
6
7
|
|
@@ -73,6 +74,9 @@ Example:
|
|
73
74
|
|
74
75
|
# Allow scraping charts from custom account URLs
|
75
76
|
config.supported_hosts << 'http://mycustom.datawrapper.de'
|
77
|
+
|
78
|
+
# Uncomment to inject custom css into iframe.
|
79
|
+
# config.use_custom_theme = true
|
76
80
|
end
|
77
81
|
|
78
82
|
Also see `lib/pageflow/chart/configuration.rb` for the additional options.
|
data/Rakefile
CHANGED
Binary file
|
@@ -1,3 +1,4 @@
|
|
1
1
|
pageflow.chart.assetUrls = {
|
2
|
-
customStylesheet: '<%= asset_path('pageflow/chart/custom.css', :protocol => 'http') %>'
|
2
|
+
customStylesheet: '<%= asset_path('pageflow/chart/custom.css', :protocol => 'http') %>',
|
3
|
+
transparentBackgroundStylesheet: '<%= asset_path('pageflow/chart/transparent_background.css', :protocol => 'http') %>'
|
3
4
|
};
|
@@ -12,6 +12,8 @@ pageflow.ConfigurationEditorView.register('chart', {
|
|
12
12
|
displayPropertyName: 'display_scraped_site_url',
|
13
13
|
required: true
|
14
14
|
});
|
15
|
+
this.view(pageflow.chart.DatawrapperAdView);
|
16
|
+
this.input('full_width', pageflow.CheckBoxInputView);
|
15
17
|
this.input('background_image_id', pageflow.FileInputView, {collection: pageflow.imageFiles});
|
16
18
|
this.input('thumbnail_image_id', pageflow.FileInputView, {
|
17
19
|
collection: pageflow.imageFiles,
|
@@ -26,19 +26,20 @@ pageflow.chart.IframeEmbeddedView = Backbone.Marionette.View.extend({
|
|
26
26
|
if (scrapedSiteId) {
|
27
27
|
this.scrapedSite = pageflow.chart.scrapedSites.getOrFetch(scrapedSiteId, {
|
28
28
|
success: function(scrapedSite) {
|
29
|
-
view.
|
29
|
+
view.updateAttributes(scrapedSite);
|
30
30
|
}
|
31
31
|
});
|
32
32
|
|
33
|
-
this.listenTo(this.scrapedSite, 'change', this.
|
33
|
+
this.listenTo(this.scrapedSite, 'change', this.updateAttributes);
|
34
34
|
}
|
35
35
|
},
|
36
36
|
|
37
|
-
|
37
|
+
updateAttributes: function(scrapedSite) {
|
38
38
|
scrapedSite = scrapedSite || this.scrapedSite;
|
39
39
|
|
40
40
|
if (scrapedSite && scrapedSite.isProcessed()) {
|
41
41
|
this.$el.attr('src', scrapedSite.get('html_file_url'));
|
42
|
+
this.$el.attr('data-use-custom-theme', scrapedSite.get('use_custom_theme'));
|
42
43
|
}
|
43
44
|
else {
|
44
45
|
this.$el.attr('src', '');
|
@@ -18,10 +18,14 @@ pageflow.pageType.register('chart', _.extend({
|
|
18
18
|
|
19
19
|
resize: function(pageElement, configuration) {
|
20
20
|
var iframeWrapper = pageElement.find('.iframeWrapper'),
|
21
|
-
|
22
|
-
|
21
|
+
pageHeader = pageElement.find('.page_header'),
|
22
|
+
scroller = pageElement.find('.scroller'),
|
23
|
+
fullWidth = configuration.full_width,
|
24
|
+
widescreened = pageElement.width() > 1430;
|
23
25
|
|
24
|
-
|
26
|
+
if (fullWidth) {
|
27
|
+
widescreened = false;
|
28
|
+
}
|
25
29
|
|
26
30
|
iframeWrapper.toggleClass('widescreened', widescreened);
|
27
31
|
|
@@ -34,16 +38,18 @@ pageflow.pageType.register('chart', _.extend({
|
|
34
38
|
},
|
35
39
|
|
36
40
|
customizeLayout: function(pageElement, configuration) {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
+
var that = this;
|
42
|
+
var iframe = pageElement.find('iframe');
|
43
|
+
var scroller = pageElement.find('.scroller');
|
44
|
+
var iframeOverlay = pageElement.find('.iframe_overlay');
|
41
45
|
|
46
|
+
if(!this.layoutCustomized) {
|
42
47
|
iframe.load(function() {
|
43
48
|
$(this).contents().find('.fs-btn').css('display','none');
|
44
|
-
$(this).contents().find('head').append('<link rel="stylesheet" type="text/css" href="' + pageflow.chart.assetUrls.customStylesheet + '">');
|
45
49
|
$(this).contents().find('body').addClass($("[data-theme]").attr('data-theme'));
|
46
50
|
|
51
|
+
that._injectStylesheets($(this));
|
52
|
+
|
47
53
|
if(pageflow.features.has('mobile platform')) {
|
48
54
|
setTimeout(function() {
|
49
55
|
if(iframe) {
|
@@ -60,21 +66,48 @@ pageflow.pageType.register('chart', _.extend({
|
|
60
66
|
}
|
61
67
|
},
|
62
68
|
|
69
|
+
_injectStylesheets: function(iframe) {
|
70
|
+
if (iframe.data('useCustomTheme')) {
|
71
|
+
this._injectStylesheet(iframe, pageflow.chart.assetUrls.customStylesheet);
|
72
|
+
}
|
73
|
+
else {
|
74
|
+
this._injectStylesheet(iframe, pageflow.chart.assetUrls.transparentBackgroundStylesheet);
|
75
|
+
}
|
76
|
+
},
|
77
|
+
|
78
|
+
_injectStylesheet: function(iframe, path) {
|
79
|
+
head = iframe.contents().find('head');
|
80
|
+
head.append('<link rel="stylesheet" type="text/css" href="' + path + '">');
|
81
|
+
},
|
82
|
+
|
63
83
|
_initEventSimulation: function(element, iframe, wrapper) {
|
64
|
-
|
65
|
-
var lastElement;
|
66
|
-
element.on(propagatedEvents, function(event) {
|
84
|
+
element.on('click', function(event) {
|
67
85
|
var contentElement = iframe.contents()[0];
|
68
|
-
|
86
|
+
|
87
|
+
element.css('display', 'none');
|
88
|
+
|
69
89
|
if (contentElement && event) {
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
90
|
+
var offset = iframe.offset();
|
91
|
+
var options = $.extend({}, event, {
|
92
|
+
screenX: event.screenX - offset.left,
|
93
|
+
screenY: event.screenY - offset.top,
|
94
|
+
clientX: event.clientX - offset.left,
|
95
|
+
clientY: event.clientY - offset.top,
|
96
|
+
});
|
97
|
+
|
98
|
+
var lastElement = $(contentElement.elementFromPoint(event.pageX - offset.left,
|
99
|
+
event.pageY - offset.top));
|
100
|
+
|
101
|
+
lastElement.simulate('mousedown', options);
|
102
|
+
lastElement.simulate('mousemove', options);
|
103
|
+
lastElement.simulate('click', options);
|
104
|
+
lastElement.simulate('mouseup', options);
|
74
105
|
|
75
106
|
element.css('cursor', lastElement.css('cursor'));
|
76
107
|
}
|
77
|
-
|
108
|
+
|
109
|
+
element.css('display', 'block');
|
110
|
+
|
78
111
|
event.preventDefault();
|
79
112
|
event.stopPropagation();
|
80
113
|
});
|
@@ -124,6 +157,12 @@ pageflow.pageType.register('chart', _.extend({
|
|
124
157
|
pageElement.find('.shadow').css({
|
125
158
|
opacity: configuration.get('gradient_opacity') / 100
|
126
159
|
});
|
160
|
+
|
161
|
+
if (configuration.hasChanged('full_width')) {
|
162
|
+
$('body').removeClass('bigScreen');
|
163
|
+
}
|
164
|
+
|
165
|
+
this.resize(pageElement, configuration.attributes);
|
127
166
|
},
|
128
167
|
|
129
168
|
embeddedEditorViews: function() {
|
@@ -7,6 +7,10 @@
|
|
7
7
|
height: 400px;
|
8
8
|
position: relative;
|
9
9
|
|
10
|
+
@media (min-width: 1500px) {
|
11
|
+
height: 800px;
|
12
|
+
}
|
13
|
+
|
10
14
|
.hidden &, .hideText & {
|
11
15
|
@include transition(0.7s ease);
|
12
16
|
}
|
@@ -33,6 +37,10 @@
|
|
33
37
|
top: 5%;
|
34
38
|
margin-top: 0;
|
35
39
|
}
|
40
|
+
|
41
|
+
.bigscreen_toggler{
|
42
|
+
visibility: visible;
|
43
|
+
}
|
36
44
|
}
|
37
45
|
|
38
46
|
.hideText & {
|
@@ -40,21 +48,17 @@
|
|
40
48
|
opacity: 0;
|
41
49
|
}
|
42
50
|
|
43
|
-
|
44
|
-
padding: 15px;
|
51
|
+
&::before {
|
45
52
|
background-color: #191919;
|
46
53
|
background-color: rgba(25,25,25, 0.9);
|
47
54
|
box-shadow: rgba(0,0,0,0.5) 0 0 3px 0px;
|
48
55
|
content: "";
|
49
56
|
position: absolute;
|
50
|
-
top: -15px;
|
51
|
-
left: -15px;
|
52
57
|
width: 100%;
|
53
58
|
z-index: -1;
|
54
59
|
height: 100%;
|
55
60
|
|
56
61
|
@include phone {
|
57
|
-
padding: 15px 0;
|
58
62
|
left: 0;
|
59
63
|
}
|
60
64
|
}
|
@@ -84,13 +88,14 @@
|
|
84
88
|
background-position: 0 0;
|
85
89
|
background-repeat: no-repeat;
|
86
90
|
position: absolute;
|
87
|
-
top:
|
91
|
+
top: 18px;
|
88
92
|
right: 18px;
|
89
93
|
color: transparent;
|
90
94
|
text-indent: -4000px;
|
91
95
|
opacity: 0;
|
92
96
|
cursor: pointer;
|
93
97
|
display: none;
|
98
|
+
visibility: hidden;
|
94
99
|
@include transition(opacity 0.5s ease);
|
95
100
|
|
96
101
|
.has_mobile_platform & {
|
@@ -1,12 +1,28 @@
|
|
1
1
|
module Pageflow
|
2
2
|
module Chart
|
3
3
|
module ScrapedSitesHelper
|
4
|
-
|
4
|
+
IFRAME_ATTRIBUTES = {
|
5
|
+
style: 'width: 100%; height: 100%',
|
6
|
+
scrolling: 'auto',
|
7
|
+
frameborder: '0',
|
8
|
+
align: 'aus',
|
9
|
+
allowfullscreen: 'true',
|
10
|
+
mozallowfullscreen: 'true',
|
11
|
+
webkitallowfullscreen: 'true'
|
12
|
+
}
|
13
|
+
|
14
|
+
def scraped_site_iframe(scraped_site_id)
|
5
15
|
scraped_site = ScrapedSite.find_by_id(scraped_site_id)
|
16
|
+
data_attributes = {}
|
6
17
|
|
7
18
|
if scraped_site
|
8
|
-
|
19
|
+
data_attributes = {
|
20
|
+
src: scraped_site.html_file_url,
|
21
|
+
use_custom_theme: scraped_site.use_custom_theme
|
22
|
+
}
|
9
23
|
end
|
24
|
+
|
25
|
+
content_tag(:iframe, '', IFRAME_ATTRIBUTES.merge(data: data_attributes))
|
10
26
|
end
|
11
27
|
end
|
12
28
|
end
|
@@ -19,12 +19,17 @@ module Pageflow
|
|
19
19
|
content_type: 'text/html'
|
20
20
|
)
|
21
21
|
|
22
|
-
downloader.load_all(scraper.javascript_urls,
|
23
|
-
|
22
|
+
downloader.load_all(scraper.javascript_urls,
|
23
|
+
extension: '.js',
|
24
|
+
before_each: begin_try_catch,
|
25
|
+
after_each: end_try_catch) do |javascript_file|
|
26
|
+
scraped_site.javascript_file = javascript_file
|
24
27
|
end
|
25
28
|
|
26
|
-
downloader.load_all(scraper.stylesheet_urls,
|
27
|
-
|
29
|
+
downloader.load_all(scraper.stylesheet_urls,
|
30
|
+
extension: '.css',
|
31
|
+
separator: "\n;") do |stylesheet_file|
|
32
|
+
scraped_site.stylesheet_file = stylesheet_file
|
28
33
|
end
|
29
34
|
end
|
30
35
|
|
@@ -39,6 +44,14 @@ module Pageflow
|
|
39
44
|
# This is were the downloader passed to `initialize` is created.
|
40
45
|
new(Downloader.new(base_url: scraped_site.url)).perform(scraped_site)
|
41
46
|
end
|
47
|
+
|
48
|
+
def begin_try_catch
|
49
|
+
";try {\n"
|
50
|
+
end
|
51
|
+
|
52
|
+
def end_try_catch
|
53
|
+
"\n} catch(e) { console.log('Datawrapper raised: ' + (e.message || e)); }\n"
|
54
|
+
end
|
42
55
|
end
|
43
56
|
|
44
57
|
class StringIOWithContentType < StringIO
|
@@ -7,18 +7,9 @@
|
|
7
7
|
|
8
8
|
<div class="content">
|
9
9
|
<div class="iframeWrapper">
|
10
|
-
|
11
|
-
style="width: 100%; height: 100%"
|
12
|
-
name="°"
|
13
|
-
scrolling="auto"
|
14
|
-
frameborder="0"
|
15
|
-
align="aus"
|
16
|
-
marginheight="15"
|
17
|
-
marginwidth="15"
|
18
|
-
allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true">
|
19
|
-
</iframe>
|
10
|
+
<%= scraped_site_iframe(configuration['scraped_site_id']) %>
|
20
11
|
<div class="iframe_overlay"></div>
|
21
|
-
<div class="bigscreen_toggler" tabindex="4" title="<%= t('.
|
12
|
+
<div class="bigscreen_toggler" tabindex="4" title="<%= t('pageflow.public.chart.toggle') %>"><%= t('pageflow.public.chart.toggle') %></div>
|
22
13
|
</div>
|
23
14
|
<div class="scroller">
|
24
15
|
<div>
|
data/bin/rake
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rake' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rake', 'rake')
|
data/bin/rspec
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This file was generated by Bundler.
|
4
|
+
#
|
5
|
+
# The application 'rspec' is installed as part of a gem, and
|
6
|
+
# this file is here to facilitate running it.
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'pathname'
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
11
|
+
Pathname.new(__FILE__).realpath)
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'bundler/setup'
|
15
|
+
|
16
|
+
load Gem.bin_path('rspec-core', 'rspec')
|
data/chart.gemspec
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'pageflow/chart/version'
|
2
5
|
|
3
6
|
Gem::Specification.new do |spec|
|
4
7
|
spec.name = "pageflow-chart"
|
5
|
-
spec.version =
|
8
|
+
spec.version = Pageflow::Chart::VERSION
|
6
9
|
spec.authors = ["Tim Fischbach"]
|
7
10
|
spec.email = ["tfischbach@codevise.de"]
|
8
11
|
spec.summary = "Pagetype for Embedded Datawrapper Charts"
|
@@ -13,12 +16,13 @@ Gem::Specification.new do |spec|
|
|
13
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
14
17
|
spec.require_paths = ["lib"]
|
15
18
|
|
16
|
-
spec.add_runtime_dependency "pageflow", "~> 0.
|
19
|
+
spec.add_runtime_dependency "pageflow", "~> 0.10"
|
17
20
|
spec.add_runtime_dependency "nokogiri"
|
18
21
|
spec.add_runtime_dependency "paperclip", "~> 4.2"
|
19
22
|
spec.add_runtime_dependency "state_machine"
|
20
23
|
spec.add_runtime_dependency "state_machine_job"
|
21
24
|
spec.add_runtime_dependency 'i18n-js'
|
25
|
+
spec.add_runtime_dependency 'pageflow-public-i18n', '~> 1.0'
|
22
26
|
|
23
27
|
spec.add_development_dependency "bundler"
|
24
28
|
spec.add_development_dependency "rake"
|
@@ -26,4 +30,7 @@ Gem::Specification.new do |spec|
|
|
26
30
|
spec.add_development_dependency 'factory_girl_rails'
|
27
31
|
spec.add_development_dependency "sqlite3"
|
28
32
|
spec.add_development_dependency "webmock"
|
33
|
+
|
34
|
+
# Semantic versioning rake tasks
|
35
|
+
spec.add_development_dependency 'semmy', '~> 0.2'
|
29
36
|
end
|
data/config/locales/de.yml
CHANGED
@@ -16,7 +16,7 @@ de:
|
|
16
16
|
text: ! '# Diagramm
|
17
17
|
|
18
18
|
|
19
|
-
Einbindung von
|
19
|
+
Einbindung von Datawrapper-Diagrammen
|
20
20
|
|
21
21
|
|
22
22
|
Hier kannst Du Deinen Pageflow um animierte Infografiken ergänzen. Eingebettet ist das
|
@@ -31,10 +31,10 @@ de:
|
|
31
31
|
diesen Dienst in Anspruch zu nehmen.
|
32
32
|
|
33
33
|
|
34
|
+
Beachte, dass Datawrapper ein spezielles Design für Diagramme bietet, die in Pageflow eingebettet werden sollen. Klicke dazu im "Visualisieren" Schritt des Diagramm Assistenten auf das Tab "Design" und wähle "Pageflow" aus. Das Farbschema des Diagramms ist dann für die Verwendung in Pageflow optimiert.
|
35
|
+
|
36
|
+
|
34
37
|
Typische Anwendungsbeispiele: Statistiken, Diagramme, Zahlen&Fakten'
|
35
|
-
page:
|
36
|
-
toggle: Ansicht vergrößern bzw. verkleinern
|
37
|
-
toggle_title: Ansicht vergrößern bzw. verkleinern
|
38
38
|
page_type_category_name: Daten und Diagramme
|
39
|
-
page_type_description: Einbindung von Diagrammen, die mit
|
39
|
+
page_type_description: Einbindung von Diagrammen, die mit Datawrapper erstellt wurden
|
40
40
|
page_type_name: Diagramm
|
data/config/locales/en.yml
CHANGED
@@ -13,10 +13,7 @@ en:
|
|
13
13
|
help_entries:
|
14
14
|
page_type:
|
15
15
|
menu_item: Chart
|
16
|
-
text: ! "# Chart\n\nIntegration of a
|
17
|
-
page:
|
18
|
-
toggle: Toggle
|
19
|
-
toggle_title: Toggle
|
16
|
+
text: ! "# Chart\n\nIntegration of a Datawrapper-Diagram\n\nHere you can add animated infographics to your Pageflow. The diagram is embedded into a background-picture and text. To enlarge the graphic you simply have to click on it. \n\nBut first of all you have to create your graphic externally and generate a link. You can find examples and requirements for this under www.datawrapper.de.\n\nNote that Datawrapper offers a special layout option for charts that shall be embedded into a Pageflow: In the \"Visualize\" step of the chart creation wizard, click the \"Design\" tab and select the \"Pageflow\" layout. That way a color scheme is used which complements Pageflow's look.\n\nExamples of application: statistics, diagrams, numbers & facts"
|
20
17
|
page_type_category_name: Data and Charts
|
21
|
-
page_type_description: Embedded
|
18
|
+
page_type_description: Embedded Datawrapper chart
|
22
19
|
page_type_name: Chart
|
@@ -0,0 +1,10 @@
|
|
1
|
+
de:
|
2
|
+
pageflow:
|
3
|
+
chart:
|
4
|
+
editor:
|
5
|
+
templates:
|
6
|
+
datawrapper_ad:
|
7
|
+
create_chart: "Neues Datawrapper Diagramm erstellen"
|
8
|
+
page_attributes:
|
9
|
+
scraped_site_id:
|
10
|
+
inline_help: "URL zu einem bei Datawrapper publiziertem Diagramm. Datawrapper bietet in den Diagramm Optionen ein spezielles 'Pageflow' Design für eine optimale Darstellung innerhalb des Beitrags. "
|
@@ -0,0 +1,10 @@
|
|
1
|
+
en:
|
2
|
+
pageflow:
|
3
|
+
chart:
|
4
|
+
editor:
|
5
|
+
templates:
|
6
|
+
datawrapper_ad:
|
7
|
+
create_chart: "Create new Datawrapper chart"
|
8
|
+
page_attributes:
|
9
|
+
scraped_site_id:
|
10
|
+
inline_help: "URL of a chart published via Datawrapper. Datawrapper offers a special 'Pageflow' layout selectable on the 'Design' tab for optimal display inside Pageflow."
|
@@ -32,6 +32,26 @@ module Pageflow
|
|
32
32
|
# @return [Array<String>]
|
33
33
|
attr_reader :supported_hosts
|
34
34
|
|
35
|
+
# If enabled, set `has_custom_theme` to `true` for new scraped
|
36
|
+
# sites. This causes styles from `pageflow/chart/custom.scss` to
|
37
|
+
# be injected into their iframe on page creation.
|
38
|
+
#
|
39
|
+
# This used to be the default, but is disabled in favor of
|
40
|
+
# custom Datawrapper themes now.
|
41
|
+
#
|
42
|
+
# @return [Boolean]
|
43
|
+
attr_accessor :use_custom_theme
|
44
|
+
|
45
|
+
# List of datawrapper theme names for which an additional css
|
46
|
+
# rule shall be injected to make the background
|
47
|
+
# transparent. This is only recommended for themes with dark
|
48
|
+
# backgrounds. By default, this is only done for the `pageflow`
|
49
|
+
# theme.
|
50
|
+
#
|
51
|
+
# @since 0.2
|
52
|
+
# @return [Array<String>]
|
53
|
+
attr_reader :datawrapper_themes_with_transparent_background_support
|
54
|
+
|
35
55
|
def initialize
|
36
56
|
@scraper_options = {
|
37
57
|
head_script_blacklist: [/piwik/],
|
@@ -41,7 +61,13 @@ module Pageflow
|
|
41
61
|
@paperclip_s3_default_options = {}
|
42
62
|
@paperclip_base_path = ':host'
|
43
63
|
@scraped_sites_root_url = nil
|
44
|
-
@supported_hosts = [
|
64
|
+
@supported_hosts = [
|
65
|
+
'http://cf.datawrapper.de',
|
66
|
+
'http://datawrapper.dwcdn.de',
|
67
|
+
'http://datawrapper.dwcdn.net'
|
68
|
+
]
|
69
|
+
@use_custom_theme = false
|
70
|
+
@datawrapper_themes_with_transparent_background_support = ['pageflow']
|
45
71
|
end
|
46
72
|
|
47
73
|
# @api private
|
@@ -26,12 +26,15 @@ module Pageflow
|
|
26
26
|
|
27
27
|
begin
|
28
28
|
urls.map do |url|
|
29
|
+
file.write(options[:before_each]) if options.key?(:before_each)
|
30
|
+
|
29
31
|
load(url) do |source|
|
30
32
|
while data = source.read(16 * 1024)
|
31
33
|
file.write(data)
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
37
|
+
file.write(options[:after_each]) if options.key?(:after_each)
|
35
38
|
file.write(options.fetch(:separator, "\n"))
|
36
39
|
end
|
37
40
|
|
@@ -1,10 +1,13 @@
|
|
1
|
+
require 'pageflow-public-i18n'
|
2
|
+
|
1
3
|
module Pageflow
|
2
4
|
module Chart
|
3
5
|
class Engine < Rails::Engine
|
4
6
|
isolate_namespace Pageflow::Chart
|
5
7
|
|
6
8
|
config.autoload_paths << File.join(config.root, 'lib')
|
7
|
-
config.assets.precompile += ['pageflow/chart/custom.css']
|
9
|
+
config.assets.precompile += ['pageflow/chart/custom.css', 'pageflow/chart/transparent_background.css']
|
10
|
+
config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.yml').to_s]
|
8
11
|
|
9
12
|
config.generators do |g|
|
10
13
|
g.test_framework :rspec,:fixture => false
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20160211085234) do
|
15
15
|
|
16
16
|
create_table "pageflow_chart_scraped_sites", force: true do |t|
|
17
17
|
t.string "url"
|
@@ -34,6 +34,7 @@ ActiveRecord::Schema.define(version: 20140417112724) do
|
|
34
34
|
t.datetime "csv_file_updated_at"
|
35
35
|
t.datetime "created_at"
|
36
36
|
t.datetime "updated_at"
|
37
|
+
t.boolean "use_custom_theme", default: true, null: false
|
37
38
|
end
|
38
39
|
|
39
40
|
end
|
@@ -15,5 +15,16 @@ module Pageflow::Chart
|
|
15
15
|
expect(scraped_site.csv_url).to eq('http://example.com/foo/data.csv')
|
16
16
|
end
|
17
17
|
end
|
18
|
+
|
19
|
+
it 'copies use_custom_theme flag from config on create' do
|
20
|
+
Pageflow::Chart.config.use_custom_theme = true
|
21
|
+
scraped_site_with_custom_theme = create(:scraped_site)
|
22
|
+
|
23
|
+
Pageflow::Chart.config.use_custom_theme = false
|
24
|
+
scraped_site_without_custom_theme = create(:scraped_site)
|
25
|
+
|
26
|
+
expect(scraped_site_with_custom_theme.use_custom_theme).to eq(true)
|
27
|
+
expect(scraped_site_without_custom_theme.use_custom_theme).to eq(false)
|
28
|
+
end
|
18
29
|
end
|
19
30
|
end
|
@@ -84,6 +84,22 @@ module Pageflow
|
|
84
84
|
|
85
85
|
expect(result).to eq("aaa;bbb;")
|
86
86
|
end
|
87
|
+
|
88
|
+
it 'allows to wrap file contents' do
|
89
|
+
downloader = Downloader.new
|
90
|
+
result = ''
|
91
|
+
|
92
|
+
stub_request(:get, "http://example.com/a").to_return(status: 200, body: 'aaa')
|
93
|
+
stub_request(:get, "http://example.com/b").to_return(status: 200, body: 'bbb')
|
94
|
+
|
95
|
+
downloader.load_all(['http://example.com/a', 'http://example.com/b'],
|
96
|
+
before_each: 'try {',
|
97
|
+
after_each: '} catch(e) {}') do |io|
|
98
|
+
result = io.read
|
99
|
+
end
|
100
|
+
|
101
|
+
expect(result).to eq("try {aaa} catch(e) {}\ntry {bbb} catch(e) {}\n")
|
102
|
+
end
|
87
103
|
end
|
88
104
|
end
|
89
105
|
end
|
metadata
CHANGED
@@ -1,183 +1,211 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pageflow-chart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Fischbach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pageflow
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.10'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: paperclip
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '4.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '4.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: state_machine
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: state_machine_job
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: i18n-js
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pageflow-public-i18n
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: bundler
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rake
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '0'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: rspec-rails
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- - ~>
|
143
|
+
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: '2.0'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- - ~>
|
150
|
+
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '2.0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: factory_girl_rails
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - ">="
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '0'
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - ">="
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: sqlite3
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- -
|
171
|
+
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- -
|
178
|
+
- - ">="
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: webmock
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
|
-
- -
|
185
|
+
- - ">="
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '0'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
|
-
- -
|
192
|
+
- - ">="
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: semmy
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0.2'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0.2'
|
181
209
|
description:
|
182
210
|
email:
|
183
211
|
- tfischbach@codevise.de
|
@@ -185,12 +213,16 @@ executables: []
|
|
185
213
|
extensions: []
|
186
214
|
extra_rdoc_files: []
|
187
215
|
files:
|
188
|
-
- .gitignore
|
216
|
+
- ".gitignore"
|
217
|
+
- ".jshintrc"
|
218
|
+
- ".travis.yml"
|
189
219
|
- CHANGELOG.md
|
190
220
|
- Gemfile
|
191
221
|
- README.md
|
192
222
|
- Rakefile
|
193
223
|
- app/assets/images/pageflow/chart/fs_close_sprite.png
|
224
|
+
- app/assets/images/pageflow/chart/themes/default/pictograms/sprite.png
|
225
|
+
- app/assets/images/pageflow/chart/themes/default/pictograms/wide.png
|
194
226
|
- app/assets/images/pageflow/chart_pictogram.png
|
195
227
|
- app/assets/images/pageflow/chart_pictogram_small.png
|
196
228
|
- app/assets/images/pageflow/chart_sprite.png
|
@@ -201,9 +233,11 @@ files:
|
|
201
233
|
- app/assets/javascripts/pageflow/chart/editor/collections/scraped_sites_collection.js
|
202
234
|
- app/assets/javascripts/pageflow/chart/editor/initializers/setup_collections.js
|
203
235
|
- app/assets/javascripts/pageflow/chart/editor/models/scraped_site.js
|
236
|
+
- app/assets/javascripts/pageflow/chart/editor/templates/datawrapper_ad.jst.ejs
|
204
237
|
- app/assets/javascripts/pageflow/chart/editor/templates/scraped_site_status.jst.ejs
|
205
238
|
- app/assets/javascripts/pageflow/chart/editor/templates/url_input.jst.ejs
|
206
239
|
- app/assets/javascripts/pageflow/chart/editor/views/configuration_editor.js
|
240
|
+
- app/assets/javascripts/pageflow/chart/editor/views/datawrapper_ad_view.js
|
207
241
|
- app/assets/javascripts/pageflow/chart/editor/views/embedded/iframe_embedded_view.js
|
208
242
|
- app/assets/javascripts/pageflow/chart/editor/views/inputs/scraped_url_input_view.js
|
209
243
|
- app/assets/javascripts/pageflow/chart/editor/views/scraped_site_status_view.js
|
@@ -212,6 +246,7 @@ files:
|
|
212
246
|
- app/assets/stylesheets/pageflow/chart/custom.css.scss
|
213
247
|
- app/assets/stylesheets/pageflow/chart/editor.css.scss
|
214
248
|
- app/assets/stylesheets/pageflow/chart/themes/default.css.scss
|
249
|
+
- app/assets/stylesheets/pageflow/chart/transparent_background.css.erb
|
215
250
|
- app/controllers/pageflow/chart/application_controller.rb
|
216
251
|
- app/controllers/pageflow/chart/scraped_sites_controller.rb
|
217
252
|
- app/helpers/pageflow/chart/scraped_sites_helper.rb
|
@@ -220,17 +255,26 @@ files:
|
|
220
255
|
- app/views/pageflow/chart/page.html
|
221
256
|
- app/views/pageflow/chart/page_type.json.jbuilder
|
222
257
|
- bin/rails
|
258
|
+
- bin/rake
|
259
|
+
- bin/rspec
|
223
260
|
- chart.gemspec
|
224
261
|
- config/locales/de.yml
|
225
262
|
- config/locales/en.yml
|
263
|
+
- config/locales/new/datawrapper_ad.de.yml
|
264
|
+
- config/locales/new/datawrapper_ad.en.yml
|
265
|
+
- config/locales/new/full_width.de.yml
|
266
|
+
- config/locales/new/full_width.en.yml
|
226
267
|
- config/routes.rb
|
227
268
|
- db/migrate/20140417112724_create_pageflow_chart_scraped_sites.rb
|
269
|
+
- db/migrate/20160211085234_add_use_custom_theme_to_scraped_sites.rb
|
270
|
+
- lib/generators/pageflow_chart/install/install_generator.rb
|
228
271
|
- lib/pageflow/chart.rb
|
229
272
|
- lib/pageflow/chart/configuration.rb
|
230
273
|
- lib/pageflow/chart/downloader.rb
|
231
274
|
- lib/pageflow/chart/engine.rb
|
232
275
|
- lib/pageflow/chart/page_type.rb
|
233
276
|
- lib/pageflow/chart/scraper.rb
|
277
|
+
- lib/pageflow/chart/version.rb
|
234
278
|
- spec/controllers/pageflow/chart/scraped_sites_controller_spec.rb
|
235
279
|
- spec/dummy/README.rdoc
|
236
280
|
- spec/dummy/Rakefile
|
@@ -294,17 +338,17 @@ require_paths:
|
|
294
338
|
- lib
|
295
339
|
required_ruby_version: !ruby/object:Gem::Requirement
|
296
340
|
requirements:
|
297
|
-
- -
|
341
|
+
- - ">="
|
298
342
|
- !ruby/object:Gem::Version
|
299
343
|
version: '0'
|
300
344
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
301
345
|
requirements:
|
302
|
-
- -
|
346
|
+
- - ">="
|
303
347
|
- !ruby/object:Gem::Version
|
304
348
|
version: '0'
|
305
349
|
requirements: []
|
306
350
|
rubyforge_project:
|
307
|
-
rubygems_version: 2.
|
351
|
+
rubygems_version: 2.2.5
|
308
352
|
signing_key:
|
309
353
|
specification_version: 4
|
310
354
|
summary: Pagetype for Embedded Datawrapper Charts
|