pageflow 15.2.2 → 15.3.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 +338 -85
- data/admins/pageflow/accounts.rb +1 -98
- data/admins/pageflow/entry.rb +21 -1
- data/admins/pageflow/entry_templates.rb +140 -0
- data/admins/pageflow/membership.rb +12 -0
- data/admins/pageflow/user.rb +5 -3
- data/app/assets/javascripts/pageflow/admin/entries.js +65 -0
- data/app/assets/javascripts/pageflow/admin/users.js +1 -1
- data/app/assets/javascripts/pageflow/asset_urls.js.erb +1 -0
- data/app/assets/javascripts/pageflow/base.js +0 -12
- data/app/assets/javascripts/pageflow/components.js +2 -6
- data/app/assets/javascripts/pageflow/dist/ui.js +47 -14
- data/app/assets/javascripts/pageflow/vendor.js +13 -10
- data/app/assets/stylesheets/pageflow/base.scss +0 -7
- data/app/assets/stylesheets/pageflow/editor/base.scss +2 -0
- data/app/assets/stylesheets/pageflow/editor/composables.scss +5 -1
- data/app/assets/stylesheets/pageflow/editor/emulation_mode_button.scss +44 -55
- data/app/assets/stylesheets/pageflow/editor/help.scss +2 -2
- data/app/assets/stylesheets/pageflow/ui/tooltip.scss +17 -3
- data/app/helpers/pageflow/admin/entries_helper.rb +16 -0
- data/app/helpers/pageflow/structured_data_helper.rb +0 -2
- data/app/models/pageflow/account.rb +21 -1
- data/app/models/pageflow/entry.rb +9 -2
- data/app/models/pageflow/entry_duplicate.rb +1 -0
- data/app/models/pageflow/entry_template.rb +16 -2
- data/app/policies/pageflow/account_policy.rb +10 -0
- data/app/policies/pageflow/entry_template_policy.rb +5 -1
- data/app/views/admin/accounts/_entry_template_details.html.arb +7 -5
- data/app/views/admin/accounts/_form.html.erb +3 -49
- data/app/views/admin/entries/_attributes_table.html.arb +5 -0
- data/app/views/admin/entries/_not_allowed_to_see_entry_types.json.jbuilder +2 -0
- data/app/views/admin/entries/entry_types.json.jbuilder +4 -0
- data/app/views/admin/entry_templates/_form.html.erb +58 -0
- data/app/views/admin/users/_not_allowed_to_see_user_quota.html.erb +3 -0
- data/app/views/components/pageflow/admin/entry_templates_tab.rb +48 -0
- data/app/views/pageflow/admin/users/_quota_exhausted.html.erb +1 -1
- data/config/initializers/admin_resource_tabs.rb +5 -0
- data/config/initializers/help_entries.rb +1 -5
- data/config/locales/de.yml +88 -155
- data/config/locales/en.yml +79 -143
- data/db/migrate/20200515112500_add_constraints_to_entry_templates.rb +21 -0
- data/db/migrate/20200807135200_rename_pageflow_entry_template_entry_type_to_entry_type_name.rb +7 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/components.js +7 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +1479 -1391
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +9218 -0
- data/{app/assets/javascripts/pageflow → entry_types/paged/app/assets/javascripts/pageflow_paged}/dist/react-client.js +1 -1
- data/{app/assets/javascripts/pageflow → entry_types/paged/app/assets/javascripts/pageflow_paged}/dist/react-server.js +3 -3
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/frontend.js +6 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/server_rendering.js +9 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/vendor.js +8 -0
- data/entry_types/paged/app/controllers/pageflow_paged/application_controller.rb +2 -2
- data/{app/helpers/pageflow → entry_types/paged/app/helpers/pageflow_paged}/page_background_asset_helper.rb +4 -3
- data/{app/helpers/pageflow → entry_types/paged/app/helpers/pageflow_paged}/react_server_side_rendering_helper.rb +23 -2
- data/entry_types/paged/app/views/layouts/pageflow_paged/application.html.erb +2 -2
- data/entry_types/paged/app/views/pageflow_paged/editor/entries/_head.html.erb +2 -2
- data/entry_types/paged/app/views/pageflow_paged/entries/_entry.html.erb +1 -1
- data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/page_background_asset/_element.html.erb +0 -0
- data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/react/_widget.html.erb +0 -0
- data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/react/page.html.erb +0 -0
- data/entry_types/paged/config/initializers/features.rb +1 -1
- data/entry_types/paged/config/initializers/help_entries.rb +17 -0
- data/entry_types/paged/config/locales/new/help.de.yml +162 -0
- data/entry_types/paged/config/locales/new/help.en.yml +153 -0
- data/entry_types/paged/lib/pageflow_paged/engine.rb +13 -0
- data/entry_types/paged/lib/pageflow_paged/plugin.rb +5 -1
- data/entry_types/paged/lib/pageflow_paged/react.rb +12 -0
- data/{lib/pageflow → entry_types/paged/lib/pageflow_paged}/react/page_type.rb +2 -2
- data/{lib/pageflow → entry_types/paged/lib/pageflow_paged}/react/widget_type.rb +2 -2
- data/entry_types/paged/vendor/assets/javascripts/development/pageflow_paged/vendor/react-server.js +20613 -0
- data/entry_types/paged/vendor/assets/javascripts/development/pageflow_paged/vendor/react.js +21495 -0
- data/entry_types/paged/vendor/assets/javascripts/production/pageflow_paged/vendor/react-server.js +24 -0
- data/entry_types/paged/vendor/assets/javascripts/production/pageflow_paged/vendor/react.js +24 -0
- data/entry_types/scrolled/app/assets/javascripts/pageflow_scrolled/legacy.js +0 -0
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +14 -4
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +8 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +6 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +2 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +33 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +8 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +38 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/content_elements/batch.json.jbuilder +2 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -7
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +19 -3
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +3 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +7 -0
- data/entry_types/scrolled/config/initializers/help_entries.rb +16 -0
- data/entry_types/scrolled/config/locales/new/de.yml +345 -13
- data/entry_types/scrolled/config/locales/new/en.yml +257 -14
- data/entry_types/scrolled/config/routes.rb +1 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +28 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDesktop.svg +56 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoMobile.svg +22 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +4 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +3 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +90 -30
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled_tasks.rake +64 -27
- data/entry_types/scrolled/package/contentElements-editor.js +242 -183
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements-frontend.js +624 -279
- data/entry_types/scrolled/package/editor.js +2561 -363
- data/entry_types/scrolled/package/frontend-server.js +228 -0
- data/entry_types/scrolled/package/frontend/EditableText-4264c349.js +1993 -0
- data/entry_types/scrolled/package/frontend/Wavesurfer-c3c45324.js +378 -0
- data/entry_types/scrolled/package/frontend/components-cfe6a479.js +2115 -0
- data/entry_types/scrolled/package/frontend/getPrototypeOf-63c7c8e8.js +86 -0
- data/entry_types/scrolled/package/frontend/index.css +9 -0
- data/entry_types/scrolled/package/frontend/index.js +4425 -0
- data/entry_types/scrolled/package/package.json +17 -6
- data/entry_types/scrolled/spec/fixtures/audio.m4a +0 -0
- data/entry_types/scrolled/spec/fixtures/video.mp4 +0 -0
- data/lib/generators/pageflow/initializer/templates/pageflow.rb +20 -9
- data/lib/pageflow/ability_mixin.rb +14 -2
- data/lib/pageflow/configuration.rb +6 -5
- data/lib/pageflow/engine.rb +1 -0
- data/lib/pageflow/entry_type_configuration.rb +1 -0
- data/lib/pageflow/global_config_api.rb +5 -4
- data/lib/pageflow/react.rb +4 -2
- data/lib/pageflow/version.rb +1 -1
- data/{packages/pageflow → package}/config/jest/index.js +2 -1
- data/{packages/pageflow → package}/config/jest/transformers/jst.js +0 -0
- data/{packages/pageflow → package}/config/jest/transformers/upwardBabel.js +0 -0
- data/package/config/webpack.js +22 -0
- data/{packages/pageflow → package}/editor.js +480 -1129
- data/package/frontend.js +2525 -0
- data/{packages/pageflow → package}/package.json +3 -0
- data/{packages/pageflow → package}/testHelpers.js +114 -13
- data/{packages/pageflow → package}/ui.js +47 -14
- data/spec/factories/accounts.rb +3 -1
- data/spec/factories/entry_templates.rb +1 -0
- data/spec/factories/published_entries.rb +6 -1
- metadata +62 -26
- data/app/assets/javascripts/pageflow/dist/frontend.js +0 -5800
- data/config/initializers/entry_types.rb +0 -4
- data/entry_types/scrolled/package/frontend.js +0 -2879
- data/packages/pageflow/config/jest/transformers/cssModules.js +0 -1
- data/packages/pageflow/config/webpack.js +0 -14
@@ -1,3 +1,4 @@
|
|
1
|
+
var pageflow = window.pageflow || {};
|
1
2
|
pageflow.assetUrls = {
|
2
3
|
unmuteSound: '<%= asset_path("pageflow/unmute.mp3") %>',
|
3
4
|
largeBandwidthProbe: '<%= Rails.env.test? ? asset_path("bandwidth_probe_large.png") : "//#{File.join(Pageflow.config.zencoder_options[:s3_host_alias], "bandwidth_probe_large.png")}" %>',
|
@@ -1,12 +0,0 @@
|
|
1
|
-
// base JavaScript file for Pageflow.
|
2
|
-
// This file is meant to hold code we develop.
|
3
|
-
// And vendor code that changes a lot.
|
4
|
-
|
5
|
-
//= require polyfills/bind
|
6
|
-
|
7
|
-
//= require ./videojs
|
8
|
-
|
9
|
-
//= require ./dist/frontend
|
10
|
-
//= require ./dist/react-client
|
11
|
-
|
12
|
-
//= require ./asset_urls
|
@@ -1,7 +1,3 @@
|
|
1
|
-
//
|
2
|
-
// packages/pageflow-react directory.
|
1
|
+
// Deprecation: File moved to pageflow_paged
|
3
2
|
|
4
|
-
//=
|
5
|
-
//= require pageflow/dist/react-server
|
6
|
-
|
7
|
-
var PAGEFLOW_EDITOR = false;
|
3
|
+
//= require pageflow_paged/components
|
@@ -158,10 +158,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
158
158
|
}
|
159
159
|
|
160
160
|
function _iterableToArrayLimit(arr, i) {
|
161
|
-
if (!(Symbol.iterator in Object(arr)
|
162
|
-
return;
|
163
|
-
}
|
164
|
-
|
161
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
165
162
|
var _arr = [];
|
166
163
|
var _n = true;
|
167
164
|
var _d = false;
|
@@ -187,12 +184,31 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
187
184
|
return _arr;
|
188
185
|
}
|
189
186
|
|
187
|
+
function _arrayLikeToArray(arr, len) {
|
188
|
+
if (len == null || len > arr.length) len = arr.length;
|
189
|
+
|
190
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
191
|
+
arr2[i] = arr[i];
|
192
|
+
}
|
193
|
+
|
194
|
+
return arr2;
|
195
|
+
}
|
196
|
+
|
197
|
+
function _unsupportedIterableToArray(o, minLen) {
|
198
|
+
if (!o) return;
|
199
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
200
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
201
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
202
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
203
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
204
|
+
}
|
205
|
+
|
190
206
|
function _nonIterableRest() {
|
191
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
207
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
192
208
|
}
|
193
209
|
|
194
210
|
function _slicedToArray(arr, i) {
|
195
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
211
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
196
212
|
}
|
197
213
|
|
198
214
|
/**
|
@@ -274,7 +290,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
274
290
|
* <button class=${styles.addButton}></button>
|
275
291
|
* `,
|
276
292
|
*
|
277
|
-
* events: cssModulesUtils.
|
293
|
+
* events: cssModulesUtils.events(styles, {
|
278
294
|
* 'click addButton': () => console.log('clicked add button');
|
279
295
|
* })
|
280
296
|
* });
|
@@ -1009,10 +1025,14 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
1009
1025
|
this.ui.label.text(text);
|
1010
1026
|
this.$el.toggleClass('align_bottom_right', options.align === 'bottom right');
|
1011
1027
|
this.$el.toggleClass('align_bottom_left', options.align === 'bottom left');
|
1028
|
+
this.$el.toggleClass('align_top_center', options.align === 'top center');
|
1012
1029
|
|
1013
1030
|
if (options.align === 'bottom right' || options.align === 'bottom left') {
|
1014
1031
|
offsetTop = 10;
|
1015
1032
|
offsetLeft = 0;
|
1033
|
+
} else if (options.align === 'top center') {
|
1034
|
+
offsetTop = -10;
|
1035
|
+
offsetLeft = 0;
|
1016
1036
|
} else {
|
1017
1037
|
offsetTop = -17;
|
1018
1038
|
offsetLeft = 10;
|
@@ -1692,6 +1712,10 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
1692
1712
|
* value of the `placeholderModel` occurs whenever the attribute is
|
1693
1713
|
* blank.
|
1694
1714
|
*
|
1715
|
+
* @param {function} [options.optionDisabled]
|
1716
|
+
* Receives value and has to return boolean indicating whether
|
1717
|
+
* option is disabled.
|
1718
|
+
*
|
1695
1719
|
* @class
|
1696
1720
|
*/
|
1697
1721
|
|
@@ -1794,6 +1818,10 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
1794
1818
|
option.value = value;
|
1795
1819
|
option.text = this.options.texts[index];
|
1796
1820
|
|
1821
|
+
if (this.options.optionDisabled && this.options.optionDisabled(value)) {
|
1822
|
+
option.setAttribute('disabled', true);
|
1823
|
+
}
|
1824
|
+
|
1797
1825
|
if (group) {
|
1798
1826
|
option.setAttribute('data-group', group);
|
1799
1827
|
this.findOrCreateOptGroup(group).append(option);
|
@@ -1818,10 +1846,10 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
1818
1846
|
if (!this.isClosed) {
|
1819
1847
|
var value = this.model.get(this.options.propertyName);
|
1820
1848
|
|
1821
|
-
if (this.model.has(this.options.propertyName) && this.ui.select.find('option[value="' + value + '"]').length) {
|
1849
|
+
if (this.model.has(this.options.propertyName) && this.ui.select.find('option[value="' + value + '"]:not([disabled])').length) {
|
1822
1850
|
this.ui.select.val(value);
|
1823
1851
|
} else {
|
1824
|
-
this.ui.select.val(this.ui.select.find('option:first').val());
|
1852
|
+
this.ui.select.val(this.ui.select.find('option:not([disabled]):first').val());
|
1825
1853
|
}
|
1826
1854
|
}
|
1827
1855
|
}
|
@@ -1950,7 +1978,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
1950
1978
|
((__t = ( I18n.t('pageflow.ui.templates.inputs.text_area_input.open_in_new_tab') )) == null ? '' : __t) +
|
1951
1979
|
'\n </label>\n <span class="inline_help">\n ' +
|
1952
1980
|
((__t = ( I18n.t('pageflow.ui.templates.inputs.text_area_input.open_in_new_tab_help') )) == null ? '' : __t) +
|
1953
|
-
'\n </span>\n </div>\n </div>\n <div class="fragment_link_panel">\n <!-- LinkInputView is inserted here -->\n </div>\n\n <!-- wysihtml5 does not handle hidden fields correctly -->\n <div class="internal">\n <input type="text" data-wysihtml5-dialog-field="href" class="current_url" value="
|
1981
|
+
'\n </span>\n </div>\n </div>\n <div class="fragment_link_panel">\n <!-- LinkInputView is inserted here -->\n </div>\n\n <!-- wysihtml5 does not handle hidden fields correctly -->\n <div class="internal">\n <input type="text" data-wysihtml5-dialog-field="href" class="current_url" value="">\n <input type="text" data-wysihtml5-dialog-field="target" class="current_target" value="_blank">\n </div>\n\n <a class="button" data-wysihtml5-dialog-action="save">\n ' +
|
1954
1982
|
((__t = ( I18n.t('pageflow.ui.templates.inputs.text_area_input.save') )) == null ? '' : __t) +
|
1955
1983
|
'\n </a>\n <a class="button" data-wysihtml5-dialog-action="cancel">\n ' +
|
1956
1984
|
((__t = ( I18n.t('pageflow.ui.templates.inputs.text_area_input.cancel') )) == null ? '' : __t) +
|
@@ -2097,7 +2125,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
2097
2125
|
var currentUrl = this.ui.urlInput.val();
|
2098
2126
|
|
2099
2127
|
if (currentUrl.startsWith('#')) {
|
2100
|
-
this.ui.displayUrlInput.val('
|
2128
|
+
this.ui.displayUrlInput.val('');
|
2101
2129
|
this.ui.openInNewTabCheckBox.prop('checked', true);
|
2102
2130
|
} else {
|
2103
2131
|
this.ui.displayUrlInput.val(currentUrl);
|
@@ -2799,8 +2827,8 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
2799
2827
|
events: {
|
2800
2828
|
'mouseover [data-tooltip]': function mouseoverDataTooltip(event) {
|
2801
2829
|
if (!this.tooltip.visible) {
|
2802
|
-
var target = $(event.
|
2803
|
-
var key = target.
|
2830
|
+
var target = $(event.currentTarget);
|
2831
|
+
var key = target.attr('data-tooltip');
|
2804
2832
|
var position;
|
2805
2833
|
|
2806
2834
|
if (target.data('tooltipAlign') === 'bottom left') {
|
@@ -2813,6 +2841,11 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
2813
2841
|
left: target.position().left + target.outerWidth(),
|
2814
2842
|
top: target.position().top + target.outerHeight()
|
2815
2843
|
};
|
2844
|
+
} else if (target.data('tooltipAlign') === 'top center') {
|
2845
|
+
position = {
|
2846
|
+
left: target.position().left + target.outerWidth() / 2,
|
2847
|
+
top: target.position().top + 2
|
2848
|
+
};
|
2816
2849
|
} else {
|
2817
2850
|
position = {
|
2818
2851
|
left: target.position().left + target.outerWidth(),
|
@@ -2825,7 +2858,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
|
|
2825
2858
|
});
|
2826
2859
|
}
|
2827
2860
|
},
|
2828
|
-
'
|
2861
|
+
'mouseleave [data-tooltip]': function mouseleaveDataTooltip() {
|
2829
2862
|
this.tooltip.hide();
|
2830
2863
|
}
|
2831
2864
|
},
|
@@ -2,15 +2,18 @@
|
|
2
2
|
// This file is meant to hold code we don't develop and/or rarely change.
|
3
3
|
// It means this asset will stay cached for much longer.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
//= require jquery_ujs
|
9
|
-
//= require jquery.fullscreen
|
10
|
-
//= require jquery.placeholder
|
5
|
+
// = require polyfills/bind
|
6
|
+
// = require ./videojs
|
7
|
+
// = require ./asset_urls
|
11
8
|
|
12
|
-
|
13
|
-
|
9
|
+
// = require i18n
|
10
|
+
// = require jquery
|
11
|
+
// = require jquery-ui/widget
|
12
|
+
// = require jquery_ujs
|
13
|
+
// = require jquery.fullscreen
|
14
|
+
// = require jquery.placeholder
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
// = require iscroll
|
17
|
+
// = require audio5.min
|
18
|
+
|
19
|
+
// = require backbone-rails
|
@@ -1,78 +1,67 @@
|
|
1
1
|
.emulation_mode_button {
|
2
|
-
|
3
|
-
@include up-open-icon;
|
2
|
+
position: relative;
|
4
3
|
float: left;
|
5
|
-
|
6
|
-
width: 100px;
|
4
|
+
cursor: pointer;
|
7
5
|
|
8
|
-
&-
|
9
|
-
|
10
|
-
|
11
|
-
padding: 1px;
|
12
|
-
position: absolute;
|
13
|
-
bottom: 1px;
|
14
|
-
left: 1px;
|
15
|
-
visibility: hidden;
|
16
|
-
width: 200px;
|
17
|
-
z-index: 1;
|
6
|
+
&-wrapper {
|
7
|
+
width: 110px;
|
8
|
+
height: 30px;
|
18
9
|
}
|
19
10
|
|
20
|
-
&-
|
21
|
-
|
11
|
+
&-desktop_icon,
|
12
|
+
&-phone_icon {
|
13
|
+
@include background-icon-center($color: #444, $font-size: 16px);
|
14
|
+
width: 40px;
|
15
|
+
height: 100%;
|
22
16
|
}
|
23
17
|
|
24
|
-
|
25
|
-
|
18
|
+
&-desktop_icon {
|
19
|
+
@include monitor-icon;
|
20
|
+
float: left;
|
26
21
|
}
|
27
22
|
|
28
|
-
&-
|
29
|
-
@include
|
30
|
-
|
31
|
-
padding: 5px 10px 5px 30px;
|
32
|
-
|
33
|
-
&.active {
|
34
|
-
display: block;
|
35
|
-
}
|
23
|
+
&-phone_icon {
|
24
|
+
@include mobile-icon;
|
25
|
+
float: right;
|
36
26
|
}
|
37
27
|
|
38
|
-
&-
|
39
|
-
|
28
|
+
&-track,
|
29
|
+
&-thumb {
|
30
|
+
position: absolute;
|
31
|
+
background-color: #1976d2;
|
40
32
|
}
|
41
33
|
|
42
|
-
&-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
34
|
+
&-track {
|
35
|
+
top: 8px;
|
36
|
+
left: 40px;
|
37
|
+
border-radius: 7px;
|
38
|
+
opacity: 0.5;
|
39
|
+
width: 34px;
|
40
|
+
height: 14px;
|
49
41
|
}
|
50
42
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
43
|
+
&-thumb {
|
44
|
+
top: 5px;
|
45
|
+
left: 37px;
|
46
|
+
width: 20px;
|
47
|
+
height: 20px;
|
48
|
+
border-radius: 50%;
|
49
|
+
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
50
|
+
transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
55
51
|
}
|
56
52
|
|
57
|
-
|
58
|
-
|
59
|
-
font-size: 10px;
|
53
|
+
&.active .emulation_mode_button-thumb {
|
54
|
+
transform: translateX(20px);
|
60
55
|
}
|
61
56
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
.emulation_mode_button-disabled_hint {
|
67
|
-
display: block;
|
57
|
+
&.disabled {
|
58
|
+
.emulation_mode_button-wrapper {
|
59
|
+
opacity: 0.4;
|
68
60
|
}
|
69
|
-
}
|
70
61
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
&-desktop {
|
76
|
-
@include monitor-icon;
|
62
|
+
.emulation_mode_button-track,
|
63
|
+
.emulation_mode_button-thumb {
|
64
|
+
background-color: #000;
|
65
|
+
}
|
77
66
|
}
|
78
67
|
}
|
@@ -158,10 +158,10 @@
|
|
158
158
|
}
|
159
159
|
|
160
160
|
.editor .help_button {
|
161
|
-
@include background-icon-right($color: #a0c4e0, $font-size: 16px, $right: 5px, $top:
|
161
|
+
@include background-icon-right($color: #a0c4e0, $font-size: 16px, $right: 5px, $top: 7px);
|
162
162
|
@include help-circled-icon;
|
163
163
|
|
164
|
-
padding:
|
164
|
+
padding: 7px 30px 0 5px;
|
165
165
|
float: right;
|
166
166
|
height: 20px;
|
167
167
|
cursor: pointer;
|
@@ -1,10 +1,9 @@
|
|
1
1
|
.tooltip {
|
2
|
-
$background-color: rgba(0, 0, 0, 0.
|
2
|
+
$background-color: rgba(0, 0, 0, 0.9);
|
3
3
|
|
4
4
|
position: absolute;
|
5
5
|
z-index: 10001;
|
6
6
|
top: 40px;
|
7
|
-
left: 400px;
|
8
7
|
max-width: 70%;
|
9
8
|
padding: 10px 15px;
|
10
9
|
color: #fff;
|
@@ -46,6 +45,21 @@
|
|
46
45
|
}
|
47
46
|
}
|
48
47
|
|
48
|
+
&.align_top_center {
|
49
|
+
transform: translate(-50%, -100%);
|
50
|
+
|
51
|
+
&:after {
|
52
|
+
border-top: solid 10px $background-color;
|
53
|
+
border-right: solid 10px transparent;
|
54
|
+
border-bottom: solid 10px transparent;
|
55
|
+
border-left: solid 10px transparent;
|
56
|
+
|
57
|
+
top: 100%;
|
58
|
+
left: 50%;
|
59
|
+
transform: translateX(-50%);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
49
63
|
&.align_bottom_right {
|
50
64
|
@include transform(translateX(-100%));
|
51
65
|
|
@@ -54,4 +68,4 @@
|
|
54
68
|
left: auto;
|
55
69
|
}
|
56
70
|
}
|
57
|
-
}
|
71
|
+
}
|
@@ -18,6 +18,22 @@ module Pageflow
|
|
18
18
|
I18n.t(state, scope: 'activerecord.values.pageflow/entry.publication_states')
|
19
19
|
end
|
20
20
|
end
|
21
|
+
|
22
|
+
def entry_type_collection
|
23
|
+
entry_type_collection_for_config(Pageflow.config)
|
24
|
+
end
|
25
|
+
|
26
|
+
def entry_type_collection_for_account(target)
|
27
|
+
entry_type_collection_for_config(Pageflow.config_for(target))
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def entry_type_collection_for_config(config)
|
33
|
+
config.entry_types.map(&:name).index_by do |type|
|
34
|
+
I18n.t(type, scope: 'activerecord.values.pageflow/entry.type_names')
|
35
|
+
end
|
36
|
+
end
|
21
37
|
end
|
22
38
|
end
|
23
39
|
end
|