pageflow 15.4.0 → 15.5.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +94 -166
  3. data/admins/pageflow/user.rb +0 -2
  4. data/app/assets/javascripts/pageflow/dist/ui.js +32 -9
  5. data/app/assets/javascripts/pageflow/editor/vendor.js +1 -0
  6. data/app/assets/stylesheets/pageflow/themes/default/page.scss +7 -0
  7. data/app/models/pageflow/chapter.rb +3 -9
  8. data/app/models/pageflow/page.rb +1 -4
  9. data/app/models/pageflow/revision.rb +0 -4
  10. data/app/models/pageflow/storyline.rb +2 -9
  11. data/app/views/pageflow/admin/initial_passwords/edit.html.erb +2 -1
  12. data/app/views/pageflow/themes/_theme.json.jbuilder +1 -1
  13. data/config/initializers/revision_components.rb +5 -0
  14. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +37 -13
  15. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +19 -6
  16. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +28 -0
  17. data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +3 -9
  18. data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +1 -4
  19. data/entry_types/scrolled/app/models/pageflow_scrolled/section.rb +3 -9
  20. data/entry_types/scrolled/app/models/pageflow_scrolled/storyline.rb +1 -9
  21. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/_global_notices.html.erb +10 -0
  22. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +6 -3
  23. data/entry_types/scrolled/config/locales/de.yml +14 -0
  24. data/entry_types/scrolled/config/locales/en.yml +15 -49
  25. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +43 -6
  26. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +26 -0
  27. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/create_bundle_symlinks_for_yarn.rake +32 -0
  28. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +8 -0
  29. data/entry_types/scrolled/lib/tasks/{pageflow_scrolled_tasks.rake → pageflow_scrolled/storybook.rake} +53 -14
  30. data/entry_types/scrolled/package/contentElements-editor.js +66 -7
  31. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  32. data/entry_types/scrolled/package/contentElements-frontend.js +109 -52
  33. data/entry_types/scrolled/package/editor.js +34 -25
  34. data/entry_types/scrolled/package/frontend/EditableText-7093fd0e.js +1071 -0
  35. data/entry_types/scrolled/package/frontend/Viewer-e49e7807.js +387 -0
  36. data/entry_types/scrolled/package/frontend/{Wavesurfer-b88b02e0.js → Wavesurfer-0adf5667.js} +1 -1
  37. data/entry_types/scrolled/package/frontend/{components-3ead1b4a.js → components-6a6793ca.js} +2 -1
  38. data/entry_types/scrolled/package/frontend/i18n-4dc6c377.js +1092 -0
  39. data/entry_types/scrolled/package/frontend/index.css +2 -2
  40. data/entry_types/scrolled/package/frontend/index.js +358 -179
  41. data/entry_types/scrolled/package/frontend/useBrowserFeature-91a4c29d.js +33 -0
  42. data/entry_types/scrolled/package/package.json +3 -5
  43. data/lib/generators/pageflow/initializer/templates/pageflow.rb +0 -7
  44. data/lib/pageflow/entry_export_import/revision_serialization.rb +15 -13
  45. data/lib/pageflow/entry_export_import/revision_serialization/import.rb +18 -26
  46. data/lib/pageflow/entry_type_configuration.rb +1 -0
  47. data/lib/pageflow/nested_revision_component.rb +49 -0
  48. data/lib/pageflow/revision_component.rb +6 -2
  49. data/lib/pageflow/user_mixin.rb +2 -1
  50. data/lib/pageflow/version.rb +1 -1
  51. data/package/editor.js +2 -1
  52. data/package/frontend.js +13 -2
  53. data/package/ui.js +32 -9
  54. data/spec/factories/test_revision_components.rb +4 -0
  55. metadata +18 -10
  56. data/entry_types/scrolled/package/frontend/EditableText-43c50894.js +0 -2161
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f03a7b8a1dfb0f883c3b74dc65373ddcdda27b3dad7a469b5f0c90dd66a4e7f
4
- data.tar.gz: 62c18d804e95fb066746cb1cb482ad1504ca6e89107d63286c2950917a371d48
3
+ metadata.gz: 96902980a5bb3f8dbdb7fea7c6d2ac7864cec92f72b841a32f9544d56f25ddf7
4
+ data.tar.gz: fb05810978adc0db7eac1901beec575d0d552c2187f95e4e4df92ab8d58801be
5
5
  SHA512:
6
- metadata.gz: cd94ad6911c8e9c0b0000f4eb294b3d0a06ebc108fa81692c284d0d2f89a53753665827110589979bd7e2a953f659bfd7e6707d35f89f5140821096742895251
7
- data.tar.gz: 2ed57089f493c3d3c4773c503852c26473e50c0fe53e61acbbe0d01f2a6d383dc8460fcdaf06bfa349bcc5b17e3fe6960ad6791a629f09665283654037a0fd19
6
+ metadata.gz: 157deea11713fb77f374469ffcb2ed25ebe0e7401f140eea761266602099a89311b58be6b4e353980dc6bae3bd896136e2a27b7748c9e6434142816230973400
7
+ data.tar.gz: 571fd3407f0e45cd0ba1bb902349da1e84ee1ffdd7cb5367ac59cc22de439ae1866b79214e96c08ecc92956b367ec1a5dd84f2a1f6fa4ff4236d6b9307643e89
data/CHANGELOG.md CHANGED
@@ -1,188 +1,116 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 15.4.0
3
+ ### Version 15.5.0
4
4
 
5
- 2021-01-08
5
+ 2021-05-07
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow/compare/15-3-stable...v15.4.0)
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/15-4-stable...v15.5.0)
8
8
 
9
9
  #### Core
10
10
 
11
- ##### Editor
11
+ ##### Manual Update Step
12
12
 
13
- - Improve editor styles
14
- ([#1629](https://github.com/codevise/pageflow/pull/1629))
15
- - Bug fix: Wait for feature detection before booting editor
16
- ([#1573](https://github.com/codevise/pageflow/pull/1573))
17
- - Bug fix: Work around Minicolors problem with updating swatches
18
- ([#1583](https://github.com/codevise/pageflow/pull/1583))
19
-
20
- ##### Internal
21
-
22
- - String literals in SQL should only be enclosed by single quotes
23
- ([#1576](https://github.com/codevise/pageflow/pull/1576))
24
- - Stub Paperclip by default in specs
25
- ([#1609](https://github.com/codevise/pageflow/pull/1609))
26
- - Retry js specs of pageflow engine
27
- ([#1608](https://github.com/codevise/pageflow/pull/1608))
28
- - Migrate Travis jobs to GitHub actions
29
- ([#1607](https://github.com/codevise/pageflow/pull/1607))
30
- - Fix CI and abort when dummy app generation fails
31
- ([#1604](https://github.com/codevise/pageflow/pull/1604))
13
+ - Upgrade Webpack config
32
14
 
33
- #### Paged Entry Type
15
+ Disable Babel compilation of `node_modules` directory to prevent
16
+ error of the form "_typeof is not defined" in Video.js HTTP
17
+ streaming service worker that is registered when DASH sources are
18
+ used. Add the following lines to the host application's
19
+ `config/webpack/environment.js` file:
34
20
 
35
- ##### Editor
21
+ ```
22
+ environment.config.merge(require('pageflow-scrolled/config/webpack'))
23
+
24
+ // Opt into future default behavior of Webpacker [1] to work around
25
+ // problems with Video.js DASH service worker.
26
+ //
27
+ // [1] https://github.com/rails/webpacker/pull/2624
28
+ environment.loaders.delete('nodeModules')
29
+
30
+ ```
31
+
32
+ No longer precompiling `node_modules` means that some ES6 syntax
33
+ included in some of the packages will end up in the
34
+ bundle. `therubyracer` gem then causes "Use of const in strict mode"
35
+ error during SSR. Upgrading the host application to use `mini_racer`
36
+ instead fixes the problem.
37
+ ([#1655](https://github.com/codevise/pageflow/pull/1655))
38
+
39
+ ##### Rails Engine
36
40
 
37
- - Fix classic loading spinner preview in editor
38
- ([#1649](https://github.com/codevise/pageflow/pull/1649))
41
+ - Allow registering entry type specific file importers
42
+ ([#1684](https://github.com/codevise/pageflow/pull/1684))
43
+ - Nested revision components
44
+ ([#1654](https://github.com/codevise/pageflow/pull/1654))
45
+ - Nested revision components
46
+ ([#1654](https://github.com/codevise/pageflow/pull/1654))
47
+ - Upgrade to Devise 4.7
48
+ ([#1657](https://github.com/codevise/pageflow/pull/1657))
49
+
50
+ ##### Admin
51
+
52
+ - Validate user locale
53
+ ([#1658](https://github.com/codevise/pageflow/pull/1658))
54
+
55
+ #### Paged Entry Type
56
+
57
+ - Add theme option for content text phone typography
58
+ ([#1670](https://github.com/codevise/pageflow/pull/1670))
59
+ - Bug fix: Wait until listener is ready before requesting cookie notice
60
+ ([#1650](https://github.com/codevise/pageflow/pull/1650))
39
61
 
40
62
  #### Scrolled Entry Type
41
63
 
64
+ ##### Rails Engine
65
+
66
+ - Color/font options for scrolled themes
67
+ ([#1673](https://github.com/codevise/pageflow/pull/1673))
68
+ - Improve scrolled install generator
69
+ ([#1682](https://github.com/codevise/pageflow/pull/1682))
70
+
42
71
  ##### Published Entry
43
72
 
44
- - Chapter deep linking
45
- ([#1637](https://github.com/codevise/pageflow/pull/1637))
46
- - Lazy load DASH code for Scrolled
47
- ([#1635](https://github.com/codevise/pageflow/pull/1635))
48
- - Deduplicate core-js in yarn.lock
49
- ([#1634](https://github.com/codevise/pageflow/pull/1634))
50
- - Do not move backdrop when navigation is scrolled out of view
51
- ([#1632](https://github.com/codevise/pageflow/pull/1632))
52
- - Navigation bar improvements
53
- ([#1631](https://github.com/codevise/pageflow/pull/1631))
54
- - Do not fall back to file default motif area
55
- ([#1628](https://github.com/codevise/pageflow/pull/1628))
56
- - Improve poster rendering
57
- ([#1621](https://github.com/codevise/pageflow/pull/1621))
58
- - Optimize frontend rendering
59
- ([#1620](https://github.com/codevise/pageflow/pull/1620))
60
- - Do not show scroll position based backdrop shadow initially
61
- ([#1619](https://github.com/codevise/pageflow/pull/1619))
62
- - Prevent state update on unmounted component
63
- ([#1618](https://github.com/codevise/pageflow/pull/1618))
64
- - Do not keep navigation open when focus is within
65
- ([#1617](https://github.com/codevise/pageflow/pull/1617))
66
- - Improve unmute sequence
67
- ([#1615](https://github.com/codevise/pageflow/pull/1615))
68
- - Show logo focus outline
69
- ([#1613](https://github.com/codevise/pageflow/pull/1613))
70
- - Open logo link in new tab
71
- ([#1612](https://github.com/codevise/pageflow/pull/1612))
72
- - Improve handling of untitled chapters
73
- ([#1610](https://github.com/codevise/pageflow/pull/1610))
74
- - Logo link through theme option
75
- ([#1603](https://github.com/codevise/pageflow/pull/1603))
76
- - Improve player controls
77
- ([#1602](https://github.com/codevise/pageflow/pull/1602),
78
- [#1586](https://github.com/codevise/pageflow/pull/1586))
79
- - change Email to Mail
80
- ([#1601](https://github.com/codevise/pageflow/pull/1601))
81
- - Prevent parallel playback of media elements
82
- ([#1599](https://github.com/codevise/pageflow/pull/1599))
83
- - Improve navigation tooltips
84
- ([#1597](https://github.com/codevise/pageflow/pull/1597))
85
- - Give backdrops default background color
86
- ([#1594](https://github.com/codevise/pageflow/pull/1594))
87
- - Replace hard coded title and meta tags
88
- ([#1593](https://github.com/codevise/pageflow/pull/1593))
89
- - Prevent resuming atmo of other section
90
- ([#1591](https://github.com/codevise/pageflow/pull/1591))
91
- - Add toggle mute button to navigation
92
- ([#1589](https://github.com/codevise/pageflow/pull/1589))
93
- - Implements skip link for navigation
94
- ([#1585](https://github.com/codevise/pageflow/pull/1585))
95
- - Position backdrop image/video according to motif area
96
- ([#1582](https://github.com/codevise/pageflow/pull/1582))
97
- - Add motif area support for background videos
98
- ([#1580](https://github.com/codevise/pageflow/pull/1580))
99
- - Require user to opt in to see external embeds
100
- ([#1577](https://github.com/codevise/pageflow/pull/1577))
101
- - Renders alt text for media
102
- ([#1574](https://github.com/codevise/pageflow/pull/1574))
103
- - Use theme specific favicons
104
- ([#1569](https://github.com/codevise/pageflow/pull/1569))
105
- - Bug fix: Don't remove media tag when unallocating player in IE 11
106
- ([#1648](https://github.com/codevise/pageflow/pull/1648))
107
- - Allow disabling video or dash via browser feature flag
108
- ([#1647](https://github.com/codevise/pageflow/pull/1647))
109
- - Bug fix: Ensure muted inline media pauses on deactivation
110
- ([#1646](https://github.com/codevise/pageflow/pull/1646))
111
- - Bug fix: Fix for unstable navigation bar on Safari
112
- ([#1642](https://github.com/codevise/pageflow/pull/1642))
113
- - Bug fix: Invisible share links should not be clickable
114
- ([#1641](https://github.com/codevise/pageflow/pull/1641))
115
- - Bug fix: Play unmute sound on iOS
116
- ([#1640](https://github.com/codevise/pageflow/pull/1640))
117
- - Bug fix: Fix scroll flickering on Android Chrome
118
- ([#1639](https://github.com/codevise/pageflow/pull/1639))
119
- - Bug fix: Do not request new player when object position changes
120
- ([#1638](https://github.com/codevise/pageflow/pull/1638))
121
- - Bug fix: Fix "SourceBuffer removed from parent media source" error
122
- ([#1636](https://github.com/codevise/pageflow/pull/1636))
123
- - Bug fix: Prevent overlapping floated elements in centered layout
124
- ([#1590](https://github.com/codevise/pageflow/pull/1590))
125
- - Bug fix: Fix progress indicator in scrolled navigation bar
126
- ([#1571](https://github.com/codevise/pageflow/pull/1571))
127
-
128
- ##### Content Elements
129
-
130
- - Fix external links layout narrow screen sizes
131
- ([#1598](https://github.com/codevise/pageflow/pull/1598))
132
- - Improve Datawrapper chart display
133
- ([#1611](https://github.com/codevise/pageflow/pull/1611))
134
- - Never hide audio controls
135
- ([#1616](https://github.com/codevise/pageflow/pull/1616))
136
- - Fixed before after height issue
137
- ([#1606](https://github.com/codevise/pageflow/pull/1606))
138
- - Heading word-wrap and hyphen css
139
- ([#1605](https://github.com/codevise/pageflow/pull/1605))
140
- - Fade out audio element when deactivating
141
- ([#1592](https://github.com/codevise/pageflow/pull/1592))
142
- - Add caption and position options to chart element
143
- ([#1587](https://github.com/codevise/pageflow/pull/1587))
144
- - Bug fix: BeforeAfter safari animation fix
145
- ([#1623](https://github.com/codevise/pageflow/pull/1623))
73
+ - Add 360 image content element based on @egjs/view360
74
+ ([#1675](https://github.com/codevise/pageflow/pull/1675),
75
+ [#1676](https://github.com/codevise/pageflow/pull/1676))
76
+ - Add position wide for heading content elements
77
+ ([#1678](https://github.com/codevise/pageflow/pull/1678))
78
+ - Remove chapter number from chapter box
79
+ ([#1679](https://github.com/codevise/pageflow/pull/1679))
80
+ - Fix embed video opt in text color in inverted section
81
+ ([#1671](https://github.com/codevise/pageflow/pull/1671))
82
+ - Handle player unallocated by empty pool
83
+ ([#1668](https://github.com/codevise/pageflow/pull/1668))
84
+ - Horizontal scroller for desktop navigation bar
85
+ ([#1669](https://github.com/codevise/pageflow/pull/1669))
86
+ - Improve file rights
87
+ ([#1665](https://github.com/codevise/pageflow/pull/1665))
88
+ - Allow non latin characters in video embed caption
89
+ ([#1664](https://github.com/codevise/pageflow/pull/1664))
90
+ - Hyphenate long text block headers
91
+ ([#1662](https://github.com/codevise/pageflow/pull/1662))
92
+ - Upgrade Scrolled to Video.js 7
93
+ ([#1655](https://github.com/codevise/pageflow/pull/1655))
94
+ - Improve before/after wiggle animation
95
+ ([#1659](https://github.com/codevise/pageflow/pull/1659))
96
+ - Display notices for unsupported browser or non-js
97
+ ([#1653](https://github.com/codevise/pageflow/pull/1653))
98
+ - Basic styles for print layout of scrolled entries
99
+ ([#1652](https://github.com/codevise/pageflow/pull/1652))
100
+ - Bug fix: Hide frame around inline video on iOS 12
101
+ ([#1680](https://github.com/codevise/pageflow/pull/1680))
146
102
 
147
103
  ##### Editor
148
104
 
149
- - Ordering content elements
150
- ([#1596](https://github.com/codevise/pageflow/pull/1596))
151
- - Preserve scroll position when toggling phone preview
152
- ([#1614](https://github.com/codevise/pageflow/pull/1614))
153
- - Show section settings directly when section is selected
154
- ([#1626](https://github.com/codevise/pageflow/pull/1626))
155
- - Make motif area selection snap to grid
156
- ([#1578](https://github.com/codevise/pageflow/pull/1578))
157
- - Extend german help texts
158
- ([#1625](https://github.com/codevise/pageflow/pull/1625))
159
- - Add options for gradient opacity/motif area exposure
160
- ([#1624](https://github.com/codevise/pageflow/pull/1624))
161
- - Add missing translation
162
- ([#1600](https://github.com/codevise/pageflow/pull/1600))
163
- - Bug fix: Apply default configuration when adding to end of section
164
- ([#1630](https://github.com/codevise/pageflow/pull/1630))
165
- - Bug fix: Fix error when merging empty text blocks
166
- ([#1588](https://github.com/codevise/pageflow/pull/1588))
167
-
168
- ###### JavaScript API
169
-
170
- - Split isPrepared state into shouldLoad and shouldPrepare
171
- ([#1622](https://github.com/codevise/pageflow/pull/1622))
172
-
173
- ###### Internal
174
-
175
- - Fix Jest warnings caused by Backbone XHR
176
- ([#1579](https://github.com/codevise/pageflow/pull/1579))
177
- - Remove renderer memoization in development
178
- ([#1584](https://github.com/codevise/pageflow/pull/1584))
179
- - Import scrolled translations into LocaleApp
180
- ([#1627](https://github.com/codevise/pageflow/pull/1627))
181
- - Navigation bar Storybook story
182
- ([#1557](https://github.com/codevise/pageflow/pull/1557))
183
- - Fix storybook documentation
184
- ([#1540](https://github.com/codevise/pageflow/pull/1540))
105
+ - Prevent concurrent save requests for embed urls
106
+ ([#1672](https://github.com/codevise/pageflow/pull/1672))
107
+ - Do not trigger multiple save requests for backdrop updates
108
+ ([#1666](https://github.com/codevise/pageflow/pull/1666))
109
+ - Fix lazy loading in editor for Safari
110
+ ([#1660](https://github.com/codevise/pageflow/pull/1660))
111
+ - Bug fix: Cascade model removal through ForeignKeySubsetCollection
112
+ ([#1651](https://github.com/codevise/pageflow/pull/1651))
185
113
 
186
114
  See
187
- [15-3-stable branch](https://github.com/codevise/pageflow/blob/15-3-stable/CHANGELOG.md)
115
+ [15-4-stable branch](https://github.com/codevise/pageflow/blob/15-4-stable/CHANGELOG.md)
188
116
  for previous changes.
@@ -25,8 +25,6 @@ module Pageflow
25
25
  column :first_name
26
26
  column :last_name
27
27
  column :email
28
- column :last_sign_in_at
29
- column :sign_in_count
30
28
  column :suspended?
31
29
  end
32
30
 
@@ -2246,6 +2246,21 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2246
2246
  }
2247
2247
  });
2248
2248
 
2249
+ function _defineProperty(obj, key, value) {
2250
+ if (key in obj) {
2251
+ Object.defineProperty(obj, key, {
2252
+ value: value,
2253
+ enumerable: true,
2254
+ configurable: true,
2255
+ writable: true
2256
+ });
2257
+ } else {
2258
+ obj[key] = value;
2259
+ }
2260
+
2261
+ return obj;
2262
+ }
2263
+
2249
2264
  function template$9(data) {
2250
2265
  var __p = '';
2251
2266
  __p += '<label>\n <span class="name"></span>\n <span class="inline_help"></span>\n</label>\n<input type="text" />\n<div class="validation"></div>\n';
@@ -2288,24 +2303,32 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2288
2303
  this.validate();
2289
2304
  },
2290
2305
  onChange: function onChange() {
2291
- var view = this;
2292
- this.saveDisplayProperty();
2293
- this.validate().done(function () {
2294
- view.save();
2306
+ var _this = this;
2307
+
2308
+ this.validate().then(function () {
2309
+ return _this.save();
2310
+ }, function () {
2311
+ return _this.saveDisplayProperty();
2295
2312
  });
2296
2313
  },
2297
2314
  saveDisplayProperty: function saveDisplayProperty() {
2315
+ this.model.unset(this.options.propertyName, {
2316
+ silent: true
2317
+ });
2298
2318
  this.model.set(this.options.displayPropertyName, this.ui.input.val());
2299
- this.model.unset(this.options.propertyName);
2300
2319
  },
2301
2320
  save: function save() {
2302
- var view = this;
2303
- $.when(this.transformPropertyValue(this.ui.input.val())).then(function (value) {
2304
- view.model.set(view.options.propertyName, value);
2321
+ var _this2 = this;
2322
+
2323
+ var value = this.ui.input.val();
2324
+ $.when(this.transformPropertyValue(value)).then(function (transformedValue) {
2325
+ var _this2$model$set;
2326
+
2327
+ _this2.model.set((_this2$model$set = {}, _defineProperty(_this2$model$set, _this2.options.displayPropertyName, value), _defineProperty(_this2$model$set, _this2.options.propertyName, transformedValue), _this2$model$set));
2305
2328
  });
2306
2329
  },
2307
2330
  load: function load() {
2308
- this.ui.input.val(this.model.get(this.options.displayPropertyName));
2331
+ this.ui.input.val(this.model.has(this.options.displayPropertyName) ? this.model.get(this.options.displayPropertyName) : this.model.get(this.options.propertyName));
2309
2332
  this.onLoad();
2310
2333
  },
2311
2334
 
@@ -1,3 +1,4 @@
1
+
1
2
  //= require i18n
2
3
  //= require i18n/translations
3
4
 
@@ -8,6 +8,9 @@ $page-typography: () !default;
8
8
  /// Typography for content text.
9
9
  $page-content-text-typography: () !default;
10
10
 
11
+ /// Typography for content text in phone layout.
12
+ $page-content-text-phone-typography: () !default
13
+
11
14
  /// Base font size for page content
12
15
  $page-content-font-size: 1em !default;
13
16
 
@@ -62,6 +65,10 @@ $page-content-list-indent: 40px !default;
62
65
  line-height: $page-content-text-line-height
63
66
  )
64
67
  );
68
+
69
+ @include phone {
70
+ @include typography($page-content-text-phone-typography);
71
+ }
65
72
  }
66
73
 
67
74
  .page_text > .paragraph ul,
@@ -1,10 +1,13 @@
1
1
  module Pageflow
2
2
  class Chapter < ApplicationRecord
3
3
  include SerializedConfiguration
4
+ include NestedRevisionComponent
4
5
 
5
6
  belongs_to :storyline, touch: true
6
7
  has_many :pages, -> { order('position ASC') }, dependent: :destroy, inverse_of: :chapter
7
8
 
9
+ nested_revision_components :pages
10
+
8
11
  attr_accessor :is_first
9
12
 
10
13
  delegate :entry, to: :storyline
@@ -12,14 +15,5 @@ module Pageflow
12
15
  def pages
13
16
  super.tap { |p| p.first.is_first = true if is_first && p.present? }
14
17
  end
15
-
16
- def copy_to(storyline)
17
- chapter = dup
18
- storyline.chapters << chapter
19
-
20
- pages.each do |page|
21
- page.copy_to(chapter)
22
- end
23
- end
24
18
  end
25
19
  end
@@ -1,6 +1,7 @@
1
1
  module Pageflow
2
2
  class Page < ApplicationRecord
3
3
  include SerializedConfiguration
4
+ include NestedRevisionComponent
4
5
  include AutoGeneratedPermaId
5
6
 
6
7
  belongs_to :chapter, touch: true
@@ -23,9 +24,5 @@ module Pageflow
23
24
  self.display_in_navigation = value['display_in_navigation']
24
25
  super
25
26
  end
26
-
27
- def copy_to(chapter)
28
- chapter.pages << dup
29
- end
30
27
  end
31
28
  end
@@ -170,10 +170,6 @@ module Pageflow
170
170
  widget.copy_to(revision)
171
171
  end
172
172
 
173
- storylines.each do |storyline|
174
- storyline.copy_to(revision)
175
- end
176
-
177
173
  file_usages.each do |file_usage|
178
174
  file_usage.copy_to(revision)
179
175
  end