pageflow 15.1.0.beta5 → 15.1.0.beta6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdd026a04cce5cafe6995a71e8b6787e47ce7f6bc3e8e3442707b7eeb8bc4f2b
4
- data.tar.gz: 2eb3e985022e4a89e07cea935844d140c8bfde32d24847ca8e6d083d73587947
3
+ metadata.gz: 589502715806a47772d831c8446f1fdc319d72b411e1c13fc00b0e5e4d5aec48
4
+ data.tar.gz: f656cafc219dc4507206bec637e03d876d98045627779fe0de904c8d270e6ae4
5
5
  SHA512:
6
- metadata.gz: cfc0cca465ec6f3d6e97db760d9cd32868e99576e6cc6e1750ed9b9ebb0820b3dab7b40151e393b75dbc259f1e9a1821dd79e64599b672e4355aea16a2b1012f
7
- data.tar.gz: f08aaef98881ada85734829e70c25b004afb4c7cd8d3cb197d1066d5c38bca7d5f7caab0e0716cd9d8da32cd2fb93c497eca3c18efeb373801a1048e4d739a49
6
+ metadata.gz: eb958ba5f3e90b14dc67b23c8a7913da07d911a0397fb801171be92567af8ffec46b271ff917ce252ac3909def665884a5f060f33da7b663499501d24d1f3baf
7
+ data.tar.gz: 714ff5f118de41a7820a2b8dbd355cedbba6dd33c13222ba8cd0684c6438bac0ae10807183302c1e45d556ac74dff4a8bfe6c1369b611a547f9c14c4a2c805e8
@@ -1,5 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### Version 15.1.0.beta6
4
+
5
+ 2020-01-29
6
+
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/v15.1.0.beta5...v15.1.0.beta6)
8
+
9
+ #### Core
10
+
11
+ ##### Internal
12
+
13
+ - Add configuration to revisions
14
+ ([#1306](https://github.com/codevise/pageflow/pull/1306))
15
+
3
16
  ### Version 15.1.0.beta5
4
17
 
5
18
  2020-01-29
@@ -39,7 +52,7 @@ Forgot to build assets before doing previous release.
39
52
 
40
53
  ```diff
41
54
  - ActiveAdmin.application.unshift(Pageflow.active_admin_load_path)
42
- + ActiveAdmin.application.load_paths +=[Pageflow.active_admin_load_path]
55
+ + ActiveAdmin.application.load_paths += [Pageflow.active_admin_load_path]
43
56
  ```
44
57
 
45
58
  - Improve support for Webpack setup in host appplication
@@ -129,7 +142,8 @@ Forgot to build assets before doing previous release.
129
142
  ([#1248](https://github.com/codevise/pageflow/pull/1248),
130
143
  [#1270](https://github.com/codevise/pageflow/pull/1270),
131
144
  [#1278](https://github.com/codevise/pageflow/pull/1278),
132
- [#1286](https://github.com/codevise/pageflow/pull/1286))
145
+ [#1286](https://github.com/codevise/pageflow/pull/1286),
146
+ [#1314](https://github.com/codevise/pageflow/pull/1314))
133
147
  - Fix section index and references to adjacent chapters
134
148
  ([#1316](https://github.com/codevise/pageflow/pull/1316))
135
149
  - Render uploaded images in scrolled entries
@@ -137,6 +151,7 @@ Forgot to build assets before doing previous release.
137
151
  [#1303](https://github.com/codevise/pageflow/pull/1303))
138
152
  - Use chapters from db in navigaition bar
139
153
  ([#1298](https://github.com/codevise/pageflow/pull/1298),
154
+ [#1300](https://github.com/codevise/pageflow/pull/1300),
140
155
  [#1308](https://github.com/codevise/pageflow/pull/1308))
141
156
 
142
157
  ##### Editor
@@ -144,8 +159,11 @@ Forgot to build assets before doing previous release.
144
159
  - Render demo in editor
145
160
  ([#1268](https://github.com/codevise/pageflow/pull/1268))
146
161
  - Use data from Backbone collections in scrolled editor preview
147
- ([#1293](https://github.com/codevise/pageflow/pull/1293),
148
- [#1294](https://github.com/codevise/pageflow/pull/1294))
162
+ ([#1288](https://github.com/codevise/pageflow/pull/1288),
163
+ [#1293](https://github.com/codevise/pageflow/pull/1293),
164
+ [#1292](https://github.com/codevise/pageflow/pull/1292),
165
+ [#1294](https://github.com/codevise/pageflow/pull/1294),
166
+ [#1305](https://github.com/codevise/pageflow/pull/1305))
149
167
 
150
168
  ##### Internal
151
169
 
@@ -3726,7 +3726,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
3726
3726
  }
3727
3727
  });
3728
3728
 
3729
- var editor = new EditorApi();
3729
+ var editor$1 = new EditorApi();
3730
3730
  var startEditor = function startEditor(options) {
3731
3731
  $(function () {
3732
3732
  $.when($.getJSON('/editor/entries/' + options.entryId + '/seed'), pageflow.browser.detectFeatures()).done(function (result) {
@@ -3972,7 +3972,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
3972
3972
  },
3973
3973
  getReference: function getReference(attribute, collection) {
3974
3974
  if (typeof collection === 'string') {
3975
- var fileType = editor.fileTypes.findByCollectionName(collection);
3975
+ var fileType = editor$1.fileTypes.findByCollectionName(collection);
3976
3976
  collection = state.entry.getFileCollection(fileType);
3977
3977
  }
3978
3978
 
@@ -4276,7 +4276,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
4276
4276
  return this.pageType().pageLinks(this.configuration);
4277
4277
  },
4278
4278
  pageType: function pageType() {
4279
- return editor.pageTypes.findByName(this.get('template'));
4279
+ return editor$1.pageTypes.findByName(this.get('template'));
4280
4280
  },
4281
4281
  toJSON: function toJSON() {
4282
4282
  return _$1.extend(_$1.clone(this.attributes), {
@@ -4333,7 +4333,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
4333
4333
  this.page = this.chapter.buildPage();
4334
4334
  }
4335
4335
 
4336
- editor.trigger('scaffold:storyline', this.storyline);
4336
+ editor$1.trigger('scaffold:storyline', this.storyline);
4337
4337
  return this.storyline;
4338
4338
  },
4339
4339
  load: function load(response) {
@@ -4667,7 +4667,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
4667
4667
  return '/widgets/' + widget.id;
4668
4668
  };
4669
4669
  };
4670
- editor.registerFileSelectionHandler('widgetConfiguration', WidgetConfigurationFileSelectionHandler);
4670
+ editor$1.registerFileSelectionHandler('widgetConfiguration', WidgetConfigurationFileSelectionHandler);
4671
4671
 
4672
4672
  var EncodingConfirmation = Backbone.Model.extend({
4673
4673
  paramRoot: 'encoding_confirmation',
@@ -4772,9 +4772,24 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
4772
4772
  }
4773
4773
  });
4774
4774
 
4775
- var EntryConfiguration = Configuration.extend({
4775
+ var EntryMetadataConfiguration = Configuration.extend({
4776
+ modelName: 'entry_metadata_configuration',
4777
+ i18nKey: 'pageflow/entry_metadata_configuration',
4778
+ defaults: {}
4779
+ });
4780
+
4781
+ var EntryMetadata = Configuration.extend({
4776
4782
  modelName: 'entry',
4777
- i18nKey: 'pageflow/entry'
4783
+ i18nKey: 'pageflow/entry',
4784
+ defaults: {},
4785
+ initialize: function initialize(attributes, options) {
4786
+ Configuration.prototype.initialize.apply(this, attributes, options);
4787
+ this.configuration = new EntryMetadataConfiguration(_$1.clone(attributes.configuration) || {});
4788
+ this.listenTo(this.configuration, 'change', function () {
4789
+ this.trigger('change');
4790
+ this.parent.save();
4791
+ });
4792
+ }
4778
4793
  });
4779
4794
 
4780
4795
  var StorylineConfiguration = Configuration.extend({
@@ -4931,7 +4946,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
4931
4946
  return '/pages/' + page.id + '/' + (options.returnToTab || 'files');
4932
4947
  };
4933
4948
  };
4934
- editor.registerFileSelectionHandler('pageConfiguration', PageConfigurationFileSelectionHandler);
4949
+ editor$1.registerFileSelectionHandler('pageConfiguration', PageConfigurationFileSelectionHandler);
4935
4950
 
4936
4951
  var ImageFile = ReusableFile.extend({
4937
4952
  stages: [{
@@ -4953,16 +4968,16 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
4953
4968
  }
4954
4969
  });
4955
4970
 
4956
- var EntryConfigurationFileSelectionHandler = function EntryConfigurationFileSelectionHandler(options) {
4971
+ var EntryMetadataFileSelectionHandler = function EntryMetadataFileSelectionHandler(options) {
4957
4972
  this.call = function (file) {
4958
- state.entry.configuration.setReference(options.attributeName, file);
4973
+ state.entry.metadata.setReference(options.attributeName, file);
4959
4974
  };
4960
4975
 
4961
4976
  this.getReferer = function () {
4962
4977
  return '/meta_data/' + (options.returnToTab || 'general');
4963
4978
  };
4964
4979
  };
4965
- editor.registerFileSelectionHandler('entryConfiguration', EntryConfigurationFileSelectionHandler);
4980
+ editor$1.registerFileSelectionHandler('entryMetadata', EntryMetadataFileSelectionHandler);
4966
4981
 
4967
4982
  var EntryPublication = Backbone.Model.extend({
4968
4983
  paramRoot: 'entry_publication',
@@ -5291,7 +5306,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5291
5306
  },
5292
5307
  add: function add(upload, options) {
5293
5308
  options = options || {};
5294
- var editor$1 = options.editor || editor;
5309
+ var editor = options.editor || editor$1;
5295
5310
  var fileType = this.fileTypes.findByUpload(upload);
5296
5311
  var file = new fileType.model({
5297
5312
  state: 'uploadable',
@@ -5301,12 +5316,12 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5301
5316
  }, {
5302
5317
  fileType: fileType
5303
5318
  });
5304
- var setTargetFile = editor$1.nextUploadTargetFile;
5319
+ var setTargetFile = editor.nextUploadTargetFile;
5305
5320
 
5306
5321
  if (setTargetFile) {
5307
5322
  if (fileType.topLevelType || !setTargetFile.fileType().nestedFileTypes.contains(fileType)) {
5308
5323
  throw new InvalidNestedTypeError(upload, {
5309
- editor: editor$1,
5324
+ editor: editor,
5310
5325
  fileType: fileType
5311
5326
  });
5312
5327
  }
@@ -5386,7 +5401,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5386
5401
  parentModel.trigger('sync:order', parentModel, response, {});
5387
5402
  },
5388
5403
  error: function error(jqXHR, textStatus, errorThrown) {
5389
- editor.failures.add(new OrderingFailure(parentModel, collection));
5404
+ editor$1.failures.add(new OrderingFailure(parentModel, collection));
5390
5405
  }
5391
5406
  });
5392
5407
  }
@@ -5412,7 +5427,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5412
5427
  this.listenTo(this, 'add', function (model) {
5413
5428
  model.chapter = chapter;
5414
5429
  model.set('chapter_id', chapter.id);
5415
- editor.trigger('add:page', model);
5430
+ editor$1.trigger('add:page', model);
5416
5431
  });
5417
5432
  this.listenTo(this, 'remove', function (model) {
5418
5433
  model.chapter = null;
@@ -5491,7 +5506,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5491
5506
  this.listenTo(this, 'add', function (model) {
5492
5507
  model.storyline = storyline;
5493
5508
  model.set('storyline_id', storyline.id);
5494
- editor.trigger('add:chapter', model);
5509
+ editor$1.trigger('add:chapter', model);
5495
5510
  });
5496
5511
  this.listenTo(this, 'remove', function (model) {
5497
5512
  model.storyline = null;
@@ -5617,7 +5632,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5617
5632
  return '/page_links/' + pageLink.id;
5618
5633
  };
5619
5634
  };
5620
- editor.registerFileSelectionHandler('pageLink', PageLinkFileSelectionHandler);
5635
+ editor$1.registerFileSelectionHandler('pageLink', PageLinkFileSelectionHandler);
5621
5636
 
5622
5637
  var persistedPromise = {
5623
5638
  persisted: function persisted() {
@@ -5702,11 +5717,11 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5702
5717
  mixins: [filesCountWatcher, polling, failureTracking],
5703
5718
  initialize: function initialize(attributes, options) {
5704
5719
  options = options || {};
5705
- this.configuration = new EntryConfiguration(this.get('configuration') || {});
5706
- this.configuration.parent = this;
5720
+ this.metadata = new EntryMetadata(this.get('metadata') || {});
5721
+ this.metadata.parent = this;
5707
5722
  this.themes = options.themes || state.themes;
5708
5723
  this.files = options.files || state.files;
5709
- this.fileTypes = options.fileTypes || editor.fileTypes;
5724
+ this.fileTypes = options.fileTypes || editor$1.fileTypes;
5710
5725
  this.storylines = options.storylines || state.storylines;
5711
5726
  this.storylines.parentModel = this;
5712
5727
  this.chapters = options.chapters || state.chapters;
@@ -5725,11 +5740,11 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5725
5740
  this.listenTo(this.chapters, 'sort', function () {
5726
5741
  this.pages.sort();
5727
5742
  });
5728
- this.listenTo(this.configuration, 'change', function () {
5729
- this.trigger('change:configuration');
5743
+ this.listenTo(this.metadata, 'change', function () {
5744
+ this.trigger('change:metadata');
5730
5745
  this.save();
5731
5746
  });
5732
- this.listenTo(this.configuration, 'change:locale', function () {
5747
+ this.listenTo(this.metadata, 'change:locale', function () {
5733
5748
  this.once('sync', function () {
5734
5749
  // No other way of updating page templates used in
5735
5750
  // EntryPreviewView at the moment.
@@ -5738,7 +5753,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5738
5753
  });
5739
5754
  },
5740
5755
  getTheme: function getTheme() {
5741
- return this.themes.findByName(this.configuration.get('theme_name'));
5756
+ return this.themes.findByName(this.metadata.get('theme_name'));
5742
5757
  },
5743
5758
  addStoryline: function addStoryline(attributes) {
5744
5759
  var storyline = this.buildStoryline(attributes);
@@ -5821,7 +5836,10 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5821
5836
  }, this);
5822
5837
  },
5823
5838
  toJSON: function toJSON() {
5824
- return this.configuration.toJSON();
5839
+ var metadataJSON = this.metadata.toJSON();
5840
+ var configJSON = this.metadata.configuration.toJSON();
5841
+ metadataJSON.configuration = configJSON;
5842
+ return metadataJSON;
5825
5843
  }
5826
5844
  });
5827
5845
 
@@ -5957,7 +5975,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
5957
5975
 
5958
5976
  if (localFile) {
5959
5977
  state.files[collectionName].remove(localFile);
5960
- var fileType = editor.fileTypes.findByUpload(file);
5978
+ var fileType = editor$1.fileTypes.findByUpload(file);
5961
5979
  var file = new fileType.model(file, {
5962
5980
  fileType: fileType
5963
5981
  });
@@ -6285,7 +6303,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6285
6303
  this.outlet.show(this.options.view);
6286
6304
  },
6287
6305
  goBack: function goBack() {
6288
- editor.navigate('/', {
6306
+ editor$1.navigate('/', {
6289
6307
  trigger: true
6290
6308
  });
6291
6309
  }
@@ -6428,7 +6446,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6428
6446
  },
6429
6447
  events: {
6430
6448
  'click .retry': function clickRetry() {
6431
- editor.failures.retry();
6449
+ editor$1.failures.retry();
6432
6450
  return false;
6433
6451
  }
6434
6452
  },
@@ -6492,7 +6510,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6492
6510
  }
6493
6511
  },
6494
6512
  goBack: function goBack() {
6495
- editor.navigate('/', {
6513
+ editor$1.navigate('/', {
6496
6514
  trigger: true
6497
6515
  });
6498
6516
  }
@@ -6533,7 +6551,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6533
6551
  },
6534
6552
  'click a.publish': function clickAPublish() {
6535
6553
  if (!this.ui.publishButton.hasClass('disabled')) {
6536
- editor.navigate('/publish', {
6554
+ editor$1.navigate('/publish', {
6537
6555
  trigger: true
6538
6556
  });
6539
6557
  }
@@ -6541,7 +6559,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6541
6559
  return false;
6542
6560
  },
6543
6561
  'click .menu a': function clickMenuA(event) {
6544
- editor.navigate($(event.target).data('path'), {
6562
+ editor$1.navigate($(event.target).data('path'), {
6545
6563
  trigger: true
6546
6564
  });
6547
6565
  return false;
@@ -6552,7 +6570,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6552
6570
 
6553
6571
  this._updatePublishButton();
6554
6572
 
6555
- this.outlineRegion.show(new editor.entryType.outlineView({
6573
+ this.outlineRegion.show(new editor$1.entryType.outlineView({
6556
6574
  entry: state.entry,
6557
6575
  navigatable: true,
6558
6576
  editable: true,
@@ -6574,7 +6592,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6574
6592
  _addMenuItems: function _addMenuItems() {
6575
6593
  var view = this;
6576
6594
 
6577
- _$1.each(editor.mainMenuItems, function (options) {
6595
+ _$1.each(editor$1.mainMenuItems, function (options) {
6578
6596
  var item = $('<li><a href="#"></a></li>');
6579
6597
  var link = item.find('a');
6580
6598
 
@@ -6616,7 +6634,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
6616
6634
  },
6617
6635
  events: {
6618
6636
  'click .settings': function clickSettings() {
6619
- editor.navigate('/widgets/' + this.model.role(), {
6637
+ editor$1.navigate('/widgets/' + this.model.role(), {
6620
6638
  trigger: true
6621
6639
  });
6622
6640
  return false;
@@ -7098,7 +7116,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7098
7116
  },
7099
7117
  events: {
7100
7118
  'click .choose': function clickChoose() {
7101
- editor.selectFile({
7119
+ editor$1.selectFile({
7102
7120
  name: this.options.collection.name,
7103
7121
  filter: this.options.filter
7104
7122
  }, this.options.fileSelectionHandler || 'pageConfiguration', _$1.extend({
@@ -7120,7 +7138,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7120
7138
  }, this.options);
7121
7139
 
7122
7140
  if (typeof this.options.collection === 'string') {
7123
- this.options.collection = state.entry.getFileCollection(editor.fileTypes.findByCollectionName(this.options.collection));
7141
+ this.options.collection = state.entry.getFileCollection(editor$1.fileTypes.findByCollectionName(this.options.collection));
7124
7142
  }
7125
7143
 
7126
7144
  this.textTrackMenuItems = new Backbone.Collection();
@@ -7627,13 +7645,17 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7627
7645
  },
7628
7646
  onRender: function onRender() {
7629
7647
  var entry = this.model;
7648
+ var state = this.options.state || {};
7649
+ var features = this.options.features || {};
7650
+ var editor = this.options.editor || {};
7630
7651
  var configurationEditor = new ConfigurationEditorView({
7631
- model: entry.configuration,
7652
+ model: entry.metadata.configuration,
7632
7653
  tab: this.options.tab
7633
7654
  });
7634
7655
  configurationEditor.tab('general', function () {
7635
7656
  this.input('title', TextInputView, {
7636
- placeholder: entry.get('entry_title')
7657
+ placeholder: entry.get('entry_title'),
7658
+ model: entry.metadata
7637
7659
  });
7638
7660
  this.input('locale', SelectInputView, {
7639
7661
  values: state.config.availablePublicLocales,
@@ -7641,17 +7663,23 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7641
7663
  return I18n$1.t('pageflow.public._language', {
7642
7664
  locale: locale
7643
7665
  });
7644
- })
7666
+ }),
7667
+ model: entry.metadata
7668
+ });
7669
+ this.input('credits', TextAreaInputView, {
7670
+ model: entry.metadata
7645
7671
  });
7646
- this.input('credits', TextAreaInputView);
7647
7672
  this.input('author', TextInputView, {
7648
- placeholder: state.config.defaultAuthorMetaTag
7673
+ placeholder: state.config.defaultAuthorMetaTag,
7674
+ model: entry.metadata
7649
7675
  });
7650
7676
  this.input('publisher', TextInputView, {
7651
- placeholder: state.config.defaultPublisherMetaTag
7677
+ placeholder: state.config.defaultPublisherMetaTag,
7678
+ model: entry.metadata
7652
7679
  });
7653
7680
  this.input('keywords', TextInputView, {
7654
- placeholder: state.config.defaultKeywordsMetaTag
7681
+ placeholder: state.config.defaultKeywordsMetaTag,
7682
+ model: entry.metadata
7655
7683
  });
7656
7684
  });
7657
7685
  configurationEditor.tab('widgets', function () {
@@ -7661,31 +7689,36 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7661
7689
  widgetTypes: editor.widgetTypes
7662
7690
  });
7663
7691
 
7664
- if (pageflow.features && pageflow.features.isEnabled('selectable_themes') && state.themes.length > 1) {
7692
+ if (features.isEnabled && features.isEnabled('selectable_themes') && state.themes.length > 1) {
7665
7693
  this.view(ThemeInputView, {
7666
7694
  themes: state.themes,
7667
- propertyName: 'theme_name'
7695
+ propertyName: 'theme_name',
7696
+ model: entry.metadata
7668
7697
  });
7669
7698
  }
7670
7699
  });
7671
7700
  configurationEditor.tab('social', function () {
7672
7701
  this.input('share_image_id', FileInputView, {
7673
7702
  collection: state.imageFiles,
7674
- fileSelectionHandler: 'entryConfiguration'
7703
+ fileSelectionHandler: 'entryMetadata',
7704
+ model: entry.metadata
7675
7705
  });
7676
7706
  this.input('summary', TextAreaInputView, {
7677
7707
  disableRichtext: true,
7678
- disableLinks: true
7708
+ disableLinks: true,
7709
+ model: entry.metadata
7679
7710
  });
7680
7711
  this.input('share_url', TextInputView, {
7681
- placeholder: state.entry.get('pretty_url')
7712
+ placeholder: state.entry.get('pretty_url'),
7713
+ model: entry.metadata
7682
7714
  });
7683
7715
  this.input('share_providers', CheckBoxGroupInputView, {
7684
7716
  values: state.config.availableShareProviders,
7685
- translationKeyPrefix: 'activerecord.values.pageflow/entry.share_providers'
7717
+ translationKeyPrefix: 'activerecord.values.pageflow/entry.share_providers',
7718
+ model: entry.metadata
7686
7719
  });
7687
7720
  });
7688
- this.listenTo(entry.configuration, 'change:theme_name', function () {
7721
+ this.listenTo(entry.metadata, 'change:theme_name', function () {
7689
7722
  configurationEditor.refresh();
7690
7723
  });
7691
7724
  this.formContainer.show(configurationEditor);
@@ -7741,7 +7774,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7741
7774
  }
7742
7775
  },
7743
7776
  goBack: function goBack() {
7744
- editor.navigate('/pages/' + this.options.page.id + '/links', {
7777
+ editor$1.navigate('/pages/' + this.options.page.id + '/links', {
7745
7778
  trigger: true
7746
7779
  });
7747
7780
  }
@@ -7810,7 +7843,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7810
7843
  }
7811
7844
  },
7812
7845
  goBack: function goBack() {
7813
- editor.navigate('/', {
7846
+ editor$1.navigate('/', {
7814
7847
  trigger: true
7815
7848
  });
7816
7849
  }
@@ -7818,7 +7851,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7818
7851
 
7819
7852
  var PageLinkInputView = ReferenceInputView.extend({
7820
7853
  choose: function choose() {
7821
- return editor.selectPage({
7854
+ return editor$1.selectPage({
7822
7855
  isAllowed: this.options.isAllowed
7823
7856
  });
7824
7857
  },
@@ -7919,7 +7952,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7919
7952
  }
7920
7953
  },
7921
7954
  goBack: function goBack() {
7922
- editor.navigate('/?storyline=' + this.model.id, {
7955
+ editor$1.navigate('/?storyline=' + this.model.id, {
7923
7956
  trigger: true
7924
7957
  });
7925
7958
  }
@@ -7938,7 +7971,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
7938
7971
  className: 'edit_widget',
7939
7972
  events: {
7940
7973
  'click a.back': function clickABack() {
7941
- editor.navigate('/meta_data/widgets', {
7974
+ editor$1.navigate('/meta_data/widgets', {
7942
7975
  trigger: true
7943
7976
  });
7944
7977
  }
@@ -8152,7 +8185,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8152
8185
  i18n: 'pageflow.editor.files.tabs',
8153
8186
  defaultTab: this.options.tabName
8154
8187
  });
8155
- editor.fileTypes.each(function (fileType) {
8188
+ editor$1.fileTypes.each(function (fileType) {
8156
8189
  if (fileType.topLevelType) {
8157
8190
  this.tab(fileType);
8158
8191
  }
@@ -8327,7 +8360,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8327
8360
  var result = this.options.selectionHandler.call(this.model);
8328
8361
 
8329
8362
  if (result !== false) {
8330
- editor.navigate(this.options.selectionHandler.getReferer(), {
8363
+ editor$1.navigate(this.options.selectionHandler.getReferer(), {
8331
8364
  trigger: true
8332
8365
  });
8333
8366
  }
@@ -8412,7 +8445,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8412
8445
  this.model.cancelUpload();
8413
8446
  },
8414
8447
  confirm: function confirm() {
8415
- editor.navigate('/confirmable_files?type=' + this.model.modelName + '&id=' + this.model.id, {
8448
+ editor$1.navigate('/confirmable_files?type=' + this.model.modelName + '&id=' + this.model.id, {
8416
8449
  trigger: true
8417
8450
  });
8418
8451
  },
@@ -8448,7 +8481,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8448
8481
  },
8449
8482
  events: {
8450
8483
  'click .filtered_files-reset_filter': function clickFiltered_filesReset_filter() {
8451
- editor.navigate('/files/' + this.options.fileType.collectionName, {
8484
+ editor$1.navigate('/files/' + this.options.fileType.collectionName, {
8452
8485
  trigger: true
8453
8486
  });
8454
8487
  return false;
@@ -8567,7 +8600,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8567
8600
  },
8568
8601
  onRender: function onRender() {
8569
8602
  var self = this;
8570
- editor.fileImporters.values().forEach(function (fileImporter) {
8603
+ editor$1.fileImporters.values().forEach(function (fileImporter) {
8571
8604
  var importerSelectView = new ImporterSelectView({
8572
8605
  importer: fileImporter,
8573
8606
  parentView: self
@@ -8789,7 +8822,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8789
8822
 
8790
8823
  for (var i = 0; i < metaData.files.length; i++) {
8791
8824
  var file = metaData.files[i];
8792
- var fileType = editor.fileTypes.findByUpload(file);
8825
+ var fileType = editor$1.fileTypes.findByUpload(file);
8793
8826
  var file = new fileType.model({
8794
8827
  state: 'uploadable',
8795
8828
  file_name: file.name,
@@ -8804,7 +8837,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8804
8837
  }
8805
8838
 
8806
8839
  ConfirmFileImportUploadView.open({
8807
- fileTypes: editor.fileTypes,
8840
+ fileTypes: editor$1.fileTypes,
8808
8841
  fileImportModel: self.model,
8809
8842
  files: state.files
8810
8843
  });
@@ -8899,7 +8932,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8899
8932
  }
8900
8933
  }];
8901
8934
 
8902
- if (editor.fileImporters.keys().length > 0) {
8935
+ if (editor$1.fileImporters.keys().length > 0) {
8903
8936
  menuOptions.push({
8904
8937
  label: I18n$1.t('pageflow.editor.views.files_view.import'),
8905
8938
  handler: function handler() {
@@ -8926,7 +8959,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8926
8959
  i18n: 'pageflow.editor.files.tabs',
8927
8960
  defaultTab: this.options.tabName
8928
8961
  });
8929
- editor.fileTypes.each(function (fileType) {
8962
+ editor$1.fileTypes.each(function (fileType) {
8930
8963
  if (fileType.topLevelType) {
8931
8964
  this.tab(fileType);
8932
8965
  }
@@ -8949,11 +8982,11 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
8949
8982
  },
8950
8983
  goBack: function goBack() {
8951
8984
  if (this.options.selectionHandler) {
8952
- editor.navigate(this.options.selectionHandler.getReferer(), {
8985
+ editor$1.navigate(this.options.selectionHandler.getReferer(), {
8953
8986
  trigger: true
8954
8987
  });
8955
8988
  } else {
8956
- editor.navigate('/', {
8989
+ editor$1.navigate('/', {
8957
8990
  trigger: true
8958
8991
  });
8959
8992
  }
@@ -9324,11 +9357,11 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9324
9357
  files: function files(collectionName, handler, payload, filterName) {
9325
9358
  this.region.show(new FilesView({
9326
9359
  model: this.entry,
9327
- selectionHandler: handler && editor.createFileSelectionHandler(handler, payload),
9360
+ selectionHandler: handler && editor$1.createFileSelectionHandler(handler, payload),
9328
9361
  tabName: collectionName,
9329
9362
  filterName: filterName
9330
9363
  }));
9331
- editor.setDefaultHelpEntry('pageflow.help_entries.files');
9364
+ editor$1.setDefaultHelpEntry('pageflow.help_entries.files');
9332
9365
  },
9333
9366
  confirmableFiles: function confirmableFiles(preselectedFileType, preselectedFileId) {
9334
9367
  this.region.show(ConfirmEncodingView.create({
@@ -9341,7 +9374,10 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9341
9374
  metaData: function metaData(tab) {
9342
9375
  this.region.show(new EditMetaDataView({
9343
9376
  model: this.entry,
9344
- tab: tab
9377
+ tab: tab,
9378
+ state: state,
9379
+ features: pageflow.features,
9380
+ editor: editor$1
9345
9381
  }));
9346
9382
  },
9347
9383
  publish: function publish() {
@@ -9349,7 +9385,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9349
9385
  model: this.entry,
9350
9386
  entryPublication: new EntryPublication()
9351
9387
  }));
9352
- editor.setDefaultHelpEntry('pageflow.help_entries.publish');
9388
+ editor$1.setDefaultHelpEntry('pageflow.help_entries.publish');
9353
9389
  },
9354
9390
  storyline: function storyline(id) {
9355
9391
  this.region.show(new EditStorylineView({
@@ -9365,10 +9401,10 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9365
9401
  var page = this.entry.pages.get(id);
9366
9402
  this.region.show(new EditPageView({
9367
9403
  model: page,
9368
- api: editor,
9404
+ api: editor$1,
9369
9405
  tab: tab
9370
9406
  }));
9371
- editor.setDefaultHelpEntry(page.pageType().help_entry_translation_key);
9407
+ editor$1.setDefaultHelpEntry(page.pageType().help_entry_translation_key);
9372
9408
  },
9373
9409
  pageLink: function pageLink(linkId) {
9374
9410
  var pageId = linkId.split(':')[0];
@@ -9376,7 +9412,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9376
9412
  this.region.show(new EditPageLinkView({
9377
9413
  model: page.pageLinks().get(linkId),
9378
9414
  page: page,
9379
- api: editor
9415
+ api: editor$1
9380
9416
  }));
9381
9417
  },
9382
9418
  widget: function widget(id) {
@@ -9514,7 +9550,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9514
9550
  initialize: function initialize() {
9515
9551
  this.listenTo(app, 'toggle-help', function (name) {
9516
9552
  this.toggle();
9517
- this.showSection(name || editor.defaultHelpEntry || this.defaultHelpEntry(), {
9553
+ this.showSection(name || editor$1.defaultHelpEntry || this.defaultHelpEntry(), {
9518
9554
  scrollIntoView: true
9519
9555
  });
9520
9556
  });
@@ -9577,7 +9613,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9577
9613
  },
9578
9614
  events: {
9579
9615
  'click .edit': function clickEdit() {
9580
- editor.navigate(this.model.editPath(), {
9616
+ editor$1.navigate(this.model.editPath(), {
9581
9617
  trigger: true
9582
9618
  });
9583
9619
  return false;
@@ -9635,7 +9671,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
9635
9671
  events: {
9636
9672
  'click .add_link': function clickAdd_link() {
9637
9673
  var view = this;
9638
- editor.selectPage().then(function (page) {
9674
+ editor$1.selectPage().then(function (page) {
9639
9675
  view.model.pageLinks().addLink(page.get('perma_id'));
9640
9676
  });
9641
9677
  return false;
@@ -10088,7 +10124,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10088
10124
  },
10089
10125
  events: {
10090
10126
  'click .retry': function clickRetry() {
10091
- editor.failures.retry();
10127
+ editor$1.failures.retry();
10092
10128
  }
10093
10129
  },
10094
10130
  onRender: function onRender() {
@@ -10096,15 +10132,15 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10096
10132
  this.listenTo(state.entry, 'change:confirmable_files_count', this.notifyConfirmableFilesCount);
10097
10133
  this.listenTo(state.savingRecords, 'add', this.update);
10098
10134
  this.listenTo(state.savingRecords, 'remove', this.update);
10099
- this.listenTo(editor.failures, 'add', this.update);
10100
- this.listenTo(editor.failures, 'remove', this.update);
10135
+ this.listenTo(editor$1.failures, 'add', this.update);
10136
+ this.listenTo(editor$1.failures, 'remove', this.update);
10101
10137
  this.update();
10102
10138
  this.notifyConfirmableFilesCount();
10103
10139
  },
10104
10140
  update: function update() {
10105
- this.$el.toggleClass('failed', !editor.failures.isEmpty());
10141
+ this.$el.toggleClass('failed', !editor$1.failures.isEmpty());
10106
10142
  this.$el.toggleClass('saving', !state.savingRecords.isEmpty());
10107
- this.ui.failedCount.text(editor.failures.count());
10143
+ this.ui.failedCount.text(editor$1.failures.count());
10108
10144
  },
10109
10145
  notifyUploadCount: function notifyUploadCount(model, uploadCount) {
10110
10146
  this.$el.toggleClass('uploading', uploadCount > 0);
@@ -10122,7 +10158,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10122
10158
  mixins: [inputView],
10123
10159
  initialize: function initialize() {
10124
10160
  if (typeof this.options.collection === 'string') {
10125
- this.options.collection = state.entry.getFileCollection(editor.fileTypes.findByCollectionName(this.options.collection));
10161
+ this.options.collection = state.entry.getFileCollection(editor$1.fileTypes.findByCollectionName(this.options.collection));
10126
10162
  }
10127
10163
 
10128
10164
  this.listenTo(this.model, 'change:' + this.options.propertyName, this._update);
@@ -10281,17 +10317,17 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10281
10317
  onRender: function onRender() {
10282
10318
  this.nestedFilesView = new NestedFilesView({
10283
10319
  collection: this.model.nestedFiles(this.options.supersetCollection),
10284
- fileType: editor.fileTypes.findByCollectionName('text_track_files'),
10320
+ fileType: editor$1.fileTypes.findByCollectionName('text_track_files'),
10285
10321
  selection: this.selection,
10286
10322
  model: this.model,
10287
10323
  tableBlankSlateText: I18n$1.t('pageflow.editor.nested_files.text_track_files.no_files_blank_slate')
10288
10324
  });
10289
10325
  this.ui.filesPanel.append(this.subview(this.nestedFilesView).el);
10290
10326
  this.update();
10291
- editor.setUploadTargetFile(this.model);
10327
+ editor$1.setUploadTargetFile(this.model);
10292
10328
  },
10293
10329
  onClose: function onClose() {
10294
- editor.setUploadTargetFile(undefined);
10330
+ editor$1.setUploadTargetFile(undefined);
10295
10331
  },
10296
10332
  update: function update() {
10297
10333
  var selectedFile = this.selection.get('file');
@@ -10716,7 +10752,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10716
10752
  }
10717
10753
  });
10718
10754
 
10719
- editor.widgetTypes.register('classic_loading_spinner', {
10755
+ editor$1.widgetTypes.register('classic_loading_spinner', {
10720
10756
  configurationEditorView: ConfigurationEditorView.extend({
10721
10757
  configure: function configure() {
10722
10758
  this.tab('loading_spinner', function () {
@@ -10728,10 +10764,10 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10728
10764
  })
10729
10765
  });
10730
10766
 
10731
- editor.widgetTypes.registerRole('cookie_notice', {
10767
+ editor$1.widgetTypes.registerRole('cookie_notice', {
10732
10768
  isOptional: true
10733
10769
  });
10734
- editor.widgetTypes.register('cookie_notice_bar', {
10770
+ editor$1.widgetTypes.register('cookie_notice_bar', {
10735
10771
  configurationEditorView: ConfigurationEditorView.extend({
10736
10772
  configure: function configure() {
10737
10773
  this.tab('cookie_notice_bar', function () {
@@ -10743,7 +10779,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10743
10779
  })
10744
10780
  });
10745
10781
 
10746
- editor.widgetTypes.register('media_loading_spinner', {
10782
+ editor$1.widgetTypes.register('media_loading_spinner', {
10747
10783
  configurationEditorView: ConfigurationEditorView.extend({
10748
10784
  configure: function configure() {
10749
10785
  this.tab('loading_spinner', function () {
@@ -10762,7 +10798,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10762
10798
  })
10763
10799
  });
10764
10800
 
10765
- editor.widgetTypes.register('phone_horizontal_slideshow_mode', {
10801
+ editor$1.widgetTypes.register('phone_horizontal_slideshow_mode', {
10766
10802
  configurationEditorView: ConfigurationEditorView.extend({
10767
10803
  configure: function configure() {
10768
10804
  this.tab('phone_horizontal_slideshow_mode', function () {
@@ -10777,7 +10813,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10777
10813
  })
10778
10814
  });
10779
10815
 
10780
- editor.widgetTypes.register('title_loading_spinner', {
10816
+ editor$1.widgetTypes.register('title_loading_spinner', {
10781
10817
  configurationEditorView: ConfigurationEditorView.extend({
10782
10818
  configure: function configure() {
10783
10819
  this.tab('loading_spinner', function () {
@@ -10785,7 +10821,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10785
10821
  text: I18n$1.t('pageflow.editor.title_loading_spinner.widget_type_info_box_text')
10786
10822
  });
10787
10823
  this.input('title', TextInputView, {
10788
- placeholder: state.entry.configuration.get('title') || state.entry.get('entry_title')
10824
+ placeholder: state.entry.metadata.get('title') || state.entry.get('entry_title')
10789
10825
  });
10790
10826
  this.input('subtitle', TextInputView);
10791
10827
  this.input('custom_background_image_id', FileInputView, {
@@ -10827,7 +10863,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10827
10863
 
10828
10864
  app.addInitializer(function () {
10829
10865
  Backbone.history.on('route', function () {
10830
- editor.applyDefaultHelpEntry();
10866
+ editor$1.applyDefaultHelpEntry();
10831
10867
  });
10832
10868
  });
10833
10869
 
@@ -10856,7 +10892,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10856
10892
  settingsDialogTabLink: 'general'
10857
10893
  }
10858
10894
  };
10859
- editor.fileTypes.register('image_files', {
10895
+ editor$1.fileTypes.register('image_files', {
10860
10896
  model: ImageFile,
10861
10897
  metaDataAttributes: ['dimensions', altMetaDataAttribute],
10862
10898
  matchUpload: /^image/,
@@ -10865,7 +10901,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10865
10901
  inputView: TextInputView
10866
10902
  }]
10867
10903
  });
10868
- editor.fileTypes.register('video_files', {
10904
+ editor$1.fileTypes.register('video_files', {
10869
10905
  model: VideoFile,
10870
10906
  metaDataAttributes: ['format', 'dimensions', 'duration', textTracksMetaDataAttribute, altMetaDataAttribute],
10871
10907
  matchUpload: /^video/,
@@ -10875,7 +10911,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10875
10911
  }],
10876
10912
  settingsDialogTabs: [textTracksSettingsDialogTab]
10877
10913
  });
10878
- editor.fileTypes.register('audio_files', {
10914
+ editor$1.fileTypes.register('audio_files', {
10879
10915
  model: AudioFile,
10880
10916
  metaDataAttributes: ['format', 'duration', textTracksMetaDataAttribute, altMetaDataAttribute],
10881
10917
  matchUpload: /^audio/,
@@ -10885,7 +10921,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10885
10921
  }],
10886
10922
  settingsDialogTabs: [textTracksSettingsDialogTab]
10887
10923
  });
10888
- editor.fileTypes.register('text_track_files', {
10924
+ editor$1.fileTypes.register('text_track_files', {
10889
10925
  model: TextTrackFile,
10890
10926
  matchUpload: function matchUpload(upload) {
10891
10927
  return upload.name.match(/\.vtt$/) || upload.name.match(/\.srt$/);
@@ -10940,30 +10976,30 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10940
10976
  binding: 'label'
10941
10977
  }
10942
10978
  });
10943
- editor.fileTypes.setup(options.config.fileTypes);
10979
+ editor$1.fileTypes.setup(options.config.fileTypes);
10944
10980
  });
10945
10981
 
10946
10982
  app.addInitializer(function (options) {
10947
- editor.widgetTypes.registerRole('navigation', {
10983
+ editor$1.widgetTypes.registerRole('navigation', {
10948
10984
  isOptional: true
10949
10985
  });
10950
- editor.widgetTypes.setup(options.widget_types);
10986
+ editor$1.widgetTypes.setup(options.widget_types);
10951
10987
  });
10952
10988
 
10953
10989
  app.addInitializer(function (options) {
10954
- state.files = FilesCollection.createForFileTypes(editor.fileTypes, options.files);
10990
+ state.files = FilesCollection.createForFileTypes(editor$1.fileTypes, options.files);
10955
10991
  state.imageFiles = state.files.image_files;
10956
10992
  state.videoFiles = state.files.video_files;
10957
10993
  state.audioFiles = state.files.audio_files;
10958
10994
  state.textTrackFiles = state.files.text_track_files;
10959
10995
  var widgets = new WidgetsCollection(options.widgets, {
10960
- widgetTypes: editor.widgetTypes
10996
+ widgetTypes: editor$1.widgetTypes
10961
10997
  });
10962
10998
  state.themes = new ThemesCollection(options.themes);
10963
10999
  state.pages = new PagesCollection(options.pages);
10964
11000
  state.chapters = new ChaptersCollection(options.chapters);
10965
11001
  state.storylines = new StorylinesCollection(options.storylines);
10966
- state.entry = editor.createEntryModel(options, {
11002
+ state.entry = editor$1.createEntryModel(options, {
10967
11003
  widgets: widgets
10968
11004
  });
10969
11005
  state.theming = new Theming(options.theming);
@@ -10984,9 +11020,9 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10984
11020
  state.storylines.on('sort', _$1.debounce(function () {
10985
11021
  state.storylines.saveOrder();
10986
11022
  }, 100));
10987
- editor.failures.watch(state.entry);
10988
- editor.failures.watch(state.pages);
10989
- editor.failures.watch(state.chapters);
11023
+ editor$1.failures.watch(state.entry);
11024
+ editor$1.failures.watch(state.pages);
11025
+ editor$1.failures.watch(state.chapters);
10990
11026
  state.savingRecords = new SavingRecordsCollection();
10991
11027
  state.savingRecords.watch(state.pages);
10992
11028
  state.savingRecords.watch(state.chapters);
@@ -10996,13 +11032,13 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
10996
11032
  app.addInitializer(function (options) {
10997
11033
  state.fileUploader = new FileUploader({
10998
11034
  entry: state.entry,
10999
- fileTypes: editor.fileTypes
11035
+ fileTypes: editor$1.fileTypes
11000
11036
  });
11001
- ConfirmUploadView.watch(state.fileUploader, editor.fileTypes, state.files);
11037
+ ConfirmUploadView.watch(state.fileUploader, editor$1.fileTypes, state.files);
11002
11038
  });
11003
11039
 
11004
11040
  app.addInitializer(function (options) {
11005
- editor.pageTypes.setup(options.page_types);
11041
+ editor$1.pageTypes.setup(options.page_types);
11006
11042
  });
11007
11043
 
11008
11044
  app.addInitializer(function (options) {
@@ -11016,7 +11052,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11016
11052
  pageflow.atmo.disable();
11017
11053
  }
11018
11054
  } else if (event.altKey && event.which === KEY_X) {
11019
- editor.navigate('pages/' + pageflow.slides.currentPage().data('id'), {
11055
+ editor$1.navigate('pages/' + pageflow.slides.currentPage().data('id'), {
11020
11056
  trigger: true
11021
11057
  });
11022
11058
  }
@@ -11024,7 +11060,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11024
11060
  });
11025
11061
 
11026
11062
  app.addInitializer(function (options) {
11027
- editor.fileImporters.setup(options.config.fileImporters);
11063
+ editor$1.fileImporters.setup(options.config.fileImporters);
11028
11064
  });
11029
11065
 
11030
11066
  app.addInitializer(function (options) {
@@ -11046,14 +11082,14 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11046
11082
  state.entry.on('use:files', function () {
11047
11083
  pageflow.stylesheet.reload('entry');
11048
11084
  });
11049
- state.entry.configuration.on('change:theme_name', function () {
11085
+ state.entry.metadata.on('change:theme_name', function () {
11050
11086
  var theme = state.entry.getTheme();
11051
11087
  pageflow.stylesheet.update('theme', theme.get('stylesheet_path'));
11052
11088
  });
11053
11089
  });
11054
11090
 
11055
11091
  app.addInitializer(function () {
11056
- _$1.each(editor.sideBarRoutings, function (options) {
11092
+ _$1.each(editor$1.sideBarRoutings, function (options) {
11057
11093
  new options.router({
11058
11094
  controller: new options.controller({
11059
11095
  region: app.sidebarRegion,
@@ -11062,13 +11098,13 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11062
11098
  });
11063
11099
  });
11064
11100
 
11065
- editor.router = new SidebarRouter({
11101
+ editor$1.router = new SidebarRouter({
11066
11102
  controller: new SidebarController({
11067
11103
  region: app.sidebarRegion,
11068
11104
  entry: state.entry
11069
11105
  })
11070
11106
  });
11071
- window.editor = editor.router;
11107
+ window.editor = editor$1.router;
11072
11108
  });
11073
11109
 
11074
11110
  app.addInitializer(function () {
@@ -11090,7 +11126,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11090
11126
  var context = this;
11091
11127
  var args = arguments;
11092
11128
 
11093
- _$1.each(editor.initializers, function (fn) {
11129
+ _$1.each(editor$1.initializers, function (fn) {
11094
11130
  fn.call(context, args);
11095
11131
  });
11096
11132
  });
@@ -11103,7 +11139,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11103
11139
  el: $('sidebar .scrolling'),
11104
11140
  region: app.sidebarRegion
11105
11141
  }).render();
11106
- app.previewRegion.show(new editor.entryType.previewView({
11142
+ app.previewRegion.show(new editor$1.entryType.previewView({
11107
11143
  model: state.entry
11108
11144
  }));
11109
11145
  app.indicatorsRegion.show(new DisabledAtmoIndicatorView());
@@ -11171,8 +11207,8 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11171
11207
  exports.EncodedFile = EncodedFile;
11172
11208
  exports.EncodingConfirmation = EncodingConfirmation;
11173
11209
  exports.Entry = Entry;
11174
- exports.EntryConfiguration = EntryConfiguration;
11175
- exports.EntryConfigurationFileSelectionHandler = EntryConfigurationFileSelectionHandler;
11210
+ exports.EntryMetadata = EntryMetadata;
11211
+ exports.EntryMetadataFileSelectionHandler = EntryMetadataFileSelectionHandler;
11176
11212
  exports.EntryPublication = EntryPublication;
11177
11213
  exports.EntryPublicationQuotaDecoratorView = EntryPublicationQuotaDecoratorView;
11178
11214
  exports.EnumTableCellView = EnumTableCellView;
@@ -11297,7 +11333,7 @@ this.pageflow._editorGlobalInterop = (function (exports, Backbone, _$1, Marionet
11297
11333
  exports.cssModulesUtils = cssModulesUtils;
11298
11334
  exports.delayedDestroying = delayedDestroying;
11299
11335
  exports.dialogView = dialogView;
11300
- exports.editor = editor;
11336
+ exports.editor = editor$1;
11301
11337
  exports.failureIndicatingView = failureIndicatingView;
11302
11338
  exports.failureTracking = failureTracking;
11303
11339
  exports.fileWithType = fileWithType;