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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +94 -166
- data/admins/pageflow/user.rb +0 -2
- data/app/assets/javascripts/pageflow/dist/ui.js +32 -9
- data/app/assets/javascripts/pageflow/editor/vendor.js +1 -0
- data/app/assets/stylesheets/pageflow/themes/default/page.scss +7 -0
- data/app/models/pageflow/chapter.rb +3 -9
- data/app/models/pageflow/page.rb +1 -4
- data/app/models/pageflow/revision.rb +0 -4
- data/app/models/pageflow/storyline.rb +2 -9
- data/app/views/pageflow/admin/initial_passwords/edit.html.erb +2 -1
- data/app/views/pageflow/themes/_theme.json.jbuilder +1 -1
- data/config/initializers/revision_components.rb +5 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +37 -13
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +19 -6
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +28 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +3 -9
- data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +1 -4
- data/entry_types/scrolled/app/models/pageflow_scrolled/section.rb +3 -9
- data/entry_types/scrolled/app/models/pageflow_scrolled/storyline.rb +1 -9
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/_global_notices.html.erb +10 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +6 -3
- data/entry_types/scrolled/config/locales/de.yml +14 -0
- data/entry_types/scrolled/config/locales/en.yml +15 -49
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +43 -6
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +26 -0
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/create_bundle_symlinks_for_yarn.rake +32 -0
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +8 -0
- data/entry_types/scrolled/lib/tasks/{pageflow_scrolled_tasks.rake → pageflow_scrolled/storybook.rake} +53 -14
- data/entry_types/scrolled/package/contentElements-editor.js +66 -7
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
- data/entry_types/scrolled/package/contentElements-frontend.js +109 -52
- data/entry_types/scrolled/package/editor.js +34 -25
- data/entry_types/scrolled/package/frontend/EditableText-7093fd0e.js +1071 -0
- data/entry_types/scrolled/package/frontend/Viewer-e49e7807.js +387 -0
- data/entry_types/scrolled/package/frontend/{Wavesurfer-b88b02e0.js → Wavesurfer-0adf5667.js} +1 -1
- data/entry_types/scrolled/package/frontend/{components-3ead1b4a.js → components-6a6793ca.js} +2 -1
- data/entry_types/scrolled/package/frontend/i18n-4dc6c377.js +1092 -0
- data/entry_types/scrolled/package/frontend/index.css +2 -2
- data/entry_types/scrolled/package/frontend/index.js +358 -179
- data/entry_types/scrolled/package/frontend/useBrowserFeature-91a4c29d.js +33 -0
- data/entry_types/scrolled/package/package.json +3 -5
- data/lib/generators/pageflow/initializer/templates/pageflow.rb +0 -7
- data/lib/pageflow/entry_export_import/revision_serialization.rb +15 -13
- data/lib/pageflow/entry_export_import/revision_serialization/import.rb +18 -26
- data/lib/pageflow/entry_type_configuration.rb +1 -0
- data/lib/pageflow/nested_revision_component.rb +49 -0
- data/lib/pageflow/revision_component.rb +6 -2
- data/lib/pageflow/user_mixin.rb +2 -1
- data/lib/pageflow/version.rb +1 -1
- data/package/editor.js +2 -1
- data/package/frontend.js +13 -2
- data/package/ui.js +32 -9
- data/spec/factories/test_revision_components.rb +4 -0
- metadata +18 -10
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96902980a5bb3f8dbdb7fea7c6d2ac7864cec92f72b841a32f9544d56f25ddf7
|
4
|
+
data.tar.gz: fb05810978adc0db7eac1901beec575d0d552c2187f95e4e4df92ab8d58801be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
3
|
+
### Version 15.5.0
|
4
4
|
|
5
|
-
2021-
|
5
|
+
2021-05-07
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/pageflow/compare/15-
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/15-4-stable...v15.5.0)
|
8
8
|
|
9
9
|
#### Core
|
10
10
|
|
11
|
-
#####
|
11
|
+
##### Manual Update Step
|
12
12
|
|
13
|
-
-
|
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
|
-
|
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
|
-
|
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
|
-
-
|
38
|
-
([#
|
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
|
-
-
|
45
|
-
([#
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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
|
-
-
|
150
|
-
([#
|
151
|
-
-
|
152
|
-
([#
|
153
|
-
-
|
154
|
-
([#
|
155
|
-
-
|
156
|
-
([#
|
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-
|
115
|
+
[15-4-stable branch](https://github.com/codevise/pageflow/blob/15-4-stable/CHANGELOG.md)
|
188
116
|
for previous changes.
|
data/admins/pageflow/user.rb
CHANGED
@@ -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
|
2292
|
-
|
2293
|
-
this.validate().
|
2294
|
-
|
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
|
2303
|
-
|
2304
|
-
|
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
|
|
@@ -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
|
data/app/models/pageflow/page.rb
CHANGED
@@ -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
|