pageflow 15.0.0.beta2 → 15.0.0.beta3
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 +105 -2
- data/README.md +5 -1
- data/app/assets/javascripts/pageflow/dist/react-client.js +176 -56
- data/app/assets/javascripts/pageflow/dist/react-server.js +176 -56
- data/app/assets/javascripts/pageflow/editor/api/widget_type.js +0 -1
- data/app/assets/javascripts/pageflow/editor/views/widget_types/media_loading_spinner.js +18 -0
- data/app/assets/javascripts/pageflow/editor/views/widget_types/title_loading_spinner.js +3 -0
- data/app/assets/javascripts/pageflow/ui/views/tabs_view.js +2 -1
- data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss +37 -1
- data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/media.scss +56 -0
- data/app/assets/stylesheets/pageflow/themes/default/loading_spinner/title.scss +10 -50
- data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +10 -1
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +5 -0
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +4 -0
- data/app/controllers/pageflow/editor/files_controller.rb +6 -3
- data/app/helpers/pageflow/meta_tags_helper.rb +3 -3
- data/app/helpers/pageflow/social_share_links_helper.rb +1 -1
- data/app/jobs/pageflow/entry_export_import/upload_and_publish_file_job.rb +41 -0
- data/app/models/concerns/pageflow/reusable_file.rb +6 -0
- data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
- data/app/models/pageflow/draft_entry.rb +26 -2
- data/app/models/pageflow/membership.rb +3 -4
- data/app/models/pageflow/revision.rb +20 -4
- data/app/models/pageflow/widget.rb +12 -6
- data/config/locales/de.yml +24 -0
- data/config/locales/en.yml +24 -0
- data/db/migrate/20140418225525_setup_schema.rb +18 -18
- data/db/migrate/20190820152900_drop_accounts_themes.rb +8 -0
- data/lib/pageflow/built_in_page_type.rb +3 -0
- data/lib/pageflow/built_in_widget_type.rb +7 -0
- data/lib/pageflow/built_in_widget_types_plugin.rb +6 -0
- data/lib/pageflow/entry_export_import.rb +43 -0
- data/lib/pageflow/entry_export_import/attachment_files.rb +65 -0
- data/lib/pageflow/entry_export_import/entry_serialization.rb +68 -0
- data/lib/pageflow/entry_export_import/file_mappings.rb +32 -0
- data/lib/pageflow/entry_export_import/page_type_versions.rb +29 -0
- data/lib/pageflow/entry_export_import/revision_serialization.rb +58 -0
- data/lib/pageflow/entry_export_import/revision_serialization/import.rb +158 -0
- data/lib/pageflow/entry_export_import/zip_archive.rb +36 -0
- data/lib/pageflow/file_type.rb +17 -4
- data/lib/pageflow/page_type.rb +20 -0
- data/lib/pageflow/page_types.rb +8 -0
- data/lib/pageflow/react/page_type.rb +10 -0
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow/widget_types.rb +9 -1
- data/lib/tasks/entry_export_import.rake +27 -0
- data/spec/factories/revisions.rb +6 -0
- data/spec/factories/test_multi_attachment_files.rb +16 -0
- data/spec/factories/test_revision_components.rb +7 -0
- metadata +46 -3
@@ -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__(
|
8963
|
+
var _pageflow = __webpack_require__(620);
|
8964
8964
|
|
8965
8965
|
var _pageflow2 = _interopRequireDefault(_pageflow);
|
8966
8966
|
|
@@ -12016,6 +12016,7 @@ 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;
|
12019
12020
|
exports.pageAttribute = pageAttribute;
|
12020
12021
|
exports.pageAttributes = pageAttributes;
|
12021
12022
|
exports.pageState = pageState;
|
@@ -12045,6 +12046,12 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
12045
12046
|
});
|
12046
12047
|
}
|
12047
12048
|
|
12049
|
+
function firstPageAttribute(property) {
|
12050
|
+
return (0, _utils.memoizedSelector)(firstPage, function (page) {
|
12051
|
+
return page && page.attributes[property];
|
12052
|
+
});
|
12053
|
+
}
|
12054
|
+
|
12048
12055
|
function pageAttribute(property, options) {
|
12049
12056
|
return (0, _utils.memoizedSelector)(selector(options), function (page) {
|
12050
12057
|
return page && page.attributes[property];
|
@@ -31060,11 +31067,14 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
31060
31067
|
|
31061
31068
|
var _ClassicLoadingSpinner = __webpack_require__(617);
|
31062
31069
|
|
31063
|
-
var
|
31070
|
+
var _MediaLoadingSpinner = __webpack_require__(618);
|
31071
|
+
|
31072
|
+
var _TitleLoadingSpinner = __webpack_require__(619);
|
31064
31073
|
|
31065
31074
|
function registerWidgetTypes() {
|
31066
31075
|
(0, _ClassicLoadingSpinner.register)();
|
31067
31076
|
(0, _TitleLoadingSpinner.register)();
|
31077
|
+
(0, _MediaLoadingSpinner.register)();
|
31068
31078
|
}
|
31069
31079
|
|
31070
31080
|
/***/ }),
|
@@ -31214,9 +31224,11 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
31214
31224
|
Object.defineProperty(exports, "__esModule", {
|
31215
31225
|
value: true
|
31216
31226
|
});
|
31227
|
+
exports.MediaLoadingSpinner = exports.MediaLoadingSpinnerComponent = undefined;
|
31217
31228
|
|
31218
31229
|
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; }; }();
|
31219
31230
|
|
31231
|
+
exports.getInvert = getInvert;
|
31220
31232
|
exports.register = register;
|
31221
31233
|
|
31222
31234
|
var _utils = __webpack_require__(340);
|
@@ -31251,13 +31263,13 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
31251
31263
|
|
31252
31264
|
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; }
|
31253
31265
|
|
31254
|
-
var
|
31255
|
-
_inherits(
|
31266
|
+
var MediaLoadingSpinnerComponent = exports.MediaLoadingSpinnerComponent = function (_React$Component) {
|
31267
|
+
_inherits(MediaLoadingSpinnerComponent, _React$Component);
|
31256
31268
|
|
31257
|
-
function
|
31258
|
-
_classCallCheck(this,
|
31269
|
+
function MediaLoadingSpinnerComponent(props) {
|
31270
|
+
_classCallCheck(this, MediaLoadingSpinnerComponent);
|
31259
31271
|
|
31260
|
-
var _this = _possibleConstructorReturn(this, (
|
31272
|
+
var _this = _possibleConstructorReturn(this, (MediaLoadingSpinnerComponent.__proto__ || Object.getPrototypeOf(MediaLoadingSpinnerComponent)).call(this, props));
|
31261
31273
|
|
31262
31274
|
_this.state = {
|
31263
31275
|
hidden: false,
|
@@ -31266,7 +31278,7 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
31266
31278
|
return _this;
|
31267
31279
|
}
|
31268
31280
|
|
31269
|
-
_createClass(
|
31281
|
+
_createClass(MediaLoadingSpinnerComponent, [{
|
31270
31282
|
key: 'componentDidMount',
|
31271
31283
|
value: function componentDidMount() {
|
31272
31284
|
var _this2 = this;
|
@@ -31307,42 +31319,29 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
31307
31319
|
value: function render() {
|
31308
31320
|
var _this4 = this;
|
31309
31321
|
|
31310
|
-
var
|
31311
|
-
editing = _props.editing,
|
31312
|
-
title = _props.title,
|
31313
|
-
subtitle = _props.subtitle,
|
31314
|
-
entryTitle = _props.entryTitle;
|
31322
|
+
var editing = this.props.editing;
|
31315
31323
|
var _state = this.state,
|
31316
31324
|
hidden = _state.hidden,
|
31317
31325
|
animating = _state.animating;
|
31318
31326
|
|
31319
|
-
|
31327
|
+
var invert = getInvert(this.props);
|
31328
|
+
var logoElement = _react2.default.createElement('div', { className: (0, _classnames2.default)("media_loading_spinner-logo", { 'media_loading_spinner-logo-invert': invert }) });
|
31329
|
+
if (this.props.removeLogo) {
|
31330
|
+
logoElement = '';
|
31331
|
+
}
|
31320
31332
|
if (editing || !hidden) {
|
31321
31333
|
return _react2.default.createElement(
|
31322
31334
|
'div',
|
31323
|
-
{ className: (0, _classnames2.default)('
|
31335
|
+
{ className: (0, _classnames2.default)('media_loading_spinner', { 'media_loading_spinner-fade': animating }, { 'media_loading_spinner-invert': invert }),
|
31324
31336
|
onAnimationEnd: function onAnimationEnd(event) {
|
31325
31337
|
return _this4.hideOrLoop(event);
|
31326
31338
|
},
|
31327
31339
|
onTouchMove: preventScrollBouncing,
|
31328
|
-
style: inlineStyle() },
|
31329
|
-
|
31330
|
-
_react2.default.createElement('div', { className: '
|
31340
|
+
style: inlineStyle(this.props) },
|
31341
|
+
logoElement,
|
31342
|
+
_react2.default.createElement('div', { className: 'media_loading_spinner-image',
|
31331
31343
|
style: backgroundImageInlineStyles(this.props) }),
|
31332
|
-
|
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
|
-
)
|
31344
|
+
this.props.children
|
31346
31345
|
);
|
31347
31346
|
} else {
|
31348
31347
|
return _react2.default.createElement('noscript', null);
|
@@ -31350,10 +31349,36 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
31350
31349
|
}
|
31351
31350
|
}]);
|
31352
31351
|
|
31353
|
-
return
|
31352
|
+
return MediaLoadingSpinnerComponent;
|
31354
31353
|
}(_react2.default.Component);
|
31355
31354
|
|
31356
|
-
function
|
31355
|
+
function preventScrollBouncing(e) {
|
31356
|
+
e.preventDefault();
|
31357
|
+
}
|
31358
|
+
|
31359
|
+
function backgroundImageInlineStyles(_ref) {
|
31360
|
+
var firstPageBackgroundImageUrl = _ref.firstPageBackgroundImageUrl,
|
31361
|
+
backgroundImage = _ref.backgroundImage,
|
31362
|
+
blurStrength = _ref.blurStrength;
|
31363
|
+
|
31364
|
+
var url = backgroundImage ? backgroundImage.urls.medium : firstPageBackgroundImageUrl;
|
31365
|
+
if (url) {
|
31366
|
+
return {
|
31367
|
+
backgroundImage: 'url("' + url + '")',
|
31368
|
+
filter: 'blur(' + blurStrength + 'px)'
|
31369
|
+
};
|
31370
|
+
}
|
31371
|
+
}
|
31372
|
+
|
31373
|
+
function getInvert(props) {
|
31374
|
+
if (!props.backgroundImage && props.invert == undefined) {
|
31375
|
+
return props.firstPageInvert;
|
31376
|
+
}
|
31377
|
+
return props.invert;
|
31378
|
+
}
|
31379
|
+
|
31380
|
+
function inlineStyle(props) {
|
31381
|
+
var invert = getInvert(props);
|
31357
31382
|
return {
|
31358
31383
|
position: 'absolute',
|
31359
31384
|
top: 0,
|
@@ -31361,49 +31386,144 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
|
|
31361
31386
|
width: '100%',
|
31362
31387
|
height: '100%',
|
31363
31388
|
zIndex: 100,
|
31364
|
-
backgroundColor: '#000'
|
31389
|
+
backgroundColor: invert ? '#fff' : '#000'
|
31365
31390
|
};
|
31366
31391
|
}
|
31367
31392
|
|
31368
|
-
|
31369
|
-
|
31370
|
-
|
31393
|
+
var MediaLoadingSpinner = exports.MediaLoadingSpinner = (0, _reactRedux.connect)((0, _utils.combineSelectors)({
|
31394
|
+
editing: (0, _selectors2.editingWidget)({ role: 'loading_spinner' }),
|
31395
|
+
firstPageInvert: (0, _selectors4.firstPageAttribute)('invert'),
|
31396
|
+
firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
|
31397
|
+
variant: 'medium',
|
31398
|
+
page: (0, _selectors4.firstPageAttribures)()
|
31399
|
+
}),
|
31400
|
+
backgroundImage: (0, _selectors3.file)('imageFiles', {
|
31401
|
+
id: (0, _selectors2.widgetAttribute)('customBackgroundImageId', {
|
31402
|
+
role: 'loading_spinner'
|
31403
|
+
})
|
31404
|
+
}),
|
31405
|
+
invert: (0, _selectors2.widgetAttribute)('invert', { role: 'loading_spinner' }),
|
31406
|
+
removeLogo: (0, _selectors2.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
|
31407
|
+
blurStrength: (0, _selectors2.widgetAttribute)('blurStrength', { role: 'loading_spinner' })
|
31408
|
+
}))(MediaLoadingSpinnerComponent);
|
31371
31409
|
|
31372
|
-
|
31410
|
+
function register() {
|
31411
|
+
(0, _registerWidgetType2.default)('media_loading_spinner', {
|
31412
|
+
component: MediaLoadingSpinner
|
31413
|
+
});
|
31414
|
+
}
|
31373
31415
|
|
31374
|
-
|
31375
|
-
|
31376
|
-
|
31377
|
-
|
31416
|
+
/***/ }),
|
31417
|
+
/* 619 */
|
31418
|
+
/***/ (function(module, exports, __webpack_require__) {
|
31419
|
+
|
31420
|
+
'use strict';
|
31421
|
+
|
31422
|
+
Object.defineProperty(exports, "__esModule", {
|
31423
|
+
value: true
|
31424
|
+
});
|
31425
|
+
exports.TitleLoadingSpinner = undefined;
|
31426
|
+
|
31427
|
+
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; }; }();
|
31428
|
+
|
31429
|
+
exports.register = register;
|
31430
|
+
|
31431
|
+
var _utils = __webpack_require__(340);
|
31432
|
+
|
31433
|
+
var _react = __webpack_require__(334);
|
31434
|
+
|
31435
|
+
var _react2 = _interopRequireDefault(_react);
|
31436
|
+
|
31437
|
+
var _reactRedux = __webpack_require__(399);
|
31438
|
+
|
31439
|
+
var _classnames = __webpack_require__(335);
|
31440
|
+
|
31441
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
31442
|
+
|
31443
|
+
var _registerWidgetType = __webpack_require__(562);
|
31444
|
+
|
31445
|
+
var _registerWidgetType2 = _interopRequireDefault(_registerWidgetType);
|
31446
|
+
|
31447
|
+
var _selectors = __webpack_require__(502);
|
31448
|
+
|
31449
|
+
var _selectors2 = __webpack_require__(376);
|
31450
|
+
|
31451
|
+
var _selectors3 = __webpack_require__(429);
|
31452
|
+
|
31453
|
+
var _selectors4 = __webpack_require__(493);
|
31454
|
+
|
31455
|
+
var _MediaLoadingSpinner = __webpack_require__(618);
|
31456
|
+
|
31457
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
31458
|
+
|
31459
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
31460
|
+
|
31461
|
+
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; }
|
31462
|
+
|
31463
|
+
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; }
|
31464
|
+
|
31465
|
+
var TitleLoadingSpinner = exports.TitleLoadingSpinner = function (_React$Component) {
|
31466
|
+
_inherits(TitleLoadingSpinner, _React$Component);
|
31467
|
+
|
31468
|
+
function TitleLoadingSpinner() {
|
31469
|
+
_classCallCheck(this, TitleLoadingSpinner);
|
31470
|
+
|
31471
|
+
return _possibleConstructorReturn(this, (TitleLoadingSpinner.__proto__ || Object.getPrototypeOf(TitleLoadingSpinner)).apply(this, arguments));
|
31378
31472
|
}
|
31379
|
-
}
|
31380
31473
|
|
31381
|
-
|
31382
|
-
|
31383
|
-
|
31474
|
+
_createClass(TitleLoadingSpinner, [{
|
31475
|
+
key: 'render',
|
31476
|
+
value: function render() {
|
31477
|
+
var _props = this.props,
|
31478
|
+
title = _props.title,
|
31479
|
+
subtitle = _props.subtitle,
|
31480
|
+
entryTitle = _props.entryTitle;
|
31481
|
+
|
31482
|
+
var invert = (0, _MediaLoadingSpinner.getInvert)(this.props);
|
31483
|
+
return _react2.default.createElement(
|
31484
|
+
_MediaLoadingSpinner.MediaLoadingSpinner,
|
31485
|
+
null,
|
31486
|
+
_react2.default.createElement(
|
31487
|
+
'div',
|
31488
|
+
{ className: (0, _classnames2.default)('media_loading_spinner-titles', { 'media_loading_spinner-invert': invert }) },
|
31489
|
+
_react2.default.createElement(
|
31490
|
+
'div',
|
31491
|
+
{ className: 'media_loading_spinner-title' },
|
31492
|
+
title || entryTitle
|
31493
|
+
),
|
31494
|
+
_react2.default.createElement(
|
31495
|
+
'div',
|
31496
|
+
{ className: 'media_loading_spinner-subtitle' },
|
31497
|
+
subtitle
|
31498
|
+
)
|
31499
|
+
)
|
31500
|
+
);
|
31501
|
+
}
|
31502
|
+
}]);
|
31503
|
+
|
31504
|
+
return TitleLoadingSpinner;
|
31505
|
+
}(_react2.default.Component);
|
31384
31506
|
|
31385
31507
|
function register() {
|
31386
31508
|
(0, _registerWidgetType2.default)('title_loading_spinner', {
|
31387
31509
|
component: (0, _reactRedux.connect)((0, _utils.combineSelectors)({
|
31388
|
-
|
31389
|
-
firstPageBackgroundImageUrl: (0, _selectors4.pageBackgroundImageUrl)({
|
31390
|
-
variant: 'medium',
|
31391
|
-
page: (0, _selectors4.firstPageAttribures)()
|
31392
|
-
}),
|
31510
|
+
firstPageInvert: (0, _selectors2.firstPageAttribute)('invert'),
|
31393
31511
|
backgroundImage: (0, _selectors3.file)('imageFiles', {
|
31394
|
-
id: (0,
|
31512
|
+
id: (0, _selectors4.widgetAttribute)('customBackgroundImageId', {
|
31395
31513
|
role: 'loading_spinner'
|
31396
31514
|
})
|
31397
31515
|
}),
|
31398
31516
|
entryTitle: (0, _selectors.entryAttribute)('title'),
|
31399
|
-
title: (0,
|
31400
|
-
subtitle: (0,
|
31517
|
+
title: (0, _selectors4.widgetAttribute)('title', { role: 'loading_spinner' }),
|
31518
|
+
subtitle: (0, _selectors4.widgetAttribute)('subtitle', { role: 'loading_spinner' }),
|
31519
|
+
removeLogo: (0, _selectors4.widgetAttribute)('removeLogo', { role: 'loading_spinner' }),
|
31520
|
+
invert: (0, _selectors4.widgetAttribute)('invert', { role: 'loading_spinner' })
|
31401
31521
|
}))(TitleLoadingSpinner)
|
31402
31522
|
});
|
31403
31523
|
}
|
31404
31524
|
|
31405
31525
|
/***/ }),
|
31406
|
-
/*
|
31526
|
+
/* 620 */
|
31407
31527
|
/***/ (function(module, exports) {
|
31408
31528
|
|
31409
31529
|
module.exports = pageflow;
|
@@ -12,7 +12,6 @@ pageflow.WidgetType = pageflow.Object.extend({
|
|
12
12
|
|
13
13
|
createConfigurationEditorView: function(options) {
|
14
14
|
var constructor = this.configurationEditorView;
|
15
|
-
|
16
15
|
return new constructor(_.extend({
|
17
16
|
attributeTranslationKeyPrefixes: [
|
18
17
|
'pageflow.editor.widgets.attributes.' + this.name,
|
@@ -0,0 +1,18 @@
|
|
1
|
+
pageflow.editor.widgetTypes.register('media_loading_spinner', {
|
2
|
+
configurationEditorView: pageflow.ConfigurationEditorView.extend({
|
3
|
+
configure: function() {
|
4
|
+
this.tab('loading_spinner', function() {
|
5
|
+
this.view(pageflow.InfoBoxView, {
|
6
|
+
text: I18n.t('pageflow.editor.media_loading_spinner.widget_type_info_box_text')
|
7
|
+
});
|
8
|
+
this.input('custom_background_image_id', pageflow.FileInputView, {
|
9
|
+
collection: 'image_files',
|
10
|
+
fileSelectionHandler: 'widgetConfiguration'
|
11
|
+
});
|
12
|
+
this.input('invert', pageflow.CheckBoxInputView);
|
13
|
+
this.input('remove_logo', pageflow.CheckBoxInputView);
|
14
|
+
this.input('blur_strength', pageflow.SliderInputView);
|
15
|
+
});
|
16
|
+
}
|
17
|
+
})
|
18
|
+
});
|
@@ -14,6 +14,9 @@ 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);
|
17
20
|
});
|
18
21
|
}
|
19
22
|
})
|
@@ -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";
|
21
20
|
@import "./logo";
|
22
21
|
@import "./page";
|
22
|
+
@import "./loading_spinner";
|
23
23
|
@import "./indicators";
|
24
24
|
@import "./navigation";
|
25
25
|
@import "./navigation_share_box";
|
@@ -17,6 +17,12 @@ $loading-spinner-logo-width: 130px !default;
|
|
17
17
|
/// Height of the loading spinner image.
|
18
18
|
$loading-spinner-logo-height: 112px !default;
|
19
19
|
|
20
|
+
/// Width of the loading spinner image for mobile.
|
21
|
+
$loading-spinner-logo-mobile-width: null !default;
|
22
|
+
|
23
|
+
/// Height of the loading spinner image for mobile.
|
24
|
+
$loading-spinner-logo-mobile-height: null !default;
|
25
|
+
|
20
26
|
/// Spinner background color.
|
21
27
|
$loading-spinner-background-color: #3b5159 !default;
|
22
28
|
|
@@ -46,8 +52,14 @@ $loading-spinner-glow-size: 140px !default;
|
|
46
52
|
/// File extension of background and logo
|
47
53
|
$loading-spinner-image-file-extension: "png" !default;
|
48
54
|
|
55
|
+
/// Background position for background image
|
56
|
+
$loading-spinner-background-position: 50% 50% !default;
|
57
|
+
|
58
|
+
|
59
|
+
@import "./loading_spinner/media";
|
49
60
|
@import "./loading_spinner/title";
|
50
61
|
|
62
|
+
|
51
63
|
@if not $custom-loading-spinner {
|
52
64
|
.loading_spinner {
|
53
65
|
// scss-lint:disable ImportantRule
|
@@ -57,7 +69,7 @@ $loading-spinner-image-file-extension: "png" !default;
|
|
57
69
|
// scss-lint:enable ImportantRule
|
58
70
|
|
59
71
|
&:before {
|
60
|
-
background-position:
|
72
|
+
background-position: $loading-spinner-background-position;
|
61
73
|
background-repeat: no-repeat;
|
62
74
|
display: block;
|
63
75
|
height: 100%;
|
@@ -75,7 +87,10 @@ $loading-spinner-image-file-extension: "png" !default;
|
|
75
87
|
|
76
88
|
@if $loading-spinner-background-size == "logo" {
|
77
89
|
background-size: $loading-spinner-logo-width $loading-spinner-logo-height;
|
90
|
+
}@else if $loading-spinner-background-size != "auto" {
|
91
|
+
background-size: $loading-spinner-background-size;
|
78
92
|
}
|
93
|
+
|
79
94
|
}
|
80
95
|
|
81
96
|
@if $loading-spinner-animate-background {
|
@@ -110,6 +125,21 @@ $loading-spinner-image-file-extension: "png" !default;
|
|
110
125
|
margin-top: -$loading-spinner-logo-height / 2;
|
111
126
|
position: absolute;
|
112
127
|
|
128
|
+
@if ($loading-spinner-logo-mobile-height) {
|
129
|
+
@include mobile {
|
130
|
+
height: $loading-spinner-logo-mobile-height;
|
131
|
+
margin-top: -$loading-spinner-logo-mobile-height / 2;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
@if ($loading-spinner-logo-mobile-width) {
|
136
|
+
@include mobile {
|
137
|
+
width: $loading-spinner-logo-mobile-width;
|
138
|
+
margin-left: -$loading-spinner-logo-mobile-width / 2;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
|
113
143
|
div {
|
114
144
|
width: 100%;
|
115
145
|
height: 100%;
|
@@ -117,6 +147,12 @@ $loading-spinner-image-file-extension: "png" !default;
|
|
117
147
|
background-repeat: no-repeat;
|
118
148
|
position: absolute;
|
119
149
|
|
150
|
+
@if ($loading-spinner-logo-mobile-width) {
|
151
|
+
@include mobile {
|
152
|
+
background-size: $loading-spinner-logo-mobile-width $loading-spinner-logo-mobile-height;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
120
156
|
@if $loading-spinner-logo == "custom" {
|
121
157
|
background-image: image-url("pageflow/themes/#{$theme-name}/loading_spinner/logo.#{$loading-spinner-image-file-extension}");
|
122
158
|
} @else {
|