pageflow 16.1.0 → 17.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -221
  3. data/README.md +6 -5
  4. data/app/assets/images/pageflow/admin/icons/published_with_noindex.svg +4 -0
  5. data/app/assets/javascripts/pageflow/dist/ui.js +1 -0
  6. data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +1 -1
  7. data/app/assets/stylesheets/pageflow/admin/entries.scss +4 -0
  8. data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +4 -0
  9. data/app/assets/stylesheets/pageflow/editor/base.scss +0 -1
  10. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +55 -6
  11. data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +12 -1
  12. data/app/assets/stylesheets/pageflow/ui/forms.scss +3 -3
  13. data/app/assets/stylesheets/pageflow/{editor/wysihtml5.scss → ui/input/text_area_input.scss} +13 -1
  14. data/app/assets/stylesheets/pageflow/ui.scss +1 -0
  15. data/app/controllers/pageflow/editor/entry_publications_controller.rb +5 -1
  16. data/app/controllers/pageflow/editor/file_import_controller.rb +1 -1
  17. data/app/controllers/pageflow/entries_controller.rb +2 -2
  18. data/app/helpers/pageflow/entries_helper.rb +2 -0
  19. data/app/helpers/pageflow/meta_tags_helper.rb +2 -1
  20. data/app/helpers/pageflow/page_types_helper.rb +4 -4
  21. data/app/helpers/pageflow/revision_file_helper.rb +3 -3
  22. data/app/helpers/pageflow/social_share_helper.rb +2 -2
  23. data/app/models/concerns/pageflow/entry_publication_states.rb +9 -0
  24. data/app/models/concerns/pageflow/feature_target.rb +1 -1
  25. data/app/models/concerns/pageflow/output_source.rb +1 -1
  26. data/app/models/concerns/pageflow/serialized_configuration.rb +1 -1
  27. data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
  28. data/app/models/pageflow/account.rb +2 -2
  29. data/app/models/pageflow/entry.rb +7 -5
  30. data/app/models/pageflow/entry_at_revision.rb +2 -0
  31. data/app/models/pageflow/entry_template.rb +4 -1
  32. data/app/models/pageflow/image_file.rb +20 -5
  33. data/app/models/pageflow/image_file_url_templates.rb +7 -1
  34. data/app/models/pageflow/revision.rb +7 -5
  35. data/app/models/pageflow/site.rb +2 -2
  36. data/app/models/pageflow/sitemaps.rb +1 -0
  37. data/app/models/pageflow/theme_customization.rb +2 -2
  38. data/app/models/pageflow/used_file.rb +8 -0
  39. data/app/views/components/pageflow/admin/extensible_attributes_table.rb +1 -7
  40. data/app/views/components/pageflow/admin/revisions_tab.rb +8 -0
  41. data/app/views/pageflow/editor/config/_seeds.json.jbuilder +1 -0
  42. data/app/views/pageflow/editor/entries/_entry.json.jbuilder +1 -0
  43. data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +1 -0
  44. data/app/views/pageflow/image_files/_image_file.json.jbuilder +1 -0
  45. data/app/views/pageflow/meta_tags/_entry.html.erb +1 -0
  46. data/config/initializers/features.rb +2 -0
  47. data/config/initializers/paperclip.rb +4 -0
  48. data/config/locales/de.yml +50 -0
  49. data/config/locales/en.yml +49 -0
  50. data/db/migrate/20231024062501_add_output_presences_to_image_files.rb +5 -0
  51. data/db/migrate/20231128124523_add_noindex_to_revisions.rb +5 -0
  52. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +266 -151
  53. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +8 -2
  54. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +1 -1
  55. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
  56. data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +1 -1
  57. data/entry_types/paged/lib/pageflow_paged/engine.rb +7 -11
  58. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +9 -3
  59. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +6 -6
  60. data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +21 -37
  61. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +1 -3
  62. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -6
  63. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +17 -18
  64. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +4 -0
  65. data/entry_types/scrolled/config/locales/de.yml +47 -11
  66. data/entry_types/scrolled/config/locales/en.yml +42 -10
  67. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +22 -89
  68. data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +2 -1
  69. data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +8 -12
  70. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +6 -0
  71. data/entry_types/scrolled/lib/pageflow_scrolled/web_app_manifest.rb +1 -1
  72. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +1 -1
  73. data/entry_types/scrolled/package/config/webpack.js +26 -0
  74. data/entry_types/scrolled/package/contentElements-editor.js +36 -23
  75. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  76. data/entry_types/scrolled/package/contentElements-frontend.js +250 -94
  77. data/entry_types/scrolled/package/editor.js +331 -147
  78. data/entry_types/scrolled/package/frontend/{EditableInlineText.module-fa9e3aff.js → EditableInlineText.module-6ee0e024.js} +463 -275
  79. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-10a1d600.js → PhonePlatformContext-b28d991a.js} +1 -1
  80. data/entry_types/scrolled/package/frontend/{ToggleFullscreenCornerButton-727cce0d.js → ToggleFullscreenCornerButton-8242f213.js} +1 -1
  81. data/entry_types/scrolled/package/frontend/{Viewer-169e14ca.js → Viewer-32cd1ac1.js} +4 -4
  82. data/entry_types/scrolled/package/frontend/{Viewer-ee1aa590.js → Viewer-6e4d14ed.js} +4 -4
  83. data/entry_types/scrolled/package/frontend/{arrowRight-92a34ccc.js → arrowRight-e42e6011.js} +2 -2
  84. data/entry_types/scrolled/package/frontend/{components-4a09bfa3.js → components-24363f97.js} +7 -6
  85. data/entry_types/scrolled/package/frontend/{i18n-ddd92820.js → i18n-71c39823.js} +84 -46
  86. data/entry_types/scrolled/package/frontend/{index-02378634.js → index-fc4b13e6.js} +3 -3
  87. data/entry_types/scrolled/package/frontend/index.css +1 -1
  88. data/entry_types/scrolled/package/frontend/index.js +90 -66
  89. data/entry_types/scrolled/package/frontend/{useContentElementEditorState-63045393.js → useContentElementEditorState-245f1986.js} +1 -1
  90. data/entry_types/scrolled/package/package.json +4 -3
  91. data/entry_types/scrolled/package/testHelpers.js +4 -2
  92. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  93. data/entry_types/scrolled/package/widgets/defaultNavigation.js +39 -4
  94. data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -0
  95. data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +49 -0
  96. data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -0
  97. data/entry_types/scrolled/package/widgets/textInlineFileRights.js +37 -0
  98. data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
  99. data/lib/generators/pageflow/resque/templates/resque.rb +1 -1
  100. data/lib/generators/pageflow/routes/routes_generator.rb +4 -3
  101. data/lib/pageflow/configuration.rb +8 -1
  102. data/lib/pageflow/engine.rb +15 -58
  103. data/lib/pageflow/page_type.rb +1 -1
  104. data/lib/pageflow/paperclip_processors/webp.rb +63 -0
  105. data/lib/pageflow/rails_version.rb +2 -2
  106. data/lib/pageflow/user_mixin.rb +1 -1
  107. data/lib/pageflow/version.rb +1 -1
  108. data/package/config/jest/index.js +3 -1
  109. data/package/editor.js +272 -154
  110. data/package/frontend.js +8 -2
  111. data/package/ui.js +1 -0
  112. data/spec/factories/entries.rb +17 -0
  113. metadata +78 -56
@@ -2273,6 +2273,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
2273
2273
  var TextAreaInputView = Marionette.ItemView.extend({
2274
2274
  mixins: [inputView, inputWithPlaceholderText],
2275
2275
  template: template$8,
2276
+ className: 'text_area_input',
2276
2277
  ui: {
2277
2278
  input: 'textarea',
2278
2279
  toolbar: '.toolbar',
@@ -3556,57 +3557,6 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3556
3557
  };
3557
3558
  });
3558
3559
 
3559
- var state = window.pageflow || {};
3560
-
3561
- function template$e(data) {
3562
- var __p = '';
3563
- __p += '';
3564
- return __p;
3565
- }
3566
-
3567
- var EditFileView = Marionette.ItemView.extend({
3568
- template: template$e,
3569
- className: 'edit_file',
3570
- onRender: function onRender() {
3571
- var fileType = this.model.fileType();
3572
- var entry = this.options.entry || state.entry;
3573
- var tab = new ConfigurationEditorTabView({
3574
- model: this.model.configuration,
3575
- attributeTranslationKeyPrefixes: ['pageflow.editor.files.attributes.' + fileType.collectionName, 'pageflow.editor.files.common_attributes', 'pageflow.editor.nested_files.' + fileType.collectionName, 'pageflow.editor.nested_files.common_attributes']
3576
- });
3577
-
3578
- if (this.options.displayFileName) {
3579
- tab.input('file_name', TextInputView, {
3580
- model: this.model,
3581
- disabled: true
3582
- });
3583
- }
3584
-
3585
- tab.input('rights', TextInputView, {
3586
- model: this.model,
3587
- placeholder: entry.get('default_file_rights')
3588
- });
3589
-
3590
- _(this.fileTypeInputs()).each(function (options) {
3591
- tab.input(options.name, options.inputView, options.inputViewOptions);
3592
- });
3593
-
3594
- tab.input('original_url', UrlDisplayView, {
3595
- model: this.model
3596
- });
3597
- this.appendSubview(tab);
3598
- },
3599
- fileTypeInputs: function fileTypeInputs() {
3600
- var fileType = this.model.fileType();
3601
- return _.chain(fileType.configurationEditorInputs).map(function (inputs) {
3602
- if (_.isFunction(inputs)) {
3603
- return inputs(this.model);
3604
- } else {
3605
- return inputs;
3606
- }
3607
- }, this).flatten().value();
3608
- }
3609
- });
3610
3560
  var app = new Marionette.Application();
3611
3561
  var dialogView = {
3612
3562
  events: {
@@ -3622,7 +3572,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3622
3572
  }
3623
3573
  };
3624
3574
 
3625
- function template$1$1(data) {
3575
+ function template$e(data) {
3626
3576
  var __t,
3627
3577
  __p = '';
3628
3578
 
@@ -3631,7 +3581,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3631
3581
  }
3632
3582
 
3633
3583
  var FileSettingsDialogView = Marionette.ItemView.extend({
3634
- template: template$1$1,
3584
+ template: template$e,
3635
3585
  className: 'file_settings_dialog editor dialog',
3636
3586
  mixins: [dialogView],
3637
3587
  ui: {
@@ -3662,11 +3612,11 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3662
3612
  app.dialogRegion.show(new FileSettingsDialogView(options));
3663
3613
  };
3664
3614
 
3665
- function template$2$1(data) {
3615
+ function template$1$1(data) {
3666
3616
  var __t,
3667
3617
  __p = '';
3668
3618
 
3669
- __p += '<a class="edit" href="" title="' + ((__t = I18n.t('pageflow.editor.templates.file_meta_data_item_value_view.edit')) == null ? '' : __t) + '">\n</a>\n<span class="value"></span>\n';
3619
+ __p += '<span class="value"></span>\n<a class="edit" href="" title="' + ((__t = I18n.t('pageflow.editor.templates.file_meta_data_item_value_view.edit')) == null ? '' : __t) + '">\n</a>\n\n';
3670
3620
  return __p;
3671
3621
  }
3672
3622
  /**
@@ -3689,7 +3639,8 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3689
3639
 
3690
3640
 
3691
3641
  var FileMetaDataItemValueView = Marionette.ItemView.extend({
3692
- template: template$2$1,
3642
+ template: template$1$1,
3643
+ className: 'value_wrapper',
3693
3644
  ui: {
3694
3645
  value: '.value',
3695
3646
  editLink: '.edit'
@@ -3730,7 +3681,13 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3730
3681
  model = this.model;
3731
3682
  }
3732
3683
 
3733
- return model.get(this.options.name);
3684
+ var value = model.get(this.options.name);
3685
+
3686
+ if (value && this.options.formatValue) {
3687
+ return this.options.formatValue(value);
3688
+ }
3689
+
3690
+ return value;
3734
3691
  }
3735
3692
  });
3736
3693
  var FileType = BaseObject.extend({
@@ -3742,6 +3699,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3742
3699
  this.paramKey = options.paramKey;
3743
3700
  this.i18nKey = options.i18nKey;
3744
3701
  this.nestedFileTypes = [];
3702
+ this.settingsDialogTabs = options.settingsDialogTabs || [];
3745
3703
  this.confirmUploadTableColumns = options.confirmUploadTableColumns || [];
3746
3704
  this.configurationEditorInputs = [].concat(options.configurationEditorInputs || []);
3747
3705
  this.configurationUpdaters = options.configurationUpdaters || [];
@@ -3749,17 +3707,8 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3749
3707
  this.nestedFilesOrder = options.nestedFilesOrder;
3750
3708
  this.skipUploadConfirmation = options.skipUploadConfirmation || false;
3751
3709
  this.filters = options.filters || [];
3752
- this.metaDataAttributes = [{
3753
- name: 'rights',
3754
- valueView: TextFileMetaDataItemValueView,
3755
- valueViewOptions: {
3756
- settingsDialogTabLink: 'general'
3757
- }
3758
- }].concat(options.metaDataAttributes || []);
3759
- this.settingsDialogTabs = [{
3760
- name: 'general',
3761
- view: EditFileView
3762
- }].concat(options.settingsDialogTabs || []);
3710
+ this.noExtendedFileRights = options.noExtendedFileRights;
3711
+ this.metaDataAttributes = options.metaDataAttributes || [];
3763
3712
 
3764
3713
  if (typeof options.matchUpload === 'function') {
3765
3714
  this.matchUpload = options.matchUpload;
@@ -3798,6 +3747,8 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3798
3747
  initialize: function initialize() {
3799
3748
  this.clientSideConfigs = [];
3800
3749
  this.clientSideConfigModifications = {};
3750
+ this.commonSettingsDialogTabs = [];
3751
+ this.commonMetaDataAttributes = [];
3801
3752
  },
3802
3753
  register: function register(name, config) {
3803
3754
  if (this._setup) {
@@ -3827,10 +3778,9 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3827
3778
  throw 'Missing client side config for file type "' + serverSideConfig.collectionName + '"';
3828
3779
  }
3829
3780
 
3830
- _(_this.clientSideConfigModifications[serverSideConfig.collectionName]).each(function (modification) {
3831
- this.lintModification(modification, serverSideConfig.collectionName);
3832
- this.applyModification(clientSideConfig, modification);
3833
- }, _this);
3781
+ _this.applyCommonConfig(clientSideConfig);
3782
+
3783
+ _this.applyModifications(serverSideConfig, clientSideConfig);
3834
3784
 
3835
3785
  return _.extend({}, serverSideConfig, clientSideConfig);
3836
3786
  }).sortBy(function (config) {
@@ -3849,6 +3799,16 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
3849
3799
  })));
3850
3800
  });
3851
3801
  },
3802
+ applyCommonConfig: function applyCommonConfig(clientSideConfig) {
3803
+ clientSideConfig.settingsDialogTabs = this.commonSettingsDialogTabs.concat(clientSideConfig.settingsDialogTabs || []);
3804
+ clientSideConfig.metaDataAttributes = this.commonMetaDataAttributes.concat(clientSideConfig.metaDataAttributes || []);
3805
+ },
3806
+ applyModifications: function applyModifications(serverSideConfig, clientSideConfig) {
3807
+ _(this.clientSideConfigModifications[serverSideConfig.collectionName]).each(function (modification) {
3808
+ this.lintModification(modification, serverSideConfig.collectionName);
3809
+ this.applyModification(clientSideConfig, modification);
3810
+ }, this);
3811
+ },
3852
3812
  lintModification: function lintModification(modification, collectionName) {
3853
3813
  var unmodifyableProperties = _.difference(_.keys(modification), this.modifyableProperties);
3854
3814
 
@@ -4123,6 +4083,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
4123
4083
  return !!this._optionalRoles[role];
4124
4084
  }
4125
4085
  });
4086
+ var state = window.pageflow || {};
4126
4087
  /**
4127
4088
  * Interface for engines providing editor extensions.
4128
4089
  * @alias editor
@@ -4133,6 +4094,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
4133
4094
  {
4134
4095
  initialize: function initialize(options) {
4135
4096
  this.router = options && options.router;
4097
+ this.entryType = {};
4136
4098
  this.sideBarRoutings = [];
4137
4099
  this.mainMenuItems = [];
4138
4100
  this.initializers = [];
@@ -4202,6 +4164,9 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
4202
4164
  * Checks to see if the browser is supported.
4203
4165
  * @param {function} options.browserNotSupportedView
4204
4166
  * Backbone view that will be rendered if the browser is not supported.
4167
+ * @param {boolean} [options.supportsExtendedFileRights]
4168
+ * Offer additional inputs for files to specify source url, license and default
4169
+ * display location.
4205
4170
  */
4206
4171
  registerEntryType: function registerEntryType(name, options) {
4207
4172
  this.entryType = _objectSpread2$1({
@@ -6552,7 +6517,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
6552
6517
  },
6553
6518
  parse: function parse(response, options) {
6554
6519
  if (response) {
6555
- this.set(_.pick(response, 'published', 'published_until', 'password_protected'));
6520
+ this.set(_.pick(response, 'published', 'published_until', 'password_protected', 'last_published_with_noindex'));
6556
6521
 
6557
6522
  this._setFiles(response, {
6558
6523
  add: false,
@@ -7069,7 +7034,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7069
7034
  return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
7070
7035
  }
7071
7036
 
7072
- function template$3$1(data) {
7037
+ function template$2$1(data) {
7073
7038
  var __t,
7074
7039
  __p = '';
7075
7040
 
@@ -7078,7 +7043,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7078
7043
  }
7079
7044
 
7080
7045
  var BackButtonDecoratorView = Marionette.Layout.extend({
7081
- template: template$3$1,
7046
+ template: template$2$1,
7082
7047
  className: 'back_button_decorator',
7083
7048
  events: {
7084
7049
  'click a.back': 'goBack'
@@ -7097,7 +7062,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7097
7062
  }
7098
7063
  });
7099
7064
 
7100
- function template$4$1(data) {
7065
+ function template$3$1(data) {
7101
7066
  var __t,
7102
7067
  __p = '';
7103
7068
 
@@ -7107,7 +7072,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7107
7072
 
7108
7073
  var ConfirmableFileItemView = Marionette.ItemView.extend({
7109
7074
  tagName: 'li',
7110
- template: template$4$1,
7075
+ template: template$3$1,
7111
7076
  ui: {
7112
7077
  fileName: '.file_name',
7113
7078
  duration: '.duration',
@@ -7140,7 +7105,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7140
7105
  }
7141
7106
  });
7142
7107
 
7143
- function template$5$1(data) {
7108
+ function template$4$1(data) {
7144
7109
  var __t,
7145
7110
  __p = '';
7146
7111
 
@@ -7151,7 +7116,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7151
7116
  }
7152
7117
 
7153
7118
  var ConfirmEncodingView = Marionette.ItemView.extend({
7154
- template: template$5$1,
7119
+ template: template$4$1,
7155
7120
  className: 'confirm_encoding',
7156
7121
  ui: {
7157
7122
  blankSlate: '.blank_slate',
@@ -7305,7 +7270,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7305
7270
  }
7306
7271
  });
7307
7272
 
7308
- function template$6$1(data) {
7273
+ function template$5$1(data) {
7309
7274
  var __t,
7310
7275
  __p = '';
7311
7276
 
@@ -7314,7 +7279,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7314
7279
  }
7315
7280
 
7316
7281
  var EditEntryView = Marionette.Layout.extend({
7317
- template: template$6$1,
7282
+ template: template$5$1,
7318
7283
  mixins: [failureIndicatingView, tooltipContainer],
7319
7284
  ui: {
7320
7285
  publishButton: 'a.publish',
@@ -7396,7 +7361,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7396
7361
  }
7397
7362
  });
7398
7363
 
7399
- function template$7$1(data) {
7364
+ function template$6$1(data) {
7400
7365
  var __t,
7401
7366
  __p = '';
7402
7367
 
@@ -7405,7 +7370,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7405
7370
  }
7406
7371
 
7407
7372
  var WidgetItemView = Marionette.Layout.extend({
7408
- template: template$7$1,
7373
+ template: template$6$1,
7409
7374
  tagName: 'li',
7410
7375
  className: 'widget_item',
7411
7376
  regions: {
@@ -7442,14 +7407,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7442
7407
  }
7443
7408
  });
7444
7409
 
7445
- function template$8$1(data) {
7410
+ function template$7$1(data) {
7446
7411
  var __p = '';
7447
7412
  __p += '<ol class="widgets">\n</ol>\n';
7448
7413
  return __p;
7449
7414
  }
7450
7415
 
7451
7416
  var EditWidgetsView = Marionette.Layout.extend({
7452
- template: template$8$1,
7417
+ template: template$7$1,
7453
7418
  ui: {
7454
7419
  widgets: '.widgets'
7455
7420
  },
@@ -7465,14 +7430,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7465
7430
  }
7466
7431
  });
7467
7432
 
7468
- function template$9$1(data) {
7433
+ function template$8$1(data) {
7469
7434
  var __p = '';
7470
7435
  __p += '<div class="image"></div>\n<div class="label"></div>\n';
7471
7436
  return __p;
7472
7437
  }
7473
7438
 
7474
7439
  var BackgroundPositioningPreviewView = Marionette.ItemView.extend({
7475
- template: template$9$1,
7440
+ template: template$8$1,
7476
7441
  className: 'preview',
7477
7442
  modelEvents: {
7478
7443
  change: 'update'
@@ -7503,14 +7468,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7503
7468
  }
7504
7469
  });
7505
7470
 
7506
- function template$a$1(data) {
7471
+ function template$9$1(data) {
7507
7472
  var __p = '';
7508
7473
  __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';
7509
7474
  return __p;
7510
7475
  }
7511
7476
 
7512
7477
  var BackgroundPositioningSlidersView = Marionette.ItemView.extend({
7513
- template: template$a$1,
7478
+ template: template$9$1,
7514
7479
  className: '',
7515
7480
  ui: {
7516
7481
  container: '.container',
@@ -7591,7 +7556,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7591
7556
  }
7592
7557
  });
7593
7558
 
7594
- function template$b$1(data) {
7559
+ function template$a$1(data) {
7595
7560
  var __t,
7596
7561
  __p = '';
7597
7562
 
@@ -7600,7 +7565,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7600
7565
  }
7601
7566
 
7602
7567
  var BackgroundPositioningView = Marionette.ItemView.extend({
7603
- template: template$b$1,
7568
+ template: template$a$1,
7604
7569
  className: 'background_positioning editor dialog',
7605
7570
  mixins: [dialogView],
7606
7571
  ui: {
@@ -7654,14 +7619,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7654
7619
  app.dialogRegion.show(new BackgroundPositioningView(options));
7655
7620
  };
7656
7621
 
7657
- function template$c$1(data) {
7622
+ function template$b$1(data) {
7658
7623
  var __p = '';
7659
7624
  __p += '<div class="label"></div>\n<a href="#"></a>\n';
7660
7625
  return __p;
7661
7626
  }
7662
7627
 
7663
7628
  var DropDownButtonItemView = Marionette.ItemView.extend({
7664
- template: template$c$1,
7629
+ template: template$b$1,
7665
7630
  tagName: 'li',
7666
7631
  className: 'drop_down_button_item',
7667
7632
  ui: {
@@ -7675,6 +7640,10 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7675
7640
  }
7676
7641
 
7677
7642
  event.preventDefault();
7643
+
7644
+ if (this.model.get('kind') === 'checkBox' || this.model.get('kind') === 'radio') {
7645
+ event.stopPropagation();
7646
+ }
7678
7647
  }
7679
7648
  },
7680
7649
  modelEvents: {
@@ -7694,7 +7663,11 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7694
7663
  this.ui.label.text(this.model.get('label'));
7695
7664
  this.$el.toggleClass('is_selectable', !!this.model.selected);
7696
7665
  this.$el.toggleClass('is_disabled', !!this.model.get('disabled'));
7666
+ this.$el.toggleClass('is_hidden', !!this.model.get('hidden'));
7667
+ this.$el.toggleClass('has_check_box', this.model.get('kind') === 'checkBox');
7668
+ this.$el.toggleClass('has_radio', this.model.get('kind') === 'radio');
7697
7669
  this.$el.toggleClass('is_checked', !!this.model.get('checked'));
7670
+ this.$el.toggleClass('separated', !!this.model.get('separated'));
7698
7671
  this.$el.data('name', this.model.get('name'));
7699
7672
  }
7700
7673
  });
@@ -7711,7 +7684,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7711
7684
  });
7712
7685
  };
7713
7686
 
7714
- function template$d$1(data) {
7687
+ function template$c$1(data) {
7715
7688
  var __p = '';
7716
7689
  __p += '<button></button>\n\n<div class="drop_down_button_menu">\n</div>\n';
7717
7690
  return __p;
@@ -7760,7 +7733,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7760
7733
 
7761
7734
 
7762
7735
  var DropDownButtonView = Marionette.ItemView.extend({
7763
- template: template$d$1,
7736
+ template: template$c$1,
7764
7737
  className: 'drop_down_button',
7765
7738
  ui: {
7766
7739
  button: '> button',
@@ -7837,7 +7810,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7837
7810
  }
7838
7811
  });
7839
7812
 
7840
- function template$e$1(data) {
7813
+ function template$d$1(data) {
7841
7814
  var __p = '';
7842
7815
  __p += '<div class="pictogram"></div>\n';
7843
7816
  return __p;
@@ -7845,7 +7818,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7845
7818
 
7846
7819
  var FileThumbnailView = Marionette.ItemView.extend({
7847
7820
  className: 'file_thumbnail',
7848
- template: template$e$1,
7821
+ template: template$d$1,
7849
7822
  modelEvents: {
7850
7823
  'change:state': 'update'
7851
7824
  },
@@ -7986,15 +7959,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
7986
7959
 
7987
7960
  if (file) {
7988
7961
  _.each(this.options.dropDownMenuItems, function (item) {
7989
- items.add(new FileInputView.CustomMenuItem({
7990
- name: item.name,
7991
- label: item.label
7992
- }, {
7993
- inputModel: _this.model,
7994
- propertyName: _this.options.propertyName,
7995
- file: file,
7996
- selected: item.selected
7997
- }));
7962
+ items.add(_this._createCustomMenuItem(file, item));
7998
7963
  });
7999
7964
 
8000
7965
  items.add(new FileInputView.EditFileSettingsMenuItem({
@@ -8007,6 +7972,31 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8007
7972
 
8008
7973
  return items;
8009
7974
  },
7975
+ _createCustomMenuItem: function _createCustomMenuItem(file, item) {
7976
+ var _this2 = this;
7977
+
7978
+ var options = {
7979
+ inputModel: this.model,
7980
+ propertyName: this.options.propertyName,
7981
+ file: file
7982
+ };
7983
+
7984
+ if (typeof item === 'function') {
7985
+ return new item({}, options);
7986
+ } else {
7987
+ return new FileInputView.CustomMenuItem({
7988
+ name: item.name,
7989
+ label: item.label,
7990
+ checked: item.checked,
7991
+ items: item.items && new Backbone.Collection(item.items.map(function (item) {
7992
+ return _this2._createCustomMenuItem(file, item);
7993
+ }))
7994
+ }, _objectSpread2$1(_objectSpread2$1({}, options), {}, {
7995
+ selected: item.selected,
7996
+ items: item.items
7997
+ }));
7998
+ }
7999
+ },
8010
8000
  _listenToNestedTextTrackFiles: function _listenToNestedTextTrackFiles(file) {
8011
8001
  if (this.textTrackFiles) {
8012
8002
  this.stopListening(this.textTrackFiles);
@@ -8081,6 +8071,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8081
8071
  this.update();
8082
8072
  },
8083
8073
  update: function update() {
8074
+ this.set('kind', 'radio');
8084
8075
  this.set('checked', this.options.textTrackFile == this.getDefaultTextTrackFile());
8085
8076
  this.set('name', this.options.textTrackFile ? null : 'no_default_text_track');
8086
8077
  this.set('label', this.options.textTrackFile ? this.options.textTrackFile.displayLabel() : this.options.textTrackFiles.length ? I18n$1.t('pageflow.editor.views.inputs.file_input.auto_default_text_track') : I18n$1.t('pageflow.editor.views.inputs.file_input.no_default_text_track'));
@@ -8097,14 +8088,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8097
8088
  }
8098
8089
  });
8099
8090
 
8100
- function template$f(data) {
8091
+ function template$e$1(data) {
8101
8092
  var __p = '';
8102
8093
  __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';
8103
8094
  return __p;
8104
8095
  }
8105
8096
 
8106
8097
  var LoadingView = Marionette.ItemView.extend({
8107
- template: template$f,
8098
+ template: template$e$1,
8108
8099
  className: 'loading',
8109
8100
  tagName: 'li'
8110
8101
  });
@@ -8126,7 +8117,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8126
8117
  }
8127
8118
  };
8128
8119
 
8129
- function template$g(data) {
8120
+ function template$f(data) {
8130
8121
  var __t,
8131
8122
  __p = '';
8132
8123
 
@@ -8136,7 +8127,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8136
8127
 
8137
8128
  var ThemeItemView = Marionette.ItemView.extend({
8138
8129
  tagName: 'li',
8139
- template: template$g,
8130
+ template: template$f,
8140
8131
  className: 'theme_item',
8141
8132
  mixins: [selectableView],
8142
8133
  selectionAttribute: 'theme',
@@ -8167,7 +8158,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8167
8158
  }
8168
8159
  });
8169
8160
 
8170
- function template$h(data) {
8161
+ function template$g(data) {
8171
8162
  var __t,
8172
8163
  __p = '';
8173
8164
 
@@ -8176,7 +8167,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8176
8167
  }
8177
8168
 
8178
8169
  var ChangeThemeDialogView = Marionette.ItemView.extend({
8179
- template: template$h,
8170
+ template: template$g,
8180
8171
  className: 'change_theme dialog editor',
8181
8172
  mixins: [dialogView],
8182
8173
  ui: {
@@ -8244,14 +8235,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8244
8235
  }).promise();
8245
8236
  };
8246
8237
 
8247
- function template$i(data) {
8238
+ function template$h(data) {
8248
8239
  var __p = '';
8249
8240
  __p += '\n';
8250
8241
  return __p;
8251
8242
  }
8252
8243
 
8253
8244
  var StaticThumbnailView = Marionette.ItemView.extend({
8254
- template: template$i,
8245
+ template: template$h,
8255
8246
  className: 'static_thumbnail',
8256
8247
  modelEvents: {
8257
8248
  'change:configuration': 'update'
@@ -8314,7 +8305,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8314
8305
  }
8315
8306
  });
8316
8307
 
8317
- function template$j(data) {
8308
+ function template$i(data) {
8318
8309
  var __p = '';
8319
8310
  __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';
8320
8311
  return __p;
@@ -8330,7 +8321,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8330
8321
  /** @lends ReferenceInputView.prototype */
8331
8322
  {
8332
8323
  mixins: [inputView],
8333
- template: template$j,
8324
+ template: template$i,
8334
8325
  className: 'reference_input',
8335
8326
  ui: {
8336
8327
  title: '.title',
@@ -8428,7 +8419,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8428
8419
  }
8429
8420
  });
8430
8421
 
8431
- function template$k(data) {
8422
+ function template$j(data) {
8432
8423
  var __t,
8433
8424
  __p = '';
8434
8425
 
@@ -8437,7 +8428,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8437
8428
  }
8438
8429
 
8439
8430
  var EditMetaDataView = Marionette.Layout.extend({
8440
- template: template$k,
8431
+ template: template$j,
8441
8432
  className: 'edit_meta_data',
8442
8433
  mixins: [failureIndicatingView],
8443
8434
  regions: {
@@ -8537,7 +8528,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8537
8528
  }
8538
8529
  });
8539
8530
 
8540
- function template$l(data) {
8531
+ function template$k(data) {
8541
8532
  var __t,
8542
8533
  __p = '';
8543
8534
 
@@ -8546,7 +8537,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8546
8537
  }
8547
8538
 
8548
8539
  var EditWidgetView = Marionette.ItemView.extend({
8549
- template: template$l,
8540
+ template: template$k,
8550
8541
  className: 'edit_widget',
8551
8542
  events: {
8552
8543
  'click a.back': function clickABack() {
@@ -8577,7 +8568,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8577
8568
  }
8578
8569
  });
8579
8570
 
8580
- function template$m(data) {
8571
+ function template$l(data) {
8581
8572
  var __p = '';
8582
8573
  __p += '<span class="file_thumbnail"></span>\n\n<span class="file_name"></span>\n';
8583
8574
  return __p;
@@ -8585,7 +8576,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8585
8576
 
8586
8577
  var ExplorerFileItemView = Marionette.ItemView.extend({
8587
8578
  tagName: 'li',
8588
- template: template$m,
8579
+ template: template$l,
8589
8580
  mixins: [loadable, selectableView],
8590
8581
  selectionAttribute: 'file',
8591
8582
  ui: {
@@ -8622,14 +8613,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8622
8613
  }
8623
8614
  });
8624
8615
 
8625
- function template$n(data) {
8616
+ function template$m(data) {
8626
8617
  var __p = '';
8627
8618
  __p += '<a href="">\n <span class="title"></span>\n</a>\n';
8628
8619
  return __p;
8629
8620
  }
8630
8621
 
8631
8622
  var OtherEntryItemView = Marionette.ItemView.extend({
8632
- template: template$n,
8623
+ template: template$m,
8633
8624
  className: 'other_entry_item',
8634
8625
  tagName: 'li',
8635
8626
  mixins: [selectableView],
@@ -8644,7 +8635,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8644
8635
  }
8645
8636
  });
8646
8637
 
8647
- function template$o(data) {
8638
+ function template$n(data) {
8648
8639
  var __t,
8649
8640
  __p = '';
8650
8641
 
@@ -8670,7 +8661,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8670
8661
  selection: this.options.selection
8671
8662
  },
8672
8663
  blankSlateViewConstructor: Marionette.ItemView.extend({
8673
- template: template$o,
8664
+ template: template$n,
8674
8665
  tagName: 'li',
8675
8666
  className: 'blank_slate'
8676
8667
  }),
@@ -8681,7 +8672,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8681
8672
  }
8682
8673
  });
8683
8674
 
8684
- function template$p(data) {
8675
+ function template$o(data) {
8685
8676
  var __t,
8686
8677
  __p = '';
8687
8678
 
@@ -8706,7 +8697,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8706
8697
  }
8707
8698
 
8708
8699
  var FilesExplorerView = Marionette.ItemView.extend({
8709
- template: template$p,
8700
+ template: template$o,
8710
8701
  className: 'files_explorer editor dialog',
8711
8702
  mixins: [dialogView],
8712
8703
  ui: {
@@ -8793,7 +8784,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8793
8784
  app.dialogRegion.show(new FilesExplorerView(options));
8794
8785
  };
8795
8786
 
8796
- function template$q(data) {
8787
+ function template$p(data) {
8797
8788
  var __p = '';
8798
8789
  __p += '<th></th>\n<td></td>';
8799
8790
  return __p;
@@ -8801,17 +8792,18 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8801
8792
 
8802
8793
  var FileMetaDataItemView = Marionette.ItemView.extend({
8803
8794
  tagName: 'tr',
8804
- template: template$q,
8795
+ template: template$p,
8805
8796
  ui: {
8806
8797
  label: 'th',
8807
8798
  value: 'td'
8808
8799
  },
8809
8800
  onRender: function onRender() {
8810
- this.subview(new this.options.valueView(_.extend({
8811
- el: this.ui.value,
8801
+ this.appendSubview(new this.options.valueView(_.extend({
8812
8802
  model: this.model,
8813
8803
  name: this.options.name
8814
- }, this.options.valueViewOptions || {})));
8804
+ }, this.options.valueViewOptions || {})), {
8805
+ to: this.ui.value
8806
+ });
8815
8807
  this.ui.label.text(this.labelText());
8816
8808
  },
8817
8809
  labelText: function labelText() {
@@ -8823,7 +8815,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8823
8815
  }
8824
8816
  });
8825
8817
 
8826
- function template$r(data) {
8818
+ function template$q(data) {
8827
8819
  var __p = '';
8828
8820
  __p += '<p class="percent"></p>\n<p class="description"></p>\n<p class="error_message"></p>';
8829
8821
  return __p;
@@ -8832,7 +8824,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8832
8824
  var FileStageItemView = Marionette.ItemView.extend({
8833
8825
  tagName: 'li',
8834
8826
  className: 'file_stage_item',
8835
- template: template$r,
8827
+ template: template$q,
8836
8828
  ui: {
8837
8829
  description: '.description',
8838
8830
  percent: '.percent',
@@ -8873,7 +8865,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8873
8865
  }
8874
8866
  });
8875
8867
 
8876
- function template$s(data) {
8868
+ function template$r(data) {
8877
8869
  var __t,
8878
8870
  __p = '';
8879
8871
 
@@ -8883,7 +8875,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8883
8875
 
8884
8876
  var FileItemView = Marionette.ItemView.extend({
8885
8877
  tagName: 'li',
8886
- template: template$s,
8878
+ template: template$r,
8887
8879
  mixins: [loadable],
8888
8880
  ui: {
8889
8881
  fileName: '.file_name',
@@ -8998,7 +8990,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
8998
8990
  }
8999
8991
  });
9000
8992
 
9001
- function template$t(data) {
8993
+ function template$s(data) {
9002
8994
  var __t,
9003
8995
  __p = '';
9004
8996
 
@@ -9015,7 +9007,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9015
9007
  }
9016
9008
 
9017
9009
  var FilteredFilesView = Marionette.ItemView.extend({
9018
- template: template$t,
9010
+ template: template$s,
9019
9011
  className: 'filtered_files',
9020
9012
  ui: {
9021
9013
  banner: '.filtered_files-banner',
@@ -9079,7 +9071,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9079
9071
  }
9080
9072
  });
9081
9073
 
9082
- function template$u(data) {
9074
+ function template$t(data) {
9083
9075
  var __t,
9084
9076
  __p = '';
9085
9077
 
@@ -9087,7 +9079,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9087
9079
  return __p;
9088
9080
  }
9089
9081
 
9090
- function template$v(data) {
9082
+ function template$u(data) {
9091
9083
  var __t,
9092
9084
  __p = '';
9093
9085
 
@@ -9096,7 +9088,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9096
9088
  }
9097
9089
 
9098
9090
  var ImporterSelectView = Marionette.ItemView.extend({
9099
- template: template$v,
9091
+ template: template$u,
9100
9092
  className: 'importer_select',
9101
9093
  tagName: 'li',
9102
9094
  events: {
@@ -9112,7 +9104,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9112
9104
  }
9113
9105
  });
9114
9106
  var ChooseImporterView = Marionette.ItemView.extend({
9115
- template: template$u,
9107
+ template: template$t,
9116
9108
  className: 'choose_importer editor dialog',
9117
9109
  mixins: [dialogView],
9118
9110
  ui: {
@@ -9147,7 +9139,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9147
9139
  app.dialogRegion.show(new ChooseImporterView(options).render());
9148
9140
  };
9149
9141
 
9150
- function template$w(data) {
9142
+ function template$v(data) {
9151
9143
  var __t,
9152
9144
  __p = '';
9153
9145
 
@@ -9155,7 +9147,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9155
9147
  return __p;
9156
9148
  }
9157
9149
 
9158
- function template$x(data) {
9150
+ function template$w(data) {
9159
9151
  var __t,
9160
9152
  __p = '';
9161
9153
 
@@ -9163,6 +9155,72 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9163
9155
  return __p;
9164
9156
  }
9165
9157
 
9158
+ function template$x(data) {
9159
+ var __p = '';
9160
+ __p += '';
9161
+ return __p;
9162
+ }
9163
+
9164
+ var EditFileView = Marionette.ItemView.extend({
9165
+ template: template$x,
9166
+ className: 'edit_file',
9167
+ onRender: function onRender() {
9168
+ var fileType = this.model.fileType();
9169
+ var entry = this.options.entry || state.entry;
9170
+ var tab = new ConfigurationEditorTabView({
9171
+ model: this.model.configuration,
9172
+ attributeTranslationKeyPrefixes: ['pageflow.editor.files.attributes.' + fileType.collectionName, 'pageflow.editor.files.common_attributes', 'pageflow.editor.nested_files.' + fileType.collectionName, 'pageflow.editor.nested_files.common_attributes']
9173
+ });
9174
+
9175
+ if (this.options.displayFileName) {
9176
+ tab.input('file_name', TextInputView, {
9177
+ model: this.model,
9178
+ disabled: true
9179
+ });
9180
+ }
9181
+
9182
+ tab.input('rights', TextInputView, {
9183
+ model: this.model,
9184
+ placeholder: entry.get('default_file_rights')
9185
+ });
9186
+
9187
+ if (editor.entryType.supportsExtendedFileRights && !fileType.noExtendedFileRights) {
9188
+ tab.input('source_url', TextInputView);
9189
+ tab.input('license', SelectInputView, {
9190
+ includeBlank: true,
9191
+ blankTranslationKey: 'pageflow.editor.files.common_attributes.license.blank',
9192
+ values: state.config.availableFileLicenses,
9193
+ texts: state.config.availableFileLicenses.map(function (name) {
9194
+ return I18n$1.t("pageflow.file_licenses.".concat(name, ".name"));
9195
+ })
9196
+ });
9197
+ tab.input('rights_display', SelectInputView, {
9198
+ values: ['credits', 'inline']
9199
+ });
9200
+ }
9201
+
9202
+ tab.view(SeparatorView);
9203
+
9204
+ _(this.fileTypeInputs()).each(function (options) {
9205
+ tab.input(options.name, options.inputView, options.inputViewOptions);
9206
+ });
9207
+
9208
+ tab.input('original_url', UrlDisplayView, {
9209
+ model: this.model
9210
+ });
9211
+ this.appendSubview(tab);
9212
+ },
9213
+ fileTypeInputs: function fileTypeInputs() {
9214
+ var fileType = this.model.fileType();
9215
+ return _.chain(fileType.configurationEditorInputs).map(function (inputs) {
9216
+ if (_.isFunction(inputs)) {
9217
+ return inputs(this.model);
9218
+ } else {
9219
+ return inputs;
9220
+ }
9221
+ }, this).flatten().value();
9222
+ }
9223
+ });
9166
9224
  var UploadableFilesView = Marionette.View.extend({
9167
9225
  className: 'uploadable_files',
9168
9226
  initialize: function initialize() {
@@ -9208,7 +9266,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9208
9266
  }
9209
9267
  });
9210
9268
  var ConfirmFileImportUploadView = Marionette.Layout.extend({
9211
- template: template$x,
9269
+ template: template$w,
9212
9270
  className: 'confirm_upload editor dialog',
9213
9271
  mixins: [dialogView],
9214
9272
  regions: {
@@ -9278,7 +9336,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9278
9336
  };
9279
9337
 
9280
9338
  var FilesImporterView = Marionette.ItemView.extend({
9281
- template: template$w,
9339
+ template: template$v,
9282
9340
  className: 'files_importer editor dialog',
9283
9341
  mixins: [dialogView],
9284
9342
  ui: {
@@ -9336,7 +9394,10 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9336
9394
  content_type: file.type,
9337
9395
  file_size: -1,
9338
9396
  rights: file.rights,
9339
- source_url: file.url
9397
+ source_url: file.url,
9398
+ configuration: {
9399
+ source_url: file.source_url
9400
+ }
9340
9401
  }, {
9341
9402
  fileType: fileType
9342
9403
  });
@@ -9555,7 +9616,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9555
9616
  var __t,
9556
9617
  __p = '';
9557
9618
 
9558
- __p += '<div class="files_pending notice">\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.files_pending_notice')) == null ? '' : __t) + '</p>\n <p><a href="#files">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.show_files')) == null ? '' : __t) + '</a></p>\n</div>\n\n<div>\n <div class="published notice">\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.published_notice')) == null ? '' : __t) + '</p>\n <p><a href="" target="_blank">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.view_revisions')) == null ? '' : __t) + '</a></p>\n </div>\n\n <div class="not_published notice">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.not_published_notice')) == null ? '' : __t) + '\n </div>\n\n <h2 class="sidebar-header">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.publish_current')) == null ? '' : __t) + '\n </h2>\n\n <div class="radio_input">\n <input id="publish_entry_forever" type="radio" name="mode" value="publish_forever">\n <label for="publish_entry_forever">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.unlimited')) == null ? '' : __t) + '</label>\n </div>\n\n <div class="radio_input">\n <input id="publish_entry_until" type="radio" name="mode" value="publish_until">\n <label for="publish_entry_until">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.until_including')) == null ? '' : __t) + '</label>\n </div>\n\n <div class="publish_until_fields disabled">\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.date')) == null ? '' : __t) + '\n <input type="text" name="publish_until">\n </label>\n\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.time')) == null ? '' : __t) + '\n <input type="text" name="publish_until_time" value="00:00">\n </label>\n </div>\n\n <div class="check_box_input">\n <input id="publish_password_protected" type="checkbox" name="password_protected" value="1">\n <label for="publish_password_protected">\n <span class="name">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.password_protected')) == null ? '' : __t) + '\n </span>\n <span class="inline_help">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.password_help')) == null ? '' : __t) + '\n </span>\n </label>\n </div>\n\n <div class="password_fields disabled">\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.user_name')) == null ? '' : __t) + '\n <input type="text" name="user_name" disabled>\n </label>\n\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.password')) == null ? '' : __t) + '\n <input type="text" name="password">\n </label>\n\n <p class="already_published_with_password">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.already_published_with_password_help')) == null ? '' : __t) + '\n </p>\n <p class="previously_published_with_password">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.previously_published_with_password_help')) == null ? '' : __t) + '\n </p>\n <p class="already_published_without_password">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.already_published_without_password_help')) == null ? '' : __t) + '\n </p>\n </div>\n\n <button class="save" disabled>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.publish')) == null ? '' : __t) + '</a>\n</div>\n\n<div class="success notice">\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.publish_success')) == null ? '' : __t) + '</p>\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.published_url_hint')) == null ? '' : __t) + '</p>\n <p><a href="" target="_blank"></a></p>\n</div>\n';
9619
+ __p += '<div class="files_pending notice">\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.files_pending_notice')) == null ? '' : __t) + '</p>\n <p><a href="#files">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.show_files')) == null ? '' : __t) + '</a></p>\n</div>\n\n<div>\n <div class="published notice">\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.published_notice')) == null ? '' : __t) + '</p>\n <p><a href="" target="_blank">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.view_revisions')) == null ? '' : __t) + '</a></p>\n </div>\n\n <div class="not_published notice">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.not_published_notice')) == null ? '' : __t) + '\n </div>\n\n <h2 class="sidebar-header">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.publish_current')) == null ? '' : __t) + '\n </h2>\n\n <div class="radio_input">\n <input id="publish_entry_forever" type="radio" name="mode" value="publish_forever">\n <label for="publish_entry_forever">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.unlimited')) == null ? '' : __t) + '</label>\n </div>\n\n <div class="radio_input">\n <input id="publish_entry_until" type="radio" name="mode" value="publish_until">\n <label for="publish_entry_until">' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.until_including')) == null ? '' : __t) + '</label>\n </div>\n\n <div class="publish_until_fields disabled">\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.date')) == null ? '' : __t) + '\n <input type="text" name="publish_until">\n </label>\n\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.time')) == null ? '' : __t) + '\n <input type="text" name="publish_until_time" value="00:00">\n </label>\n </div>\n\n <div class="check_box_input">\n <input id="publish_with_noindex" type="checkbox" name="noindex" value="1">\n <label for="publish_with_noindex">\n <span class="name">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.noindex')) == null ? '' : __t) + '\n </span>\n <span class="inline_help">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.noindex_help')) == null ? '' : __t) + '\n </span>\n </label>\n </div>\n\n <div class="check_box_input">\n <input id="publish_password_protected" type="checkbox" name="password_protected" value="1">\n <label for="publish_password_protected">\n <span class="name">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.password_protected')) == null ? '' : __t) + '\n </span>\n <span class="inline_help">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.password_help')) == null ? '' : __t) + '\n </span>\n </label>\n </div>\n\n <div class="password_fields disabled">\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.user_name')) == null ? '' : __t) + '\n <input type="text" name="user_name" disabled>\n </label>\n\n <label>\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.password')) == null ? '' : __t) + '\n <input type="text" name="password">\n </label>\n\n <p class="already_published_with_password">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.already_published_with_password_help')) == null ? '' : __t) + '\n </p>\n <p class="previously_published_with_password">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.previously_published_with_password_help')) == null ? '' : __t) + '\n </p>\n <p class="already_published_without_password">\n ' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.already_published_without_password_help')) == null ? '' : __t) + '\n </p>\n </div>\n\n <button class="save" disabled>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.publish')) == null ? '' : __t) + '</a>\n</div>\n\n<div class="success notice">\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.publish_success')) == null ? '' : __t) + '</p>\n <p>' + ((__t = I18n.t('pageflow.editor.templates.publish_entry.published_url_hint')) == null ? '' : __t) + '</p>\n <p><a href="" target="_blank"></a></p>\n</div>\n';
9559
9620
  return __p;
9560
9621
  }
9561
9622
 
@@ -9572,6 +9633,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9572
9633
  passwordFields: '.password_fields',
9573
9634
  userNameField: 'input[name=user_name]',
9574
9635
  passwordField: 'input[name=password]',
9636
+ noindexCheckBox: 'input[name=noindex]',
9575
9637
  alreadyPublishedWithPassword: '.already_published_with_password',
9576
9638
  previouslyPublishedWithPassword: '.previously_published_with_password',
9577
9639
  alreadyPublishedWithoutPassword: '.already_published_without_password',
@@ -9634,6 +9696,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9634
9696
  this.ui.passwordField.val(this.randomPassword());
9635
9697
  }
9636
9698
 
9699
+ this.ui.noindexCheckBox.prop('checked', this.model.get('last_published_with_noindex'));
9637
9700
  this.ui.alreadyPublishedWithPassword.toggle(this.model.get('published') && this.model.get('password_protected'));
9638
9701
  this.ui.previouslyPublishedWithPassword.toggle(!this.model.get('published') && this.model.get('password_protected'));
9639
9702
  this.ui.alreadyPublishedWithoutPassword.toggle(this.model.get('published') && !this.model.get('password_protected')); // Helpers
@@ -9674,7 +9737,8 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
9674
9737
  this.options.entryPublication.publish({
9675
9738
  published_until: publishedUntil,
9676
9739
  password_protected: this.ui.passwordProtectedCheckBox.is(':checked'),
9677
- password: this.ui.passwordField.val()
9740
+ password: this.ui.passwordField.val(),
9741
+ noindex: this.ui.noindexCheckBox.is(':checked')
9678
9742
  }).fail(function () {
9679
9743
  alert('Beim Veröffentlichen ist ein Fehler aufgetreten');
9680
9744
  }).always(function () {
@@ -10817,7 +10881,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
10817
10881
  }
10818
10882
  });
10819
10883
  var ConfirmUploadView = Marionette.Layout.extend({
10820
- template: template$x,
10884
+ template: template$w,
10821
10885
  className: 'confirm_upload editor dialog',
10822
10886
  mixins: [dialogView],
10823
10887
  regions: {
@@ -11104,10 +11168,60 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
11104
11168
  editor.applyDefaultHelpEntry();
11105
11169
  });
11106
11170
  });
11171
+
11172
+ function _arrayWithoutHoles(arr) {
11173
+ if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
11174
+ }
11175
+
11176
+ function _iterableToArray(iter) {
11177
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
11178
+ }
11179
+
11180
+ function _nonIterableSpread() {
11181
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11182
+ }
11183
+
11184
+ function _toConsumableArray(arr) {
11185
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
11186
+ }
11187
+
11107
11188
  var OtherFile = UploadableFile.extend({
11108
11189
  thumbnailPictogram: 'other'
11109
11190
  });
11110
11191
  app.addInitializer(function (options) {
11192
+ editor.fileTypes.commonMetaDataAttributes = [{
11193
+ name: 'rights',
11194
+ valueView: TextFileMetaDataItemValueView,
11195
+ valueViewOptions: {
11196
+ settingsDialogTabLink: 'general'
11197
+ }
11198
+ }];
11199
+
11200
+ if (editor.entryType.supportsExtendedFileRights) {
11201
+ editor.fileTypes.commonMetaDataAttributes = [].concat(_toConsumableArray(editor.fileTypes.commonMetaDataAttributes), [{
11202
+ name: 'source_url',
11203
+ valueView: TextFileMetaDataItemValueView,
11204
+ valueViewOptions: {
11205
+ fromConfiguration: true,
11206
+ settingsDialogTabLink: 'general'
11207
+ }
11208
+ }, {
11209
+ name: 'license',
11210
+ valueView: TextFileMetaDataItemValueView,
11211
+ valueViewOptions: {
11212
+ fromConfiguration: true,
11213
+ formatValue: function formatValue(value) {
11214
+ return I18n$1.t("pageflow.file_licenses.".concat(value, ".name"));
11215
+ },
11216
+ settingsDialogTabLink: 'general'
11217
+ }
11218
+ }]);
11219
+ }
11220
+
11221
+ editor.fileTypes.commonSettingsDialogTabs = [{
11222
+ name: 'general',
11223
+ view: EditFileView
11224
+ }];
11111
11225
  var textTracksMetaDataAttribute = {
11112
11226
  name: 'text_tracks',
11113
11227
  valueView: TextTracksFileMetaDataItemValueView,
@@ -11167,6 +11281,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
11167
11281
  return upload.name.match(/\.vtt$/) || upload.name.match(/\.srt$/);
11168
11282
  },
11169
11283
  skipUploadConfirmation: true,
11284
+ noExtendedFileRights: true,
11170
11285
  configurationEditorInputs: [{
11171
11286
  name: 'label',
11172
11287
  inputView: TextInputView,