pageflow 13.6.0 → 14.0.0.beta1
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 +72 -5
- data/app/assets/javascripts/pageflow/dist/react-client.js +22 -27
- data/app/assets/javascripts/pageflow/dist/react-server.js +22 -27
- data/app/assets/javascripts/pageflow/editor/collections/files_collection.js +0 -1
- data/app/assets/javascripts/pageflow/editor/models/file_uploader.js +3 -1
- data/app/assets/javascripts/pageflow/editor/models/hosted_file.js +2 -7
- data/app/assets/javascripts/pageflow/editor/models/image_file.js +1 -1
- data/app/assets/javascripts/pageflow/editor/models/uploaded_file.js +12 -10
- data/app/assets/javascripts/pageflow/editor/views/configuration_editors/groups/general.js +4 -4
- data/app/assets/javascripts/pageflow/editor/views/uploader_view.js +18 -27
- data/app/assets/javascripts/pageflow/slideshow/page_split_layout.js +8 -8
- data/app/assets/javascripts/pageflow/slideshow/page_widget.js +1 -1
- data/app/assets/stylesheets/pageflow/delayed_text_fade_in.scss +10 -5
- data/app/assets/stylesheets/pageflow/editor/file_stages.scss +0 -4
- data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +0 -4
- data/app/assets/stylesheets/pageflow/hide_text.scss +2 -2
- data/app/assets/stylesheets/pageflow/lt_ie9.scss +5 -5
- data/app/assets/stylesheets/pageflow/navigation_bar.scss +1 -0
- data/app/assets/stylesheets/pageflow/navigation_mobile.scss +4 -0
- data/app/assets/stylesheets/pageflow/page.scss +2 -2
- data/app/assets/stylesheets/pageflow/page_transitions/crossfade.scss +1 -1
- data/app/assets/stylesheets/pageflow/page_transitions/fade.scss +11 -11
- data/app/assets/stylesheets/pageflow/page_transitions/fade_to_black.scss +13 -10
- data/app/assets/stylesheets/pageflow/page_types/audio.scss +3 -3
- data/app/assets/stylesheets/pageflow/page_types/video.scss +9 -9
- data/app/assets/stylesheets/pageflow/page_types/video/content_hiding.scss +2 -2
- data/app/assets/stylesheets/pageflow/page_types/video/mobile_poster.scss +3 -3
- data/app/assets/stylesheets/pageflow/print_view.scss +8 -5
- data/app/assets/stylesheets/pageflow/slideshow.scss +6 -5
- data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/page.scss +3 -168
- data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +2 -2
- data/app/assets/stylesheets/pageflow/themes/default/page/content_text_margin.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/page/header.scss +172 -0
- data/app/assets/stylesheets/pageflow/themes/default/page/hyphenate.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/page/line_lengths.scss +12 -14
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/vjs_mapping.scss +6 -6
- data/app/assets/stylesheets/pageflow/themes/default/{video_wrapper.scss → uncropped_media_wrapper.scss} +1 -1
- data/app/controllers/pageflow/editor/files_controller.rb +11 -8
- data/app/helpers/pageflow/background_image_helper.rb +2 -1
- data/app/helpers/pageflow/files_helper.rb +1 -0
- data/app/helpers/pageflow/pages_helper.rb +31 -0
- data/app/helpers/pageflow/video_files_helper.rb +3 -3
- data/app/jobs/pageflow/process_file_job.rb +15 -5
- data/app/models/concerns/pageflow/hosted_file.rb +42 -33
- data/app/models/concerns/pageflow/uploaded_file.rb +10 -0
- data/app/models/pageflow/audio_file.rb +1 -1
- data/app/models/pageflow/audio_file_url_templates.rb +1 -1
- data/app/models/pageflow/draft_entry.rb +1 -1
- data/app/models/pageflow/image_file.rb +38 -52
- data/app/models/pageflow/image_file_css_background_image_urls.rb +4 -4
- data/app/models/pageflow/image_file_url_templates.rb +2 -2
- data/app/models/pageflow/positioned_file.rb +1 -1
- data/app/models/pageflow/text_track_file.rb +15 -32
- data/app/models/pageflow/text_track_file_url_templates.rb +2 -3
- data/app/models/pageflow/video_file.rb +1 -1
- data/app/models/pageflow/video_file_url_templates.rb +1 -1
- data/app/state_machines/pageflow/{image_file_state_machine.rb → processed_file_state_machine.rb} +4 -10
- data/app/views/pageflow/editor/files/_file.json.jbuilder +4 -0
- data/app/views/pageflow/entries/edit.html.erb +2 -2
- data/app/views/pageflow/entries/mobile_navigation/_page.html.erb +1 -0
- data/app/views/pageflow/entries/navigation/_page.html.erb +2 -1
- data/config/initializers/paperclip.rb +6 -0
- data/config/routes.rb +1 -1
- data/db/migrate/20181115165746_change_processed_attachment_to_attachment_on_s3_for_images.rb +16 -0
- data/db/migrate/20190306161431_copy_file_attributes_of_failed_uploads.rb +25 -0
- data/lib/pageflow/configuration.rb +23 -5
- data/lib/pageflow/configuration/defaults.rb +2 -9
- data/lib/pageflow/version.rb +1 -1
- data/spec/factories/audio_files.rb +17 -10
- data/spec/factories/hosted_files.rb +13 -11
- data/spec/factories/image_files.rb +18 -11
- data/spec/factories/text_track_files.rb +30 -10
- data/spec/factories/video_files.rb +16 -9
- metadata +9 -8
- data/app/assets/javascripts/pageflow/dist/react.js +0 -29944
- data/app/jobs/pageflow/upload_file_to_s3_job.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e85a3d4874ac0e48fd24a7e83259c1f5cb91f650d6963312389db99ed88877f7
|
4
|
+
data.tar.gz: d58afca9204dfecaf2809ecb3e0c55fcbe54c957b0a247f2f4dee55e3d178095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca49aac5a2f04c18902044cdf5d604de35e86b3fc532ee28d0a12a9183cb654a81cb4f619a16ccc7f275a3e27b205844abcbeab1e6a16a699613d5bb860850fc
|
7
|
+
data.tar.gz: ac24b62c77bdec1b04daf2cc505f37b04835a9c27d132aa9076bd9eeb6b57f15ef337265cf7a5dac9fc77ed99138ad455c2b6b9f869864e25ba6e5b9d44493ee
|
data/CHANGELOG.md
CHANGED
@@ -1,14 +1,81 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version
|
3
|
+
### Version 14.0.0.beta1
|
4
4
|
|
5
|
-
2019-03-
|
5
|
+
2019-03-08
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/pageflow/compare/13-
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/13-x-stable...v14.0.0.beta1)
|
8
|
+
|
9
|
+
#### Manual Update Steps
|
10
|
+
|
11
|
+
- Direct upload to S3
|
12
|
+
([#1076](https://github.com/codevise/pageflow/pull/1076))
|
13
|
+
|
14
|
+
Files are now uploaded directly to S3 from the browser. The
|
15
|
+
following steps need to be performed:
|
16
|
+
|
17
|
+
* Update CORS-config for S3 bucket as described in
|
18
|
+
[`doc/setting_up_external_services.md`](https://github.com/codevise/pageflow/blob/14-0-stable/doc/setting_up_external_services.md).
|
19
|
+
|
20
|
+
* `nginx-upload-module` is no longer supported since the requests to
|
21
|
+
create files no longer contain uploads. Corresponding Nginx
|
22
|
+
configuration for Pageflow endpoints needs to be removed. Check
|
23
|
+
whether the `paperclip-nginx-upload` io adapter is still needed.
|
24
|
+
|
25
|
+
#### Breaking Changes for Pageflow Plugins
|
26
|
+
|
27
|
+
- Page DOM layout change
|
28
|
+
([#1135](https://github.com/codevise/pageflow/pull/1135))
|
29
|
+
|
30
|
+
Page headers are now have level 3 instead of level 2. There is a new
|
31
|
+
helper which is recommended to render the default page header and
|
32
|
+
content text.
|
33
|
+
|
34
|
+
ERB template based page types need to make the following changes to
|
35
|
+
CSS class names in their page templates:
|
36
|
+
|
37
|
+
* `blackLayer` -> `black_layer`
|
38
|
+
* `backgroundArea` -> `page_background`
|
39
|
+
* `contentWrapper` -> `content_wrapper`
|
40
|
+
* `videoWrapper` -> `uncropped_media_wrapper`
|
41
|
+
|
42
|
+
The default header and content snippet
|
43
|
+
|
44
|
+
<div class="page_header">
|
45
|
+
<h2>
|
46
|
+
<span class="tagline"><%= configuration['tagline'] %></span>
|
47
|
+
<span class="title"><%= configuration['title'] %></span>
|
48
|
+
<span class="subtitle"><%= configuration['subtitle'] %></span>
|
49
|
+
</h2>
|
50
|
+
<%= background_image_tag(configuration['background_image_id'], {class: "print_image"}) %>
|
51
|
+
</div>
|
52
|
+
<div class="contentText">
|
53
|
+
<p><%= raw configuration['text'] %></p>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
should be replaced with the following helper call:
|
57
|
+
|
58
|
+
<%= page_default_content(page) %>
|
59
|
+
|
60
|
+
- Direct upload to S3
|
61
|
+
([#1132](https://github.com/codevise/pageflow/pull/1132))
|
62
|
+
|
63
|
+
Files are now uploaded directly to S3 from the browser. The state
|
64
|
+
machine defined by `HostedFile` therefore no longer includes states
|
65
|
+
like `uploading_to_s3`. Files which are be in state
|
66
|
+
`uploading_to_s3_failed` have to be migrated to the
|
67
|
+
`uploading_failed` state. See the migrations inside the PR for
|
68
|
+
examples.
|
69
|
+
|
70
|
+
#### Minor Changes
|
8
71
|
|
9
72
|
- Add shared specs to pageflow-support to lint page types
|
10
|
-
([#
|
73
|
+
([#1133](https://github.com/codevise/pageflow/pull/1133))
|
74
|
+
- Increase max length for page tagline, title and subtitles
|
75
|
+
([#1131](https://github.com/codevise/pageflow/pull/1131))
|
76
|
+
- Include text in navigation bar links
|
77
|
+
([#1129](https://github.com/codevise/pageflow/pull/1129))
|
11
78
|
|
12
79
|
See
|
13
|
-
[13-
|
80
|
+
[13-x-stable branch](https://github.com/codevise/pageflow/blob/13-x-stable/CHANGELOG.md)
|
14
81
|
for previous changes.
|
@@ -9562,7 +9562,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
9562
9562
|
function className(_ref) {
|
9563
9563
|
var pageHasPlayerControls = _ref.pageHasPlayerControls;
|
9564
9564
|
|
9565
|
-
return (0, _classnames2.default)('
|
9565
|
+
return (0, _classnames2.default)('page_background', {
|
9566
9566
|
'page_background-for_page_with_player_controls': pageHasPlayerControls
|
9567
9567
|
});
|
9568
9568
|
}
|
@@ -17551,7 +17551,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17551
17551
|
{ ref: 'scroller', className: className(this.props), style: style(this.props) },
|
17552
17552
|
_react2.default.createElement(
|
17553
17553
|
'div',
|
17554
|
-
{ className: '
|
17554
|
+
{ className: 'content_wrapper' },
|
17555
17555
|
this.props.children
|
17556
17556
|
)
|
17557
17557
|
);
|
@@ -17738,26 +17738,22 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17738
17738
|
key: "render",
|
17739
17739
|
value: function render() {
|
17740
17740
|
return _react2.default.createElement(
|
17741
|
-
"
|
17741
|
+
"h3",
|
17742
17742
|
{ className: "page_header" },
|
17743
17743
|
_react2.default.createElement(
|
17744
|
-
"
|
17745
|
-
|
17746
|
-
|
17747
|
-
|
17748
|
-
|
17749
|
-
|
17750
|
-
|
17751
|
-
|
17752
|
-
|
17753
|
-
|
17754
|
-
|
17755
|
-
|
17756
|
-
|
17757
|
-
"span",
|
17758
|
-
{ className: "subtitle" },
|
17759
|
-
this.props.page.subtitle
|
17760
|
-
)
|
17744
|
+
"span",
|
17745
|
+
{ className: "page_header-tagline" },
|
17746
|
+
this.props.page.tagline
|
17747
|
+
),
|
17748
|
+
_react2.default.createElement(
|
17749
|
+
"span",
|
17750
|
+
{ className: "page_header-title" },
|
17751
|
+
this.props.page.title
|
17752
|
+
),
|
17753
|
+
_react2.default.createElement(
|
17754
|
+
"span",
|
17755
|
+
{ className: "page_header-subtitle" },
|
17756
|
+
this.props.page.subtitle
|
17761
17757
|
)
|
17762
17758
|
);
|
17763
17759
|
}
|
@@ -17767,7 +17763,6 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17767
17763
|
}(_react2.default.Component);
|
17768
17764
|
|
17769
17765
|
exports.default = _class;
|
17770
|
-
;
|
17771
17766
|
|
17772
17767
|
/***/ }),
|
17773
17768
|
/* 445 */
|
@@ -17822,7 +17817,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17822
17817
|
};
|
17823
17818
|
|
17824
17819
|
function className(props) {
|
17825
|
-
return (0, _classnames2.default)('
|
17820
|
+
return (0, _classnames2.default)('page_text', _defineProperty({}, 'page_text-margin_' + props.marginBottom, props.marginBottom != PageText.defaultProps.marginBottom));
|
17826
17821
|
}
|
17827
17822
|
|
17828
17823
|
function text(props) {
|
@@ -26006,7 +26001,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
26006
26001
|
var dimensions = (0, _getDimensions2.default)(props.videoFile, props.fit, props.position, wrapperDimensions);
|
26007
26002
|
return _react2.default.createElement(
|
26008
26003
|
'div',
|
26009
|
-
{ className: '
|
26004
|
+
{ className: 'uncropped_media_wrapper' },
|
26010
26005
|
_react2.default.createElement(
|
26011
26006
|
'div',
|
26012
26007
|
{ className: (0, _getCueOffsetClassName2.default)(dimensions, wrapperDimensions),
|
@@ -26408,7 +26403,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
26408
26403
|
function PrintImageTag(_ref3) {
|
26409
26404
|
var file = _ref3.file;
|
26410
26405
|
|
26411
|
-
if (file && _selectors2.pageIsPrepared) {
|
26406
|
+
if (file && file.isReady && _selectors2.pageIsPrepared) {
|
26412
26407
|
return React.createElement('img', { src: file.urls.print,
|
26413
26408
|
alt: file.alt,
|
26414
26409
|
className: 'print_image' });
|
@@ -28130,7 +28125,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
28130
28125
|
{ pageHasPlayerControls: true },
|
28131
28126
|
_react2.default.createElement(
|
28132
28127
|
'div',
|
28133
|
-
{ className: '
|
28128
|
+
{ className: 'uncropped_media_wrapper' },
|
28134
28129
|
this.props.children
|
28135
28130
|
),
|
28136
28131
|
_react2.default.createElement(_components.PageShadow, { page: page })
|
@@ -30788,7 +30783,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
30788
30783
|
|
30789
30784
|
return React.createElement(
|
30790
30785
|
_media.Page,
|
30791
|
-
{ className: '
|
30786
|
+
{ className: 'audio_page',
|
30792
30787
|
page: props.page,
|
30793
30788
|
file: props.audioFile,
|
30794
30789
|
playerState: props.playerState,
|
@@ -30933,7 +30928,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
30933
30928
|
function VideoPage(props) {
|
30934
30929
|
return React.createElement(
|
30935
30930
|
_media.Page,
|
30936
|
-
{ className: '
|
30931
|
+
{ className: 'video_page',
|
30937
30932
|
page: props.page,
|
30938
30933
|
file: props.videoFile,
|
30939
30934
|
qualities: qualities,
|
@@ -9562,7 +9562,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
9562
9562
|
function className(_ref) {
|
9563
9563
|
var pageHasPlayerControls = _ref.pageHasPlayerControls;
|
9564
9564
|
|
9565
|
-
return (0, _classnames2.default)('
|
9565
|
+
return (0, _classnames2.default)('page_background', {
|
9566
9566
|
'page_background-for_page_with_player_controls': pageHasPlayerControls
|
9567
9567
|
});
|
9568
9568
|
}
|
@@ -17545,7 +17545,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17545
17545
|
{ ref: 'scroller', className: className(this.props), style: style(this.props) },
|
17546
17546
|
_react2.default.createElement(
|
17547
17547
|
'div',
|
17548
|
-
{ className: '
|
17548
|
+
{ className: 'content_wrapper' },
|
17549
17549
|
this.props.children
|
17550
17550
|
)
|
17551
17551
|
);
|
@@ -17732,26 +17732,22 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17732
17732
|
key: "render",
|
17733
17733
|
value: function render() {
|
17734
17734
|
return _react2.default.createElement(
|
17735
|
-
"
|
17735
|
+
"h3",
|
17736
17736
|
{ className: "page_header" },
|
17737
17737
|
_react2.default.createElement(
|
17738
|
-
"
|
17739
|
-
|
17740
|
-
|
17741
|
-
|
17742
|
-
|
17743
|
-
|
17744
|
-
|
17745
|
-
|
17746
|
-
|
17747
|
-
|
17748
|
-
|
17749
|
-
|
17750
|
-
|
17751
|
-
"span",
|
17752
|
-
{ className: "subtitle" },
|
17753
|
-
this.props.page.subtitle
|
17754
|
-
)
|
17738
|
+
"span",
|
17739
|
+
{ className: "page_header-tagline" },
|
17740
|
+
this.props.page.tagline
|
17741
|
+
),
|
17742
|
+
_react2.default.createElement(
|
17743
|
+
"span",
|
17744
|
+
{ className: "page_header-title" },
|
17745
|
+
this.props.page.title
|
17746
|
+
),
|
17747
|
+
_react2.default.createElement(
|
17748
|
+
"span",
|
17749
|
+
{ className: "page_header-subtitle" },
|
17750
|
+
this.props.page.subtitle
|
17755
17751
|
)
|
17756
17752
|
);
|
17757
17753
|
}
|
@@ -17761,7 +17757,6 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17761
17757
|
}(_react2.default.Component);
|
17762
17758
|
|
17763
17759
|
exports.default = _class;
|
17764
|
-
;
|
17765
17760
|
|
17766
17761
|
/***/ }),
|
17767
17762
|
/* 444 */
|
@@ -17816,7 +17811,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
17816
17811
|
};
|
17817
17812
|
|
17818
17813
|
function className(props) {
|
17819
|
-
return (0, _classnames2.default)('
|
17814
|
+
return (0, _classnames2.default)('page_text', _defineProperty({}, 'page_text-margin_' + props.marginBottom, props.marginBottom != PageText.defaultProps.marginBottom));
|
17820
17815
|
}
|
17821
17816
|
|
17822
17817
|
function text(props) {
|
@@ -26000,7 +25995,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
26000
25995
|
var dimensions = (0, _getDimensions2.default)(props.videoFile, props.fit, props.position, wrapperDimensions);
|
26001
25996
|
return _react2.default.createElement(
|
26002
25997
|
'div',
|
26003
|
-
{ className: '
|
25998
|
+
{ className: 'uncropped_media_wrapper' },
|
26004
25999
|
_react2.default.createElement(
|
26005
26000
|
'div',
|
26006
26001
|
{ className: (0, _getCueOffsetClassName2.default)(dimensions, wrapperDimensions),
|
@@ -26402,7 +26397,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
26402
26397
|
function PrintImageTag(_ref3) {
|
26403
26398
|
var file = _ref3.file;
|
26404
26399
|
|
26405
|
-
if (file && _selectors2.pageIsPrepared) {
|
26400
|
+
if (file && file.isReady && _selectors2.pageIsPrepared) {
|
26406
26401
|
return React.createElement('img', { src: file.urls.print,
|
26407
26402
|
alt: file.alt,
|
26408
26403
|
className: 'print_image' });
|
@@ -28108,7 +28103,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
28108
28103
|
{ pageHasPlayerControls: true },
|
28109
28104
|
_react2.default.createElement(
|
28110
28105
|
'div',
|
28111
|
-
{ className: '
|
28106
|
+
{ className: 'uncropped_media_wrapper' },
|
28112
28107
|
this.props.children
|
28113
28108
|
),
|
28114
28109
|
_react2.default.createElement(_components.PageShadow, { page: page })
|
@@ -30766,7 +30761,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
30766
30761
|
|
30767
30762
|
return React.createElement(
|
30768
30763
|
_media.Page,
|
30769
|
-
{ className: '
|
30764
|
+
{ className: 'audio_page',
|
30770
30765
|
page: props.page,
|
30771
30766
|
file: props.audioFile,
|
30772
30767
|
playerState: props.playerState,
|
@@ -30911,7 +30906,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
30911
30906
|
function VideoPage(props) {
|
30912
30907
|
return React.createElement(
|
30913
30908
|
_media.Page,
|
30914
|
-
{ className: '
|
30909
|
+
{ className: 'video_page',
|
30915
30910
|
page: props.page,
|
30916
30911
|
file: props.videoFile,
|
30917
30912
|
qualities: qualities,
|
@@ -12,7 +12,9 @@ pageflow.FileUploader = pageflow.Object.extend({
|
|
12
12
|
var fileType = this.fileTypes.findByUpload(upload);
|
13
13
|
var file = new fileType.model({
|
14
14
|
state: 'uploadable',
|
15
|
-
file_name: upload.name
|
15
|
+
file_name: upload.name,
|
16
|
+
content_type: upload.type,
|
17
|
+
file_size: upload.size
|
16
18
|
}, {
|
17
19
|
fileType: fileType
|
18
20
|
});
|
@@ -4,17 +4,12 @@ pageflow.HostedFile = pageflow.UploadedFile.extend({
|
|
4
4
|
{
|
5
5
|
name: 'uploading',
|
6
6
|
activeStates: ['uploading'],
|
7
|
-
failedStates: ['
|
8
|
-
},
|
9
|
-
{
|
10
|
-
name: 'uploading_to_s3',
|
11
|
-
activeStates: ['uploading_to_s3'],
|
12
|
-
failedStates: ['uploading_to_s3_failed']
|
7
|
+
failedStates: ['uploading_failed']
|
13
8
|
}
|
14
9
|
].concat(_.result(this, 'processingStages'));
|
15
10
|
},
|
16
11
|
|
17
12
|
processingStages: [],
|
18
13
|
|
19
|
-
readyState: '
|
14
|
+
readyState: 'uploaded'
|
20
15
|
});
|
@@ -38,12 +38,7 @@ pageflow.UploadedFile = Backbone.Model.extend({
|
|
38
38
|
},
|
39
39
|
|
40
40
|
urlRoot: function() {
|
41
|
-
|
42
|
-
return this.collection.url() + '/empty';
|
43
|
-
}
|
44
|
-
else {
|
45
|
-
return this.collection.url();
|
46
|
-
}
|
41
|
+
return this.collection.url();
|
47
42
|
},
|
48
43
|
|
49
44
|
fileType: function() {
|
@@ -80,7 +75,7 @@ pageflow.UploadedFile = Backbone.Model.extend({
|
|
80
75
|
},
|
81
76
|
|
82
77
|
isUploaded: function() {
|
83
|
-
return this.get('state') !== 'uploading' && this.get('state') !== '
|
78
|
+
return this.get('state') !== 'uploading' && this.get('state') !== 'uploading_failed';
|
84
79
|
},
|
85
80
|
|
86
81
|
isPending: function() {
|
@@ -108,7 +103,9 @@ pageflow.UploadedFile = Backbone.Model.extend({
|
|
108
103
|
},
|
109
104
|
|
110
105
|
toJSON: function() {
|
111
|
-
return _.extend(_.pick(this.attributes,
|
106
|
+
return _.extend(_.pick(this.attributes,
|
107
|
+
'file_name', 'rights', 'parent_file_id', 'parent_file_model_type', 'content_type', 'file_size'
|
108
|
+
), {
|
112
109
|
configuration: this.configuration.toJSON()
|
113
110
|
});
|
114
111
|
},
|
@@ -121,9 +118,14 @@ pageflow.UploadedFile = Backbone.Model.extend({
|
|
121
118
|
},
|
122
119
|
|
123
120
|
uploadFailed: function() {
|
124
|
-
this.set('state', '
|
121
|
+
this.set('state', 'uploading_failed');
|
125
122
|
this.unset('uploading_progress');
|
126
|
-
|
127
123
|
this.trigger('uploadFailed');
|
124
|
+
},
|
125
|
+
|
126
|
+
publish: function() {
|
127
|
+
this.save({}, {
|
128
|
+
url: this.url() + '/publish'
|
129
|
+
});
|
128
130
|
}
|
129
131
|
});
|
@@ -1,10 +1,10 @@
|
|
1
1
|
pageflow.ConfigurationEditorTabView.groups.define('general', function() {
|
2
|
-
this.input('title', pageflow.TextInputView, {required: true});
|
2
|
+
this.input('title', pageflow.TextInputView, {required: true, maxLength: 5000});
|
3
3
|
this.input('hide_title', pageflow.CheckBoxInputView);
|
4
|
-
this.input('tagline', pageflow.TextInputView);
|
5
|
-
this.input('subtitle', pageflow.TextInputView);
|
4
|
+
this.input('tagline', pageflow.TextInputView, {maxLength: 5000});
|
5
|
+
this.input('subtitle', pageflow.TextInputView, {maxLength: 5000});
|
6
6
|
this.input('text', pageflow.TextAreaInputView);
|
7
7
|
this.input('text_position', pageflow.SelectInputView, {values: pageflow.Page.textPositions});
|
8
8
|
this.input('gradient_opacity', pageflow.SliderInputView);
|
9
9
|
this.input('invert', pageflow.CheckBoxInputView);
|
10
|
-
});
|
10
|
+
});
|