pageflow 14.5.2 → 15.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.

Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -39
  3. data/admins/pageflow/membership.rb +1 -5
  4. data/app/assets/javascripts/pageflow/dist/react-client.js +62 -179
  5. data/app/assets/javascripts/pageflow/dist/react-server.js +62 -179
  6. data/app/assets/javascripts/pageflow/editor/api/widget_type.js +1 -0
  7. data/app/assets/javascripts/pageflow/editor/base.js +2 -2
  8. data/app/assets/javascripts/pageflow/editor/collections/files_collection.js +4 -0
  9. data/app/assets/javascripts/pageflow/editor/collections/nested_files_collection.js +4 -0
  10. data/app/assets/javascripts/pageflow/editor/initializers/setup_audio.js +1 -1
  11. data/app/assets/javascripts/pageflow/editor/models/encoded_file.js +1 -1
  12. data/app/assets/javascripts/pageflow/editor/models/image_file.js +1 -1
  13. data/app/assets/javascripts/pageflow/editor/models/mixins/transient_references.js +7 -7
  14. data/app/assets/javascripts/pageflow/editor/models/preview_entry_data.js +2 -2
  15. data/app/assets/javascripts/pageflow/editor/models/{uploaded_file.js → reusable_file.js} +1 -1
  16. data/app/assets/javascripts/pageflow/editor/models/text_track_file.js +2 -2
  17. data/app/assets/javascripts/pageflow/editor/models/{hosted_file.js → uploadable_file.js} +1 -1
  18. data/app/assets/javascripts/pageflow/editor/views/widget_types/title_loading_spinner.js +0 -3
  19. data/app/assets/stylesheets/pageflow/mixins/pageflow.scss +1 -1
  20. data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -1
  21. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/title.scss +50 -10
  22. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss +0 -2
  23. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +0 -5
  24. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +0 -4
  25. data/app/controllers/pageflow/files_controller.rb +3 -3
  26. data/app/helpers/pageflow/audio_files_helper.rb +18 -16
  27. data/app/helpers/pageflow/background_image_helper.rb +22 -17
  28. data/app/helpers/pageflow/entry_json_seed_helper.rb +3 -3
  29. data/app/helpers/pageflow/file_thumbnails_helper.rb +1 -1
  30. data/app/helpers/pageflow/meta_tags_helper.rb +3 -3
  31. data/app/helpers/pageflow/pages_helper.rb +10 -1
  32. data/app/helpers/pageflow/revision_file_helper.rb +27 -0
  33. data/app/helpers/pageflow/social_share_helper.rb +5 -3
  34. data/app/helpers/pageflow/social_share_links_helper.rb +1 -1
  35. data/app/helpers/pageflow/video_files_helper.rb +18 -13
  36. data/app/jobs/pageflow/{process_file_job.rb → process_image_or_text_track_job.rb} +1 -1
  37. data/app/models/concerns/pageflow/{uploaded_file.rb → reusable_file.rb} +59 -5
  38. data/app/models/concerns/pageflow/{hosted_file.rb → uploadable_file.rb} +26 -15
  39. data/app/models/pageflow/audio_file.rb +2 -2
  40. data/app/models/pageflow/draft_entry.rb +1 -1
  41. data/app/models/pageflow/entry.rb +0 -8
  42. data/app/models/pageflow/file_usage.rb +3 -1
  43. data/app/models/pageflow/image_file.rb +31 -29
  44. data/app/models/pageflow/membership.rb +4 -3
  45. data/app/models/pageflow/page.rb +0 -8
  46. data/app/models/pageflow/positioned_file.rb +3 -2
  47. data/app/models/pageflow/published_entry.rb +9 -3
  48. data/app/models/pageflow/revision.rb +6 -12
  49. data/app/models/pageflow/text_track_file.rb +13 -12
  50. data/app/models/pageflow/thumbnail_file_resolver.rb +3 -3
  51. data/app/models/pageflow/used_file.rb +4 -0
  52. data/app/models/pageflow/video_file.rb +2 -2
  53. data/app/models/pageflow/widget.rb +6 -12
  54. data/app/state_machines/pageflow/{processed_file_state_machine.rb → image_and_text_track_processing_state_machine.rb} +3 -2
  55. data/app/state_machines/pageflow/{encoded_file_state_machine.rb → media_encoding_state_machine.rb} +27 -19
  56. data/app/views/pageflow/editor/files/_file.json.jbuilder +1 -1
  57. data/app/views/pageflow/entries/mobile_navigation/_page.html.erb +1 -1
  58. data/app/views/pageflow/entries/navigation/_page.html.erb +2 -2
  59. data/app/views/pageflow/entries/overview/_page.html.erb +1 -1
  60. data/app/views/pageflow/files/_file.json.jbuilder +1 -0
  61. data/app/views/pageflow/social_share/_page_meta_tags.html.erb +1 -1
  62. data/config/locales/de.yml +0 -24
  63. data/config/locales/en.yml +0 -24
  64. data/db/migrate/20190306161431_copy_file_attributes_of_failed_uploads.rb +4 -4
  65. data/db/migrate/20190523151140_add_perma_id_to_file_usages.rb +13 -0
  66. data/lib/pageflow/built_in_widget_type.rb +0 -7
  67. data/lib/pageflow/built_in_widget_types_plugin.rb +0 -6
  68. data/lib/pageflow/user_mixin.rb +0 -6
  69. data/lib/pageflow/version.rb +1 -1
  70. data/lib/pageflow/widget_types.rb +1 -9
  71. data/spec/factories/{hosted_files.rb → uploadable_files.rb} +3 -3
  72. metadata +16 -32
  73. data/app/assets/javascripts/pageflow/dist/editor.js +0 -11890
  74. data/app/assets/javascripts/pageflow/dist/frontend.js +0 -5800
  75. data/app/assets/javascripts/pageflow/dist/ui.js +0 -3114
  76. data/app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js +0 -18
  77. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss +0 -56
@@ -8960,7 +8960,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
8960
8960
 
8961
8961
  var _loadingSpinner = __webpack_require__(616);
8962
8962
 
8963
- var _pageflow = __webpack_require__(620);
8963
+ var _pageflow = __webpack_require__(619);
8964
8964
 
8965
8965
  var _pageflow2 = _interopRequireDefault(_pageflow);
8966
8966
 
@@ -12016,7 +12016,6 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
12016
12016
  });
12017
12017
  exports.firstPage = exports.selector = exports.pageBackgroundImageUrl = undefined;
12018
12018
  exports.firstPageAttribures = firstPageAttribures;
12019
- exports.firstPageAttribute = firstPageAttribute;
12020
12019
  exports.pageAttribute = pageAttribute;
12021
12020
  exports.pageAttributes = pageAttributes;
12022
12021
  exports.pageState = pageState;
@@ -12046,12 +12045,6 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
12046
12045
  });
12047
12046
  }
12048
12047
 
12049
- function firstPageAttribute(property) {
12050
- return (0, _utils.memoizedSelector)(firstPage, function (page) {
12051
- return page && page.attributes[property];
12052
- });
12053
- }
12054
-
12055
12048
  function pageAttribute(property, options) {
12056
12049
  return (0, _utils.memoizedSelector)(selector(options), function (page) {
12057
12050
  return page && page.attributes[property];
@@ -24281,7 +24274,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
24281
24274
  function autoTextTrackFile(textTrackFiles, defaultTextTrackFileId, locale, volume) {
24282
24275
  if (defaultTextTrackFileId) {
24283
24276
  var defaultTextTrackFile = textTrackFiles.find(function (textTrackFile) {
24284
- return textTrackFile.id == defaultTextTrackFileId;
24277
+ return textTrackFile.permaId == defaultTextTrackFileId;
24285
24278
  });
24286
24279
 
24287
24280
  if (defaultTextTrackFile) {
@@ -29910,7 +29903,8 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
29910
29903
  collectionName: (0, _utils.camelize)(collectionName),
29911
29904
  dispatch: dispatch,
29912
29905
 
29913
- attributes: ['id', 'basename', 'variants', 'is_ready', 'parent_file_id', 'parent_file_model_type', 'width', 'height', 'duration_in_ms', 'rights', 'created_at'],
29906
+ idAttribute: 'perma_id',
29907
+ attributes: ['id', 'perma_id', 'basename', 'variants', 'is_ready', 'parent_file_id', 'parent_file_model_type', 'width', 'height', 'duration_in_ms', 'rights', 'created_at'],
29914
29908
  includeConfiguration: true
29915
29909
  });
29916
29910
  });
@@ -29928,7 +29922,9 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
29928
29922
  return {
29929
29923
  files: (0, _redux.combineReducers)(Object.keys(files).reduce(function (result, collectionName) {
29930
29924
  collectionName = (0, _utils.camelize)(collectionName);
29931
- result[collectionName] = (0, _collections.createReducer)(collectionName);
29925
+ result[collectionName] = (0, _collections.createReducer)(collectionName, {
29926
+ idAttribute: 'permaId'
29927
+ });
29932
29928
  return result;
29933
29929
  }, {})),
29934
29930
 
@@ -31064,14 +31060,11 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31064
31060
 
31065
31061
  var _ClassicLoadingSpinner = __webpack_require__(617);
31066
31062
 
31067
- var _MediaLoadingSpinner = __webpack_require__(618);
31068
-
31069
- var _TitleLoadingSpinner = __webpack_require__(619);
31063
+ var _TitleLoadingSpinner = __webpack_require__(618);
31070
31064
 
31071
31065
  function registerWidgetTypes() {
31072
31066
  (0, _ClassicLoadingSpinner.register)();
31073
31067
  (0, _TitleLoadingSpinner.register)();
31074
- (0, _MediaLoadingSpinner.register)();
31075
31068
  }
31076
31069
 
31077
31070
  /***/ }),
@@ -31221,11 +31214,9 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31221
31214
  Object.defineProperty(exports, "__esModule", {
31222
31215
  value: true
31223
31216
  });
31224
- exports.MediaLoadingSpinner = exports.MediaLoadingSpinnerComponent = undefined;
31225
31217
 
31226
31218
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
31227
31219
 
31228
- exports.getInvert = getInvert;
31229
31220
  exports.register = register;
31230
31221
 
31231
31222
  var _utils = __webpack_require__(340);
@@ -31260,13 +31251,13 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31260
31251
 
31261
31252
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
31262
31253
 
31263
- var MediaLoadingSpinnerComponent = exports.MediaLoadingSpinnerComponent = function (_React$Component) {
31264
- _inherits(MediaLoadingSpinnerComponent, _React$Component);
31254
+ var TitleLoadingSpinner = function (_React$Component) {
31255
+ _inherits(TitleLoadingSpinner, _React$Component);
31265
31256
 
31266
- function MediaLoadingSpinnerComponent(props) {
31267
- _classCallCheck(this, MediaLoadingSpinnerComponent);
31257
+ function TitleLoadingSpinner(props) {
31258
+ _classCallCheck(this, TitleLoadingSpinner);
31268
31259
 
31269
- var _this = _possibleConstructorReturn(this, (MediaLoadingSpinnerComponent.__proto__ || Object.getPrototypeOf(MediaLoadingSpinnerComponent)).call(this, props));
31260
+ var _this = _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).call(this, props));
31270
31261
 
31271
31262
  _this.state = {
31272
31263
  hidden: false,
@@ -31275,7 +31266,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31275
31266
  return _this;
31276
31267
  }
31277
31268
 
31278
- _createClass(MediaLoadingSpinnerComponent, [{
31269
+ _createClass(TitleLoadingSpinner, [{
31279
31270
  key: 'componentDidMount',
31280
31271
  value: function componentDidMount() {
31281
31272
  var _this2 = this;
@@ -31316,29 +31307,42 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31316
31307
  value: function render() {
31317
31308
  var _this4 = this;
31318
31309
 
31319
- var editing = this.props.editing;
31310
+ var _props = this.props,
31311
+ editing = _props.editing,
31312
+ title = _props.title,
31313
+ subtitle = _props.subtitle,
31314
+ entryTitle = _props.entryTitle;
31320
31315
  var _state = this.state,
31321
31316
  hidden = _state.hidden,
31322
31317
  animating = _state.animating;
31323
31318
 
31324
- var invert = getInvert(this.props);
31325
- var logoElement = _react2.default.createElement('div', { className: (0, _classnames2.default)("media_loading_spinner-logo", { 'media_loading_spinner-logo-invert': invert }) });
31326
- if (this.props.removeLogo) {
31327
- logoElement = '';
31328
- }
31319
+
31329
31320
  if (editing || !hidden) {
31330
31321
  return _react2.default.createElement(
31331
31322
  'div',
31332
- { className: (0, _classnames2.default)('media_loading_spinner', { 'media_loading_spinner-fade': animating }, { 'media_loading_spinner-invert': invert }),
31323
+ { className: (0, _classnames2.default)('title_loading_spinner', { 'title_loading_spinner-fade': animating }),
31333
31324
  onAnimationEnd: function onAnimationEnd(event) {
31334
31325
  return _this4.hideOrLoop(event);
31335
31326
  },
31336
31327
  onTouchMove: preventScrollBouncing,
31337
- style: inlineStyle(this.props) },
31338
- logoElement,
31339
- _react2.default.createElement('div', { className: 'media_loading_spinner-image',
31328
+ style: inlineStyle() },
31329
+ _react2.default.createElement('div', { className: 'title_loading_spinner-logo' }),
31330
+ _react2.default.createElement('div', { className: 'title_loading_spinner-image',
31340
31331
  style: backgroundImageInlineStyles(this.props) }),
31341
- this.props.children
31332
+ _react2.default.createElement(
31333
+ 'div',
31334
+ { className: 'title_loading_spinner-titles' },
31335
+ _react2.default.createElement(
31336
+ 'div',
31337
+ { className: 'title_loading_spinner-title' },
31338
+ title || entryTitle
31339
+ ),
31340
+ _react2.default.createElement(
31341
+ 'div',
31342
+ { className: 'title_loading_spinner-subtitle' },
31343
+ subtitle
31344
+ )
31345
+ )
31342
31346
  );
31343
31347
  } else {
31344
31348
  return _react2.default.createElement('noscript', null);
@@ -31346,36 +31350,10 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31346
31350
  }
31347
31351
  }]);
31348
31352
 
31349
- return MediaLoadingSpinnerComponent;
31353
+ return TitleLoadingSpinner;
31350
31354
  }(_react2.default.Component);
31351
31355
 
31352
- function preventScrollBouncing(e) {
31353
- e.preventDefault();
31354
- }
31355
-
31356
- function backgroundImageInlineStyles(_ref) {
31357
- var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31358
- backgroundImage = _ref.backgroundImage,
31359
- blurStrength = _ref.blurStrength;
31360
-
31361
- var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31362
- if (url) {
31363
- return {
31364
- backgroundImage: 'url("' + url + '")',
31365
- filter: 'blur(' + blurStrength + 'px)'
31366
- };
31367
- }
31368
- }
31369
-
31370
- function getInvert(props) {
31371
- if (!props.backgroundImage && props.invert == undefined) {
31372
- return props.firstPageInvert;
31373
- }
31374
- return props.invert;
31375
- }
31376
-
31377
- function inlineStyle(props) {
31378
- var invert = getInvert(props);
31356
+ function inlineStyle() {
31379
31357
  return {
31380
31358
  position: 'absolute',
31381
31359
  top: 0,
@@ -31383,144 +31361,49 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
31383
31361
  width: '100%',
31384
31362
  height: '100%',
31385
31363
  zIndex: 100,
31386
- backgroundColor: invert ? '#fff' : '#000'
31364
+ backgroundColor: '#000'
31387
31365
  };
31388
31366
  }
31389
31367
 
31390
- var MediaLoadingSpinner = exports.MediaLoadingSpinner = (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31391
- editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31392
- firstPageInvert: (0, _selectors4.firstPageAttribute)('invert'),
31393
- firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31394
- variant: 'medium',
31395
- page: (0, _selectors4.firstPageAttribures)()
31396
- }),
31397
- backgroundImage: (0, _selectors3.file)('imageFiles', {
31398
- id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31399
- role: 'loading_spinner'
31400
- })
31401
- }),
31402
- invert: (0, _selectors2.widgetAttribute)('invert', { role: 'loading_spinner' }),
31403
- removeLogo: (0, _selectors2.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31404
- blurStrength: (0, _selectors2.widgetAttribute)('blurStrength', { role: 'loading_spinner' })
31405
- }))(MediaLoadingSpinnerComponent);
31406
-
31407
- function register() {
31408
- (0, _registerWidgetType2.default)('media_loading_spinner', {
31409
- component: MediaLoadingSpinner
31410
- });
31411
- }
31412
-
31413
- /***/ }),
31414
- /* 619 */
31415
- /***/ (function(module, exports, __webpack_require__) {
31416
-
31417
- 'use strict';
31418
-
31419
- Object.defineProperty(exports, "__esModule", {
31420
- value: true
31421
- });
31422
- exports.TitleLoadingSpinner = undefined;
31423
-
31424
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
31425
-
31426
- exports.register = register;
31427
-
31428
- var _utils = __webpack_require__(340);
31429
-
31430
- var _react = __webpack_require__(334);
31431
-
31432
- var _react2 = _interopRequireDefault(_react);
31433
-
31434
- var _reactRedux = __webpack_require__(399);
31435
-
31436
- var _classnames = __webpack_require__(335);
31437
-
31438
- var _classnames2 = _interopRequireDefault(_classnames);
31439
-
31440
- var _registerWidgetType = __webpack_require__(562);
31441
-
31442
- var _registerWidgetType2 = _interopRequireDefault(_registerWidgetType);
31443
-
31444
- var _selectors = __webpack_require__(502);
31445
-
31446
- var _selectors2 = __webpack_require__(376);
31447
-
31448
- var _selectors3 = __webpack_require__(429);
31449
-
31450
- var _selectors4 = __webpack_require__(493);
31451
-
31452
- var _MediaLoadingSpinner = __webpack_require__(618);
31453
-
31454
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31455
-
31456
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31457
-
31458
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
31459
-
31460
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
31461
-
31462
- var TitleLoadingSpinner = exports.TitleLoadingSpinner = function (_React$Component) {
31463
- _inherits(TitleLoadingSpinner, _React$Component);
31368
+ function backgroundImageInlineStyles(_ref) {
31369
+ var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
31370
+ backgroundImage = _ref.backgroundImage;
31464
31371
 
31465
- function TitleLoadingSpinner() {
31466
- _classCallCheck(this, TitleLoadingSpinner);
31372
+ var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
31467
31373
 
31468
- return _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).apply(this, arguments));
31374
+ if (url) {
31375
+ return {
31376
+ backgroundImage: 'url("' + url + '")'
31377
+ };
31469
31378
  }
31379
+ }
31470
31380
 
31471
- _createClass(TitleLoadingSpinner, [{
31472
- key: 'render',
31473
- value: function render() {
31474
- var _props = this.props,
31475
- title = _props.title,
31476
- subtitle = _props.subtitle,
31477
- entryTitle = _props.entryTitle;
31478
-
31479
- var invert = (0, _MediaLoadingSpinner.getInvert)(this.props);
31480
- return _react2.default.createElement(
31481
- _MediaLoadingSpinner.MediaLoadingSpinner,
31482
- null,
31483
- _react2.default.createElement(
31484
- 'div',
31485
- { className: (0, _classnames2.default)('media_loading_spinner-titles', { 'media_loading_spinner-invert': invert }) },
31486
- _react2.default.createElement(
31487
- 'div',
31488
- { className: 'media_loading_spinner-title' },
31489
- title || entryTitle
31490
- ),
31491
- _react2.default.createElement(
31492
- 'div',
31493
- { className: 'media_loading_spinner-subtitle' },
31494
- subtitle
31495
- )
31496
- )
31497
- );
31498
- }
31499
- }]);
31500
-
31501
- return TitleLoadingSpinner;
31502
- }(_react2.default.Component);
31381
+ function preventScrollBouncing(e) {
31382
+ e.preventDefault();
31383
+ }
31503
31384
 
31504
31385
  function register() {
31505
31386
  (0, _registerWidgetType2.default)('title_loading_spinner', {
31506
31387
  component: (0, _reactRedux.connect)((0, _utils.combineSelectors)({
31507
- firstPageInvert: (0, _selectors2.firstPageAttribute)('invert'),
31388
+ editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
31389
+ firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
31390
+ variant: 'medium',
31391
+ page: (0, _selectors4.firstPageAttribures)()
31392
+ }),
31508
31393
  backgroundImage: (0, _selectors3.file)('imageFiles', {
31509
- id: (0, _selectors4.widgetAttribute)('customBackgroundImageId', {
31394
+ id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
31510
31395
  role: 'loading_spinner'
31511
31396
  })
31512
31397
  }),
31513
31398
  entryTitle: (0, _selectors.entryAttribute)('title'),
31514
- title: (0, _selectors4.widgetAttribute)('title', { role: 'loading_spinner' }),
31515
- subtitle: (0, _selectors4.widgetAttribute)('subtitle', { role: 'loading_spinner' }),
31516
- removeLogo: (0, _selectors4.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
31517
- invert: (0, _selectors4.widgetAttribute)('invert', { role: 'loading_spinner' })
31399
+ title: (0, _selectors2.widgetAttribute)('title', { role: 'loading_spinner' }),
31400
+ subtitle: (0, _selectors2.widgetAttribute)('subtitle', { role: 'loading_spinner' })
31518
31401
  }))(TitleLoadingSpinner)
31519
31402
  });
31520
31403
  }
31521
31404
 
31522
31405
  /***/ }),
31523
- /* 620 */
31406
+ /* 619 */
31524
31407
  /***/ (function(module, exports) {
31525
31408
 
31526
31409
  module.exports = pageflow;
@@ -12,6 +12,7 @@ pageflow.WidgetType = pageflow.Object.extend({
12
12
 
13
13
  createConfigurationEditorView: function(options) {
14
14
  var constructor = this.configurationEditorView;
15
+
15
16
  return new constructor(_.extend({
16
17
  attributeTranslationKeyPrefixes: [
17
18
  'pageflow.editor.widgets.attributes.' + this.name,
@@ -17,8 +17,8 @@
17
17
 
18
18
  //= require_tree ./utils
19
19
  //= require_tree ./models/mixins
20
- //= require ./models/uploaded_file
21
- //= require ./models/hosted_file
20
+ //= require ./models/reusable_file
21
+ //= require ./models/uploadable_file
22
22
  //= require ./models/encoded_file
23
23
  //= require ./models/configuration
24
24
  //= require ./models/scaffold
@@ -32,6 +32,10 @@ pageflow.FilesCollection = Backbone.Collection.extend({
32
32
  });
33
33
  },
34
34
 
35
+ getByPermaId: function(permaId) {
36
+ return this.findWhere({perma_id: parseInt(permaId, 10)});
37
+ },
38
+
35
39
  getEntry: function() {
36
40
  return this.entry || pageflow.entry;
37
41
  },
@@ -23,5 +23,9 @@ pageflow.NestedFilesCollection = pageflow.SubsetCollection.extend({
23
23
  'change:configuration:' + nestedFilesOrder.binding,
24
24
  this.sort);
25
25
  }
26
+ },
27
+
28
+ getByPermaId: function(permaId) {
29
+ return this.findWhere({perma_id: parseInt(permaId, 10)});
26
30
  }
27
31
  });
@@ -1,7 +1,7 @@
1
1
  pageflow.app.addInitializer(function(options) {
2
2
  pageflow.Audio.setup({
3
3
  getSources: function(audioFileId) {
4
- var file = pageflow.audioFiles.get(audioFileId);
4
+ var file = pageflow.audioFiles.getByPermaId(audioFileId);
5
5
  return file ? file.getSources() : '';
6
6
  }
7
7
  });
@@ -1,4 +1,4 @@
1
- pageflow.EncodedFile = pageflow.HostedFile.extend({
1
+ pageflow.EncodedFile = pageflow.UploadableFile.extend({
2
2
  processingStages: function() {
3
3
  var stages = [];
4
4
 
@@ -1,4 +1,4 @@
1
- pageflow.ImageFile = pageflow.UploadedFile.extend({
1
+ pageflow.ImageFile = pageflow.ReusableFile.extend({
2
2
  stages: [
3
3
  {
4
4
  name: 'uploading',
@@ -11,7 +11,7 @@ pageflow.transientReferences = {
11
11
  }
12
12
 
13
13
  return this.transientReferences[attribute] ||
14
- collection.get(this.get(attribute));
14
+ collection.getByPermaId(this.get(attribute));
15
15
  },
16
16
 
17
17
  setReference: function(attribute, record) {
@@ -29,18 +29,18 @@ pageflow.transientReferences = {
29
29
  if (record.isNew()) {
30
30
  this.transientReferences[attribute] = record;
31
31
  this.set(attribute, null);
32
- this._setIdOnceSynced(attribute, record);
32
+ this._setPermaIdOnceSynced(attribute, record);
33
33
  }
34
34
  else {
35
- this.set(attribute, record.id);
35
+ this.set(attribute, record.get('perma_id'));
36
36
  }
37
37
  },
38
38
 
39
- _setIdOnceSynced: function(attribute, record) {
40
- record.once('change:id', function() {
39
+ _setPermaIdOnceSynced: function(attribute, record) {
40
+ record.once('change:perma_id', function() {
41
41
  this._onceRecordCanBeFoundInCollection(record, function() {
42
42
  delete this.transientReferences[attribute];
43
- this.set(attribute, record.id);
43
+ this.set(attribute, record.get('perma_id'));
44
44
  });
45
45
  }, this);
46
46
  },
@@ -73,7 +73,7 @@ pageflow.transientReferences = {
73
73
 
74
74
  _cleanUpSaveListener: function(attribute) {
75
75
  if (this.transientReferences[attribute]) {
76
- this.stopListening(this.transientReferences[attribute], 'change:id');
76
+ this.stopListening(this.transientReferences[attribute], 'change:perma_id');
77
77
  delete this.transientReferences[attribute];
78
78
  }
79
79
  },
@@ -10,8 +10,8 @@ pageflow.PreviewEntryData = pageflow.EntryData.extend({
10
10
  return this.entry.getTheme().get(name);
11
11
  },
12
12
 
13
- getFile: function(collectionName, id) {
14
- var file = this.entry.getFileCollection(collectionName).get(id);
13
+ getFile: function(collectionName, permaId) {
14
+ var file = this.entry.getFileCollection(collectionName).getByPermaId(permaId);
15
15
  return file && file.attributes;
16
16
  },
17
17
 
@@ -1,4 +1,4 @@
1
- pageflow.UploadedFile = Backbone.Model.extend({
1
+ pageflow.ReusableFile = Backbone.Model.extend({
2
2
  mixins: [pageflow.stageProvider, pageflow.retryable],
3
3
 
4
4
  initialize: function(attributes, options) {
@@ -1,4 +1,4 @@
1
- pageflow.TextTrackFile = pageflow.HostedFile.extend({
1
+ pageflow.TextTrackFile = pageflow.UploadableFile.extend({
2
2
  defaults: {
3
3
  configuration: {
4
4
  kind: 'captions'
@@ -16,7 +16,7 @@ pageflow.TextTrackFile = pageflow.HostedFile.extend({
16
16
  readyState: 'processed',
17
17
 
18
18
  initialize: function(attributes, options) {
19
- pageflow.UploadedFile.prototype.initialize.apply(this, arguments);
19
+ pageflow.ReusableFile.prototype.initialize.apply(this, arguments);
20
20
 
21
21
  if (this.isNew() && !this.configuration.get('srclang')) {
22
22
  this.configuration.set('srclang', this.extractLanguageCodeFromFilename());
@@ -1,4 +1,4 @@
1
- pageflow.HostedFile = pageflow.UploadedFile.extend({
1
+ pageflow.UploadableFile = pageflow.ReusableFile.extend({
2
2
  stages: function() {
3
3
  return [
4
4
  {
@@ -14,9 +14,6 @@ pageflow.editor.widgetTypes.register('title_loading_spinner', {
14
14
  collection: 'image_files',
15
15
  fileSelectionHandler: 'widgetConfiguration'
16
16
  });
17
- this.input('invert', pageflow.CheckBoxInputView);
18
- this.input('remove_logo', pageflow.CheckBoxInputView);
19
- this.input('blur_strength', pageflow.SliderInputView);
20
17
  });
21
18
  }
22
19
  })
@@ -29,7 +29,7 @@
29
29
  }
30
30
  }
31
31
 
32
- @mixin pageflow-hosted-file-stage($stage-name) {
32
+ @mixin pageflow-uploadable-file-stage($stage-name) {
33
33
  .editor {
34
34
  .file_thumbnail .pictogram.#{$stage-name},
35
35
  .file_stage_item.#{$stage-name} {
@@ -17,9 +17,9 @@
17
17
  @import "./built_in_page_types";
18
18
  @import "./anchors";
19
19
  @import "./cookie_notice_bar";
20
+ @import "./loading_spinner";
20
21
  @import "./logo";
21
22
  @import "./page";
22
- @import "./loading_spinner";
23
23
  @import "./indicators";
24
24
  @import "./navigation";
25
25
  @import "./navigation_share_box";
@@ -8,13 +8,25 @@ $title-loading-spinner-subtitle-typography: () !default;
8
8
 
9
9
  $title-loading-spinner-phone-subtitle-typography: () !default;
10
10
 
11
- .media_loading_spinner {
11
+ .title_loading_spinner {
12
+ $duration: 7s;
12
13
 
13
- &-fade {
14
- .media_loading_spinner-titles {
15
- @include animation(title_fade $media-loading-spinner-duration ease-out 1);
16
- @include animation-fill-mode(forwards);
17
- }
14
+ &:before {
15
+ content: "";
16
+ display: block;
17
+ position: absolute;
18
+ top: 0;
19
+ left: 0;
20
+ bottom: 0;
21
+ right: 0;
22
+ z-index: 1;
23
+ background-color: rgba(0, 0, 0, 0.15);
24
+ }
25
+
26
+ &-image {
27
+ background-size: cover;
28
+ filter: blur(50px);
29
+ height: 100%;
18
30
  }
19
31
 
20
32
  &-titles {
@@ -41,7 +53,7 @@ $title-loading-spinner-phone-subtitle-typography: () !default;
41
53
  content: "";
42
54
  display: block;
43
55
  width: 100px;
44
- border-bottom: solid 2px;
56
+ border-bottom: solid 2px #fff;
45
57
  margin: 20px auto;
46
58
  }
47
59
 
@@ -84,7 +96,36 @@ $title-loading-spinner-phone-subtitle-typography: () !default;
84
96
  );
85
97
  }
86
98
  }
87
-
99
+
100
+ &-logo {
101
+ @extend %pageflow_widget_margin_right !optional;
102
+ position: relative;
103
+
104
+ &:after {
105
+ @extend %background_logo;
106
+ content: "";
107
+ display: block;
108
+ z-index: 1;
109
+ opacity: 0;
110
+ }
111
+ }
112
+
113
+ &-fade {
114
+ @include animation(fade_out 1s ease 1);
115
+ @include animation-delay($duration + 0.5s);
116
+ @include animation-fill-mode(forwards);
117
+
118
+ .title_loading_spinner-titles {
119
+ @include animation(title_fade $duration ease-out 1);
120
+ @include animation-fill-mode(forwards);
121
+ }
122
+
123
+ .title_loading_spinner-logo:after {
124
+ @include animation(fade_in 1s ease-out 1);
125
+ @include animation-fill-mode(forwards);
126
+ }
127
+ }
128
+
88
129
  @include keyframes(title_fade) {
89
130
  0% {
90
131
  @include transform(translate(-50%, -30%));
@@ -114,5 +155,4 @@ $title-loading-spinner-phone-subtitle-typography: () !default;
114
155
  opacity: 0;
115
156
  }
116
157
  }
117
-
118
- }
158
+ }
@@ -46,10 +46,8 @@ $loading-spinner-glow-size: 140px !default;
46
46
  /// File extension of background and logo
47
47
  $loading-spinner-image-file-extension: "png" !default;
48
48
 
49
- @import "./loading_spinner/media";
50
49
  @import "./loading_spinner/title";
51
50
 
52
-
53
51
  @if not $custom-loading-spinner {
54
52
  .loading_spinner {
55
53
  // scss-lint:disable ImportantRule