pageflow 15.2.2 → 15.6.1

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 (213) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -118
  3. data/README.md +2 -3
  4. data/admins/pageflow/accounts.rb +1 -98
  5. data/admins/pageflow/entry.rb +21 -1
  6. data/admins/pageflow/entry_templates.rb +140 -0
  7. data/admins/pageflow/membership.rb +12 -0
  8. data/admins/pageflow/user.rb +5 -5
  9. data/app/assets/javascripts/pageflow/admin/entries.js +65 -0
  10. data/app/assets/javascripts/pageflow/admin/users.js +1 -1
  11. data/app/assets/javascripts/pageflow/asset_urls.js.erb +1 -0
  12. data/app/assets/javascripts/pageflow/base.js +0 -12
  13. data/app/assets/javascripts/pageflow/components.js +2 -6
  14. data/app/assets/javascripts/pageflow/dist/ui.js +178 -55
  15. data/app/assets/javascripts/pageflow/editor/vendor.js +1 -0
  16. data/app/assets/javascripts/pageflow/vendor.js +12 -10
  17. data/app/assets/stylesheets/pageflow/base.scss +0 -7
  18. data/app/assets/stylesheets/pageflow/editor/base.scss +5 -2
  19. data/app/assets/stylesheets/pageflow/editor/composables.scss +5 -1
  20. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +1 -1
  21. data/app/assets/stylesheets/pageflow/editor/emulation_mode_button.scss +44 -55
  22. data/app/assets/stylesheets/pageflow/editor/help.scss +2 -2
  23. data/app/assets/stylesheets/pageflow/editor/select_button.scss +1 -1
  24. data/app/assets/stylesheets/pageflow/editor/sidebar_footer.scss +1 -1
  25. data/app/assets/stylesheets/pageflow/entries.scss +1 -1
  26. data/app/assets/stylesheets/pageflow/loading_spinner.scss +4 -1
  27. data/app/assets/stylesheets/pageflow/navigation_mobile.scss +4 -4
  28. data/app/assets/stylesheets/pageflow/themes/default/anchors.scss +1 -1
  29. data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +1 -1
  30. data/app/assets/stylesheets/pageflow/themes/default/page.scss +7 -0
  31. data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +1 -1
  32. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/control_bar.scss +1 -1
  33. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +1 -1
  34. data/app/assets/stylesheets/pageflow/themes/default/player_controls/shared/menu_bar.scss +2 -2
  35. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/control_bar.scss +2 -2
  36. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +1 -1
  37. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/quality_menu.scss +2 -2
  38. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/wave.scss +1 -1
  39. data/app/assets/stylesheets/pageflow/ui/forms.scss +9 -2
  40. data/app/assets/stylesheets/pageflow/ui/input/extended_select_input.scss +2 -2
  41. data/app/assets/stylesheets/pageflow/ui/tooltip.scss +17 -3
  42. data/app/helpers/pageflow/admin/entries_helper.rb +16 -0
  43. data/app/helpers/pageflow/structured_data_helper.rb +0 -2
  44. data/app/models/pageflow/account.rb +21 -1
  45. data/app/models/pageflow/account_role_query.rb +1 -1
  46. data/app/models/pageflow/chapter.rb +3 -9
  47. data/app/models/pageflow/entry.rb +9 -2
  48. data/app/models/pageflow/entry_duplicate.rb +1 -0
  49. data/app/models/pageflow/entry_template.rb +16 -2
  50. data/app/models/pageflow/managed_user_query.rb +1 -1
  51. data/app/models/pageflow/page.rb +1 -4
  52. data/app/models/pageflow/revision.rb +0 -4
  53. data/app/models/pageflow/storyline.rb +2 -9
  54. data/app/policies/pageflow/account_policy.rb +10 -0
  55. data/app/policies/pageflow/entry_template_policy.rb +5 -1
  56. data/app/policies/pageflow/folder_policy.rb +2 -2
  57. data/app/policies/pageflow/membership_policy.rb +2 -2
  58. data/app/policies/pageflow/theming_policy.rb +2 -2
  59. data/app/policies/pageflow/user_policy.rb +1 -1
  60. data/app/views/admin/accounts/_entry_template_details.html.arb +7 -5
  61. data/app/views/admin/accounts/_form.html.erb +3 -49
  62. data/app/views/admin/entries/_attributes_table.html.arb +5 -0
  63. data/app/views/admin/entries/_not_allowed_to_see_entry_types.json.jbuilder +2 -0
  64. data/app/views/admin/entries/entry_types.json.jbuilder +4 -0
  65. data/app/views/admin/entry_templates/_form.html.erb +58 -0
  66. data/app/views/admin/users/_not_allowed_to_see_user_quota.html.erb +3 -0
  67. data/app/views/components/pageflow/admin/entry_templates_tab.rb +48 -0
  68. data/app/views/pageflow/admin/initial_passwords/edit.html.erb +2 -1
  69. data/app/views/pageflow/admin/users/_quota_exhausted.html.erb +1 -1
  70. data/app/views/pageflow/themes/_theme.json.jbuilder +1 -1
  71. data/app/views/pageflow/video_files/_video_file.json.jbuilder +8 -1
  72. data/config/initializers/admin_resource_tabs.rb +5 -0
  73. data/config/initializers/help_entries.rb +1 -5
  74. data/config/initializers/revision_components.rb +5 -0
  75. data/config/locales/de.yml +88 -155
  76. data/config/locales/en.yml +79 -143
  77. data/db/migrate/20200515112500_add_constraints_to_entry_templates.rb +21 -0
  78. data/db/migrate/20200807135200_rename_pageflow_entry_template_entry_type_to_entry_type_name.rb +7 -0
  79. data/entry_types/paged/app/assets/javascripts/pageflow_paged/components.js +7 -0
  80. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +1528 -1349
  81. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +9258 -0
  82. data/{app/assets/javascripts/pageflow → entry_types/paged/app/assets/javascripts/pageflow_paged}/dist/react-client.js +1 -1
  83. data/{app/assets/javascripts/pageflow → entry_types/paged/app/assets/javascripts/pageflow_paged}/dist/react-server.js +3 -3
  84. data/entry_types/paged/app/assets/javascripts/pageflow_paged/frontend.js +6 -0
  85. data/entry_types/paged/app/assets/javascripts/pageflow_paged/server_rendering.js +9 -0
  86. data/entry_types/paged/app/assets/javascripts/pageflow_paged/vendor.js +9 -0
  87. data/entry_types/paged/app/assets/javascripts/pageflow_paged/videojs.js +6 -0
  88. data/entry_types/paged/app/controllers/pageflow_paged/application_controller.rb +2 -2
  89. data/{app/helpers/pageflow → entry_types/paged/app/helpers/pageflow_paged}/page_background_asset_helper.rb +4 -3
  90. data/{app/helpers/pageflow → entry_types/paged/app/helpers/pageflow_paged}/react_server_side_rendering_helper.rb +23 -2
  91. data/entry_types/paged/app/views/layouts/pageflow_paged/_loading_spinner_inline_script.html.erb +1 -0
  92. data/entry_types/paged/app/views/layouts/pageflow_paged/application.html.erb +3 -3
  93. data/entry_types/paged/app/views/pageflow_paged/editor/entries/_head.html.erb +4 -2
  94. data/entry_types/paged/app/views/pageflow_paged/entries/_entry.html.erb +1 -1
  95. data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/page_background_asset/_element.html.erb +0 -0
  96. data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/react/_widget.html.erb +0 -0
  97. data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/react/page.html.erb +0 -0
  98. data/entry_types/paged/config/initializers/features.rb +1 -1
  99. data/entry_types/paged/config/initializers/help_entries.rb +17 -0
  100. data/entry_types/paged/config/locales/new/help.de.yml +162 -0
  101. data/entry_types/paged/config/locales/new/help.en.yml +153 -0
  102. data/entry_types/paged/lib/pageflow_paged/engine.rb +13 -0
  103. data/entry_types/paged/lib/pageflow_paged/plugin.rb +5 -1
  104. data/entry_types/paged/lib/pageflow_paged/react.rb +12 -0
  105. data/{lib/pageflow → entry_types/paged/lib/pageflow_paged}/react/page_type.rb +2 -2
  106. data/{lib/pageflow → entry_types/paged/lib/pageflow_paged}/react/widget_type.rb +2 -2
  107. data/entry_types/paged/lib/tasks/pageflow_paged_tasks.rake +7 -0
  108. data/entry_types/paged/vendor/assets/javascripts/development/pageflow_paged/vendor/react-server.js +20613 -0
  109. data/entry_types/paged/vendor/assets/javascripts/development/pageflow_paged/vendor/react.js +21495 -0
  110. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/dash.all.min.js +0 -0
  111. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs-dash.js +0 -0
  112. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs.js +0 -0
  113. data/entry_types/paged/vendor/assets/javascripts/production/pageflow_paged/vendor/react-server.js +24 -0
  114. data/entry_types/paged/vendor/assets/javascripts/production/pageflow_paged/vendor/react.js +24 -0
  115. data/entry_types/scrolled/app/assets/javascripts/pageflow_scrolled/legacy.js +0 -0
  116. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
  117. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +14 -4
  118. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +2 -2
  119. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +10 -0
  120. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +7 -0
  121. data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +2 -0
  122. data/entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb +21 -0
  123. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +40 -0
  124. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +36 -0
  125. data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +3 -9
  126. data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +37 -2
  127. data/entry_types/scrolled/app/models/pageflow_scrolled/section.rb +3 -9
  128. data/entry_types/scrolled/app/models/pageflow_scrolled/storyline.rb +1 -9
  129. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/content_elements/batch.json.jbuilder +2 -0
  130. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -7
  131. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/_global_notices.html.erb +10 -0
  132. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +28 -11
  133. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +3 -0
  134. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +8 -0
  135. data/entry_types/scrolled/app/views/pageflow_scrolled/favicons/_entry.html.erb +10 -0
  136. data/entry_types/scrolled/config/initializers/help_entries.rb +16 -0
  137. data/entry_types/scrolled/config/locales/de.yml +669 -0
  138. data/entry_types/scrolled/config/locales/en.yml +488 -0
  139. data/entry_types/scrolled/config/routes.rb +1 -0
  140. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +76 -6
  141. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-192x192.png +0 -0
  142. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-512x512.png +0 -0
  143. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/apple-touch-icon.png +0 -0
  144. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/browserconfig.xml +9 -0
  145. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-16x16.png +0 -0
  146. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-32x32.png +0 -0
  147. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon.ico +0 -0
  148. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/mstile-150x150.png +0 -0
  149. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/safari-pinned-tab.svg +46 -0
  150. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/site.webmanifest +19 -0
  151. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDesktop.svg +56 -0
  152. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoMobile.svg +22 -0
  153. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/unmute.mp3 +0 -0
  154. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +26 -0
  155. data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +6 -0
  156. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +3 -1
  157. data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +90 -30
  158. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/create_bundle_symlinks_for_yarn.rake +33 -0
  159. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +8 -0
  160. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +173 -0
  161. data/entry_types/scrolled/package/config/webpack.js +11 -0
  162. data/entry_types/scrolled/package/contentElements-editor.js +316 -185
  163. data/entry_types/scrolled/package/contentElements-frontend.css +1 -0
  164. data/entry_types/scrolled/package/contentElements-frontend.js +940 -304
  165. data/entry_types/scrolled/package/editor.js +2930 -371
  166. data/entry_types/scrolled/package/frontend-server.js +228 -0
  167. data/entry_types/scrolled/package/frontend/EditableText-7093fd0e.js +1071 -0
  168. data/entry_types/scrolled/package/frontend/Viewer-e49e7807.js +387 -0
  169. data/entry_types/scrolled/package/frontend/Wavesurfer-0adf5667.js +375 -0
  170. data/entry_types/scrolled/package/frontend/components-6a6793ca.js +2534 -0
  171. data/entry_types/scrolled/package/frontend/getPrototypeOf-63c7c8e8.js +86 -0
  172. data/entry_types/scrolled/package/frontend/i18n-4dc6c377.js +1092 -0
  173. data/entry_types/scrolled/package/frontend/index.css +9 -0
  174. data/entry_types/scrolled/package/frontend/index.js +5686 -0
  175. data/entry_types/scrolled/package/frontend/useBrowserFeature-91a4c29d.js +33 -0
  176. data/entry_types/scrolled/package/package.json +30 -9
  177. data/entry_types/scrolled/spec/fixtures/audio.m4a +0 -0
  178. data/entry_types/scrolled/spec/fixtures/video.mp4 +0 -0
  179. data/lib/generators/pageflow/initializer/templates/pageflow.rb +14 -9
  180. data/lib/pageflow/ability_mixin.rb +14 -2
  181. data/lib/pageflow/configuration.rb +6 -5
  182. data/lib/pageflow/entry_export_import/revision_serialization.rb +15 -13
  183. data/lib/pageflow/entry_export_import/revision_serialization/import.rb +18 -26
  184. data/lib/pageflow/entry_type_configuration.rb +2 -0
  185. data/lib/pageflow/global_config_api.rb +5 -4
  186. data/lib/pageflow/nested_revision_component.rb +49 -0
  187. data/lib/pageflow/react.rb +4 -2
  188. data/lib/pageflow/revision_component.rb +6 -2
  189. data/lib/pageflow/themes.rb +4 -0
  190. data/lib/pageflow/user_mixin.rb +2 -1
  191. data/lib/pageflow/version.rb +1 -1
  192. data/{packages/pageflow → package}/config/jest/index.js +8 -2
  193. data/{packages/pageflow → package}/config/jest/transformers/jst.js +0 -0
  194. data/{packages/pageflow → package}/config/jest/transformers/upwardBabel.js +0 -0
  195. data/{packages/pageflow → package}/config/webpack.js +7 -0
  196. data/{packages/pageflow → package}/editor.js +482 -1130
  197. data/package/frontend.js +2553 -0
  198. data/{packages/pageflow → package}/package.json +3 -0
  199. data/{packages/pageflow → package}/testHelpers.js +114 -13
  200. data/{packages/pageflow → package}/ui.js +178 -55
  201. data/spec/factories/accounts.rb +3 -1
  202. data/spec/factories/entry_templates.rb +1 -0
  203. data/spec/factories/published_entries.rb +6 -1
  204. data/spec/factories/test_revision_components.rb +4 -0
  205. metadata +95 -36
  206. data/app/assets/javascripts/pageflow/dist/frontend.js +0 -5800
  207. data/app/assets/javascripts/pageflow/videojs.js +0 -6
  208. data/config/initializers/entry_types.rb +0 -4
  209. data/entry_types/scrolled/config/locales/new/de.yml +0 -269
  210. data/entry_types/scrolled/config/locales/new/en.yml +0 -264
  211. data/entry_types/scrolled/lib/tasks/pageflow_scrolled_tasks.rake +0 -96
  212. data/entry_types/scrolled/package/frontend.js +0 -2879
  213. data/packages/pageflow/config/jest/transformers/cssModules.js +0 -1
@@ -24,6 +24,7 @@ module Pageflow
24
24
  has_many :revisions, class_name: 'Pageflow::Revision', foreign_key: :creator_id
25
25
 
26
26
  validates :first_name, :last_name, presence: true
27
+ validates_inclusion_of :locale, in: Pageflow.config.available_locales.map(&:to_s)
27
28
 
28
29
  scope :admins, -> { where(admin: true) }
29
30
  end
@@ -41,7 +42,7 @@ module Pageflow
41
42
  end
42
43
 
43
44
  def locale
44
- super.presence || I18n.default_locale
45
+ super.presence || I18n.default_locale.to_s
45
46
  end
46
47
 
47
48
  def update_with_password(attributes)
@@ -1,3 +1,3 @@
1
1
  module Pageflow
2
- VERSION = '15.2.2'.freeze
2
+ VERSION = '15.6.1'.freeze
3
3
  end
@@ -1,6 +1,12 @@
1
1
  const path = require('path');
2
2
 
3
3
  module.exports = {
4
+ globals: {
5
+ pageflow: {
6
+ config: {}
7
+ }
8
+ },
9
+
4
10
  moduleNameMapper: {
5
11
  '^jquery$': resolve('../../src/vendor/jquery'),
6
12
  '^jquery-ui$': resolve('../../src/vendor/jquery-ui'),
@@ -11,13 +17,13 @@ module.exports = {
11
17
  '^underscore$': resolve('../../src/vendor/underscore'),
12
18
  '^cocktail$': resolve('../../src/vendor/cocktail'),
13
19
  '^iscroll$': resolve('../../src/vendor/iscroll'),
14
- '^wysihtml5': resolve('../../spec/support/wysihtmlStub'),
20
+ '^wysihtml5': resolve('../../spec/support/wysihtmlStub')
15
21
  },
16
22
 
17
23
  transform: {
18
24
  '^.+\\.jst$': resolve('./transformers/jst'),
19
25
  '^.+\\.jsx?$': resolve('./transformers/upwardBabel'),
20
- '^.+\\.module.css$': resolve('./transformers/cssModules')
26
+ '^.+\\.module.css$': 'jest-css-modules-processor'
21
27
  }
22
28
  }
23
29
 
@@ -10,5 +10,12 @@ module.exports = {
10
10
  'backbone.marionette': 'Backbone.Marionette',
11
11
  'iscroll': 'IScroll',
12
12
  'wysihtml5': 'wysihtml5'
13
+ },
14
+ // Webpack's chunk loading code references `window` by default -
15
+ // which is not available in server side rendering context.
16
+ //
17
+ // https://github.com/webpack/webpack/blob/c9d4ff7b054fc581c96ce0e53432d44f9dd8ca72/lib/web/JsonpMainTemplatePlugin.js#L493
18
+ output: {
19
+ globalObject: 'this'
13
20
  }
14
21
  };
@@ -1,12 +1,12 @@
1
1
  import Backbone from 'backbone';
2
- import _$1 from 'underscore';
3
- import { Object as Object$1, ConfigurationEditorTabView, TextInputView, UrlDisplayView, TabsView, ConfigurationEditorView, CollectionView, CheckBoxInputView, tooltipContainer, SelectInputView, inputView, TextAreaInputView, CheckBoxGroupInputView, ExtendedSelectInputView, i18nUtils, TableView, TextTableCellView, PresenceTableCellView, SortableCollectionView, DeleteRowTableCellView, ColorInputView, SliderInputView, IconTableCellView } from 'pageflow/ui';
2
+ import _ from 'underscore';
3
+ import { Object as Object$1, ConfigurationEditorTabView, TextInputView, UrlDisplayView, TabsView, ConfigurationEditorView, CollectionView, tooltipContainer, SelectInputView, inputView, TextAreaInputView, CheckBoxGroupInputView, i18nUtils, TableView, TextTableCellView, PresenceTableCellView, SortableCollectionView, DeleteRowTableCellView, CheckBoxInputView, SliderInputView, IconTableCellView } from 'pageflow/ui';
4
4
  export * from 'pageflow/ui';
5
5
  import Cocktail from 'cocktail';
6
6
  import I18n$1 from 'i18n-js';
7
7
  import Marionette from 'backbone.marionette';
8
8
  import $ from 'jquery';
9
- import 'jquery-ui';
9
+ import { browser, features, Audio, events } from 'pageflow/frontend';
10
10
 
11
11
  (function () {
12
12
  var sync = Backbone.sync;
@@ -36,6 +36,40 @@ function _defineProperty(obj, key, value) {
36
36
  return obj;
37
37
  }
38
38
 
39
+ function ownKeys(object, enumerableOnly) {
40
+ var keys = Object.keys(object);
41
+
42
+ if (Object.getOwnPropertySymbols) {
43
+ var symbols = Object.getOwnPropertySymbols(object);
44
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
45
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
46
+ });
47
+ keys.push.apply(keys, symbols);
48
+ }
49
+
50
+ return keys;
51
+ }
52
+
53
+ function _objectSpread2(target) {
54
+ for (var i = 1; i < arguments.length; i++) {
55
+ var source = arguments[i] != null ? arguments[i] : {};
56
+
57
+ if (i % 2) {
58
+ ownKeys(Object(source), true).forEach(function (key) {
59
+ _defineProperty(target, key, source[key]);
60
+ });
61
+ } else if (Object.getOwnPropertyDescriptors) {
62
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
63
+ } else {
64
+ ownKeys(Object(source)).forEach(function (key) {
65
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
66
+ });
67
+ }
68
+ }
69
+
70
+ return target;
71
+ }
72
+
39
73
  var CommonPageConfigurationTabs = Object$1.extend({
40
74
  initialize: function initialize() {
41
75
  this.configureFns = {};
@@ -44,7 +78,7 @@ var CommonPageConfigurationTabs = Object$1.extend({
44
78
  this.configureFns[name] = configureFn;
45
79
  },
46
80
  apply: function apply(configurationEditorView) {
47
- _$1.each(this.configureFns, function (configureFn, name) {
81
+ _.each(this.configureFns, function (configureFn, name) {
48
82
  configurationEditorView.tab(name, function () {
49
83
  configureFn.call(prefixInputDecorator(name, this));
50
84
  });
@@ -138,13 +172,13 @@ var FailuresAPI = Object$1.extend(
138
172
  });
139
173
  },
140
174
  retry: function retry() {
141
- _$1.each(this.failures, function (failure, key) {
175
+ _.each(this.failures, function (failure, key) {
142
176
  this.remove(key);
143
177
  failure.retry();
144
178
  }, this);
145
179
  },
146
180
  isEmpty: function isEmpty() {
147
- return _$1.size(this.failures) === 0;
181
+ return _.size(this.failures) === 0;
148
182
  },
149
183
 
150
184
  /**
@@ -155,18 +189,18 @@ var FailuresAPI = Object$1.extend(
155
189
  */
156
190
  add: function add(failure) {
157
191
  this.failures[failure.key()] = failure;
158
- this.length = _$1.size(this.failures);
192
+ this.length = _.size(this.failures);
159
193
  },
160
194
  remove: function remove(key) {
161
195
  delete this.failures[key];
162
- this.length = _$1.size(this.failures);
196
+ this.length = _.size(this.failures);
163
197
  },
164
198
  count: function count() {
165
199
  return this.length;
166
200
  }
167
201
  });
168
202
 
169
- _$1.extend(FailuresAPI.prototype, Backbone.Events);
203
+ _.extend(FailuresAPI.prototype, Backbone.Events);
170
204
 
171
205
  var UploadError = Object$1.extend({
172
206
  setMessage: function setMessage(options) {
@@ -200,7 +234,7 @@ var UnmatchedUploadError = UploadError.extend({
200
234
  });
201
235
  var validFileTypeTranslationList = {
202
236
  validFileTypeTranslations: function validFileTypeTranslations(validFileTypes) {
203
- return _$1.map(validFileTypes, function (validFileType) {
237
+ return _.map(validFileTypes, function (validFileType) {
204
238
  return I18n$1.t('activerecord.models.' + validFileType.i18nKey + '.other');
205
239
  }).join(', ');
206
240
  }
@@ -272,11 +306,11 @@ var FileTypesCollection = Object$1.extend({
272
306
  }
273
307
  });
274
308
 
275
- _$1.each(['each', 'map', 'reduce', 'first', 'find', 'contains', 'filter'], function (method) {
309
+ _.each(['each', 'map', 'reduce', 'first', 'find', 'contains', 'filter'], function (method) {
276
310
  FileTypesCollection.prototype[method] = function () {
277
311
  var args = Array.prototype.slice.call(arguments);
278
312
  args.unshift(this._fileTypes);
279
- return _$1[method].apply(_$1, args);
313
+ return _[method].apply(_, args);
280
314
  };
281
315
  });
282
316
 
@@ -307,7 +341,7 @@ var EditFileView = Marionette.ItemView.extend({
307
341
  placeholder: entry.get('default_file_rights')
308
342
  });
309
343
 
310
- _$1(this.fileTypeInputs()).each(function (options) {
344
+ _(this.fileTypeInputs()).each(function (options) {
311
345
  tab.input(options.name, options.inputView, options.inputViewOptions);
312
346
  });
313
347
 
@@ -318,8 +352,8 @@ var EditFileView = Marionette.ItemView.extend({
318
352
  },
319
353
  fileTypeInputs: function fileTypeInputs() {
320
354
  var fileType = this.model.fileType();
321
- return _$1.chain(fileType.configurationEditorInputs).map(function (inputs) {
322
- if (_$1.isFunction(inputs)) {
355
+ return _.chain(fileType.configurationEditorInputs).map(function (inputs) {
356
+ if (_.isFunction(inputs)) {
323
357
  return inputs(this.model);
324
358
  } else {
325
359
  return inputs;
@@ -366,9 +400,9 @@ var FileSettingsDialogView = Marionette.ItemView.extend({
366
400
  defaultTab: this.options.tabName
367
401
  });
368
402
 
369
- _$1.each(this.model.fileType().settingsDialogTabs, function (options) {
370
- this.tabsView.tab(options.name, _$1.bind(function () {
371
- return this.subview(new options.view(_$1.extend({
403
+ _.each(this.model.fileType().settingsDialogTabs, function (options) {
404
+ this.tabsView.tab(options.name, _.bind(function () {
405
+ return this.subview(new options.view(_.extend({
372
406
  model: this.model
373
407
  }, options.viewOptions)));
374
408
  }, this));
@@ -504,7 +538,7 @@ var FileType = Object$1.extend({
504
538
  this.nestedFileTypes = fileTypesCollection;
505
539
  },
506
540
  getFilter: function getFilter(name) {
507
- var result = _$1(this.filters).find(function (filter) {
541
+ var result = _(this.filters).find(function (filter) {
508
542
  return filter.name === name;
509
543
  });
510
544
 
@@ -540,44 +574,44 @@ var FileTypes = Object$1.extend({
540
574
  setup: function setup(serverSideConfigs) {
541
575
  var clientSideConfigs = this.clientSideConfigs;
542
576
  this._setup = true;
543
- this.collection = new FileTypesCollection(_$1.map(serverSideConfigs, function (serverSideConfig) {
577
+ this.collection = new FileTypesCollection(_.map(serverSideConfigs, function (serverSideConfig) {
544
578
  var clientSideConfig = clientSideConfigs[serverSideConfig.collectionName];
545
579
 
546
580
  if (!clientSideConfig) {
547
581
  throw 'Missing client side config for file type "' + serverSideConfig.collectionName + '"';
548
582
  }
549
583
 
550
- _$1(this.clientSideConfigModifications[serverSideConfig.collectionName]).each(function (modification) {
584
+ _(this.clientSideConfigModifications[serverSideConfig.collectionName]).each(function (modification) {
551
585
  this.lintModification(modification, serverSideConfig.collectionName);
552
586
  this.applyModification(clientSideConfig, modification);
553
587
  }, this);
554
588
 
555
- return new FileType(_$1.extend({}, serverSideConfig, clientSideConfig));
589
+ return new FileType(_.extend({}, serverSideConfig, clientSideConfig));
556
590
  }, this));
557
591
  var those = this;
558
592
 
559
- _$1.map(serverSideConfigs, function (serverSideConfig) {
593
+ _.map(serverSideConfigs, function (serverSideConfig) {
560
594
  var fileType = those.findByCollectionName(serverSideConfig.collectionName);
561
- fileType.setNestedFileTypes(new FileTypesCollection(_$1.map(serverSideConfig.nestedFileTypes, function (nestedFileType) {
595
+ fileType.setNestedFileTypes(new FileTypesCollection(_.map(serverSideConfig.nestedFileTypes, function (nestedFileType) {
562
596
  return those.findByCollectionName(nestedFileType.collectionName);
563
597
  })));
564
598
  });
565
599
  },
566
600
  lintModification: function lintModification(modification, collectionName) {
567
- var unmodifyableProperties = _$1.difference(_$1.keys(modification), this.modifyableProperties);
601
+ var unmodifyableProperties = _.difference(_.keys(modification), this.modifyableProperties);
568
602
 
569
603
  if (unmodifyableProperties.length) {
570
604
  throw 'Only the following properties are allowed in FileTypes#modify: ' + this.modifyableProperties.join(', ') + '. Given in modification for ' + collectionName + ': ' + unmodifyableProperties.join(', ') + '.';
571
605
  }
572
606
  },
573
607
  applyModification: function applyModification(target, modification) {
574
- _$1(this.modifyableProperties).each(function (property) {
608
+ _(this.modifyableProperties).each(function (property) {
575
609
  target[property] = (target[property] || []).concat(modification[property] || []);
576
610
  });
577
611
  }
578
612
  });
579
613
 
580
- _$1.each(['each', 'map', 'reduce', 'first', 'find', 'findByUpload', 'findByCollectionName', 'contains', 'filter'], function (method) {
614
+ _.each(['each', 'map', 'reduce', 'first', 'find', 'findByUpload', 'findByCollectionName', 'contains', 'filter'], function (method) {
581
615
  FileTypes.prototype[method] = function () {
582
616
  if (!this._setup) {
583
617
  throw 'File types are not yet set up.';
@@ -661,14 +695,14 @@ var PageType = Object$1.extend({
661
695
  createConfigurationEditorView: function createConfigurationEditorView(options) {
662
696
  var constructor = this.configurationEditorView();
663
697
  options.pageType = this.seed;
664
- return new constructor(_$1.extend({
698
+ return new constructor(_.extend({
665
699
  tabTranslationKeyPrefixes: [this.seed.translation_key_prefix + '.page_configuration_tabs', 'pageflow.common_page_configuration_tabs'],
666
700
  attributeTranslationKeyPrefixes: [this.seed.translation_key_prefix + '.page_attributes', 'pageflow.common_page_attributes']
667
701
  }, options));
668
702
  },
669
703
  createPageLinkConfigurationEditorView: function createPageLinkConfigurationEditorView(options) {
670
704
  var constructor = this.options.pageLinkConfigurationEditorView || PageLinkConfigurationEditorView;
671
- return new constructor(_$1.extend({
705
+ return new constructor(_.extend({
672
706
  tabTranslationKeyPrefixes: [this.seed.translation_key_prefix + '.page_link_configuration_tabs', 'pageflow.common_page_link_configuration_tabs'],
673
707
  attributeTranslationKeyPrefixes: [this.seed.translation_key_prefix + '.page_link_attributes', 'pageflow.common_page_link_attributes']
674
708
  }, options));
@@ -692,7 +726,7 @@ var PageTypes = Object$1.extend({
692
726
  setup: function setup(serverSideConfigs) {
693
727
  var clientSideConfigs = this.clientSideConfigs;
694
728
  this._setup = true;
695
- this.pageTypes = _$1.map(serverSideConfigs, function (serverSideConfig) {
729
+ this.pageTypes = _.map(serverSideConfigs, function (serverSideConfig) {
696
730
  var clientSideConfig = clientSideConfigs[serverSideConfig.name] || {};
697
731
  return new PageType(serverSideConfig.name, clientSideConfig, serverSideConfig);
698
732
  });
@@ -713,7 +747,7 @@ var PageTypes = Object$1.extend({
713
747
  }
714
748
  });
715
749
 
716
- _$1.each(['each', 'map', 'reduce', 'first', 'find', 'pluck'], function (method) {
750
+ _.each(['each', 'map', 'reduce', 'first', 'find', 'pluck'], function (method) {
717
751
  PageTypes.prototype[method] = function () {
718
752
  if (!this._setup) {
719
753
  throw 'Page types are not yet set up.';
@@ -721,7 +755,7 @@ _$1.each(['each', 'map', 'reduce', 'first', 'find', 'pluck'], function (method)
721
755
 
722
756
  var args = Array.prototype.slice.call(arguments);
723
757
  args.unshift(this.pageTypes);
724
- return _$1[method].apply(_$1, args);
758
+ return _[method].apply(_, args);
725
759
  };
726
760
  });
727
761
 
@@ -733,18 +767,18 @@ var MultiCollection = function MultiCollection() {
733
767
  this.length = 0;
734
768
  };
735
769
 
736
- _$1.extend(MultiCollection.prototype, {
770
+ _.extend(MultiCollection.prototype, {
737
771
  add: function add(record) {
738
772
  if (!this.records[record.cid]) {
739
773
  this.records[record.cid] = record;
740
- this.length = _$1.keys(this.records).length;
774
+ this.length = _.keys(this.records).length;
741
775
  this.trigger('add', record);
742
776
  }
743
777
  },
744
778
  remove: function remove(record) {
745
779
  if (this.records[record.cid]) {
746
780
  delete this.records[record.cid];
747
- this.length = _$1.keys(this.records).length;
781
+ this.length = _.keys(this.records).length;
748
782
  this.trigger('remove', record);
749
783
  }
750
784
  },
@@ -753,7 +787,7 @@ _$1.extend(MultiCollection.prototype, {
753
787
  }
754
788
  });
755
789
 
756
- _$1.extend(MultiCollection.prototype, Backbone.Events);
790
+ _.extend(MultiCollection.prototype, Backbone.Events);
757
791
 
758
792
  MultiCollection.extend = Backbone.Collection.extend;
759
793
 
@@ -793,7 +827,7 @@ var WidgetType = Object$1.extend({
793
827
  },
794
828
  createConfigurationEditorView: function createConfigurationEditorView(options) {
795
829
  var constructor = this.configurationEditorView;
796
- return new constructor(_$1.extend({
830
+ return new constructor(_.extend({
797
831
  attributeTranslationKeyPrefixes: ['pageflow.editor.widgets.attributes.' + this.name, 'pageflow.editor.widgets.common_attributes']
798
832
  }, options));
799
833
  }
@@ -815,10 +849,10 @@ var WidgetTypes = Object$1.extend({
815
849
  this._setup = true;
816
850
  this._widgetTypesByName = {};
817
851
 
818
- var roles = _$1.keys(serverSideConfigsByRole);
852
+ var roles = _.keys(serverSideConfigsByRole);
819
853
 
820
- this._widgetTypesByRole = roles.reduce(_$1.bind(function (result, role) {
821
- result[role] = serverSideConfigsByRole[role].map(_$1.bind(function (serverSideConfig) {
854
+ this._widgetTypesByRole = roles.reduce(_.bind(function (result, role) {
855
+ result[role] = serverSideConfigsByRole[role].map(_.bind(function (serverSideConfig) {
822
856
  var clientSideConfig = this._clientSideConfigs[serverSideConfig.name] || {};
823
857
  var widgetType = new WidgetType(serverSideConfig, clientSideConfig);
824
858
  this._widgetTypesByName[serverSideConfig.name] = widgetType;
@@ -845,9 +879,6 @@ var WidgetTypes = Object$1.extend({
845
879
  }
846
880
  });
847
881
 
848
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
849
-
850
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
851
882
  /**
852
883
  * Interface for engines providing editor extensions.
853
884
  * @alias editor
@@ -923,9 +954,13 @@ var EditorApi = Object$1.extend(
923
954
  * Backbone view that will render the live preview of the entry.
924
955
  * @param {function} options.EntryOutlineView
925
956
  * Backbone view that will be rendered in the side bar.
957
+ * @param {function} options.isBrowserSupported
958
+ * Checks to see if the browser is supported.
959
+ * @param {function} options.browserNotSupportedView
960
+ * Backbone view that will be rendered if the browser is not supported.
926
961
  */
927
962
  registerEntryType: function registerEntryType(name, options) {
928
- this.entryType = _objectSpread({
963
+ this.entryType = _objectSpread2({
929
964
  name: name
930
965
  }, options);
931
966
  },
@@ -1109,7 +1144,7 @@ var EditorApi = Object$1.extend(
1109
1144
  * whether the page is a valid selection
1110
1145
  */
1111
1146
  selectPage: function selectPage(options) {
1112
- return this.pageSelectionView.selectPage(_objectSpread({}, options, {
1147
+ return this.pageSelectionView.selectPage(_objectSpread2(_objectSpread2({}, options), {}, {
1113
1148
  entry: state.entry
1114
1149
  }));
1115
1150
  },
@@ -1119,20 +1154,34 @@ var EditorApi = Object$1.extend(
1119
1154
  }
1120
1155
 
1121
1156
  var payloadJson = JSON.parse(decodeURIComponent(encodedPayload));
1122
- return new this.fileSelectionHandlers[handlerName](_objectSpread({}, payloadJson, {
1157
+ return new this.fileSelectionHandlers[handlerName](_objectSpread2(_objectSpread2({}, payloadJson), {}, {
1123
1158
  entry: state.entry
1124
1159
  }));
1125
1160
  },
1126
1161
  createPageConfigurationEditorView: function createPageConfigurationEditorView(page, options) {
1127
- var view = this.pageTypes.findByPage(page).createConfigurationEditorView(_$1.extend(options, {
1162
+ var view = this.pageTypes.findByPage(page).createConfigurationEditorView(_.extend(options, {
1128
1163
  model: page.configuration
1129
1164
  }));
1130
1165
  this.commonPageConfigurationTabs.apply(view);
1131
1166
  return view;
1167
+ },
1168
+ ensureBrowserSupport: function ensureBrowserSupport(start) {
1169
+ if (this.entryType.isBrowserSupported) {
1170
+ var isBrowserSupported = this.entryType.isBrowserSupported();
1171
+
1172
+ if (isBrowserSupported) {
1173
+ start();
1174
+ } else {
1175
+ var browserNotSupportedView = new this.entryType.browserNotSupportedView();
1176
+ app.mainRegion.show(browserNotSupportedView);
1177
+ }
1178
+ } else {
1179
+ start();
1180
+ }
1132
1181
  }
1133
1182
  });
1134
1183
 
1135
- var editor$1 = new EditorApi();
1184
+ var editor = new EditorApi();
1136
1185
  var startEditor = function startEditor(options) {
1137
1186
  // In Webpack builds, I18n object from the i18n-js module is not
1138
1187
  // identical to window.I18n which is provided by the i18n-js gem via
@@ -1142,10 +1191,12 @@ var startEditor = function startEditor(options) {
1142
1191
  I18n$1.locale = window.I18n.locale;
1143
1192
  I18n$1.translations = window.I18n.translations;
1144
1193
  $(function () {
1145
- $.when($.getJSON('/editor/entries/' + options.entryId + '/seed'), pageflow.browser.detectFeatures()).done(function (result) {
1146
- app.start(result[0]);
1147
- }).fail(function () {
1148
- alert('Error while starting editor.');
1194
+ editor.ensureBrowserSupport(function () {
1195
+ Promise.all([$.getJSON('/editor/entries/' + options.entryId + '/seed'), browser.detectFeatures()]).then(function (result) {
1196
+ return app.start(result[0]);
1197
+ }, function () {
1198
+ return alert('Error while starting editor.');
1199
+ });
1149
1200
  });
1150
1201
  });
1151
1202
  };
@@ -1220,7 +1271,7 @@ var entryTypeEditorControllerUrls = {
1220
1271
  };
1221
1272
 
1222
1273
  function entryTypeEditorControllerUrl(resources) {
1223
- return [state.entry.url(), editor$1.entryType.name, resources].join('/');
1274
+ return [state.entry.url(), editor.entryType.name, resources].join('/');
1224
1275
  }
1225
1276
 
1226
1277
  var formDataUtils = {
@@ -1231,7 +1282,7 @@ var formDataUtils = {
1231
1282
  },
1232
1283
  fromObject: function fromObject(object) {
1233
1284
  var queryString = $.param(object).replace(/\+/g, '%20');
1234
- return _$1(queryString.split('&')).reduce(function (result, param) {
1285
+ return _(queryString.split('&')).reduce(function (result, param) {
1235
1286
  var pair = param.split('=');
1236
1287
  result[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
1237
1288
  return result;
@@ -1330,7 +1381,7 @@ var SubsetCollection = Backbone.Collection.extend({
1330
1381
  this.reset();
1331
1382
  },
1332
1383
  url: function url() {
1333
- return this.parentModel.url() + (_$1.result(this.parent, 'urlSuffix') || _$1.result(this.parent, 'url'));
1384
+ return this.parentModel.url() + (_.result(this.parent, 'urlSuffix') || _.result(this.parent, 'url'));
1334
1385
  },
1335
1386
  dispose: function dispose() {
1336
1387
  this.stopListening();
@@ -1353,7 +1404,7 @@ var FilesCollection = Backbone.Collection.extend({
1353
1404
  return '/editor/entries/' + this.getEntry().get('id') + '/files/' + this.name;
1354
1405
  },
1355
1406
  fetch: function fetch(options) {
1356
- options = _$1.extend({
1407
+ options = _.extend({
1357
1408
  fileType: this.fileType
1358
1409
  }, options || {});
1359
1410
  return Backbone.Collection.prototype.fetch.call(this, options);
@@ -1410,7 +1461,7 @@ FilesCollection.createForFileTypes = function (fileTypes, files, options) {
1410
1461
  };
1411
1462
 
1412
1463
  FilesCollection.createForFileType = function (fileType, files, options) {
1413
- return new FilesCollection(files, _$1.extend({
1464
+ return new FilesCollection(files, _.extend({
1414
1465
  fileType: fileType,
1415
1466
  model: fileType.model
1416
1467
  }, options || {}));
@@ -1458,7 +1509,7 @@ var transientReferences = {
1458
1509
  },
1459
1510
  getReference: function getReference(attribute, collection) {
1460
1511
  if (typeof collection === 'string') {
1461
- var fileType = editor$1.fileTypes.findByCollectionName(collection);
1512
+ var fileType = editor.fileTypes.findByCollectionName(collection);
1462
1513
  collection = state.entry.getFileCollection(fileType);
1463
1514
  }
1464
1515
 
@@ -1498,16 +1549,16 @@ var transientReferences = {
1498
1549
  // Backbone collections update their modelsById map in the change
1499
1550
  // event which is dispatched after the `change:<attribute>`
1500
1551
  // events.
1501
- record.once('change', _$1.bind(callback, this));
1552
+ record.once('change', _.bind(callback, this));
1502
1553
  },
1503
1554
  _listenForReady: function _listenForReady(attribute, record) {
1504
1555
  if (!record.isReady()) {
1505
1556
  this.pendingReferences[attribute] = record;
1506
- this.listenTo(record, 'change:state', function () {
1557
+ this.listenTo(record, 'change:state', function (model, value, options) {
1507
1558
  if (record.isReady()) {
1508
1559
  this._cleanUpReadyListener(attribute);
1509
1560
 
1510
- this.trigger('change');
1561
+ this.trigger('change', this, options);
1511
1562
  this.trigger('change:' + attribute + ':ready');
1512
1563
  }
1513
1564
  });
@@ -1627,8 +1678,8 @@ var Configuration = Backbone.Model.extend({
1627
1678
  return sources;
1628
1679
  }
1629
1680
 
1630
- return _$1.map(sources, function (source) {
1631
- var clone = _$1.clone(source);
1681
+ return _.map(sources, function (source) {
1682
+ var clone = _.clone(source);
1632
1683
 
1633
1684
  clone.src = clone.src + '?e=' + parent.id + '&t=' + new Date().getTime();
1634
1685
  return clone;
@@ -1779,7 +1830,7 @@ var Page = Backbone.Model.extend({
1779
1830
  },
1780
1831
  thumbnailFile: function thumbnailFile() {
1781
1832
  var configuration = this.configuration;
1782
- return _$1.reduce(this.pageType().thumbnailCandidates(), function (result, candidate) {
1833
+ return _.reduce(this.pageType().thumbnailCandidates(), function (result, candidate) {
1783
1834
  if (candidate.condition && !conditionMet(candidate.condition, configuration)) {
1784
1835
  return result;
1785
1836
  }
@@ -1791,10 +1842,10 @@ var Page = Backbone.Model.extend({
1791
1842
  return this.pageType().pageLinks(this.configuration);
1792
1843
  },
1793
1844
  pageType: function pageType() {
1794
- return editor$1.pageTypes.findByName(this.get('template'));
1845
+ return editor.pageTypes.findByName(this.get('template'));
1795
1846
  },
1796
1847
  toJSON: function toJSON() {
1797
- return _$1.extend(_$1.clone(this.attributes), {
1848
+ return _.extend(_.clone(this.attributes), {
1798
1849
  configuration: this.configuration.toJSON()
1799
1850
  });
1800
1851
  },
@@ -1848,7 +1899,7 @@ var StorylineScaffold = Scaffold.extend({
1848
1899
  this.page = this.chapter.buildPage();
1849
1900
  }
1850
1901
 
1851
- editor$1.trigger('scaffold:storyline', this.storyline);
1902
+ editor.trigger('scaffold:storyline', this.storyline);
1852
1903
  return this.storyline;
1853
1904
  },
1854
1905
  load: function load(response) {
@@ -1886,7 +1937,7 @@ FileReuse.submit = function (otherEntry, file, options) {
1886
1937
  var FileConfiguration = Configuration.extend({
1887
1938
  defaults: {},
1888
1939
  applyUpdaters: function applyUpdaters(updaters, newAttributes) {
1889
- _$1(updaters).each(function (updater) {
1940
+ _(updaters).each(function (updater) {
1890
1941
  updater(this, newAttributes);
1891
1942
  }, this);
1892
1943
  }
@@ -1920,7 +1971,7 @@ var NestedFilesCollection = SubsetCollection.extend({
1920
1971
 
1921
1972
  var retryable = {
1922
1973
  retry: function retry(options) {
1923
- options = options ? _$1.clone(options) : {};
1974
+ options = options ? _.clone(options) : {};
1924
1975
  if (options.parse === void 0) options.parse = true;
1925
1976
  var model = this;
1926
1977
 
@@ -1994,8 +2045,8 @@ var FileStage = Backbone.Model.extend({
1994
2045
  var stageProvider = {
1995
2046
  initialize: function initialize() {
1996
2047
  var finishedStates = [this.readyState];
1997
- var stages = _$1.result(this, 'stages') || [];
1998
- this.stages = new Backbone.Collection(_$1.chain(stages).slice().reverse().map(function (options) {
2048
+ var stages = _.result(this, 'stages') || [];
2049
+ this.stages = new Backbone.Collection(_.chain(stages).slice().reverse().map(function (options) {
1999
2050
  var name = options.name;
2000
2051
  options.file = this;
2001
2052
  options.finishedStates = finishedStates;
@@ -2030,7 +2081,7 @@ var ReusableFile = Backbone.Model.extend({
2030
2081
  this.listenTo(this.configuration, 'change', function () {
2031
2082
  this.trigger('change:configuration', this);
2032
2083
 
2033
- _$1.chain(this.configuration.changed).keys().each(function (name) {
2084
+ _.chain(this.configuration.changed).keys().each(function (name) {
2034
2085
  this.trigger('change:configuration:' + name, this, this.configuration.get(name));
2035
2086
  }, this);
2036
2087
 
@@ -2099,7 +2150,7 @@ var ReusableFile = Backbone.Model.extend({
2099
2150
  return false;
2100
2151
  },
2101
2152
  toJSON: function toJSON() {
2102
- return _$1.extend(_$1.pick(this.attributes, 'file_name', 'rights', 'parent_file_id', 'parent_file_model_type', 'content_type', 'file_size'), {
2153
+ return _.extend(_.pick(this.attributes, 'file_name', 'rights', 'parent_file_id', 'parent_file_model_type', 'content_type', 'file_size'), {
2103
2154
  configuration: this.configuration.toJSON()
2104
2155
  });
2105
2156
  },
@@ -2127,7 +2178,7 @@ var UploadableFile = ReusableFile.extend({
2127
2178
  name: 'uploading',
2128
2179
  activeStates: ['uploading'],
2129
2180
  failedStates: ['uploading_failed']
2130
- }].concat(_$1.result(this, 'processingStages'));
2181
+ }].concat(_.result(this, 'processingStages'));
2131
2182
  },
2132
2183
  processingStages: [],
2133
2184
  readyState: 'uploaded'
@@ -2182,7 +2233,7 @@ var WidgetConfigurationFileSelectionHandler = function WidgetConfigurationFileSe
2182
2233
  return '/widgets/' + widget.id;
2183
2234
  };
2184
2235
  };
2185
- editor$1.registerFileSelectionHandler('widgetConfiguration', WidgetConfigurationFileSelectionHandler);
2236
+ editor.registerFileSelectionHandler('widgetConfiguration', WidgetConfigurationFileSelectionHandler);
2186
2237
 
2187
2238
  var EncodingConfirmation = Backbone.Model.extend({
2188
2239
  paramRoot: 'encoding_confirmation',
@@ -2302,11 +2353,15 @@ var EntryMetadata = Configuration.extend({
2302
2353
  defaults: {},
2303
2354
  initialize: function initialize(attributes, options) {
2304
2355
  Configuration.prototype.initialize.apply(this, attributes, options);
2305
- this.configuration = new EntryMetadataConfiguration(_$1.clone(attributes.configuration) || {});
2356
+ this.configuration = new EntryMetadataConfiguration(_.clone(attributes.configuration) || {});
2306
2357
  this.listenTo(this.configuration, 'change', function () {
2307
2358
  this.trigger('change');
2308
2359
  this.parent.save();
2309
2360
  });
2361
+ },
2362
+ // Pageflow Scrolled only synchronizes saved records to entry state.
2363
+ isNew: function isNew() {
2364
+ return false;
2310
2365
  }
2311
2366
  });
2312
2367
 
@@ -2380,7 +2435,7 @@ var StorylineOrdering = function StorylineOrdering(storylines, pages) {
2380
2435
  };
2381
2436
 
2382
2437
  function visit(storylines, offset, level) {
2383
- return _$1(storylines).reduce(function (position, storyline, index) {
2438
+ return _(storylines).reduce(function (position, storyline, index) {
2384
2439
  storyline.set('position', position);
2385
2440
  storyline.set('level', level);
2386
2441
  return visit(children(storyline), position + 1, level + 1);
@@ -2396,7 +2451,7 @@ var StorylineOrdering = function StorylineOrdering(storylines, pages) {
2396
2451
  }
2397
2452
 
2398
2453
  function prepare() {
2399
- storylinesByParent = _$1(groupStorylinesByParentStoryline()).reduce(function (result, storylines, key) {
2454
+ storylinesByParent = _(groupStorylinesByParentStoryline()).reduce(function (result, storylines, key) {
2400
2455
  result[key] = storylines.sort(compareStorylines);
2401
2456
  return result;
2402
2457
  }, {});
@@ -2464,7 +2519,7 @@ var PageConfigurationFileSelectionHandler = function PageConfigurationFileSelect
2464
2519
  return '/pages/' + page.id + '/' + (options.returnToTab || 'files');
2465
2520
  };
2466
2521
  };
2467
- editor$1.registerFileSelectionHandler('pageConfiguration', PageConfigurationFileSelectionHandler);
2522
+ editor.registerFileSelectionHandler('pageConfiguration', PageConfigurationFileSelectionHandler);
2468
2523
 
2469
2524
  var ImageFile = ReusableFile.extend({
2470
2525
  stages: [{
@@ -2495,7 +2550,7 @@ var EntryMetadataFileSelectionHandler = function EntryMetadataFileSelectionHandl
2495
2550
  return '/meta_data/' + (options.returnToTab || 'general');
2496
2551
  };
2497
2552
  };
2498
- editor$1.registerFileSelectionHandler('entryMetadata', EntryMetadataFileSelectionHandler);
2553
+ editor.registerFileSelectionHandler('entryMetadata', EntryMetadataFileSelectionHandler);
2499
2554
 
2500
2555
  var EntryPublication = Backbone.Model.extend({
2501
2556
  paramRoot: 'entry_publication',
@@ -2542,121 +2597,6 @@ var ChapterScaffold = Scaffold.extend({
2542
2597
  }
2543
2598
  });
2544
2599
 
2545
- // https://github.com/jashkenas/backbone/issues/2601
2546
-
2547
- function BaseObject(options) {
2548
- this.initialize.apply(this, arguments);
2549
- }
2550
-
2551
- _$1.extend(BaseObject.prototype, Backbone.Events, {
2552
- initialize: function initialize(options) {}
2553
- }); // The self-propagating extend function that Backbone classes use.
2554
-
2555
-
2556
- BaseObject.extend = Backbone.Model.extend;
2557
-
2558
- var EntryData = BaseObject.extend({
2559
- getThemingOption: function getThemingOption(name) {
2560
- throw 'Not implemented';
2561
- },
2562
- getFile: function getFile(collectionName, id) {
2563
- throw 'Not implemented';
2564
- },
2565
- getPageConfiguration: function getPageConfiguration(permaId) {
2566
- throw 'Not implemented';
2567
- },
2568
- getPagePosition: function getPagePosition(permaId) {
2569
- throw 'Not implemented';
2570
- },
2571
- getChapterConfiguration: function getChapterConfiguration(id) {
2572
- throw 'Not implemented';
2573
- },
2574
- getStorylineConfiguration: function getStorylineConfiguration(id) {
2575
- throw 'Not implemented';
2576
- },
2577
- getChapterIdByPagePermaId: function getChapterIdByPagePermaId(permaId) {
2578
- throw 'Not implemented';
2579
- },
2580
- getStorylineIdByChapterId: function getStorylineIdByChapterId(permaId) {
2581
- throw 'Not implemented';
2582
- },
2583
- getChapterPagePermaIds: function getChapterPagePermaIds(id) {
2584
- throw 'Not implemented';
2585
- },
2586
- getParentPagePermaIdByPagePermaId: function getParentPagePermaIdByPagePermaId(permaId) {
2587
- var storylineId = this.getStorylineIdByPagePermaId(permaId);
2588
- return this.getParentPagePermaId(storylineId);
2589
- },
2590
- getStorylineIdByPagePermaId: function getStorylineIdByPagePermaId(permaId) {
2591
- var chapterId = this.getChapterIdByPagePermaId(permaId);
2592
- return this.getStorylineIdByChapterId(chapterId);
2593
- },
2594
- getParentStorylineId: function getParentStorylineId(storylineId) {
2595
- var parentPagePermaId = this.getParentPagePermaId(storylineId);
2596
- return parentPagePermaId && this.getStorylineIdByPagePermaId(parentPagePermaId);
2597
- },
2598
- getParentChapterId: function getParentChapterId(chapterId) {
2599
- var storylineId = this.getStorylineIdByChapterId(chapterId);
2600
- var pagePermaId = this.getParentPagePermaId(storylineId);
2601
- return pagePermaId && this.getChapterIdByPagePermaId(pagePermaId);
2602
- },
2603
- getParentPagePermaId: function getParentPagePermaId(storylineId) {
2604
- return this.getStorylineConfiguration(storylineId).parent_page_perma_id;
2605
- },
2606
- getStorylineLevel: function getStorylineLevel(storylineId) {
2607
- var parentStorylineId = this.getParentStorylineId(storylineId);
2608
-
2609
- if (parentStorylineId) {
2610
- return this.getStorylineLevel(parentStorylineId) + 1;
2611
- } else {
2612
- return 0;
2613
- }
2614
- }
2615
- });
2616
-
2617
- var PreviewEntryData = EntryData.extend({
2618
- initialize: function initialize(options) {
2619
- this.entry = options.entry;
2620
- this.storylines = options.storylines;
2621
- this.chapters = options.chapters;
2622
- this.pages = options.pages;
2623
- },
2624
- getThemingOption: function getThemingOption(name) {
2625
- return this.entry.getTheme().get(name);
2626
- },
2627
- getFile: function getFile(collectionName, permaId) {
2628
- var file = this.entry.getFileCollection(collectionName).getByPermaId(permaId);
2629
- return file && file.attributes;
2630
- },
2631
- getStorylineConfiguration: function getStorylineConfiguration(id) {
2632
- var storyline = this.storylines.get(id);
2633
- return storyline ? storyline.configuration.attributes : {};
2634
- },
2635
- getChapterConfiguration: function getChapterConfiguration(id) {
2636
- var chapter = this.chapters.get(id);
2637
- return chapter ? chapter.configuration.attributes : {};
2638
- },
2639
- getChapterPagePermaIds: function getChapterPagePermaIds(id) {
2640
- var chapter = this.chapters.get(id);
2641
- return chapter ? chapter.pages.pluck('perma_id') : [];
2642
- },
2643
- getStorylineIdByChapterId: function getStorylineIdByChapterId(id) {
2644
- var chapter = this.chapters.get(id);
2645
- return chapter && chapter.get('storyline_id');
2646
- },
2647
- getChapterIdByPagePermaId: function getChapterIdByPagePermaId(permaId) {
2648
- var page = this.pages.getByPermaId(permaId);
2649
- return page && page.get('chapter_id');
2650
- },
2651
- getPageConfiguration: function getPageConfiguration(permaId) {
2652
- var page = this.pages.getByPermaId(permaId);
2653
- return page ? page.configuration.attributes : {};
2654
- },
2655
- getPagePosition: function getPagePosition(permaId) {
2656
- return this.pages.indexOf(this.pages.getByPermaId(permaId));
2657
- }
2658
- });
2659
-
2660
2600
  var EditLockContainer = Backbone.Model.extend({
2661
2601
  initialize: function initialize() {
2662
2602
  this.storageKey = 'pageflow.edit_lock.' + state.entry.id;
@@ -2680,7 +2620,7 @@ var EditLockContainer = Backbone.Model.extend({
2680
2620
  },
2681
2621
  startPolling: function startPolling() {
2682
2622
  if (!this.pollingInteval) {
2683
- this.pollingInteval = setInterval(_$1.bind(function () {
2623
+ this.pollingInteval = setInterval(_.bind(function () {
2684
2624
  this.acquire({
2685
2625
  polling: true
2686
2626
  });
@@ -2824,7 +2764,7 @@ var FileUploader = Object$1.extend({
2824
2764
  },
2825
2765
  add: function add(upload, options) {
2826
2766
  options = options || {};
2827
- var editor = options.editor || editor$1;
2767
+ var editor$1 = options.editor || editor;
2828
2768
  var fileType = this.fileTypes.findByUpload(upload);
2829
2769
  var file = new fileType.model({
2830
2770
  state: 'uploadable',
@@ -2834,12 +2774,12 @@ var FileUploader = Object$1.extend({
2834
2774
  }, {
2835
2775
  fileType: fileType
2836
2776
  });
2837
- var setTargetFile = editor.nextUploadTargetFile;
2777
+ var setTargetFile = editor$1.nextUploadTargetFile;
2838
2778
 
2839
2779
  if (setTargetFile) {
2840
2780
  if (fileType.topLevelType || !setTargetFile.fileType().nestedFileTypes.contains(fileType)) {
2841
2781
  throw new InvalidNestedTypeError(upload, {
2842
- editor: editor,
2782
+ editor: editor$1,
2843
2783
  fileType: fileType
2844
2784
  });
2845
2785
  }
@@ -2876,12 +2816,12 @@ var FileUploader = Object$1.extend({
2876
2816
  });
2877
2817
  },
2878
2818
  submit: function submit() {
2879
- _$1(this.deferreds).invoke('resolve');
2819
+ _(this.deferreds).invoke('resolve');
2880
2820
 
2881
2821
  this.deferreds = [];
2882
2822
  },
2883
2823
  abort: function abort() {
2884
- _$1(this.deferreds).invoke('reject');
2824
+ _(this.deferreds).invoke('reject');
2885
2825
 
2886
2826
  this.deferreds = [];
2887
2827
  }
@@ -2919,7 +2859,7 @@ var orderedCollection = {
2919
2859
  parentModel.trigger('sync:order', parentModel, response, {});
2920
2860
  },
2921
2861
  error: function error(jqXHR, textStatus, errorThrown) {
2922
- editor$1.failures.add(new OrderingFailure(parentModel, collection));
2862
+ editor.failures.add(new OrderingFailure(parentModel, collection));
2923
2863
  }
2924
2864
  });
2925
2865
  }
@@ -2945,7 +2885,7 @@ var ChapterPagesCollection = SubsetCollection.extend({
2945
2885
  this.listenTo(this, 'add', function (model) {
2946
2886
  model.chapter = chapter;
2947
2887
  model.set('chapter_id', chapter.id);
2948
- editor$1.trigger('add:page', model);
2888
+ editor.trigger('add:page', model);
2949
2889
  });
2950
2890
  this.listenTo(this, 'remove', function (model) {
2951
2891
  model.chapter = null;
@@ -2992,10 +2932,10 @@ var Chapter = Backbone.Model.extend({
2992
2932
  chapter_id: this.id,
2993
2933
  position: this.pages.length
2994
2934
  };
2995
- return this.pages.addAndReturnModel(_$1.extend(defaults, attributes));
2935
+ return this.pages.addAndReturnModel(_.extend(defaults, attributes));
2996
2936
  },
2997
2937
  toJSON: function toJSON() {
2998
- return _$1.extend(_$1.clone(this.attributes), {
2938
+ return _.extend(_.clone(this.attributes), {
2999
2939
  configuration: this.configuration.toJSON()
3000
2940
  });
3001
2941
  },
@@ -3024,7 +2964,7 @@ var StorylineChaptersCollection = SubsetCollection.extend({
3024
2964
  this.listenTo(this, 'add', function (model) {
3025
2965
  model.storyline = storyline;
3026
2966
  model.set('storyline_id', storyline.id);
3027
- editor$1.trigger('add:chapter', model);
2967
+ editor.trigger('add:chapter', model);
3028
2968
  });
3029
2969
  this.listenTo(this, 'remove', function (model) {
3030
2970
  model.storyline = null;
@@ -3058,7 +2998,7 @@ var Storyline = Backbone.Model.extend({
3058
2998
  return this.isNew() ? this.collection.url() : '/storylines';
3059
2999
  },
3060
3000
  displayTitle: function displayTitle() {
3061
- return _$1([this.title() || !this.isMain() && I18n$1.t('pageflow.storylines.untitled'), this.isMain() && I18n$1.t('pageflow.storylines.main')]).compact().join(' - ');
3001
+ return _([this.title() || !this.isMain() && I18n$1.t('pageflow.storylines.untitled'), this.isMain() && I18n$1.t('pageflow.storylines.main')]).compact().join(' - ');
3062
3002
  },
3063
3003
  title: function title() {
3064
3004
  return this.configuration.get('title');
@@ -3092,7 +3032,7 @@ var Storyline = Backbone.Model.extend({
3092
3032
  title: '',
3093
3033
  position: this.chapters.length
3094
3034
  };
3095
- return this.chapters.addAndReturnModel(_$1.extend(defaults, attributes));
3035
+ return this.chapters.addAndReturnModel(_.extend(defaults, attributes));
3096
3036
  },
3097
3037
  scaffoldChapter: function scaffoldChapter(options) {
3098
3038
  var scaffold = new ChapterScaffold(this, options);
@@ -3125,7 +3065,7 @@ var PageLink = Backbone.Model.extend({
3125
3065
  return this.collection.page.id;
3126
3066
  },
3127
3067
  toSerializedJSON: function toSerializedJSON() {
3128
- return _$1.omit(this.attributes, 'highlighted', 'position');
3068
+ return _.omit(this.attributes, 'highlighted', 'position');
3129
3069
  },
3130
3070
  highlight: function highlight() {
3131
3071
  this.set('highlighted', true);
@@ -3150,7 +3090,7 @@ var PageLinkFileSelectionHandler = function PageLinkFileSelectionHandler(options
3150
3090
  return '/page_links/' + pageLink.id;
3151
3091
  };
3152
3092
  };
3153
- editor$1.registerFileSelectionHandler('pageLink', PageLinkFileSelectionHandler);
3093
+ editor.registerFileSelectionHandler('pageLink', PageLinkFileSelectionHandler);
3154
3094
 
3155
3095
  /**
3156
3096
  * Mixins for models with a nested configuration model.
@@ -3194,14 +3134,14 @@ function configurationContainer() {
3194
3134
  initialize: function initialize() {
3195
3135
  this.configuration = new configurationModel(this.get('configuration'));
3196
3136
  this.configuration.parent = this;
3197
- this.listenTo(this.configuration, 'change', function () {
3198
- if (!this.isNew() && (!this.isDestroying || !this.isDestroying()) && (!this.isDestroyed || !this.isDestroyed()) && autoSave) {
3137
+ this.listenTo(this.configuration, 'change', function (model, options) {
3138
+ if (!this.isNew() && (!this.isDestroying || !this.isDestroying()) && (!this.isDestroyed || !this.isDestroyed()) && autoSave && options.autoSave !== false) {
3199
3139
  this.save();
3200
3140
  }
3201
3141
 
3202
- this.trigger('change:configuration', this);
3142
+ this.trigger('change:configuration', this, undefined, options);
3203
3143
 
3204
- _$1.chain(this.configuration.changed).keys().each(function (name) {
3144
+ _.chain(this.configuration.changed).keys().each(function (name) {
3205
3145
  this.trigger('change:configuration:' + name, this, this.configuration.get(name));
3206
3146
  }, this);
3207
3147
  });
@@ -3210,12 +3150,12 @@ function configurationContainer() {
3210
3150
  var attributes = {};
3211
3151
 
3212
3152
  if (includeAttributesInJSON === true) {
3213
- attributes = _$1.clone(this.attributes);
3153
+ attributes = _.clone(this.attributes);
3214
3154
  } else if (includeAttributesInJSON) {
3215
- attributes = _$1.pick(this.attributes, includeAttributesInJSON);
3155
+ attributes = _.pick(this.attributes, includeAttributesInJSON);
3216
3156
  }
3217
3157
 
3218
- return _$1.extend(attributes, {
3158
+ return _.extend(attributes, {
3219
3159
  configuration: this.configuration.toJSON()
3220
3160
  });
3221
3161
  }
@@ -3265,7 +3205,7 @@ var filesCountWatcher = {
3265
3205
  },
3266
3206
  updateFilesCount: function updateFilesCount(trait, name, collection, filter) {
3267
3207
  this.set(trait + '_' + name + '_count', collection.filter(filter).length);
3268
- this.set(trait + '_files_count', _$1.reduce(this.watchedFileCollectionNames, function (sum, name) {
3208
+ this.set(trait + '_files_count', _.reduce(this.watchedFileCollectionNames, function (sum, name) {
3269
3209
  return sum + this.get(trait + '_' + name + '_count');
3270
3210
  }, 0, this));
3271
3211
  }
@@ -3283,7 +3223,7 @@ var polling = {
3283
3223
  },
3284
3224
  startPolling: function startPolling() {
3285
3225
  if (!this.pollingInterval) {
3286
- this.pollingInterval = setInterval(_$1.bind(function () {
3226
+ this.pollingInterval = setInterval(_.bind(function () {
3287
3227
  this.fetch();
3288
3228
  }, this), 1000);
3289
3229
  }
@@ -3318,7 +3258,7 @@ var Entry = Backbone.Model.extend({
3318
3258
  this.configuration = this.metadata;
3319
3259
  this.themes = options.themes || state.themes;
3320
3260
  this.files = options.files || state.files;
3321
- this.fileTypes = options.fileTypes || editor$1.fileTypes;
3261
+ this.fileTypes = options.fileTypes || editor.fileTypes;
3322
3262
  this.storylines = options.storylines || state.storylines;
3323
3263
  this.storylines.parentModel = this;
3324
3264
  this.chapters = options.chapters || state.chapters;
@@ -3352,6 +3292,9 @@ var Entry = Backbone.Model.extend({
3352
3292
  getTheme: function getTheme() {
3353
3293
  return this.themes.findByName(this.metadata.get('theme_name'));
3354
3294
  },
3295
+ supportsPhoneEmulation: function supportsPhoneEmulation() {
3296
+ return true;
3297
+ },
3355
3298
  addStoryline: function addStoryline(attributes) {
3356
3299
  var storyline = this.buildStoryline(attributes);
3357
3300
  storyline.save();
@@ -3361,7 +3304,7 @@ var Entry = Backbone.Model.extend({
3361
3304
  var defaults = {
3362
3305
  title: ''
3363
3306
  };
3364
- return this.storylines.addAndReturnModel(_$1.extend(defaults, attributes));
3307
+ return this.storylines.addAndReturnModel(_.extend(defaults, attributes));
3365
3308
  },
3366
3309
  scaffoldStoryline: function scaffoldStoryline(options) {
3367
3310
  var scaffold = new StorylineScaffold(this, options);
@@ -3369,12 +3312,12 @@ var Entry = Backbone.Model.extend({
3369
3312
  return scaffold;
3370
3313
  },
3371
3314
  addChapterInNewStoryline: function addChapterInNewStoryline(options) {
3372
- return this.scaffoldStoryline(_$1.extend({
3315
+ return this.scaffoldStoryline(_.extend({
3373
3316
  depth: 'chapter'
3374
3317
  }, options)).chapter;
3375
3318
  },
3376
3319
  addPageInNewStoryline: function addPageInNewStoryline(options) {
3377
- return this.scaffoldStoryline(_$1.extend({
3320
+ return this.scaffoldStoryline(_.extend({
3378
3321
  depth: 'page'
3379
3322
  }, options)).page;
3380
3323
  },
@@ -3403,7 +3346,7 @@ var Entry = Backbone.Model.extend({
3403
3346
  },
3404
3347
  parse: function parse(response, options) {
3405
3348
  if (response) {
3406
- this.set(_$1.pick(response, 'published', 'published_until', 'password_protected'));
3349
+ this.set(_.pick(response, 'published', 'published_until', 'password_protected'));
3407
3350
 
3408
3351
  this._setFiles(response, {
3409
3352
  add: false,
@@ -3421,12 +3364,12 @@ var Entry = Backbone.Model.extend({
3421
3364
  // the rights attribute.
3422
3365
 
3423
3366
  if (options.merge !== false) {
3424
- filesAttributes = _$1.map(filesAttributes, function (fileAttributes) {
3425
- return _$1.omit(fileAttributes, 'rights');
3367
+ filesAttributes = _.map(filesAttributes, function (fileAttributes) {
3368
+ return _.omit(fileAttributes, 'rights');
3426
3369
  });
3427
3370
  }
3428
3371
 
3429
- this.getFileCollection(fileType).set(filesAttributes, _$1.extend({
3372
+ this.getFileCollection(fileType).set(filesAttributes, _.extend({
3430
3373
  fileType: fileType
3431
3374
  }, options));
3432
3375
  delete response[fileType.collectionName];
@@ -3572,8 +3515,8 @@ var FileImport = Backbone.Model.extend({
3572
3515
 
3573
3516
  if (localFile) {
3574
3517
  state.files[collectionName].remove(localFile);
3575
- var fileType = editor$1.fileTypes.findByUpload(file);
3576
- var file = new fileType.model(file, {
3518
+ var fileType = editor.fileTypes.findByUpload(file);
3519
+ file = new fileType.model(file, {
3577
3520
  fileType: fileType
3578
3521
  });
3579
3522
  currentEntry.getFileCollection(fileType).add(file);
@@ -3617,6 +3560,7 @@ var ForeignKeySubsetCollection = SubsetCollection.extend({
3617
3560
  constructor: function constructor(options) {
3618
3561
  var parent = options.parent;
3619
3562
  var parentModel = options.parentModel;
3563
+ this.autoConsolidatePositions = options.autoConsolidatePositions;
3620
3564
  SubsetCollection.prototype.constructor.call(this, {
3621
3565
  parent: parent,
3622
3566
  parentModel: parentModel,
@@ -3634,7 +3578,8 @@ var ForeignKeySubsetCollection = SubsetCollection.extend({
3634
3578
 
3635
3579
  model.set(options.foreignKeyAttribute, parentModel.id);
3636
3580
  });
3637
- this.listenTo(parentModel, 'destroy', function () {
3581
+ this.listenTo(parentModel, 'destroy dependentDestroy', function () {
3582
+ this.invoke('trigger', 'dependentDestroy');
3638
3583
  this.clear();
3639
3584
  });
3640
3585
 
@@ -3690,7 +3635,7 @@ var PageLinksCollection = Backbone.Collection.extend({
3690
3635
  }));
3691
3636
  },
3692
3637
  defaultPosition: function defaultPosition() {
3693
- return Math.max(0, _$1.max(this.map(function (pageLink) {
3638
+ return Math.max(0, _.max(this.map(function (pageLink) {
3694
3639
  return pageLink.get('position');
3695
3640
  }))) + 1;
3696
3641
  },
@@ -3707,7 +3652,7 @@ var PageLinksCollection = Backbone.Collection.extend({
3707
3652
 
3708
3653
  /** @private */
3709
3654
  getUniqueId: function getUniqueId() {
3710
- var maxId = Math.max(0, _$1.max(this.map(function (pageLink) {
3655
+ var maxId = Math.max(0, _.max(this.map(function (pageLink) {
3711
3656
  return parseInt(pageLink.id.split(':').pop(), 10);
3712
3657
  })));
3713
3658
  return this.configuration.page.get('perma_id') + ':' + (maxId + 1);
@@ -3725,7 +3670,7 @@ var OtherEntriesCollection = Backbone.Collection.extend({
3725
3670
  // of the "other" entries, after all.
3726
3671
  parse: function parse(response) {
3727
3672
  var excludeEntry = this.getExcludeEntry(),
3728
- filteredResponse = _$1.filter(response, function (entry) {
3673
+ filteredResponse = _.filter(response, function (entry) {
3729
3674
  return entry.id != excludeEntry.id;
3730
3675
  });
3731
3676
 
@@ -3806,7 +3751,7 @@ var PagesCollection = Backbone.Collection.extend({
3806
3751
  }
3807
3752
  });
3808
3753
  this.listenTo(this, 'change:id', function (model) {
3809
- setTimeout(_$1.bind(function () {
3754
+ setTimeout(_.bind(function () {
3810
3755
  this._persisted.add(model);
3811
3756
  }, this), 0);
3812
3757
  });
@@ -3843,7 +3788,7 @@ var WidgetsCollection = Backbone.Collection.extend({
3843
3788
  },
3844
3789
  batchSave: function batchSave(options) {
3845
3790
  var subject = this.subject;
3846
- return Backbone.sync('patch', subject, _$1.extend(options || {}, {
3791
+ return Backbone.sync('patch', subject, _.extend(options || {}, {
3847
3792
  url: this.url() + '/batch',
3848
3793
  attrs: {
3849
3794
  widgets: this.map(function (widget) {
@@ -3870,11 +3815,6 @@ Cocktail.mixin(Backbone.Collection, addAndReturnModel);
3870
3815
 
3871
3816
  var SidebarRouter = Marionette.AppRouter.extend({
3872
3817
  appRoutes: {
3873
- 'page_links/:id': 'pageLink',
3874
- 'pages/:id': 'page',
3875
- 'pages/:id/:tab': 'page',
3876
- 'chapters/:id': 'chapter',
3877
- 'storylines/:id': 'storyline',
3878
3818
  'widgets/:id': 'widget',
3879
3819
  'files/:collectionName?handler=:handler&payload=:payload&filter=:filter': 'files',
3880
3820
  'files/:collectionName?handler=:handler&payload=:payload': 'files',
@@ -3912,7 +3852,7 @@ var BackButtonDecoratorView = Marionette.Layout.extend({
3912
3852
  },
3913
3853
  goBack: function goBack() {
3914
3854
  this.options.view.onGoBack && this.options.view.onGoBack();
3915
- editor$1.navigate('/', {
3855
+ editor.navigate('/', {
3916
3856
  trigger: true
3917
3857
  });
3918
3858
  }
@@ -4073,7 +4013,7 @@ function modelLifecycleTrackingView(_ref) {
4073
4013
  var classNames = _ref.classNames;
4074
4014
  return {
4075
4015
  events: _defineProperty({}, "click .".concat(classNames.retryButton), function click() {
4076
- editor$1.failures.retry();
4016
+ editor.failures.retry();
4077
4017
  return false;
4078
4018
  }),
4079
4019
  initialize: function initialize() {
@@ -4133,63 +4073,6 @@ var failureIndicatingView = modelLifecycleTrackingView({
4133
4073
 
4134
4074
  function template$6(data) {
4135
4075
  var __t, __p = '';
4136
- __p += '<a class="back">' +
4137
- ((__t = ( I18n.t('pageflow.editor.templates.edit_chapter.outline') )) == null ? '' : __t) +
4138
- '</a>\n<a class="destroy">' +
4139
- ((__t = ( I18n.t('pageflow.editor.templates.edit_chapter.destroy') )) == null ? '' : __t) +
4140
- '</a>\n\n<div class="failure">\n <p>' +
4141
- ((__t = ( I18n.t('pageflow.editor.templates.edit_chapter.save_error') )) == null ? '' : __t) +
4142
- '</p>\n <p class="message"></p>\n <a class="retry" href="">' +
4143
- ((__t = ( I18n.t('pageflow.editor.templates.edit_chapter.retry') )) == null ? '' : __t) +
4144
- '</a>\n</div>\n\n<div class="form_container"></div>';
4145
- return __p
4146
- }
4147
-
4148
- var EditChapterView = Marionette.Layout.extend({
4149
- template: template$6,
4150
- className: 'edit_chapter',
4151
- mixins: [failureIndicatingView],
4152
- regions: {
4153
- formContainer: '.form_container'
4154
- },
4155
- events: {
4156
- 'click a.back': 'goBack',
4157
- 'click a.destroy': 'destroy'
4158
- },
4159
- onRender: function onRender() {
4160
- var configurationEditor = new ConfigurationEditorView({
4161
- model: this.model.configuration
4162
- });
4163
- this.configure(configurationEditor);
4164
- this.formContainer.show(configurationEditor);
4165
- },
4166
- configure: function configure(configurationEditor) {
4167
- var view = this;
4168
- configurationEditor.tab('general', function () {
4169
- this.input('title', TextInputView, {
4170
- model: view.model
4171
- });
4172
-
4173
- if (pageflow.features.isEnabled('chapter_hierachy')) {
4174
- this.input('display_parent_page_button', CheckBoxInputView);
4175
- }
4176
- });
4177
- },
4178
- destroy: function destroy() {
4179
- if (confirm(I18n$1.t('pageflow.editor.views.edit_chapter_view.confirm_destroy'))) {
4180
- this.model.destroy();
4181
- this.goBack();
4182
- }
4183
- },
4184
- goBack: function goBack() {
4185
- editor$1.navigate('/', {
4186
- trigger: true
4187
- });
4188
- }
4189
- });
4190
-
4191
- function template$7(data) {
4192
- var __t, __p = '';
4193
4076
  __p += '<a class="close" href="#">' +
4194
4077
  ((__t = ( I18n.t('pageflow.editor.templates.edit_entry.close') )) == null ? '' : __t) +
4195
4078
  '</a>\n<a class="publish" href="#" data-tooltip-align="bottom right">\n ' +
@@ -4205,7 +4088,7 @@ return __p
4205
4088
  }
4206
4089
 
4207
4090
  var EditEntryView = Marionette.Layout.extend({
4208
- template: template$7,
4091
+ template: template$6,
4209
4092
  mixins: [failureIndicatingView, tooltipContainer],
4210
4093
  ui: {
4211
4094
  publishButton: 'a.publish',
@@ -4223,7 +4106,7 @@ var EditEntryView = Marionette.Layout.extend({
4223
4106
  },
4224
4107
  'click a.publish': function clickAPublish() {
4225
4108
  if (!this.ui.publishButton.hasClass('disabled')) {
4226
- editor$1.navigate('/publish', {
4109
+ editor.navigate('/publish', {
4227
4110
  trigger: true
4228
4111
  });
4229
4112
  }
@@ -4231,7 +4114,7 @@ var EditEntryView = Marionette.Layout.extend({
4231
4114
  return false;
4232
4115
  },
4233
4116
  'click .menu a': function clickMenuA(event) {
4234
- editor$1.navigate($(event.target).data('path'), {
4117
+ editor.navigate($(event.target).data('path'), {
4235
4118
  trigger: true
4236
4119
  });
4237
4120
  return false;
@@ -4242,7 +4125,7 @@ var EditEntryView = Marionette.Layout.extend({
4242
4125
 
4243
4126
  this._updatePublishButton();
4244
4127
 
4245
- this.outlineRegion.show(new editor$1.entryType.outlineView({
4128
+ this.outlineRegion.show(new editor.entryType.outlineView({
4246
4129
  entry: state.entry,
4247
4130
  navigatable: true,
4248
4131
  editable: true,
@@ -4264,7 +4147,7 @@ var EditEntryView = Marionette.Layout.extend({
4264
4147
  _addMenuItems: function _addMenuItems() {
4265
4148
  var view = this;
4266
4149
 
4267
- _$1.each(editor$1.mainMenuItems, function (options) {
4150
+ _.each(editor.mainMenuItems, function (options) {
4268
4151
  var item = $('<li><a href="#"></a></li>');
4269
4152
  var link = item.find('a');
4270
4153
 
@@ -4283,7 +4166,7 @@ var EditEntryView = Marionette.Layout.extend({
4283
4166
  }
4284
4167
  });
4285
4168
 
4286
- function template$8(data) {
4169
+ function template$7(data) {
4287
4170
  var __t, __p = '';
4288
4171
  __p += '<div class="widget_type">\n</div>\n<a class="settings" title="' +
4289
4172
  ((__t = ( I18n.t('pageflow.editor.templates.widget_item.settings') )) == null ? '' : __t) +
@@ -4292,7 +4175,7 @@ return __p
4292
4175
  }
4293
4176
 
4294
4177
  var WidgetItemView = Marionette.Layout.extend({
4295
- template: template$8,
4178
+ template: template$7,
4296
4179
  tagName: 'li',
4297
4180
  className: 'widget_item',
4298
4181
  regions: {
@@ -4306,7 +4189,7 @@ var WidgetItemView = Marionette.Layout.extend({
4306
4189
  },
4307
4190
  events: {
4308
4191
  'click .settings': function clickSettings() {
4309
- editor$1.navigate('/widgets/' + this.model.role(), {
4192
+ editor.navigate('/widgets/' + this.model.role(), {
4310
4193
  trigger: true
4311
4194
  });
4312
4195
  return false;
@@ -4332,14 +4215,14 @@ var WidgetItemView = Marionette.Layout.extend({
4332
4215
  }
4333
4216
  });
4334
4217
 
4335
- function template$9(data) {
4218
+ function template$8(data) {
4336
4219
  var __p = '';
4337
4220
  __p += '<ol class="widgets">\n</ol>\n';
4338
4221
  return __p
4339
4222
  }
4340
4223
 
4341
4224
  var EditWidgetsView = Marionette.Layout.extend({
4342
- template: template$9,
4225
+ template: template$8,
4343
4226
  ui: {
4344
4227
  widgets: '.widgets'
4345
4228
  },
@@ -4355,14 +4238,14 @@ var EditWidgetsView = Marionette.Layout.extend({
4355
4238
  }
4356
4239
  });
4357
4240
 
4358
- function template$a(data) {
4241
+ function template$9(data) {
4359
4242
  var __p = '';
4360
4243
  __p += '<div class="image"></div>\n<div class="label"></div>\n';
4361
4244
  return __p
4362
4245
  }
4363
4246
 
4364
4247
  var BackgroundPositioningPreviewView = Marionette.ItemView.extend({
4365
- template: template$a,
4248
+ template: template$9,
4366
4249
  className: 'preview',
4367
4250
  modelEvents: {
4368
4251
  change: 'update'
@@ -4393,14 +4276,14 @@ var BackgroundPositioningPreviewView = Marionette.ItemView.extend({
4393
4276
  }
4394
4277
  });
4395
4278
 
4396
- function template$b(data) {
4279
+ function template$a(data) {
4397
4280
  var __p = '';
4398
4281
  __p += '<div class="container">\n <div class="slider horizontal">\n </div>\n <div class="slider vertical">\n </div>\n <div class="percent horizontal">\n <input type="number" min="0" max="100">\n %\n </div>\n <div class="percent vertical">\n <input type="number" min="0" max="100">\n %\n </div>\n</div>\n';
4399
4282
  return __p
4400
4283
  }
4401
4284
 
4402
4285
  var BackgroundPositioningSlidersView = Marionette.ItemView.extend({
4403
- template: template$b,
4286
+ template: template$a,
4404
4287
  className: '',
4405
4288
  ui: {
4406
4289
  container: '.container',
@@ -4481,7 +4364,7 @@ var BackgroundPositioningSlidersView = Marionette.ItemView.extend({
4481
4364
  }
4482
4365
  });
4483
4366
 
4484
- function template$c(data) {
4367
+ function template$b(data) {
4485
4368
  var __t, __p = '';
4486
4369
  __p += '<div class="box">\n <h2>' +
4487
4370
  ((__t = ( I18n.t('pageflow.editor.templates.background_positioning.title') )) == null ? '' : __t) +
@@ -4498,7 +4381,7 @@ return __p
4498
4381
  }
4499
4382
 
4500
4383
  var BackgroundPositioningView = Marionette.ItemView.extend({
4501
- template: template$c,
4384
+ template: template$b,
4502
4385
  className: 'background_positioning dialog',
4503
4386
  mixins: [dialogView],
4504
4387
  ui: {
@@ -4535,7 +4418,7 @@ var BackgroundPositioningView = Marionette.ItemView.extend({
4535
4418
  createPreviews: function createPreviews() {
4536
4419
  var view = this;
4537
4420
 
4538
- _$1.each(view.previews, function (ratio, name) {
4421
+ _.each(view.previews, function (ratio, name) {
4539
4422
  view.ui.previews.append(view.subview(new BackgroundPositioningPreviewView({
4540
4423
  model: view.transientModel,
4541
4424
  propertyName: view.options.propertyName,
@@ -4552,14 +4435,14 @@ BackgroundPositioningView.open = function (options) {
4552
4435
  app.dialogRegion.show(new BackgroundPositioningView(options));
4553
4436
  };
4554
4437
 
4555
- function template$d(data) {
4438
+ function template$c(data) {
4556
4439
  var __p = '';
4557
4440
  __p += '<div class="label"></div>\n<a href="#"></a>\n';
4558
4441
  return __p
4559
4442
  }
4560
4443
 
4561
4444
  var DropDownButtonItemView = Marionette.ItemView.extend({
4562
- template: template$d,
4445
+ template: template$c,
4563
4446
  tagName: 'li',
4564
4447
  className: 'drop_down_button_item',
4565
4448
  ui: {
@@ -4609,7 +4492,7 @@ var DropDownButtonItemListView = function DropDownButtonItemListView(options) {
4609
4492
  });
4610
4493
  };
4611
4494
 
4612
- function template$e(data) {
4495
+ function template$d(data) {
4613
4496
  var __p = '';
4614
4497
  __p += '<button></button>\n\n<div class="drop_down_button_menu">\n</div>\n';
4615
4498
  return __p
@@ -4644,7 +4527,7 @@ return __p
4644
4527
  */
4645
4528
 
4646
4529
  var DropDownButtonView = Marionette.ItemView.extend({
4647
- template: template$e,
4530
+ template: template$d,
4648
4531
  className: 'drop_down_button',
4649
4532
  ui: {
4650
4533
  button: '> button',
@@ -4707,11 +4590,11 @@ var DropDownButtonView = Marionette.ItemView.extend({
4707
4590
  }
4708
4591
  },
4709
4592
  scheduleHideMenu: function scheduleHideMenu() {
4710
- this.hideMenuTimeout = setTimeout(_$1.bind(this.hideMenu, this), 300);
4593
+ this.hideMenuTimeout = setTimeout(_.bind(this.hideMenu, this), 300);
4711
4594
  }
4712
4595
  });
4713
4596
 
4714
- function template$f(data) {
4597
+ function template$e(data) {
4715
4598
  var __p = '';
4716
4599
  __p += '<div class="pictogram"></div>\n';
4717
4600
  return __p
@@ -4719,7 +4602,7 @@ return __p
4719
4602
 
4720
4603
  var FileThumbnailView = Marionette.ItemView.extend({
4721
4604
  className: 'file_thumbnail',
4722
- template: template$f,
4605
+ template: template$e,
4723
4606
  modelEvents: {
4724
4607
  'change:state': 'update'
4725
4608
  },
@@ -4762,7 +4645,7 @@ var FileThumbnailView = Marionette.ItemView.extend({
4762
4645
  }
4763
4646
  });
4764
4647
 
4765
- function template$g(data) {
4648
+ function template$f(data) {
4766
4649
  var __t, __p = '';
4767
4650
  __p += '<label>\n <span class="name"></span>\n <span class="inline_help"></span>\n</label>\n<div class="file_thumbnail"></div>\n<div class="file_name"></div>\n\n<a href="" class="unset" title="' +
4768
4651
  ((__t = ( I18n.t('pageflow.ui.templates.inputs.file_input.reset') )) == null ? '' : __t) +
@@ -4780,7 +4663,7 @@ return __p
4780
4663
 
4781
4664
  var FileInputView = Marionette.ItemView.extend({
4782
4665
  mixins: [inputView],
4783
- template: template$g,
4666
+ template: template$f,
4784
4667
  className: 'file_input',
4785
4668
  ui: {
4786
4669
  fileName: '.file_name',
@@ -4788,10 +4671,10 @@ var FileInputView = Marionette.ItemView.extend({
4788
4671
  },
4789
4672
  events: {
4790
4673
  'click .choose': function clickChoose() {
4791
- editor$1.selectFile({
4674
+ editor.selectFile({
4792
4675
  name: this.options.collection.name,
4793
4676
  filter: this.options.filter
4794
- }, this.options.fileSelectionHandler || 'pageConfiguration', _$1.extend({
4677
+ }, this.options.fileSelectionHandler || 'pageConfiguration', _.extend({
4795
4678
  id: this.model.getRoutableId ? this.model.getRoutableId() : this.model.id,
4796
4679
  attributeName: this.options.propertyName,
4797
4680
  returnToTab: this.options.parentTab
@@ -4804,13 +4687,13 @@ var FileInputView = Marionette.ItemView.extend({
4804
4687
  }
4805
4688
  },
4806
4689
  initialize: function initialize() {
4807
- this.options = _$1.extend({
4690
+ this.options = _.extend({
4808
4691
  positioning: true,
4809
4692
  textTrackFiles: state.textTrackFiles
4810
4693
  }, this.options);
4811
4694
 
4812
4695
  if (typeof this.options.collection === 'string') {
4813
- this.options.collection = state.entry.getFileCollection(editor$1.fileTypes.findByCollectionName(this.options.collection));
4696
+ this.options.collection = state.entry.getFileCollection(editor.fileTypes.findByCollectionName(this.options.collection));
4814
4697
  }
4815
4698
 
4816
4699
  this.textTrackMenuItems = new Backbone.Collection();
@@ -4840,6 +4723,8 @@ var FileInputView = Marionette.ItemView.extend({
4840
4723
  }));
4841
4724
  },
4842
4725
  _dropDownMenuItems: function _dropDownMenuItems() {
4726
+ var _this = this;
4727
+
4843
4728
  var file = this._getFile(file);
4844
4729
 
4845
4730
  var items = new Backbone.Collection();
@@ -4864,6 +4749,18 @@ var FileInputView = Marionette.ItemView.extend({
4864
4749
  }
4865
4750
 
4866
4751
  if (file) {
4752
+ _.each(this.options.dropDownMenuItems, function (item) {
4753
+ items.add(new FileInputView.CustomMenuItem({
4754
+ name: item.name,
4755
+ label: item.label
4756
+ }, {
4757
+ inputModel: _this.model,
4758
+ propertyName: _this.options.propertyName,
4759
+ file: file,
4760
+ selected: item.selected
4761
+ }));
4762
+ });
4763
+
4867
4764
  items.add(new FileInputView.EditFileSettingsMenuItem({
4868
4765
  name: 'edit_file_settings',
4869
4766
  label: I18n$1.t('pageflow.editor.views.inputs.file_input.edit_file_settings')
@@ -4914,6 +4811,18 @@ FileInputView.EditBackgroundPositioningMenuItem = Backbone.Model.extend({
4914
4811
  });
4915
4812
  }
4916
4813
  });
4814
+ FileInputView.CustomMenuItem = Backbone.Model.extend({
4815
+ initialize: function initialize(attributes, options) {
4816
+ this.options = options;
4817
+ },
4818
+ selected: function selected() {
4819
+ this.options.selected({
4820
+ inputModel: this.options.inputModel,
4821
+ propertyName: this.options.propertyName,
4822
+ file: this.options.file
4823
+ });
4824
+ }
4825
+ });
4917
4826
  FileInputView.EditFileSettingsMenuItem = Backbone.Model.extend({
4918
4827
  initialize: function initialize(attributes, options) {
4919
4828
  this.options = options;
@@ -4952,14 +4861,14 @@ FileInputView.DefaultTextTrackFileMenuItem = Backbone.Model.extend({
4952
4861
  }
4953
4862
  });
4954
4863
 
4955
- function template$h(data) {
4864
+ function template$g(data) {
4956
4865
  var __p = '';
4957
4866
  __p += '<div class="spinner">\n <div class="rect1"></div>\n <div class="rect2"></div>\n <div class="rect3"></div>\n <div class="rect4"></div>\n <div class="rect5"></div>\n</div>\n';
4958
4867
  return __p
4959
4868
  }
4960
4869
 
4961
4870
  var LoadingView = Marionette.ItemView.extend({
4962
- template: template$h,
4871
+ template: template$g,
4963
4872
  className: 'loading',
4964
4873
  tagName: 'li'
4965
4874
  });
@@ -4982,7 +4891,7 @@ var selectableView = {
4982
4891
  }
4983
4892
  };
4984
4893
 
4985
- function template$i(data) {
4894
+ function template$h(data) {
4986
4895
  var __t, __p = '';
4987
4896
  __p += '<span class="theme_name"></span>\n<span class="button_or_checkmark">\n <p class="theme_in_use"></p>\n <a class="use_theme">' +
4988
4897
  ((__t = ( I18n.t('pageflow.editor.templates.theme.use') )) == null ? '' : __t) +
@@ -4992,7 +4901,7 @@ return __p
4992
4901
 
4993
4902
  var ThemeItemView = Marionette.ItemView.extend({
4994
4903
  tagName: 'li',
4995
- template: template$i,
4904
+ template: template$h,
4996
4905
  className: 'theme_item',
4997
4906
  mixins: [selectableView],
4998
4907
  selectionAttribute: 'theme',
@@ -5023,7 +4932,7 @@ var ThemeItemView = Marionette.ItemView.extend({
5023
4932
  }
5024
4933
  });
5025
4934
 
5026
- function template$j(data) {
4935
+ function template$i(data) {
5027
4936
  var __t, __p = '';
5028
4937
  __p += '<div class="box">\n <div class="content">\n <div>\n <h2 class="themes_header">' +
5029
4938
  ((__t = ( I18n.t('pageflow.editor.templates.change_theme_dialog.header') )) == null ? '' : __t) +
@@ -5038,7 +4947,7 @@ return __p
5038
4947
  }
5039
4948
 
5040
4949
  var ChangeThemeDialogView = Marionette.ItemView.extend({
5041
- template: template$j,
4950
+ template: template$i,
5042
4951
  className: 'change_theme dialog editor',
5043
4952
  mixins: [dialogView],
5044
4953
  ui: {
@@ -5107,14 +5016,14 @@ ChangeThemeDialogView.changeTheme = function (options) {
5107
5016
  }).promise();
5108
5017
  };
5109
5018
 
5110
- function template$k(data) {
5019
+ function template$j(data) {
5111
5020
  var __p = '';
5112
5021
  __p += '\n';
5113
5022
  return __p
5114
5023
  }
5115
5024
 
5116
5025
  var StaticThumbnailView = Marionette.ItemView.extend({
5117
- template: template$k,
5026
+ template: template$j,
5118
5027
  className: 'static_thumbnail',
5119
5028
  modelEvents: {
5120
5029
  'change:configuration': 'update'
@@ -5147,7 +5056,7 @@ var ModelThumbnailView = Marionette.View.extend({
5147
5056
  },
5148
5057
  update: function update() {
5149
5058
  if (this.model) {
5150
- if (_$1.isFunction(this.model.thumbnailFile)) {
5059
+ if (_.isFunction(this.model.thumbnailFile)) {
5151
5060
  var file = this.model && this.model.thumbnailFile();
5152
5061
 
5153
5062
  if (this.thumbnailView && this.currentFileThumbnail == file) {
@@ -5178,7 +5087,7 @@ var ModelThumbnailView = Marionette.View.extend({
5178
5087
  }
5179
5088
  });
5180
5089
 
5181
- function template$l(data) {
5090
+ function template$k(data) {
5182
5091
  var __p = '';
5183
5092
  __p += '<label>\n <span class="name"></span>\n <span class="inline_help"></span>\n</label>\n<div class="title"></div>\n<button class="unset"></button>\n<button class="choose"></button>\n';
5184
5093
  return __p
@@ -5194,7 +5103,7 @@ var ReferenceInputView = Marionette.ItemView.extend(
5194
5103
  /** @lends ReferenceInputView.prototype */
5195
5104
  {
5196
5105
  mixins: [inputView],
5197
- template: template$l,
5106
+ template: template$k,
5198
5107
  className: 'reference_input',
5199
5108
  ui: {
5200
5109
  title: '.title',
@@ -5293,7 +5202,7 @@ var ThemeInputView = ReferenceInputView.extend({
5293
5202
  }
5294
5203
  });
5295
5204
 
5296
- function template$m(data) {
5205
+ function template$l(data) {
5297
5206
  var __t, __p = '';
5298
5207
  __p += '<a class="back">' +
5299
5208
  ((__t = ( I18n.t('pageflow.editor.templates.edit_meta_data.outline') )) == null ? '' : __t) +
@@ -5306,7 +5215,7 @@ return __p
5306
5215
  }
5307
5216
 
5308
5217
  var EditMetaDataView = Marionette.Layout.extend({
5309
- template: template$m,
5218
+ template: template$l,
5310
5219
  className: 'edit_meta_data',
5311
5220
  mixins: [failureIndicatingView],
5312
5221
  regions: {
@@ -5332,7 +5241,7 @@ var EditMetaDataView = Marionette.Layout.extend({
5332
5241
  });
5333
5242
  this.input('locale', SelectInputView, {
5334
5243
  values: state.config.availablePublicLocales,
5335
- texts: _$1.map(state.config.availablePublicLocales, function (locale) {
5244
+ texts: _.map(state.config.availablePublicLocales, function (locale) {
5336
5245
  return I18n$1.t('pageflow.public._language', {
5337
5246
  locale: locale
5338
5247
  });
@@ -5400,298 +5309,67 @@ var EditMetaDataView = Marionette.Layout.extend({
5400
5309
  this.formContainer.show(configurationEditor);
5401
5310
  },
5402
5311
  goBack: function goBack() {
5403
- editor.navigate('/', {
5312
+ this.options.editor.navigate('/', {
5404
5313
  trigger: true
5405
5314
  });
5406
5315
  }
5407
5316
  });
5408
5317
 
5409
- function template$n(data) {
5318
+ function template$m(data) {
5410
5319
  var __t, __p = '';
5411
5320
  __p += '<a class="back">' +
5412
- ((__t = ( I18n.t('pageflow.editor.templates.edit_page_link.back') )) == null ? '' : __t) +
5413
- '</a>\n<a class="destroy">' +
5414
- ((__t = ( I18n.t('pageflow.editor.templates.edit_page_link.destroy') )) == null ? '' : __t) +
5415
- '</a>\n<div class="form_container"></div>\n';
5321
+ ((__t = ( I18n.t('pageflow.editor.templates.edit_widget.back') )) == null ? '' : __t) +
5322
+ '</a>\n';
5416
5323
  return __p
5417
5324
  }
5418
5325
 
5419
- var EditPageLinkView = Marionette.Layout.extend({
5420
- template: template$n,
5421
- regions: {
5422
- formContainer: '.form_container'
5423
- },
5424
- ui: {
5425
- backButton: 'a.back'
5426
- },
5326
+ var EditWidgetView = Marionette.ItemView.extend({
5327
+ template: template$m,
5328
+ className: 'edit_widget',
5427
5329
  events: {
5428
- 'click a.back': 'goBack',
5429
- 'click a.destroy': 'destroy'
5430
- },
5431
- onRender: function onRender() {
5432
- var pageType = this.options.api.pageTypes.findByPage(this.options.page);
5433
- var configurationEditor = pageType.createPageLinkConfigurationEditorView({
5434
- model: this.model,
5435
- page: this.options.page
5436
- });
5437
- this.formContainer.show(configurationEditor);
5438
- this.highlight();
5330
+ 'click a.back': function clickABack() {
5331
+ editor.navigate('/meta_data/widgets', {
5332
+ trigger: true
5333
+ });
5334
+ }
5439
5335
  },
5440
- highlight: function highlight() {
5441
- this.model.highlight();
5442
- this.listenTo(this, 'close', function () {
5443
- this.model.resetHighlight();
5444
- });
5336
+ initialize: function initialize() {
5337
+ this.model.set('editing', true);
5445
5338
  },
5446
- destroy: function destroy() {
5447
- if (confirm(I18n$1.t('pageflow.internal_links.editor.views.edit_page_link_view.confirm_destroy'))) {
5448
- this.model.remove();
5449
- this.goBack();
5450
- }
5339
+ onClose: function onClose() {
5340
+ Marionette.ItemView.prototype.onClose.call(this);
5341
+ this.model.set('editing', false);
5451
5342
  },
5452
- goBack: function goBack() {
5453
- editor$1.navigate('/pages/' + this.options.page.id + '/links', {
5454
- trigger: true
5343
+ onRender: function onRender() {
5344
+ var configurationEditor = this.model.widgetType().createConfigurationEditorView({
5345
+ model: this.model.configuration,
5346
+ tab: this.options.tab
5455
5347
  });
5348
+ this.appendSubview(configurationEditor);
5456
5349
  }
5457
5350
  });
5458
5351
 
5459
- function template$o(data) {
5460
- var __t, __p = '';
5461
- __p += '<a class="back">' +
5462
- ((__t = ( I18n.t('pageflow.editor.templates.edit_page.outline') )) == null ? '' : __t) +
5463
- '</a>\n<a class="destroy">' +
5464
- ((__t = ( I18n.t('pageflow.editor.templates.edit_page.destroy') )) == null ? '' : __t) +
5465
- '</a>\n\n<div class="failure">\n <p>' +
5466
- ((__t = ( I18n.t('pageflow.editor.templates.edit_page.save_error') )) == null ? '' : __t) +
5467
- '</p>\n <p class="message"></p>\n <a class="retry" href="">' +
5468
- ((__t = ( I18n.t('pageflow.editor.templates.edit_page.retry') )) == null ? '' : __t) +
5469
- '</a>\n</div>\n\n<div class="page_type"></div>\n\n<div class="configuration_container"></div>';
5352
+ var loadable = modelLifecycleTrackingView({
5353
+ classNames: {
5354
+ creating: 'creating',
5355
+ destroying: 'destroying'
5356
+ }
5357
+ });
5358
+
5359
+ function template$n(data) {
5360
+ var __p = '';
5361
+ __p += '<span class="file_thumbnail"></span>\n\n<span class="file_name"></span>\n';
5470
5362
  return __p
5471
5363
  }
5472
5364
 
5473
- var EditPageView = Marionette.Layout.extend({
5474
- template: template$o,
5475
- className: 'edit_page',
5476
- mixins: [failureIndicatingView],
5477
- regions: {
5478
- pageTypeContainer: '.page_type',
5479
- configurationContainer: '.configuration_container'
5480
- },
5481
- events: {
5482
- 'click a.back': 'goBack',
5483
- 'click a.destroy': 'destroy'
5484
- },
5485
- modelEvents: {
5486
- 'change:template': 'load'
5487
- },
5488
- onRender: function onRender() {
5489
- var _this = this;
5490
-
5491
- this.pageTypeContainer.show(new ExtendedSelectInputView({
5492
- model: this.model,
5493
- propertyName: 'template',
5494
- collection: this.options.api.pageTypes.pluck('seed'),
5495
- valueProperty: 'name',
5496
- translationKeyProperty: 'translation_key',
5497
- groupTranslationKeyProperty: 'category_translation_key',
5498
- descriptionTranslationKeyProperty: 'description_translation_key',
5499
- pictogramClass: 'type_pictogram',
5500
- helpLinkClicked: function helpLinkClicked(value) {
5501
- var pageType = _this.options.api.pageTypes.findByName(value);
5502
-
5503
- app.trigger('toggle-help', pageType.seed.help_entry_translation_key);
5504
- }
5505
- }));
5506
- this.load();
5507
- this.model.trigger('edit', this.model);
5508
- },
5509
- onShow: function onShow() {
5510
- this.configurationEditor.refreshScroller();
5511
- },
5512
- load: function load() {
5513
- this.configurationEditor = this.options.api.createPageConfigurationEditorView(this.model, {
5514
- tab: this.options.tab
5515
- });
5516
- this.configurationContainer.show(this.configurationEditor);
5517
- },
5518
- destroy: function destroy() {
5519
- if (confirm(I18n$1.t('pageflow.editor.views.edit_page_view.confirm_destroy'))) {
5520
- this.model.destroy();
5521
- this.goBack();
5522
- }
5523
- },
5524
- goBack: function goBack() {
5525
- editor$1.navigate('/', {
5526
- trigger: true
5527
- });
5528
- }
5529
- });
5530
-
5531
- var PageLinkInputView = ReferenceInputView.extend({
5532
- choose: function choose() {
5533
- return editor$1.selectPage({
5534
- isAllowed: this.options.isAllowed
5535
- });
5536
- },
5537
- getTarget: function getTarget(permaId) {
5538
- return state.pages.getByPermaId(permaId);
5539
- }
5540
- });
5541
-
5542
- function template$p(data) {
5543
- var __t, __p = '';
5544
- __p += '<a class="back">' +
5545
- ((__t = ( I18n.t('pageflow.editor.templates.edit_storyline.outline') )) == null ? '' : __t) +
5546
- '</a>\n<a class="destroy" data-tooltip-align="bottom right">\n ' +
5547
- ((__t = ( I18n.t('pageflow.editor.templates.edit_storyline.destroy') )) == null ? '' : __t) +
5548
- '\n</a>\n\n<div class="failure">\n <p>' +
5549
- ((__t = ( I18n.t('pageflow.editor.templates.edit_storyline.save_error') )) == null ? '' : __t) +
5550
- '</p>\n <p class="message"></p>\n <a class="retry" href="">' +
5551
- ((__t = ( I18n.t('pageflow.editor.templates.edit_storyline.retry') )) == null ? '' : __t) +
5552
- '</a>\n</div>\n\n<div class="form_container"></div>\n';
5553
- return __p
5554
- }
5555
-
5556
- var EditStorylineView = Marionette.Layout.extend({
5557
- template: template$p,
5558
- className: 'edit_storyline',
5559
- mixins: [failureIndicatingView, tooltipContainer],
5560
- regions: {
5561
- formContainer: '.form_container'
5562
- },
5563
- ui: {
5564
- destroyButton: 'a.destroy'
5565
- },
5566
- events: {
5567
- 'click a.back': 'goBack',
5568
- 'click a.destroy': 'destroy'
5569
- },
5570
- onRender: function onRender() {
5571
- var configurationEditor = new ConfigurationEditorView({
5572
- model: this.model.configuration,
5573
- attributeTranslationKeyPrefixes: ['pageflow.storyline_attributes']
5574
- });
5575
- this.configure(configurationEditor, this.model.transitiveChildPages());
5576
- this.formContainer.show(configurationEditor);
5577
- this.updateDestroyButton();
5578
- },
5579
- updateDestroyButton: function updateDestroyButton() {
5580
- var disabled = this.model.chapters.length > 0;
5581
- this.ui.destroyButton.toggleClass('disabled', disabled);
5582
-
5583
- if (disabled) {
5584
- this.ui.destroyButton.attr('data-tooltip', 'pageflow.editor.views.edit_storyline_view.cannot_destroy');
5585
- } else {
5586
- this.ui.destroyButton.removeAttr('data-tooltip');
5587
- }
5588
- },
5589
- configure: function configure(configurationEditor, storylineChildPages) {
5590
- configurationEditor.tab('general', function () {
5591
- this.input('title', TextInputView);
5592
- this.input('main', CheckBoxInputView, {
5593
- disabled: true,
5594
- visibleBinding: 'main'
5595
- });
5596
- this.group('page_transitions', {
5597
- includeBlank: true
5598
- });
5599
- this.input('main', CheckBoxInputView, {
5600
- visibleBinding: 'main',
5601
- visible: function visible(isMain) {
5602
- return !isMain;
5603
- }
5604
- });
5605
- this.input('parent_page_perma_id', PageLinkInputView, {
5606
- visibleBinding: 'main',
5607
- visible: function visible(isMain) {
5608
- return !isMain && state.storylines.length > 1;
5609
- },
5610
- isAllowed: function isAllowed(page) {
5611
- return !storylineChildPages.contain(page);
5612
- }
5613
- });
5614
- this.input('scroll_successor_id', PageLinkInputView);
5615
-
5616
- if (pageflow.features.isEnabled('chapter_hierachy')) {
5617
- this.input('navigation_bar_mode', SelectInputView, {
5618
- values: pageflow.ChapterFilter.strategies
5619
- });
5620
- }
5621
- });
5622
- },
5623
- destroy: function destroy() {
5624
- if (this.model.chapters.length) {
5625
- return;
5626
- }
5627
-
5628
- if (confirm(I18n$1.t('pageflow.editor.views.edit_storyline_view.confirm_destroy'))) {
5629
- this.model.destroy();
5630
- this.goBack();
5631
- }
5632
- },
5633
- goBack: function goBack() {
5634
- editor$1.navigate('/?storyline=' + this.model.id, {
5635
- trigger: true
5636
- });
5637
- }
5638
- });
5639
-
5640
- function template$q(data) {
5641
- var __t, __p = '';
5642
- __p += '<a class="back">' +
5643
- ((__t = ( I18n.t('pageflow.editor.templates.edit_widget.back') )) == null ? '' : __t) +
5644
- '</a>\n';
5645
- return __p
5646
- }
5647
-
5648
- var EditWidgetView = Marionette.ItemView.extend({
5649
- template: template$q,
5650
- className: 'edit_widget',
5651
- events: {
5652
- 'click a.back': function clickABack() {
5653
- editor$1.navigate('/meta_data/widgets', {
5654
- trigger: true
5655
- });
5656
- }
5657
- },
5658
- initialize: function initialize() {
5659
- this.model.set('editing', true);
5660
- },
5661
- onClose: function onClose() {
5662
- Marionette.ItemView.prototype.onClose.call(this);
5663
- this.model.set('editing', false);
5664
- },
5665
- onRender: function onRender() {
5666
- var configurationEditor = this.model.widgetType().createConfigurationEditorView({
5667
- model: this.model.configuration,
5668
- tab: this.options.tab
5669
- });
5670
- this.appendSubview(configurationEditor);
5671
- }
5672
- });
5673
-
5674
- var loadable = modelLifecycleTrackingView({
5675
- classNames: {
5676
- creating: 'creating',
5677
- destroying: 'destroying'
5678
- }
5679
- });
5680
-
5681
- function template$r(data) {
5682
- var __p = '';
5683
- __p += '<span class="file_thumbnail"></span>\n\n<span class="file_name"></span>\n';
5684
- return __p
5685
- }
5686
-
5687
- var ExplorerFileItemView = Marionette.ItemView.extend({
5688
- tagName: 'li',
5689
- template: template$r,
5690
- mixins: [loadable, selectableView],
5691
- selectionAttribute: 'file',
5692
- ui: {
5693
- fileName: '.file_name',
5694
- thumbnail: '.file_thumbnail'
5365
+ var ExplorerFileItemView = Marionette.ItemView.extend({
5366
+ tagName: 'li',
5367
+ template: template$n,
5368
+ mixins: [loadable, selectableView],
5369
+ selectionAttribute: 'file',
5370
+ ui: {
5371
+ fileName: '.file_name',
5372
+ thumbnail: '.file_thumbnail'
5695
5373
  },
5696
5374
  events: {
5697
5375
  'click': function click() {
@@ -5719,18 +5397,18 @@ var ExplorerFileItemView = Marionette.ItemView.extend({
5719
5397
  this.ui.fileName.text(this.model.get('file_name') || '(Unbekannt)');
5720
5398
  },
5721
5399
  isDisabled: function isDisabled() {
5722
- return this.options.disabledIds && _$1.contains(this.options.disabledIds, this.model.get('id'));
5400
+ return this.options.disabledIds && _.contains(this.options.disabledIds, this.model.get('id'));
5723
5401
  }
5724
5402
  });
5725
5403
 
5726
- function template$s(data) {
5404
+ function template$o(data) {
5727
5405
  var __p = '';
5728
5406
  __p += '<a href="">\n <span class="title"></span>\n</a>\n';
5729
5407
  return __p
5730
5408
  }
5731
5409
 
5732
5410
  var OtherEntryItemView = Marionette.ItemView.extend({
5733
- template: template$s,
5411
+ template: template$o,
5734
5412
  className: 'other_entry_item',
5735
5413
  tagName: 'li',
5736
5414
  mixins: [selectableView],
@@ -5745,7 +5423,7 @@ var OtherEntryItemView = Marionette.ItemView.extend({
5745
5423
  }
5746
5424
  });
5747
5425
 
5748
- function template$t(data) {
5426
+ function template$p(data) {
5749
5427
  var __t, __p = '';
5750
5428
  __p +=
5751
5429
  ((__t = ( I18n.t('pageflow.editor.templates.other_entries_blank_slate.none_available') )) == null ? '' : __t) +
@@ -5771,7 +5449,7 @@ var OtherEntriesCollectionView = Marionette.View.extend({
5771
5449
  selection: this.options.selection
5772
5450
  },
5773
5451
  blankSlateViewConstructor: Marionette.ItemView.extend({
5774
- template: template$t,
5452
+ template: template$p,
5775
5453
  tagName: 'li',
5776
5454
  className: 'blank_slate'
5777
5455
  }),
@@ -5782,7 +5460,7 @@ var OtherEntriesCollectionView = Marionette.View.extend({
5782
5460
  }
5783
5461
  });
5784
5462
 
5785
- function template$u(data) {
5463
+ function template$q(data) {
5786
5464
  var __t, __p = '';
5787
5465
  __p += '<div class="box">\n <h2>' +
5788
5466
  ((__t = ( I18n.t('pageflow.editor.templates.files_explorer.reuse_files') )) == null ? '' : __t) +
@@ -5811,7 +5489,7 @@ return __p
5811
5489
  }
5812
5490
 
5813
5491
  var FilesExplorerView = Marionette.ItemView.extend({
5814
- template: template$u,
5492
+ template: template$q,
5815
5493
  className: 'files_explorer editor dialog',
5816
5494
  mixins: [dialogView],
5817
5495
  ui: {
@@ -5848,7 +5526,7 @@ var FilesExplorerView = Marionette.ItemView.extend({
5848
5526
  i18n: 'pageflow.editor.files.tabs',
5849
5527
  defaultTab: this.options.tabName
5850
5528
  });
5851
- editor$1.fileTypes.each(function (fileType) {
5529
+ editor.fileTypes.each(function (fileType) {
5852
5530
  if (fileType.topLevelType) {
5853
5531
  this.tab(fileType);
5854
5532
  }
@@ -5857,7 +5535,7 @@ var FilesExplorerView = Marionette.ItemView.extend({
5857
5535
  this.ui.okButton.prop('disabled', true);
5858
5536
  },
5859
5537
  tab: function tab(fileType) {
5860
- this.tabsView.tab(fileType.collectionName, _$1.bind(function () {
5538
+ this.tabsView.tab(fileType.collectionName, _.bind(function () {
5861
5539
  var collection = this._collection(fileType);
5862
5540
 
5863
5541
  var disabledIds = state.entry.getFileCollection(fileType).pluck('id');
@@ -5898,7 +5576,7 @@ FilesExplorerView.open = function (options) {
5898
5576
  app.dialogRegion.show(new FilesExplorerView(options));
5899
5577
  };
5900
5578
 
5901
- function template$v(data) {
5579
+ function template$r(data) {
5902
5580
  var __p = '';
5903
5581
  __p += '<th></th>\n<td></td>';
5904
5582
  return __p
@@ -5906,13 +5584,13 @@ return __p
5906
5584
 
5907
5585
  var FileMetaDataItemView = Marionette.ItemView.extend({
5908
5586
  tagName: 'tr',
5909
- template: template$v,
5587
+ template: template$r,
5910
5588
  ui: {
5911
5589
  label: 'th',
5912
5590
  value: 'td'
5913
5591
  },
5914
5592
  onRender: function onRender() {
5915
- this.subview(new this.options.valueView(_$1.extend({
5593
+ this.subview(new this.options.valueView(_.extend({
5916
5594
  el: this.ui.value,
5917
5595
  model: this.model,
5918
5596
  name: this.options.name
@@ -5928,7 +5606,7 @@ var FileMetaDataItemView = Marionette.ItemView.extend({
5928
5606
  }
5929
5607
  });
5930
5608
 
5931
- function template$w(data) {
5609
+ function template$s(data) {
5932
5610
  var __p = '';
5933
5611
  __p += '<p class="percent"></p>\n<p class="description"></p>\n<p class="error_message"></p>';
5934
5612
  return __p
@@ -5937,7 +5615,7 @@ return __p
5937
5615
  var FileStageItemView = Marionette.ItemView.extend({
5938
5616
  tagName: 'li',
5939
5617
  className: 'file_stage_item',
5940
- template: template$w,
5618
+ template: template$s,
5941
5619
  ui: {
5942
5620
  description: '.description',
5943
5621
  percent: '.percent',
@@ -5978,7 +5656,7 @@ var FileStageItemView = Marionette.ItemView.extend({
5978
5656
  }
5979
5657
  });
5980
5658
 
5981
- function template$x(data) {
5659
+ function template$t(data) {
5982
5660
  var __t, __p = '';
5983
5661
  __p += '<span class="file_thumbnail"></span>\n\n<span class="file_name"></span>\n<a class="select">' +
5984
5662
  ((__t = ( I18n.t('pageflow.editor.templates.file_item.select') )) == null ? '' : __t) +
@@ -6002,7 +5680,7 @@ return __p
6002
5680
 
6003
5681
  var FileItemView = Marionette.ItemView.extend({
6004
5682
  tagName: 'li',
6005
- template: template$x,
5683
+ template: template$t,
6006
5684
  mixins: [loadable],
6007
5685
  ui: {
6008
5686
  fileName: '.file_name',
@@ -6023,7 +5701,7 @@ var FileItemView = Marionette.ItemView.extend({
6023
5701
  var result = this.options.selectionHandler.call(this.model);
6024
5702
 
6025
5703
  if (result !== false) {
6026
- editor$1.navigate(this.options.selectionHandler.getReferer(), {
5704
+ editor.navigate(this.options.selectionHandler.getReferer(), {
6027
5705
  trigger: true
6028
5706
  });
6029
5707
  }
@@ -6056,7 +5734,7 @@ var FileItemView = Marionette.ItemView.extend({
6056
5734
  itemViewConstructor: FileStageItemView
6057
5735
  }));
6058
5736
 
6059
- _$1.each(this.metaDataViews(), function (view) {
5737
+ _.each(this.metaDataViews(), function (view) {
6060
5738
  this.ui.metaData.append(this.subview(view).el);
6061
5739
  }, this);
6062
5740
  },
@@ -6068,7 +5746,7 @@ var FileItemView = Marionette.ItemView.extend({
6068
5746
  this.$el.attr('data-id', this.model.id);
6069
5747
  this.ui.fileName.text(this.model.get('file_name') || '(Unbekannt)');
6070
5748
  this.ui.downloadLink.attr('href', this.model.get('original_url'));
6071
- this.ui.downloads.toggle(this.model.isUploaded() && !_$1.isEmpty(this.model.get('original_url')));
5749
+ this.ui.downloads.toggle(this.model.isUploaded() && !_.isEmpty(this.model.get('original_url')));
6072
5750
  this.ui.selectButton.toggle(!!this.options.selectionHandler);
6073
5751
  this.ui.settingsButton.toggle(!this.model.isNew());
6074
5752
  this.ui.cancelButton.toggle(this.model.isUploading());
@@ -6079,7 +5757,7 @@ var FileItemView = Marionette.ItemView.extend({
6079
5757
  },
6080
5758
  metaDataViews: function metaDataViews() {
6081
5759
  var model = this.model;
6082
- return _$1.map(this.options.metaDataAttributes, function (options) {
5760
+ return _.map(this.options.metaDataAttributes, function (options) {
6083
5761
  if (typeof options === 'string') {
6084
5762
  options = {
6085
5763
  name: options,
@@ -6087,7 +5765,7 @@ var FileItemView = Marionette.ItemView.extend({
6087
5765
  };
6088
5766
  }
6089
5767
 
6090
- return new FileMetaDataItemView(_$1.extend({
5768
+ return new FileMetaDataItemView(_.extend({
6091
5769
  model: model
6092
5770
  }, options));
6093
5771
  });
@@ -6108,7 +5786,7 @@ var FileItemView = Marionette.ItemView.extend({
6108
5786
  this.model.cancelUpload();
6109
5787
  },
6110
5788
  confirm: function confirm() {
6111
- editor$1.navigate('/confirmable_files?type=' + this.model.modelName + '&id=' + this.model.id, {
5789
+ editor.navigate('/confirmable_files?type=' + this.model.modelName + '&id=' + this.model.id, {
6112
5790
  trigger: true
6113
5791
  });
6114
5792
  },
@@ -6117,7 +5795,7 @@ var FileItemView = Marionette.ItemView.extend({
6117
5795
  }
6118
5796
  });
6119
5797
 
6120
- function template$y(data) {
5798
+ function template$u(data) {
6121
5799
  var __t, __p = '';
6122
5800
  __p += '<div class="filtered_files-banner">\n <span class="filtered_files-banner_prefix">\n ' +
6123
5801
  ((__t = ( I18n.t('pageflow.editor.views.filtered_files_view.banner_prefix') )) == null ? '' : __t) +
@@ -6136,7 +5814,7 @@ return __p
6136
5814
  }
6137
5815
 
6138
5816
  var FilteredFilesView = Marionette.ItemView.extend({
6139
- template: template$y,
5817
+ template: template$u,
6140
5818
  className: 'filtered_files',
6141
5819
  ui: {
6142
5820
  banner: '.filtered_files-banner',
@@ -6144,7 +5822,7 @@ var FilteredFilesView = Marionette.ItemView.extend({
6144
5822
  },
6145
5823
  events: {
6146
5824
  'click .filtered_files-reset_filter': function clickFiltered_filesReset_filter() {
6147
- editor$1.navigate('/files/' + this.options.fileType.collectionName, {
5825
+ editor.navigate('/files/' + this.options.fileType.collectionName, {
6148
5826
  trigger: true
6149
5827
  });
6150
5828
  return false;
@@ -6200,7 +5878,7 @@ var FilteredFilesView = Marionette.ItemView.extend({
6200
5878
  }
6201
5879
  });
6202
5880
 
6203
- function template$z(data) {
5881
+ function template$v(data) {
6204
5882
  var __t, __p = '';
6205
5883
  __p += '<div class="box choose_importer_box">\n <h1 class="dialog-header">' +
6206
5884
  ((__t = ( I18n.t('pageflow.editor.views.files_view.importer.heading') )) == null ? '' : __t) +
@@ -6210,7 +5888,7 @@ __p += '<div class="box choose_importer_box">\n <h1 class="dialog-header">' +
6210
5888
  return __p
6211
5889
  }
6212
5890
 
6213
- function template$A(data) {
5891
+ function template$w(data) {
6214
5892
  var __t, __p = '';
6215
5893
  __p += '<button class=\'importer\' data-key=\'' +
6216
5894
  ((__t = ( data.fileImporter.key )) == null ? '' : __t) +
@@ -6225,7 +5903,7 @@ return __p
6225
5903
  }
6226
5904
 
6227
5905
  var ImporterSelectView = Marionette.ItemView.extend({
6228
- template: template$A,
5906
+ template: template$w,
6229
5907
  className: 'importer_select',
6230
5908
  tagName: 'li',
6231
5909
  events: {
@@ -6242,7 +5920,7 @@ var ImporterSelectView = Marionette.ItemView.extend({
6242
5920
  });
6243
5921
 
6244
5922
  var ChooseImporterView = Marionette.ItemView.extend({
6245
- template: template$z,
5923
+ template: template$v,
6246
5924
  className: 'choose_importer editor dialog',
6247
5925
  mixins: [dialogView],
6248
5926
  ui: {
@@ -6263,7 +5941,7 @@ var ChooseImporterView = Marionette.ItemView.extend({
6263
5941
  },
6264
5942
  onRender: function onRender() {
6265
5943
  var self = this;
6266
- editor$1.fileImporters.values().forEach(function (fileImporter) {
5944
+ editor.fileImporters.values().forEach(function (fileImporter) {
6267
5945
  var importerSelectView = new ImporterSelectView({
6268
5946
  importer: fileImporter,
6269
5947
  parentView: self
@@ -6277,7 +5955,7 @@ ChooseImporterView.open = function (options) {
6277
5955
  app.dialogRegion.show(new ChooseImporterView(options).render());
6278
5956
  };
6279
5957
 
6280
- function template$B(data) {
5958
+ function template$x(data) {
6281
5959
  var __t, __p = '';
6282
5960
  __p += '<div class="box file_importer_box">\n <h1 class="dialog-header">' +
6283
5961
  ((__t = ( I18n.t('pageflow.editor.file_importers.'+data.importerKey+'.dialog_label') )) == null ? '' : __t) +
@@ -6291,7 +5969,7 @@ __p += '<div class="box file_importer_box">\n <h1 class="dialog-header">' +
6291
5969
  return __p
6292
5970
  }
6293
5971
 
6294
- function template$C(data) {
5972
+ function template$y(data) {
6295
5973
  var __t, __p = '';
6296
5974
  __p += '<div class="box">\n <h1 class="dialog-header">' +
6297
5975
  ((__t = ( I18n.t('pageflow.editor.templates.confirm_upload.header') )) == null ? '' : __t) +
@@ -6307,14 +5985,14 @@ __p += '<div class="box">\n <h1 class="dialog-header">' +
6307
5985
  return __p
6308
5986
  }
6309
5987
 
6310
- function template$D(data) {
5988
+ function template$z(data) {
6311
5989
  var __p = '';
6312
5990
  __p += '<h2></h2>\n';
6313
5991
  return __p
6314
5992
  }
6315
5993
 
6316
5994
  var UploadableFilesView = Marionette.ItemView.extend({
6317
- template: template$D,
5995
+ template: template$z,
6318
5996
  className: 'uploadable_files',
6319
5997
  ui: {
6320
5998
  header: 'h2'
@@ -6351,8 +6029,8 @@ var UploadableFilesView = Marionette.ItemView.extend({
6351
6029
  }];
6352
6030
  },
6353
6031
  fileTypeColumns: function fileTypeColumns() {
6354
- return _$1(this.options.fileType.confirmUploadTableColumns).map(function (column) {
6355
- return _$1.extend({}, column, {
6032
+ return _(this.options.fileType.confirmUploadTableColumns).map(function (column) {
6033
+ return _.extend({}, column, {
6356
6034
  configurationAttribute: true
6357
6035
  });
6358
6036
  });
@@ -6360,7 +6038,7 @@ var UploadableFilesView = Marionette.ItemView.extend({
6360
6038
  });
6361
6039
 
6362
6040
  var ConfirmFileImportUploadView = Marionette.Layout.extend({
6363
- template: template$C,
6041
+ template: template$y,
6364
6042
  className: 'confirm_upload editor dialog',
6365
6043
  mixins: [dialogView],
6366
6044
  regions: {
@@ -6380,15 +6058,11 @@ var ConfirmFileImportUploadView = Marionette.Layout.extend({
6380
6058
  getSelectedFiles: function getSelectedFiles() {
6381
6059
  var files = [];
6382
6060
 
6383
- for (var key in state.files) {
6384
- if (state.files.hasOwnProperty(key)) {
6385
- var collection = state.files[key];
6386
-
6387
- if (collection.length > 0) {
6388
- files = files.concat(collection.toJSON());
6389
- }
6061
+ _.each(state.files, function (collection) {
6062
+ if (collection.length > 0) {
6063
+ files = files.concat(collection.toJSON());
6390
6064
  }
6391
- }
6065
+ });
6392
6066
 
6393
6067
  return files;
6394
6068
  },
@@ -6420,7 +6094,7 @@ var ConfirmFileImportUploadView = Marionette.Layout.extend({
6420
6094
  var file = this.selection.get('file');
6421
6095
 
6422
6096
  if (file) {
6423
- this.selectedFileRegion.show(new pageflow.EditFileView({
6097
+ this.selectedFileRegion.show(new EditFileView({
6424
6098
  model: file
6425
6099
  }));
6426
6100
  } else {
@@ -6434,7 +6108,7 @@ ConfirmFileImportUploadView.open = function (options) {
6434
6108
  };
6435
6109
 
6436
6110
  var FilesImporterView = Marionette.ItemView.extend({
6437
- template: template$B,
6111
+ template: template$x,
6438
6112
  className: 'files_importer editor dialog',
6439
6113
  mixins: [dialogView],
6440
6114
  ui: {
@@ -6485,8 +6159,8 @@ var FilesImporterView = Marionette.ItemView.extend({
6485
6159
 
6486
6160
  for (var i = 0; i < metaData.files.length; i++) {
6487
6161
  var file = metaData.files[i];
6488
- var fileType = editor$1.fileTypes.findByUpload(file);
6489
- var file = new fileType.model({
6162
+ var fileType = editor.fileTypes.findByUpload(file);
6163
+ file = new fileType.model({
6490
6164
  state: 'uploadable',
6491
6165
  file_name: file.name,
6492
6166
  content_type: file.type,
@@ -6500,7 +6174,7 @@ var FilesImporterView = Marionette.ItemView.extend({
6500
6174
  }
6501
6175
 
6502
6176
  ConfirmFileImportUploadView.open({
6503
- fileTypes: editor$1.fileTypes,
6177
+ fileTypes: editor.fileTypes,
6504
6178
  fileImportModel: self.model,
6505
6179
  files: state.files
6506
6180
  });
@@ -6521,7 +6195,7 @@ FilesImporterView.open = function (options) {
6521
6195
  app.dialogRegion.show(new FilesImporterView(options).render());
6522
6196
  };
6523
6197
 
6524
- function template$E(data) {
6198
+ function template$A(data) {
6525
6199
  var __t, __p = '';
6526
6200
  __p += '<button class="">\n <span class="label">' +
6527
6201
  ((__t = ( I18n.t('pageflow.editor.templates.select_button.select') )) == null ? '' : __t) +
@@ -6530,7 +6204,7 @@ return __p
6530
6204
  }
6531
6205
 
6532
6206
  var SelectButtonView = Marionette.ItemView.extend({
6533
- template: template$E,
6207
+ template: template$A,
6534
6208
  className: 'select_button',
6535
6209
  ui: {
6536
6210
  button: 'button',
@@ -6565,7 +6239,7 @@ var SelectButtonView = Marionette.ItemView.extend({
6565
6239
  }
6566
6240
  });
6567
6241
 
6568
- function template$F(data) {
6242
+ function template$B(data) {
6569
6243
  var __t, __p = '';
6570
6244
  __p += '<a class="back">' +
6571
6245
  ((__t = ( I18n.t('pageflow.editor.templates.files.back') )) == null ? '' : __t) +
@@ -6574,7 +6248,7 @@ return __p
6574
6248
  }
6575
6249
 
6576
6250
  var FilesView = Marionette.ItemView.extend({
6577
- template: template$F,
6251
+ template: template$B,
6578
6252
  className: 'manage_files',
6579
6253
  events: {
6580
6254
  'click a.back': 'goBack',
@@ -6595,7 +6269,7 @@ var FilesView = Marionette.ItemView.extend({
6595
6269
  }
6596
6270
  }];
6597
6271
 
6598
- if (editor$1.fileImporters.keys().length > 0) {
6272
+ if (editor.fileImporters.keys().length > 0) {
6599
6273
  menuOptions.push({
6600
6274
  label: I18n$1.t('pageflow.editor.views.files_view.import'),
6601
6275
  handler: function handler() {
@@ -6622,7 +6296,7 @@ var FilesView = Marionette.ItemView.extend({
6622
6296
  i18n: 'pageflow.editor.files.tabs',
6623
6297
  defaultTab: this.options.tabName
6624
6298
  });
6625
- editor$1.fileTypes.each(function (fileType) {
6299
+ editor.fileTypes.each(function (fileType) {
6626
6300
  if (fileType.topLevelType) {
6627
6301
  this.tab(fileType);
6628
6302
  }
@@ -6631,7 +6305,7 @@ var FilesView = Marionette.ItemView.extend({
6631
6305
  },
6632
6306
  tab: function tab(fileType) {
6633
6307
  var selectionMode = this.options.tabName === fileType.collectionName;
6634
- this.tabsView.tab(fileType.collectionName, _$1.bind(function () {
6308
+ this.tabsView.tab(fileType.collectionName, _.bind(function () {
6635
6309
  return this.subview(new FilteredFilesView({
6636
6310
  entry: state.entry,
6637
6311
  fileType: fileType,
@@ -6645,11 +6319,11 @@ var FilesView = Marionette.ItemView.extend({
6645
6319
  },
6646
6320
  goBack: function goBack() {
6647
6321
  if (this.options.selectionHandler) {
6648
- editor$1.navigate(this.options.selectionHandler.getReferer(), {
6322
+ editor.navigate(this.options.selectionHandler.getReferer(), {
6649
6323
  trigger: true
6650
6324
  });
6651
6325
  } else {
6652
- editor$1.navigate('/', {
6326
+ editor.navigate('/', {
6653
6327
  trigger: true
6654
6328
  });
6655
6329
  }
@@ -6659,14 +6333,14 @@ var FilesView = Marionette.ItemView.extend({
6659
6333
  }
6660
6334
  });
6661
6335
 
6662
- function template$G(data) {
6336
+ function template$C(data) {
6663
6337
  var __p = '';
6664
6338
  __p += '<div class="quota_state">\n</div>\n<div class="outlet">\n</div>\n<div class="exhausted_message">\n</div>\n';
6665
6339
  return __p
6666
6340
  }
6667
6341
 
6668
6342
  var EntryPublicationQuotaDecoratorView = Marionette.Layout.extend({
6669
- template: template$G,
6343
+ template: template$C,
6670
6344
  className: 'quota_decorator',
6671
6345
  regions: {
6672
6346
  outlet: '.outlet'
@@ -6707,7 +6381,7 @@ var EntryPublicationQuotaDecoratorView = Marionette.Layout.extend({
6707
6381
  }
6708
6382
  });
6709
6383
 
6710
- function template$H(data) {
6384
+ function template$D(data) {
6711
6385
  var __t, __p = '';
6712
6386
  __p += '<div class="files_pending notice">\n <p>' +
6713
6387
  ((__t = ( I18n.t('pageflow.editor.templates.publish_entry.files_pending_notice') )) == null ? '' : __t) +
@@ -6754,7 +6428,7 @@ return __p
6754
6428
  }
6755
6429
 
6756
6430
  var PublishEntryView = Marionette.ItemView.extend({
6757
- template: template$H,
6431
+ template: template$D,
6758
6432
  className: 'publish_entry',
6759
6433
  ui: {
6760
6434
  publishUntilFields: '.publish_until_fields',
@@ -6949,14 +6623,14 @@ var PublishEntryView = Marionette.ItemView.extend({
6949
6623
  this.enableSave();
6950
6624
  },
6951
6625
  checkForm: function checkForm() {
6952
- if (_$1.all([this.checkPublishUntil(), this.checkPassword()])) {
6626
+ if (_.all([this.checkPublishUntil(), this.checkPassword()])) {
6953
6627
  this.enableSave();
6954
6628
  } else {
6955
6629
  this.disableSave();
6956
6630
  }
6957
6631
  },
6958
6632
  checkPublishUntil: function checkPublishUntil() {
6959
- return this.ui.publishForeverRadioBox.is(':checked') || this.ui.publishUntilRadioBox.is(':checked') && _$1.all([this.checkPublishUntilDate(), this.checkPublishUntilTime()]);
6633
+ return this.ui.publishForeverRadioBox.is(':checked') || this.ui.publishUntilRadioBox.is(':checked') && _.all([this.checkPublishUntilDate(), this.checkPublishUntilTime()]);
6960
6634
  },
6961
6635
  checkPublishUntilDate: function checkPublishUntilDate() {
6962
6636
  if (this.ui.publishUntilField.datepicker('getDate')) {
@@ -6991,7 +6665,7 @@ var PublishEntryView = Marionette.ItemView.extend({
6991
6665
  },
6992
6666
  randomPassword: function randomPassword() {
6993
6667
  var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
6994
- return _$1(10).times(function () {
6668
+ return _(10).times(function () {
6995
6669
  return possible.charAt(Math.floor(Math.random() * possible.length));
6996
6670
  }).join('');
6997
6671
  }
@@ -7020,11 +6694,11 @@ var SidebarController = Marionette.Controller.extend({
7020
6694
  files: function files(collectionName, handler, payload, filterName) {
7021
6695
  this.region.show(new FilesView({
7022
6696
  model: this.entry,
7023
- selectionHandler: handler && editor$1.createFileSelectionHandler(handler, payload),
6697
+ selectionHandler: handler && editor.createFileSelectionHandler(handler, payload),
7024
6698
  tabName: collectionName,
7025
6699
  filterName: filterName
7026
6700
  }));
7027
- editor$1.setDefaultHelpEntry('pageflow.help_entries.files');
6701
+ editor.setDefaultHelpEntry('pageflow.help_entries.files');
7028
6702
  },
7029
6703
  confirmableFiles: function confirmableFiles(preselectedFileType, preselectedFileId) {
7030
6704
  this.region.show(ConfirmEncodingView.create({
@@ -7039,8 +6713,8 @@ var SidebarController = Marionette.Controller.extend({
7039
6713
  model: this.entry,
7040
6714
  tab: tab,
7041
6715
  state: state,
7042
- features: pageflow.features,
7043
- editor: editor$1
6716
+ features: features,
6717
+ editor: editor
7044
6718
  }));
7045
6719
  },
7046
6720
  publish: function publish() {
@@ -7048,35 +6722,7 @@ var SidebarController = Marionette.Controller.extend({
7048
6722
  model: this.entry,
7049
6723
  entryPublication: new EntryPublication()
7050
6724
  }));
7051
- editor$1.setDefaultHelpEntry('pageflow.help_entries.publish');
7052
- },
7053
- storyline: function storyline(id) {
7054
- this.region.show(new EditStorylineView({
7055
- model: this.entry.storylines.get(id)
7056
- }));
7057
- },
7058
- chapter: function chapter(id) {
7059
- this.region.show(new EditChapterView({
7060
- model: this.entry.chapters.get(id)
7061
- }));
7062
- },
7063
- page: function page(id, tab) {
7064
- var page = this.entry.pages.get(id);
7065
- this.region.show(new EditPageView({
7066
- model: page,
7067
- api: editor$1,
7068
- tab: tab
7069
- }));
7070
- editor$1.setDefaultHelpEntry(page.pageType().help_entry_translation_key);
7071
- },
7072
- pageLink: function pageLink(linkId) {
7073
- var pageId = linkId.split(':')[0];
7074
- var page = state.pages.getByPermaId(pageId);
7075
- this.region.show(new EditPageLinkView({
7076
- model: page.pageLinks().get(linkId),
7077
- page: page,
7078
- api: editor$1
7079
- }));
6725
+ editor.setDefaultHelpEntry('pageflow.help_entries.publish');
7080
6726
  },
7081
6727
  widget: function widget(id) {
7082
6728
  this.region.show(new EditWidgetView({
@@ -7165,7 +6811,7 @@ var ScrollingView = Marionette.View.extend({
7165
6811
  }
7166
6812
  });
7167
6813
 
7168
- function template$I(data) {
6814
+ function template$E(data) {
7169
6815
  var __t, __p = '';
7170
6816
  __p += '<div class="box">\n <h2>' +
7171
6817
  ((__t = ( I18n.t('pageflow.editor.templates.help.title') )) == null ? '' : __t) +
@@ -7176,7 +6822,7 @@ return __p
7176
6822
  }
7177
6823
 
7178
6824
  var HelpView = Marionette.ItemView.extend({
7179
- template: template$I,
6825
+ template: template$E,
7180
6826
  className: 'help',
7181
6827
  ui: {
7182
6828
  placeholder: '.placeholder',
@@ -7213,7 +6859,7 @@ var HelpView = Marionette.ItemView.extend({
7213
6859
  initialize: function initialize() {
7214
6860
  this.listenTo(app, 'toggle-help', function (name) {
7215
6861
  this.toggle();
7216
- this.showSection(name || editor$1.defaultHelpEntry || this.defaultHelpEntry(), {
6862
+ this.showSection(name || editor.defaultHelpEntry || this.defaultHelpEntry(), {
7217
6863
  scrollIntoView: true
7218
6864
  });
7219
6865
  });
@@ -7253,7 +6899,7 @@ var PageThumbnailView = ModelThumbnailView.extend({
7253
6899
  className: 'model_thumbnail page_thumbnail'
7254
6900
  });
7255
6901
 
7256
- function template$J(data) {
6902
+ function template$F(data) {
7257
6903
  var __t, __p = '';
7258
6904
  __p += '<div>\n <span class="missing_page_thumbnail"></span>\n <span class="page_thumbnail"></span>\n <div class="title"></div>\n <div class="label"></div>\n <a class="remove" title="' +
7259
6905
  ((__t = ( I18n.t('pageflow.editor.templates.page_link_item.remove') )) == null ? '' : __t) +
@@ -7264,7 +6910,7 @@ return __p
7264
6910
  }
7265
6911
 
7266
6912
  var PageLinkItemView = Marionette.ItemView.extend({
7267
- template: template$J,
6913
+ template: template$F,
7268
6914
  tagName: 'li',
7269
6915
  className: 'page_link',
7270
6916
  ui: {
@@ -7276,7 +6922,7 @@ var PageLinkItemView = Marionette.ItemView.extend({
7276
6922
  },
7277
6923
  events: {
7278
6924
  'click .edit': function clickEdit() {
7279
- editor$1.navigate(this.model.editPath(), {
6925
+ editor.navigate(this.model.editPath(), {
7280
6926
  trigger: true
7281
6927
  });
7282
6928
  return false;
@@ -7314,7 +6960,7 @@ var PageLinkItemView = Marionette.ItemView.extend({
7314
6960
  }
7315
6961
  });
7316
6962
 
7317
- function template$K(data) {
6963
+ function template$G(data) {
7318
6964
  var __t, __p = '';
7319
6965
  __p += '<label>\n <span class="name">' +
7320
6966
  ((__t = ( I18n.t('pageflow.editor.templates.page_links.label') )) == null ? '' : __t) +
@@ -7325,7 +6971,7 @@ return __p
7325
6971
  }
7326
6972
 
7327
6973
  var PageLinksView = Marionette.ItemView.extend({
7328
- template: template$K,
6974
+ template: template$G,
7329
6975
  className: 'page_links',
7330
6976
  ui: {
7331
6977
  links: 'ul.links',
@@ -7334,7 +6980,7 @@ var PageLinksView = Marionette.ItemView.extend({
7334
6980
  events: {
7335
6981
  'click .add_link': function clickAdd_link() {
7336
6982
  var view = this;
7337
- editor$1.selectPage().then(function (page) {
6983
+ editor.selectPage().then(function (page) {
7338
6984
  view.model.pageLinks().addLink(page.get('perma_id'));
7339
6985
  });
7340
6986
  return false;
@@ -7361,61 +7007,48 @@ var PageLinksView = Marionette.ItemView.extend({
7361
7007
  }
7362
7008
  });
7363
7009
 
7364
- function template$L(data) {
7365
- var __t, __p = '';
7366
- __p += '<div class="emulation_mode_button-menu">\n <div class="emulation_mode_button-menu_header">\n ' +
7367
- ((__t = ( I18n.t('pageflow.editor.templates.emulation_mode_button.header') )) == null ? '' : __t) +
7368
- '\n </div>\n <ul>\n <li class="emulation_mode_button-menu_item emulation_mode_button-desktop">\n <a class="emulation_mode_button-menu_link">\n ' +
7369
- ((__t = ( I18n.t('pageflow.editor.templates.emulation_mode_button.desktop') )) == null ? '' : __t) +
7370
- '\n </a>\n </li>\n <li class="emulation_mode_button-menu_item emulation_mode_button-phone">\n <a class="emulation_mode_button-menu_link">\n ' +
7371
- ((__t = ( I18n.t('pageflow.editor.templates.emulation_mode_button.phone') )) == null ? '' : __t) +
7372
- '\n <div class="emulation_mode_button-disabled_hint">\n ' +
7373
- ((__t = ( I18n.t('pageflow.editor.templates.emulation_mode_button.disabled_hint') )) == null ? '' : __t) +
7374
- '\n </div>\n </a>\n </li>\n </ul>\n</div>\n<div class="emulation_mode_button-display emulation_mode_button-desktop">\n ' +
7375
- ((__t = ( I18n.t('pageflow.editor.templates.emulation_mode_button.desktop') )) == null ? '' : __t) +
7376
- '\n</div>\n<div class="emulation_mode_button-display emulation_mode_button-phone">\n ' +
7377
- ((__t = ( I18n.t('pageflow.editor.templates.emulation_mode_button.phone') )) == null ? '' : __t) +
7378
- '\n</div>\n';
7010
+ function template$H(data) {
7011
+ var __p = '';
7012
+ __p += '<div class="emulation_mode_button-wrapper"\n data-tooltip-align="top center">\n <div class="emulation_mode_button-desktop_icon"/>\n <div class="emulation_mode_button-phone_icon"/>\n <div class="emulation_mode_button-track" />\n <div class="emulation_mode_button-thumb" />\n</div>\n';
7379
7013
  return __p
7380
7014
  }
7381
7015
 
7382
7016
  var EmulationModeButtonView = Marionette.ItemView.extend({
7383
- template: template$L,
7017
+ template: template$H,
7384
7018
  className: 'emulation_mode_button',
7019
+ mixins: [tooltipContainer],
7385
7020
  ui: {
7386
- phoneItem: '.emulation_mode_button-phone',
7387
- desktopItem: '.emulation_mode_button-desktop',
7388
- phoneDisplay: '.emulation_mode_button-display.emulation_mode_button-phone',
7389
- desktopDisplay: '.emulation_mode_button-display.emulation_mode_button-desktop'
7021
+ wrapper: '.emulation_mode_button-wrapper',
7022
+ desktopIcon: '.emulation_mode_button-desktop_icon',
7023
+ phoneIcon: '.emulation_mode_button-phone_icon'
7390
7024
  },
7391
7025
  events: {
7392
- 'click .emulation_mode_button-desktop a': function clickEmulation_mode_buttonDesktopA() {
7393
- this.model.unset('emulation_mode');
7394
- },
7395
- 'click .emulation_mode_button-phone a': function clickEmulation_mode_buttonPhoneA() {
7396
- if (!this.model.get('current_page_supports_emulation_mode')) {
7026
+ 'click': function click() {
7027
+ if (this.model.get('emulation_mode_disabled')) {
7397
7028
  return;
7398
7029
  }
7399
7030
 
7400
- this.model.set('emulation_mode', 'phone');
7031
+ if (this.model.has('emulation_mode')) {
7032
+ this.model.unset('emulation_mode');
7033
+ } else {
7034
+ this.model.set('emulation_mode', 'phone');
7035
+ }
7401
7036
  }
7402
7037
  },
7403
7038
  modelEvents: {
7404
- 'change:emulation_mode change:current_page_supports_emulation_mode': 'update'
7039
+ 'change:emulation_mode change:emulation_mode_disabled': 'update'
7405
7040
  },
7406
7041
  onRender: function onRender() {
7407
7042
  this.update();
7408
7043
  },
7409
7044
  update: function update() {
7410
- this.ui.phoneItem.toggleClass('disabled', !this.model.get('current_page_supports_emulation_mode'));
7411
- this.ui.phoneItem.toggleClass('active', this.model.has('emulation_mode'));
7412
- this.ui.desktopItem.toggleClass('active', !this.model.has('emulation_mode'));
7413
- this.ui.phoneDisplay.toggleClass('active', this.model.has('emulation_mode'));
7414
- this.ui.desktopDisplay.toggleClass('active', !this.model.has('emulation_mode'));
7045
+ this.$el.toggleClass('disabled', !!this.model.get('emulation_mode_disabled'));
7046
+ this.$el.toggleClass('active', this.model.has('emulation_mode'));
7047
+ this.ui.wrapper.attr('data-tooltip', this.model.get('emulation_mode_disabled') ? 'pageflow.editor.templates.emulation_mode_button.disabled_hint' : 'pageflow.editor.templates.emulation_mode_button.tooltip');
7415
7048
  }
7416
7049
  });
7417
7050
 
7418
- function template$M(data) {
7051
+ function template$I(data) {
7419
7052
  var __t, __p = '';
7420
7053
  __p +=
7421
7054
  ((__t = ( I18n.t('pageflow.editor.templates.help_button.open_help') )) == null ? '' : __t);
@@ -7423,7 +7056,7 @@ return __p
7423
7056
  }
7424
7057
 
7425
7058
  var HelpButtonView = Marionette.ItemView.extend({
7426
- template: template$M,
7059
+ template: template$I,
7427
7060
  className: 'help_button',
7428
7061
  events: {
7429
7062
  'click': function click() {
@@ -7435,7 +7068,7 @@ var HelpButtonView = Marionette.ItemView.extend({
7435
7068
  var SidebarFooterView = Marionette.View.extend({
7436
7069
  className: 'sidebar_footer',
7437
7070
  render: function render() {
7438
- if (pageflow.features.isEnabled('editor_emulation_mode')) {
7071
+ if (this.model.supportsPhoneEmulation()) {
7439
7072
  this.appendSubview(new EmulationModeButtonView({
7440
7073
  model: this.model
7441
7074
  }));
@@ -7463,7 +7096,7 @@ var InfoBoxView = Marionette.View.extend({
7463
7096
  }
7464
7097
  });
7465
7098
 
7466
- function template$N(data) {
7099
+ function template$J(data) {
7467
7100
  var __t, __p = '';
7468
7101
  __p += '<span class="list_item_thumbnail"></span>\n<span class="list_item_missing_thumbnail"></span>\n<span class="list_item_type_pictogram type_pictogram"></span>\n\n<div class="list_item_title"></div>\n<div class="list_item_description"></div>\n\n<div class="list_item_buttons">\n <a class="list_item_edit_button" title="' +
7469
7102
  ((__t = ( I18n.t('pageflow.editor.templates.list_item.edit') )) == null ? '' : __t) +
@@ -7474,7 +7107,7 @@ return __p
7474
7107
  }
7475
7108
 
7476
7109
  var ListItemView = Marionette.ItemView.extend({
7477
- template: template$N,
7110
+ template: template$J,
7478
7111
  tagName: 'li',
7479
7112
  className: 'list_item',
7480
7113
  ui: {
@@ -7548,7 +7181,7 @@ var ListItemView = Marionette.ItemView.extend({
7548
7181
  }
7549
7182
  });
7550
7183
 
7551
- function template$O(data) {
7184
+ function template$K(data) {
7552
7185
  var __t, __p = '';
7553
7186
  __p += '<div class="checking notice">\n <p>' +
7554
7187
  ((__t = ( I18n.t('pageflow.editor.templates.locked.loading') )) == null ? '' : __t) +
@@ -7563,7 +7196,7 @@ return __p
7563
7196
  }
7564
7197
 
7565
7198
  var LockedView = Marionette.ItemView.extend({
7566
- template: template$O,
7199
+ template: template$K,
7567
7200
  className: 'locked checking',
7568
7201
  ui: {
7569
7202
  breakButton: '.break',
@@ -7604,7 +7237,7 @@ var LockedView = Marionette.ItemView.extend({
7604
7237
  });
7605
7238
 
7606
7239
  var EditorView = Backbone.View.extend({
7607
- scrollNavigationKeys: _$1.values({
7240
+ scrollNavigationKeys: _.values({
7608
7241
  pageUp: 33,
7609
7242
  pageDown: 34,
7610
7243
  end: 35,
@@ -7726,7 +7359,7 @@ var LazyVideoEmbeddedView = Marionette.View.extend({
7726
7359
  },
7727
7360
  render: function render() {
7728
7361
  this.videoPlayer = this.$el.data('videoPlayer');
7729
- this.videoPlayer.ready(_$1.bind(function () {
7362
+ this.videoPlayer.ready(_.bind(function () {
7730
7363
  this.videoPlayer.src(this.model.getVideoFileSources(this.options.propertyName));
7731
7364
  }, this));
7732
7365
  this.update();
@@ -7756,7 +7389,7 @@ var LazyVideoEmbeddedView = Marionette.View.extend({
7756
7389
  }
7757
7390
  });
7758
7391
 
7759
- function template$P(data) {
7392
+ function template$L(data) {
7760
7393
  var __t, __p = '';
7761
7394
  __p += '<li class="uploading"><span class="count">0</span>' +
7762
7395
  ((__t = ( I18n.t('pageflow.editor.templates.notification.upload_pending') )) == null ? '' : __t) +
@@ -7779,7 +7412,7 @@ return __p
7779
7412
  var NotificationsView = Marionette.ItemView.extend({
7780
7413
  className: 'notifications',
7781
7414
  tagName: 'ul',
7782
- template: template$P,
7415
+ template: template$L,
7783
7416
  ui: {
7784
7417
  failedCount: '.failed .count',
7785
7418
  uploadingCount: '.uploading .count',
@@ -7787,23 +7420,23 @@ var NotificationsView = Marionette.ItemView.extend({
7787
7420
  },
7788
7421
  events: {
7789
7422
  'click .retry': function clickRetry() {
7790
- editor$1.failures.retry();
7423
+ editor.failures.retry();
7791
7424
  }
7792
7425
  },
7793
7426
  onRender: function onRender() {
7794
7427
  this.listenTo(state.entry, 'change:uploading_files_count', this.notifyUploadCount);
7795
7428
  this.listenTo(state.entry, 'change:confirmable_files_count', this.notifyConfirmableFilesCount);
7796
- this.listenTo(editor$1.savingRecords, 'add', this.update);
7797
- this.listenTo(editor$1.savingRecords, 'remove', this.update);
7798
- this.listenTo(editor$1.failures, 'add', this.update);
7799
- this.listenTo(editor$1.failures, 'remove', this.update);
7429
+ this.listenTo(editor.savingRecords, 'add', this.update);
7430
+ this.listenTo(editor.savingRecords, 'remove', this.update);
7431
+ this.listenTo(editor.failures, 'add', this.update);
7432
+ this.listenTo(editor.failures, 'remove', this.update);
7800
7433
  this.update();
7801
7434
  this.notifyConfirmableFilesCount();
7802
7435
  },
7803
7436
  update: function update() {
7804
- this.$el.toggleClass('failed', !editor$1.failures.isEmpty());
7805
- this.$el.toggleClass('saving', !editor$1.savingRecords.isEmpty());
7806
- this.ui.failedCount.text(editor$1.failures.count());
7437
+ this.$el.toggleClass('failed', !editor.failures.isEmpty());
7438
+ this.$el.toggleClass('saving', !editor.savingRecords.isEmpty());
7439
+ this.ui.failedCount.text(editor.failures.count());
7807
7440
  },
7808
7441
  notifyUploadCount: function notifyUploadCount(model, uploadCount) {
7809
7442
  this.$el.toggleClass('uploading', uploadCount > 0);
@@ -7821,7 +7454,7 @@ var FileProcessingStateDisplayView = Marionette.View.extend({
7821
7454
  mixins: [inputView],
7822
7455
  initialize: function initialize() {
7823
7456
  if (typeof this.options.collection === 'string') {
7824
- this.options.collection = state.entry.getFileCollection(editor$1.fileTypes.findByCollectionName(this.options.collection));
7457
+ this.options.collection = state.entry.getFileCollection(editor.fileTypes.findByCollectionName(this.options.collection));
7825
7458
  }
7826
7459
 
7827
7460
  this.listenTo(this.model, 'change:' + this.options.propertyName, this._update);
@@ -7866,14 +7499,14 @@ var FileProcessingStateDisplayView = Marionette.View.extend({
7866
7499
  }
7867
7500
  });
7868
7501
 
7869
- function template$Q(data) {
7502
+ function template$M(data) {
7870
7503
  var __p = '';
7871
7504
  __p += '<h2></h2>\n';
7872
7505
  return __p
7873
7506
  }
7874
7507
 
7875
7508
  var NestedFilesView = Marionette.ItemView.extend({
7876
- template: template$Q,
7509
+ template: template$M,
7877
7510
  className: 'nested_files',
7878
7511
  ui: {
7879
7512
  header: 'h2'
@@ -7908,8 +7541,8 @@ var NestedFilesView = Marionette.ItemView.extend({
7908
7541
  this.$el.toggleClass('is_empty', this.collection.length === 0);
7909
7542
  },
7910
7543
  columns: function columns(fileType) {
7911
- var nestedFilesColumns = _$1(fileType.nestedFileTableColumns).map(function (column) {
7912
- return _$1.extend({}, column, {
7544
+ var nestedFilesColumns = _(fileType.nestedFileTableColumns).map(function (column) {
7545
+ return _.extend({}, column, {
7913
7546
  configurationAttribute: true
7914
7547
  });
7915
7548
  });
@@ -7936,7 +7569,7 @@ var NestedFilesView = Marionette.ItemView.extend({
7936
7569
  this.options.selection.set('file', nextFile);
7937
7570
  }
7938
7571
  },
7939
- setNextFile: _$1.debounce(function () {
7572
+ setNextFile: _.debounce(function () {
7940
7573
  var fileIndex = this.collection.indexOf(this.options.selection.get('file'));
7941
7574
 
7942
7575
  if (typeof this.collection.at(fileIndex + 1) !== 'undefined') {
@@ -7949,7 +7582,7 @@ var NestedFilesView = Marionette.ItemView.extend({
7949
7582
  }, 200)
7950
7583
  });
7951
7584
 
7952
- function template$R(data) {
7585
+ function template$N(data) {
7953
7586
  var __t, __p = '';
7954
7587
  __p += '<div class="text_tracks_container">\n <div class="files_upload_panel">\n <div class="files_panel">\n </div>\n <a class="upload" href="">' +
7955
7588
  ((__t = ( I18n.t('pageflow.editor.templates.text_tracks.upload') )) == null ? '' : __t) +
@@ -7960,7 +7593,7 @@ return __p
7960
7593
  }
7961
7594
 
7962
7595
  var TextTracksView = Marionette.Layout.extend({
7963
- template: template$R,
7596
+ template: template$N,
7964
7597
  className: 'text_tracks',
7965
7598
  regions: {
7966
7599
  selectedFileRegion: '.selected_file_region'
@@ -7980,17 +7613,17 @@ var TextTracksView = Marionette.Layout.extend({
7980
7613
  onRender: function onRender() {
7981
7614
  this.nestedFilesView = new NestedFilesView({
7982
7615
  collection: this.model.nestedFiles(this.options.supersetCollection),
7983
- fileType: editor$1.fileTypes.findByCollectionName('text_track_files'),
7616
+ fileType: editor.fileTypes.findByCollectionName('text_track_files'),
7984
7617
  selection: this.selection,
7985
7618
  model: this.model,
7986
7619
  tableBlankSlateText: I18n$1.t('pageflow.editor.nested_files.text_track_files.no_files_blank_slate')
7987
7620
  });
7988
7621
  this.ui.filesPanel.append(this.subview(this.nestedFilesView).el);
7989
7622
  this.update();
7990
- editor$1.setUploadTargetFile(this.model);
7623
+ editor.setUploadTargetFile(this.model);
7991
7624
  },
7992
7625
  onClose: function onClose() {
7993
- editor$1.setUploadTargetFile(undefined);
7626
+ editor.setUploadTargetFile(undefined);
7994
7627
  },
7995
7628
  update: function update() {
7996
7629
  var selectedFile = this.selection.get('file');
@@ -8023,29 +7656,7 @@ var TextTracksFileMetaDataItemValueView = FileMetaDataItemValueView.extend({
8023
7656
  }
8024
7657
  });
8025
7658
 
8026
- var DisabledAtmoIndicatorView = Marionette.View.extend({
8027
- className: 'disabled_atmo_indicator',
8028
- events: {
8029
- 'click': function click() {
8030
- pageflow.atmo.enable();
8031
- }
8032
- },
8033
- initialize: function initialize() {
8034
- this.listenTo(pageflow.events, 'atmo:disabled', function () {
8035
- this.$el.show();
8036
- });
8037
- this.listenTo(pageflow.events, 'atmo:enabled', function () {
8038
- this.$el.hide();
8039
- });
8040
- this.$el.toggle(!!pageflow.atmo && pageflow.atmo.disabled);
8041
- },
8042
- render: function render() {
8043
- this.$el.attr('title', I18n$1.t('pageflow.editor.atmo.disabled'));
8044
- return this;
8045
- }
8046
- });
8047
-
8048
- function template$S(data) {
7659
+ function template$O(data) {
8049
7660
  var __p = '';
8050
7661
  __p += '<label>\n <span class="list_label"></span>\n</label>\n\n<ul class="list_items"></ul>\n';
8051
7662
  return __p
@@ -8092,7 +7703,7 @@ return __p
8092
7703
  */
8093
7704
 
8094
7705
  var ListView = Marionette.ItemView.extend({
8095
- template: template$S,
7706
+ template: template$O,
8096
7707
  className: 'list',
8097
7708
  ui: {
8098
7709
  label: '.list_label',
@@ -8104,12 +7715,12 @@ var ListView = Marionette.ItemView.extend({
8104
7715
  el: this.ui.items,
8105
7716
  collection: this.collection,
8106
7717
  itemViewConstructor: ListItemView,
8107
- itemViewOptions: _$1.extend({
7718
+ itemViewOptions: _.extend({
8108
7719
  description: this.options.itemDescription,
8109
7720
  typeName: this.options.itemTypeName,
8110
7721
  typeDescription: this.options.itemTypeDescription,
8111
7722
  isInvalid: this.options.itemIsInvalid
8112
- }, _$1(this.options).pick('onEdit', 'onRemove', 'highlight')),
7723
+ }, _(this.options).pick('onEdit', 'onRemove', 'highlight')),
8113
7724
  blankSlateViewConstructor: Marionette.ItemView.extend({
8114
7725
  tagName: 'li',
8115
7726
  className: 'list_blank_slate',
@@ -8122,7 +7733,7 @@ var ListView = Marionette.ItemView.extend({
8122
7733
  });
8123
7734
 
8124
7735
  var ConfirmUploadView = Marionette.Layout.extend({
8125
- template: template$C,
7736
+ template: template$y,
8126
7737
  className: 'confirm_upload editor dialog',
8127
7738
  mixins: [dialogView],
8128
7739
  regions: {
@@ -8211,6 +7822,9 @@ ConfirmUploadView.open = function (options) {
8211
7822
  * * `<translationKeyPrefix>.retry` (optional): Label of the retry
8212
7823
  * button of the failure message.
8213
7824
  *
7825
+ * Override the `destroyModel` method to customize destroy behavior.
7826
+ * Calls `destroyWithDelay` by default.
7827
+ *
8214
7828
  * @param {Object} options
8215
7829
  * @param {Backbone.Model} options.model -
8216
7830
  * Model including the {@link configurationContainer},
@@ -8243,7 +7857,7 @@ var EditConfigurationView = Marionette.Layout.extend({
8243
7857
  'click a.destroy': 'destroy'
8244
7858
  },
8245
7859
  onRender: function onRender() {
8246
- var translationKeyPrefix = _$1.result(this, 'translationKeyPrefix');
7860
+ var translationKeyPrefix = _.result(this, 'translationKeyPrefix');
8247
7861
 
8248
7862
  this.configurationEditor = new ConfigurationEditorView({
8249
7863
  tabTranslationKeyPrefix: "".concat(translationKeyPrefix, ".tabs"),
@@ -8258,17 +7872,21 @@ var EditConfigurationView = Marionette.Layout.extend({
8258
7872
  },
8259
7873
  destroy: function destroy() {
8260
7874
  if (window.confirm(this.t('confirm_destroy'))) {
8261
- this.model.destroyWithDelay();
8262
- this.goBack();
7875
+ if (this.destroyModel() !== false) {
7876
+ this.goBack();
7877
+ }
8263
7878
  }
8264
7879
  },
7880
+ destroyModel: function destroyModel() {
7881
+ this.model.destroyWithDelay();
7882
+ },
8265
7883
  goBack: function goBack() {
8266
- editor$1.navigate('/', {
7884
+ editor.navigate('/', {
8267
7885
  trigger: true
8268
7886
  });
8269
7887
  },
8270
7888
  t: function t(suffix) {
8271
- var translationKeyPrefix = _$1.result(this, 'translationKeyPrefix');
7889
+ var translationKeyPrefix = _.result(this, 'translationKeyPrefix');
8272
7890
 
8273
7891
  return I18n$1.t("".concat(translationKeyPrefix, ".").concat(suffix), {
8274
7892
  defaultValue: I18n$1.t("pageflow.editor.views.edit_configuration.".concat(suffix))
@@ -8276,245 +7894,7 @@ var EditConfigurationView = Marionette.Layout.extend({
8276
7894
  }
8277
7895
  });
8278
7896
 
8279
- ConfigurationEditorView.register('audio', {
8280
- configure: function configure() {
8281
- this.tab('general', function () {
8282
- this.group('general', {
8283
- supportsTextPositionCenter: true
8284
- });
8285
- this.input('additional_title', TextInputView);
8286
- this.input('additional_description', TextAreaInputView, {
8287
- size: 'short'
8288
- });
8289
- });
8290
- this.tab('files', function () {
8291
- this.input('audio_file_id', FileInputView, {
8292
- collection: state.audioFiles,
8293
- defaultTextTrackFilePropertyName: 'default_text_track_file_id'
8294
- });
8295
- this.group('background');
8296
- this.input('thumbnail_image_id', FileInputView, {
8297
- collection: state.imageFiles,
8298
- positioning: false
8299
- });
8300
- });
8301
- this.tab('options', function () {
8302
- if (pageflow.features.isEnabled('waveform_player_controls')) {
8303
- this.input('audio_player_controls_variant', SelectInputView, {
8304
- values: ['default', 'waveform']
8305
- });
8306
- }
8307
-
8308
- this.input('waveform_color', ColorInputView, {
8309
- visibleBinding: 'audio_player_controls_variant',
8310
- visibleBindingValue: 'waveform',
8311
- defaultValue: pageflow.theme.mainColor(),
8312
- swatches: usedWaveformColors()
8313
- });
8314
- this.input('autoplay', CheckBoxInputView);
8315
- this.group('options', {
8316
- canPauseAtmo: true
8317
- });
8318
- });
8319
-
8320
- function usedWaveformColors() {
8321
- return _$1.chain(state.pages.map(function (page) {
8322
- return page.configuration.get('waveform_color');
8323
- })).uniq().compact().value();
8324
- }
8325
- }
8326
- });
8327
-
8328
- ConfigurationEditorView.register('background_image', {
8329
- configure: function configure() {
8330
- this.tab('general', function () {
8331
- this.group('general', {
8332
- supportsTextPositionCenter: true
8333
- });
8334
- });
8335
- this.tab('files', function () {
8336
- this.group('background');
8337
- this.input('thumbnail_image_id', FileInputView, {
8338
- collection: state.imageFiles,
8339
- positioning: false
8340
- });
8341
- });
8342
- this.tab('options', function () {
8343
- this.group('options');
8344
- });
8345
- }
8346
- });
8347
-
8348
- ConfigurationEditorView.register('video', {
8349
- configure: function configure() {
8350
- this.tab('general', function () {
8351
- this.group('general', {
8352
- supportsTextPositionCenter: true
8353
- });
8354
- this.input('additional_title', TextInputView);
8355
- this.input('additional_description', TextAreaInputView, {
8356
- size: 'short'
8357
- });
8358
- });
8359
- this.tab('files', function () {
8360
- this.input('video_file_id', FileInputView, {
8361
- collection: state.videoFiles,
8362
- positioning: false,
8363
- defaultTextTrackFilePropertyName: 'default_text_track_file_id'
8364
- });
8365
- this.input('poster_image_id', FileInputView, {
8366
- collection: state.imageFiles,
8367
- positioning: false
8368
- });
8369
- this.input('mobile_poster_image_id', FileInputView, {
8370
- collection: state.imageFiles,
8371
- positioning: true
8372
- });
8373
- this.input('thumbnail_image_id', FileInputView, {
8374
- collection: state.imageFiles,
8375
- positioning: false
8376
- });
8377
- });
8378
- this.tab('options', function () {
8379
- this.input('autoplay', CheckBoxInputView);
8380
-
8381
- if (pageflow.features.isEnabled('auto_change_page')) {
8382
- this.input('auto_change_page_on_ended', CheckBoxInputView);
8383
- }
8384
-
8385
- this.group('options', {
8386
- canPauseAtmo: true
8387
- });
8388
- });
8389
- }
8390
- });
8391
-
8392
- ConfigurationEditorTabView.groups.define('background', function (options) {
8393
- options = options || {};
8394
- var prefix = options.propertyNamePrefix ? options.propertyNamePrefix + '_' : '';
8395
- var backgroundTypeProperty = prefix + 'background_type';
8396
- this.input(backgroundTypeProperty, SelectInputView, {
8397
- values: ['image', 'video'],
8398
- ensureValueDefined: true
8399
- });
8400
- this.input(prefix + 'background_image_id', FileInputView, {
8401
- collection: state.imageFiles,
8402
- visibleBinding: backgroundTypeProperty,
8403
- visibleBindingValue: 'image',
8404
- fileSelectionHandlerOptions: options
8405
- });
8406
- this.input(prefix + 'video_file_id', FileInputView, {
8407
- collection: state.videoFiles,
8408
- visibleBinding: backgroundTypeProperty,
8409
- visibleBindingValue: 'video',
8410
- fileSelectionHandlerOptions: options
8411
- });
8412
- this.input(prefix + 'poster_image_id', FileInputView, {
8413
- collection: state.imageFiles,
8414
- visibleBinding: backgroundTypeProperty,
8415
- visibleBindingValue: 'video',
8416
- fileSelectionHandlerOptions: options
8417
- });
8418
- this.input(prefix + 'mobile_poster_image_id', FileInputView, {
8419
- collection: state.imageFiles,
8420
- visibleBinding: backgroundTypeProperty,
8421
- visibleBindingValue: 'video',
8422
- fileSelectionHandlerOptions: options
8423
- });
8424
- });
8425
-
8426
- ConfigurationEditorTabView.groups.define('general', function (options) {
8427
- this.input('title', TextInputView, {
8428
- required: true,
8429
- maxLength: 5000
8430
- });
8431
- this.input('hide_title', CheckBoxInputView);
8432
- this.input('tagline', TextInputView, {
8433
- maxLength: 5000
8434
- });
8435
- this.input('subtitle', TextInputView, {
8436
- maxLength: 5000
8437
- });
8438
- this.input('text', TextAreaInputView, {
8439
- fragmentLinkInputView: PageLinkInputView,
8440
- enableLists: true
8441
- });
8442
- this.input('text_position', SelectInputView, {
8443
- values: options.supportsTextPositionCenter ? Page.textPositions : Page.textPositionsWithoutCenterOption
8444
- });
8445
- this.input('gradient_opacity', SliderInputView);
8446
- this.input('invert', CheckBoxInputView);
8447
- });
8448
-
8449
- ConfigurationEditorTabView.groups.define('page_link', function () {
8450
- this.input('label', TextInputView);
8451
- this.input('target_page_id', PageLinkInputView);
8452
- this.group('page_transitions', {
8453
- includeBlank: true
8454
- });
8455
- });
8456
-
8457
- ConfigurationEditorTabView.groups.define('page_transitions', function (options) {
8458
- var inputOptions = {
8459
- translationKeyPrefix: 'pageflow.page_transitions',
8460
- blankTranslationKey: 'pageflow.page_transitions.default',
8461
- values: pageflow.pageTransitions.names()
8462
- };
8463
-
8464
- if (pageflow.navigationDirection.isHorizontalOnPhone()) {
8465
- inputOptions.additionalInlineHelpText = I18n$1.t('pageflow.editor.phone_horizontal_slideshow_mode.page_transitions_inline_help');
8466
- }
8467
-
8468
- this.input(options.propertyName || 'page_transition', SelectInputView, _$1.extend(inputOptions, options));
8469
- });
8470
-
8471
- ConfigurationEditorTabView.groups.define('options', function (options) {
8472
- var theme = state.entry.getTheme();
8473
- this.input('display_in_navigation', CheckBoxInputView);
8474
-
8475
- if (theme.supportsEmphasizedPages()) {
8476
- this.input('emphasize_in_navigation', CheckBoxInputView);
8477
- }
8478
-
8479
- this.group('page_transitions', {
8480
- propertyName: 'transition'
8481
- });
8482
-
8483
- if (pageflow.features.isEnabled('delayed_text_fade_in')) {
8484
- this.input('delayed_text_fade_in', SelectInputView, {
8485
- values: Page.delayedTextFadeIn
8486
- });
8487
- }
8488
-
8489
- this.input('description', TextAreaInputView, {
8490
- size: 'short',
8491
- disableLinks: true
8492
- });
8493
- this.input('atmo_audio_file_id', FileInputView, {
8494
- collection: state.audioFiles
8495
- });
8496
-
8497
- if (theme.supportsHideLogoOnPages()) {
8498
- this.input('hide_logo', CheckBoxInputView);
8499
- }
8500
-
8501
- if (options.canPauseAtmo) {
8502
- this.input('atmo_during_playback', SelectInputView, {
8503
- values: pageflow.Atmo.duringPlaybackModes
8504
- });
8505
- }
8506
-
8507
- if (theme.supportsScrollIndicatorModes()) {
8508
- this.input('scroll_indicator_mode', SelectInputView, {
8509
- values: Page.scrollIndicatorModes
8510
- });
8511
- this.input('scroll_indicator_orientation', SelectInputView, {
8512
- values: Page.scrollIndicatorOrientations
8513
- });
8514
- }
8515
- });
8516
-
8517
- editor$1.widgetTypes.register('classic_loading_spinner', {
7897
+ editor.widgetTypes.register('classic_loading_spinner', {
8518
7898
  configurationEditorView: ConfigurationEditorView.extend({
8519
7899
  configure: function configure() {
8520
7900
  this.tab('loading_spinner', function () {
@@ -8526,10 +7906,10 @@ editor$1.widgetTypes.register('classic_loading_spinner', {
8526
7906
  })
8527
7907
  });
8528
7908
 
8529
- editor$1.widgetTypes.registerRole('cookie_notice', {
7909
+ editor.widgetTypes.registerRole('cookie_notice', {
8530
7910
  isOptional: true
8531
7911
  });
8532
- editor$1.widgetTypes.register('cookie_notice_bar', {
7912
+ editor.widgetTypes.register('cookie_notice_bar', {
8533
7913
  configurationEditorView: ConfigurationEditorView.extend({
8534
7914
  configure: function configure() {
8535
7915
  this.tab('cookie_notice_bar', function () {
@@ -8541,7 +7921,7 @@ editor$1.widgetTypes.register('cookie_notice_bar', {
8541
7921
  })
8542
7922
  });
8543
7923
 
8544
- editor$1.widgetTypes.register('media_loading_spinner', {
7924
+ editor.widgetTypes.register('media_loading_spinner', {
8545
7925
  configurationEditorView: ConfigurationEditorView.extend({
8546
7926
  configure: function configure() {
8547
7927
  this.tab('loading_spinner', function () {
@@ -8555,12 +7935,18 @@ editor$1.widgetTypes.register('media_loading_spinner', {
8555
7935
  this.input('invert', CheckBoxInputView);
8556
7936
  this.input('remove_logo', CheckBoxInputView);
8557
7937
  this.input('blur_strength', SliderInputView);
7938
+ this.input('animation_duration', SliderInputView, {
7939
+ minValue: 1,
7940
+ maxValue: 7,
7941
+ defaultValue: 7,
7942
+ unit: 's'
7943
+ });
8558
7944
  });
8559
7945
  }
8560
7946
  })
8561
7947
  });
8562
7948
 
8563
- editor$1.widgetTypes.register('phone_horizontal_slideshow_mode', {
7949
+ editor.widgetTypes.register('phone_horizontal_slideshow_mode', {
8564
7950
  configurationEditorView: ConfigurationEditorView.extend({
8565
7951
  configure: function configure() {
8566
7952
  this.tab('phone_horizontal_slideshow_mode', function () {
@@ -8575,7 +7961,7 @@ editor$1.widgetTypes.register('phone_horizontal_slideshow_mode', {
8575
7961
  })
8576
7962
  });
8577
7963
 
8578
- editor$1.widgetTypes.register('title_loading_spinner', {
7964
+ editor.widgetTypes.register('title_loading_spinner', {
8579
7965
  configurationEditorView: ConfigurationEditorView.extend({
8580
7966
  configure: function configure() {
8581
7967
  this.tab('loading_spinner', function () {
@@ -8593,6 +7979,12 @@ editor$1.widgetTypes.register('title_loading_spinner', {
8593
7979
  this.input('invert', CheckBoxInputView);
8594
7980
  this.input('remove_logo', CheckBoxInputView);
8595
7981
  this.input('blur_strength', SliderInputView);
7982
+ this.input('animation_duration', SliderInputView, {
7983
+ minValue: 1,
7984
+ maxValue: 7,
7985
+ defaultValue: 7,
7986
+ unit: 's'
7987
+ });
8596
7988
  });
8597
7989
  }
8598
7990
  })
@@ -8611,11 +8003,11 @@ app.addInitializer(function (options) {
8611
8003
  });
8612
8004
 
8613
8005
  app.addInitializer(function (options) {
8614
- pageflow.features.enable('editor', options.entry.enabled_feature_names);
8006
+ features.enable('editor', options.entry.enabled_feature_names);
8615
8007
  });
8616
8008
 
8617
8009
  app.addInitializer(function (options) {
8618
- pageflow.Audio.setup({
8010
+ Audio.setup({
8619
8011
  getSources: function getSources(audioFileId) {
8620
8012
  var file = state.audioFiles.getByPermaId(audioFileId);
8621
8013
  return file ? file.getSources() : '';
@@ -8625,7 +8017,7 @@ app.addInitializer(function (options) {
8625
8017
 
8626
8018
  app.addInitializer(function () {
8627
8019
  Backbone.history.on('route', function () {
8628
- editor$1.applyDefaultHelpEntry();
8020
+ editor.applyDefaultHelpEntry();
8629
8021
  });
8630
8022
  });
8631
8023
 
@@ -8654,7 +8046,7 @@ app.addInitializer(function (options) {
8654
8046
  settingsDialogTabLink: 'general'
8655
8047
  }
8656
8048
  };
8657
- editor$1.fileTypes.register('image_files', {
8049
+ editor.fileTypes.register('image_files', {
8658
8050
  model: ImageFile,
8659
8051
  metaDataAttributes: ['dimensions', altMetaDataAttribute],
8660
8052
  matchUpload: /^image/,
@@ -8663,7 +8055,7 @@ app.addInitializer(function (options) {
8663
8055
  inputView: TextInputView
8664
8056
  }]
8665
8057
  });
8666
- editor$1.fileTypes.register('video_files', {
8058
+ editor.fileTypes.register('video_files', {
8667
8059
  model: VideoFile,
8668
8060
  metaDataAttributes: ['format', 'dimensions', 'duration', textTracksMetaDataAttribute, altMetaDataAttribute],
8669
8061
  matchUpload: /^video/,
@@ -8673,7 +8065,7 @@ app.addInitializer(function (options) {
8673
8065
  }],
8674
8066
  settingsDialogTabs: [textTracksSettingsDialogTab]
8675
8067
  });
8676
- editor$1.fileTypes.register('audio_files', {
8068
+ editor.fileTypes.register('audio_files', {
8677
8069
  model: AudioFile,
8678
8070
  metaDataAttributes: ['format', 'duration', textTracksMetaDataAttribute, altMetaDataAttribute],
8679
8071
  matchUpload: /^audio/,
@@ -8683,7 +8075,7 @@ app.addInitializer(function (options) {
8683
8075
  }],
8684
8076
  settingsDialogTabs: [textTracksSettingsDialogTab]
8685
8077
  });
8686
- editor$1.fileTypes.register('text_track_files', {
8078
+ editor.fileTypes.register('text_track_files', {
8687
8079
  model: TextTrackFile,
8688
8080
  matchUpload: function matchUpload(upload) {
8689
8081
  return upload.name.match(/\.vtt$/) || upload.name.match(/\.srt$/);
@@ -8738,90 +8130,66 @@ app.addInitializer(function (options) {
8738
8130
  binding: 'label'
8739
8131
  }
8740
8132
  });
8741
- editor$1.fileTypes.setup(options.config.fileTypes);
8133
+ editor.fileTypes.setup(options.config.fileTypes);
8742
8134
  });
8743
8135
 
8744
8136
  app.addInitializer(function (options) {
8745
- editor$1.widgetTypes.registerRole('navigation', {
8137
+ editor.widgetTypes.registerRole('navigation', {
8746
8138
  isOptional: true
8747
8139
  });
8748
- editor$1.widgetTypes.setup(options.widget_types);
8140
+ editor.widgetTypes.setup(options.widget_types);
8749
8141
  });
8750
8142
 
8751
8143
  app.addInitializer(function (options) {
8752
- state.files = FilesCollection.createForFileTypes(editor$1.fileTypes, options.files);
8144
+ state.files = FilesCollection.createForFileTypes(editor.fileTypes, options.files);
8753
8145
  state.imageFiles = state.files.image_files;
8754
8146
  state.videoFiles = state.files.video_files;
8755
8147
  state.audioFiles = state.files.audio_files;
8756
8148
  state.textTrackFiles = state.files.text_track_files;
8757
8149
  var widgets = new WidgetsCollection(options.widgets, {
8758
- widgetTypes: editor$1.widgetTypes
8150
+ widgetTypes: editor.widgetTypes
8759
8151
  });
8760
8152
  state.themes = new ThemesCollection(options.themes);
8761
8153
  state.pages = new PagesCollection(options.pages);
8762
8154
  state.chapters = new ChaptersCollection(options.chapters);
8763
8155
  state.storylines = new StorylinesCollection(options.storylines);
8764
- state.entry = editor$1.createEntryModel(options, {
8156
+ state.entry = editor.createEntryModel(options, {
8765
8157
  widgets: widgets
8766
8158
  });
8767
8159
  state.theming = new Theming(options.theming);
8768
8160
  state.account = new Backbone.Model(options.account);
8769
8161
  widgets.subject = state.entry;
8770
- state.entryData = new PreviewEntryData({
8771
- entry: state.entry,
8772
- storylines: state.storylines,
8773
- chapters: state.chapters,
8774
- pages: state.pages
8775
- });
8776
8162
  state.storylineOrdering = new StorylineOrdering(state.storylines, state.pages);
8777
8163
  state.storylineOrdering.sort({
8778
8164
  silent: true
8779
8165
  });
8780
8166
  state.storylineOrdering.watch();
8781
8167
  state.pages.sort();
8782
- state.storylines.on('sort', _$1.debounce(function () {
8168
+ state.storylines.on('sort', _.debounce(function () {
8783
8169
  state.storylines.saveOrder();
8784
8170
  }, 100));
8785
- editor$1.failures.watch(state.entry);
8786
- editor$1.failures.watch(state.pages);
8787
- editor$1.failures.watch(state.chapters);
8788
- editor$1.savingRecords.watch(state.pages);
8789
- editor$1.savingRecords.watch(state.chapters);
8790
- pageflow.events.trigger('seed:loaded');
8171
+ editor.failures.watch(state.entry);
8172
+ editor.failures.watch(state.pages);
8173
+ editor.failures.watch(state.chapters);
8174
+ editor.savingRecords.watch(state.pages);
8175
+ editor.savingRecords.watch(state.chapters);
8176
+ events.trigger('seed:loaded');
8791
8177
  });
8792
8178
 
8793
8179
  app.addInitializer(function (options) {
8794
8180
  state.fileUploader = new FileUploader({
8795
8181
  entry: state.entry,
8796
- fileTypes: editor$1.fileTypes
8182
+ fileTypes: editor.fileTypes
8797
8183
  });
8798
- ConfirmUploadView.watch(state.fileUploader, editor$1.fileTypes, state.files);
8799
- });
8800
-
8801
- app.addInitializer(function (options) {
8802
- editor$1.pageTypes.setup(options.page_types);
8184
+ ConfirmUploadView.watch(state.fileUploader, editor.fileTypes, state.files);
8803
8185
  });
8804
8186
 
8805
8187
  app.addInitializer(function (options) {
8806
- var KEY_A = 65;
8807
- var KEY_X = 88;
8808
- $(document).on('keydown', function (event) {
8809
- if (event.altKey && event.which === KEY_A) {
8810
- if (pageflow.atmo.disabled) {
8811
- pageflow.atmo.enable();
8812
- } else {
8813
- pageflow.atmo.disable();
8814
- }
8815
- } else if (event.altKey && event.which === KEY_X) {
8816
- editor$1.navigate('pages/' + pageflow.slides.currentPage().data('id'), {
8817
- trigger: true
8818
- });
8819
- }
8820
- });
8188
+ editor.pageTypes.setup(options.page_types);
8821
8189
  });
8822
8190
 
8823
8191
  app.addInitializer(function (options) {
8824
- editor$1.fileImporters.setup(options.config.fileImporters);
8192
+ editor.fileImporters.setup(options.config.fileImporters);
8825
8193
  });
8826
8194
 
8827
8195
  app.addInitializer(function (options) {
@@ -8834,23 +8202,8 @@ app.addInitializer(function (options) {
8834
8202
  state.entry.pollForPendingFiles();
8835
8203
  });
8836
8204
 
8837
- app.addInitializer(function (options) {
8838
- state.entry.on('change:pending_files_count', function (model, value) {
8839
- if (value < state.entry.previous('pending_files_count')) {
8840
- pageflow.stylesheet.reload('entry');
8841
- }
8842
- });
8843
- state.entry.on('use:files', function () {
8844
- pageflow.stylesheet.reload('entry');
8845
- });
8846
- state.entry.metadata.on('change:theme_name', function () {
8847
- var theme = state.entry.getTheme();
8848
- pageflow.stylesheet.update('theme', theme.get('stylesheet_path'));
8849
- });
8850
- });
8851
-
8852
8205
  app.addInitializer(function () {
8853
- _$1.each(editor$1.sideBarRoutings, function (options) {
8206
+ _.each(editor.sideBarRoutings, function (options) {
8854
8207
  new options.router({
8855
8208
  controller: new options.controller({
8856
8209
  region: app.sidebarRegion,
@@ -8859,13 +8212,13 @@ app.addInitializer(function () {
8859
8212
  });
8860
8213
  });
8861
8214
 
8862
- editor$1.router = new SidebarRouter({
8215
+ editor.router = new SidebarRouter({
8863
8216
  controller: new SidebarController({
8864
8217
  region: app.sidebarRegion,
8865
8218
  entry: state.entry
8866
8219
  })
8867
8220
  });
8868
- window.editor = editor$1.router;
8221
+ window.editor = editor.router;
8869
8222
  });
8870
8223
 
8871
8224
  app.addInitializer(function () {
@@ -8887,7 +8240,7 @@ app.addInitializer(function ()
8887
8240
  var context = this;
8888
8241
  var args = arguments;
8889
8242
 
8890
- _$1.each(editor$1.initializers, function (fn) {
8243
+ _.each(editor.initializers, function (fn) {
8891
8244
  fn.call(context, args);
8892
8245
  });
8893
8246
  });
@@ -8900,10 +8253,9 @@ app.addInitializer(function (options) {
8900
8253
  el: $('sidebar .scrolling'),
8901
8254
  region: app.sidebarRegion
8902
8255
  }).render();
8903
- app.previewRegion.show(new editor$1.entryType.previewView({
8256
+ app.previewRegion.show(new editor.entryType.previewView({
8904
8257
  model: state.entry
8905
8258
  }));
8906
- app.indicatorsRegion.show(new DisabledAtmoIndicatorView());
8907
8259
  app.notificationsRegion.show(new NotificationsView());
8908
8260
  app.sidebarFooterRegion.show(new SidebarFooterView({
8909
8261
  model: state.entry
@@ -8922,4 +8274,4 @@ app.addRegions({
8922
8274
  sidebarFooterRegion: 'sidebar .sidebar_footer_container'
8923
8275
  });
8924
8276
 
8925
- export { AudioFile, BackButtonDecoratorView, BackgroundImageEmbeddedView, BackgroundPositioningPreviewView, BackgroundPositioningSlidersView, BackgroundPositioningView, ChangeThemeDialogView, Chapter, ChapterConfiguration, ChapterPagesCollection, ChapterScaffold, ChaptersCollection, ChooseImporterView, Configuration, ConfirmEncodingView, ConfirmFileImportUploadView, ConfirmUploadView, ConfirmableFileItemView, DisabledAtmoIndicatorView, DropDownButtonItemListView, DropDownButtonItemView, DropDownButtonView, EditChapterView, EditConfigurationView, EditEntryView, EditFileView, EditLock, EditLockContainer, EditMetaDataView, EditPageLinkView, EditPageView, EditStorylineView, EditWidgetView, EditWidgetsView, EditorApi, EditorView, EmulationModeButtonView, EncodedFile, EncodingConfirmation, Entry, EntryMetadata, EntryMetadataFileSelectionHandler, EntryPublication, EntryPublicationQuotaDecoratorView, ExplorerFileItemView, Failure, FileConfiguration, FileImport, FileInputView, FileItemView, FileMetaDataItemValueView, FileMetaDataItemView, FileProcessingStateDisplayView, FileReuse, FileSettingsDialogView, FileStage, FileStageItemView, FileThumbnailView, FileTypes, FileTypesCollection, FileUploader, FilesCollection, FilesExplorerView, FilesImporterView, FilesView, FilteredFilesView, ForeignKeySubsetCollection, HelpButtonView, HelpImageView, HelpView, ImageFile, InfoBoxView, InvalidNestedTypeError, LazyVideoEmbeddedView, ListItemView, ListView, LoadingView, LockedView, ModelThumbnailView, NestedFilesCollection, NestedFilesView, NestedTypeError, NotificationsView, OrderedPageLinksCollection, OtherEntriesCollection, OtherEntriesCollectionView, OtherEntry, OtherEntryItemView, Page, PageConfigurationFileSelectionHandler, PageLink, PageLinkConfigurationEditorView, PageLinkFileSelectionHandler, PageLinkInputView, PageLinkItemView, PageLinksCollection, PageLinksView, PageThumbnailView, PagesCollection, PreviewEntryData, PublishEntryView, ReferenceInputView, ReusableFile, Scaffold, ScrollingView, SelectButtonView, SidebarController, SidebarFooterView, SidebarRouter, StaticThumbnailView, Storyline, StorylineChaptersCollection, StorylineConfiguration, StorylineOrdering, StorylineScaffold, StorylineTransitiveChildPages, StorylinesCollection, SubsetCollection, TextFileMetaDataItemValueView, TextTrackFile, TextTracksFileMetaDataItemValueView, TextTracksView, Theme, ThemeInputView, ThemeItemView, ThemesCollection, Theming, UnmatchedUploadError, UploadError, UploadableFile, UploadableFilesView, UploaderView, VideoFile, Widget, WidgetConfiguration, WidgetConfigurationFileSelectionHandler, WidgetItemView, WidgetTypes, WidgetsCollection, addAndReturnModel, app, authenticationProvider, configurationContainer, delayedDestroying, dialogView, editor$1 as editor, entryTypeEditorControllerUrls, failureIndicatingView, failureTracking, fileWithType, filesCountWatcher, formDataUtils, loadable, modelLifecycleTrackingView, orderedCollection, persistedPromise, polling, retryable, selectableView, stageProvider, startEditor, state, stylesheet, transientReferences, validFileTypeTranslationList };
8277
+ export { AudioFile, BackButtonDecoratorView, BackgroundImageEmbeddedView, BackgroundPositioningPreviewView, BackgroundPositioningSlidersView, BackgroundPositioningView, ChangeThemeDialogView, Chapter, ChapterConfiguration, ChapterPagesCollection, ChapterScaffold, ChaptersCollection, ChooseImporterView, Configuration, ConfirmEncodingView, ConfirmFileImportUploadView, ConfirmUploadView, ConfirmableFileItemView, DropDownButtonItemListView, DropDownButtonItemView, DropDownButtonView, EditConfigurationView, EditEntryView, EditFileView, EditLock, EditLockContainer, EditMetaDataView, EditWidgetView, EditWidgetsView, EditorApi, EditorView, EmulationModeButtonView, EncodedFile, EncodingConfirmation, Entry, EntryMetadata, EntryMetadataFileSelectionHandler, EntryPublication, EntryPublicationQuotaDecoratorView, ExplorerFileItemView, Failure, FileConfiguration, FileImport, FileInputView, FileItemView, FileMetaDataItemValueView, FileMetaDataItemView, FileProcessingStateDisplayView, FileReuse, FileSettingsDialogView, FileStage, FileStageItemView, FileThumbnailView, FileTypes, FileTypesCollection, FileUploader, FilesCollection, FilesExplorerView, FilesImporterView, FilesView, FilteredFilesView, ForeignKeySubsetCollection, HelpButtonView, HelpImageView, HelpView, ImageFile, InfoBoxView, InvalidNestedTypeError, LazyVideoEmbeddedView, ListItemView, ListView, LoadingView, LockedView, ModelThumbnailView, NestedFilesCollection, NestedFilesView, NestedTypeError, NotificationsView, OrderedPageLinksCollection, OtherEntriesCollection, OtherEntriesCollectionView, OtherEntry, OtherEntryItemView, Page, PageConfigurationFileSelectionHandler, PageLink, PageLinkConfigurationEditorView, PageLinkFileSelectionHandler, PageLinkItemView, PageLinksCollection, PageLinksView, PageThumbnailView, PagesCollection, PublishEntryView, ReferenceInputView, ReusableFile, Scaffold, ScrollingView, SelectButtonView, SidebarController, SidebarFooterView, SidebarRouter, StaticThumbnailView, Storyline, StorylineChaptersCollection, StorylineConfiguration, StorylineOrdering, StorylineScaffold, StorylineTransitiveChildPages, StorylinesCollection, SubsetCollection, TextFileMetaDataItemValueView, TextTrackFile, TextTracksFileMetaDataItemValueView, TextTracksView, Theme, ThemeInputView, ThemeItemView, ThemesCollection, Theming, UnmatchedUploadError, UploadError, UploadableFile, UploadableFilesView, UploaderView, VideoFile, Widget, WidgetConfiguration, WidgetConfigurationFileSelectionHandler, WidgetItemView, WidgetTypes, WidgetsCollection, addAndReturnModel, app, authenticationProvider, configurationContainer, delayedDestroying, dialogView, editor, entryTypeEditorControllerUrls, failureIndicatingView, failureTracking, fileWithType, filesCountWatcher, formDataUtils, loadable, modelLifecycleTrackingView, orderedCollection, persistedPromise, polling, retryable, selectableView, stageProvider, startEditor, state, stylesheet, transientReferences, validFileTypeTranslationList };