pageflow 15.1.0.beta5 → 15.1.0.beta6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pageflow might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -4
- data/app/assets/javascripts/pageflow/dist/editor.js +157 -121
- data/app/assets/javascripts/pageflow/dist/react-client.js +1 -1
- data/app/assets/javascripts/pageflow/dist/react-server.js +1 -1
- data/app/controllers/pageflow/editor/entries_controller.rb +8 -7
- data/app/models/pageflow/draft_entry.rb +1 -0
- data/app/models/pageflow/home_button.rb +4 -4
- data/app/models/pageflow/overview_button.rb +2 -2
- data/app/models/pageflow/published_entry.rb +1 -0
- data/app/models/pageflow/revision.rb +14 -0
- data/app/views/pageflow/editor/entries/_entry.json.jbuilder +2 -6
- data/config/locales/new/entry_metadata_configuration.de.yml +17 -0
- data/config/locales/new/entry_metadata_configuration.en.yml +17 -0
- data/db/migrate/20200114154200_add_configuration_to_revisions.rb +5 -0
- data/db/migrate/20200117133200_change_revision_appearance_option_default_and_null.rb +10 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +164 -129
- data/lib/pageflow/version.rb +1 -1
- data/packages/pageflow/editor.js +155 -119
- data/spec/factories/revisions.rb +22 -6
- metadata +5 -1
data/lib/pageflow/version.rb
CHANGED
data/packages/pageflow/editor.js
CHANGED
@@ -1063,7 +1063,7 @@ var EditorApi = Object$1.extend(
|
|
1063
1063
|
}
|
1064
1064
|
});
|
1065
1065
|
|
1066
|
-
var editor = new EditorApi();
|
1066
|
+
var editor$1 = new EditorApi();
|
1067
1067
|
var startEditor = function startEditor(options) {
|
1068
1068
|
$(function () {
|
1069
1069
|
$.when($.getJSON('/editor/entries/' + options.entryId + '/seed'), pageflow.browser.detectFeatures()).done(function (result) {
|
@@ -1309,7 +1309,7 @@ var transientReferences = {
|
|
1309
1309
|
},
|
1310
1310
|
getReference: function getReference(attribute, collection) {
|
1311
1311
|
if (typeof collection === 'string') {
|
1312
|
-
var fileType = editor.fileTypes.findByCollectionName(collection);
|
1312
|
+
var fileType = editor$1.fileTypes.findByCollectionName(collection);
|
1313
1313
|
collection = state.entry.getFileCollection(fileType);
|
1314
1314
|
}
|
1315
1315
|
|
@@ -1613,7 +1613,7 @@ var Page = Backbone.Model.extend({
|
|
1613
1613
|
return this.pageType().pageLinks(this.configuration);
|
1614
1614
|
},
|
1615
1615
|
pageType: function pageType() {
|
1616
|
-
return editor.pageTypes.findByName(this.get('template'));
|
1616
|
+
return editor$1.pageTypes.findByName(this.get('template'));
|
1617
1617
|
},
|
1618
1618
|
toJSON: function toJSON() {
|
1619
1619
|
return _$1.extend(_$1.clone(this.attributes), {
|
@@ -1670,7 +1670,7 @@ var StorylineScaffold = Scaffold.extend({
|
|
1670
1670
|
this.page = this.chapter.buildPage();
|
1671
1671
|
}
|
1672
1672
|
|
1673
|
-
editor.trigger('scaffold:storyline', this.storyline);
|
1673
|
+
editor$1.trigger('scaffold:storyline', this.storyline);
|
1674
1674
|
return this.storyline;
|
1675
1675
|
},
|
1676
1676
|
load: function load(response) {
|
@@ -2004,7 +2004,7 @@ var WidgetConfigurationFileSelectionHandler = function WidgetConfigurationFileSe
|
|
2004
2004
|
return '/widgets/' + widget.id;
|
2005
2005
|
};
|
2006
2006
|
};
|
2007
|
-
editor.registerFileSelectionHandler('widgetConfiguration', WidgetConfigurationFileSelectionHandler);
|
2007
|
+
editor$1.registerFileSelectionHandler('widgetConfiguration', WidgetConfigurationFileSelectionHandler);
|
2008
2008
|
|
2009
2009
|
var EncodingConfirmation = Backbone.Model.extend({
|
2010
2010
|
paramRoot: 'encoding_confirmation',
|
@@ -2109,9 +2109,24 @@ var AudioFile = EncodedFile.extend({
|
|
2109
2109
|
}
|
2110
2110
|
});
|
2111
2111
|
|
2112
|
-
var
|
2112
|
+
var EntryMetadataConfiguration = Configuration.extend({
|
2113
|
+
modelName: 'entry_metadata_configuration',
|
2114
|
+
i18nKey: 'pageflow/entry_metadata_configuration',
|
2115
|
+
defaults: {}
|
2116
|
+
});
|
2117
|
+
|
2118
|
+
var EntryMetadata = Configuration.extend({
|
2113
2119
|
modelName: 'entry',
|
2114
|
-
i18nKey: 'pageflow/entry'
|
2120
|
+
i18nKey: 'pageflow/entry',
|
2121
|
+
defaults: {},
|
2122
|
+
initialize: function initialize(attributes, options) {
|
2123
|
+
Configuration.prototype.initialize.apply(this, attributes, options);
|
2124
|
+
this.configuration = new EntryMetadataConfiguration(_$1.clone(attributes.configuration) || {});
|
2125
|
+
this.listenTo(this.configuration, 'change', function () {
|
2126
|
+
this.trigger('change');
|
2127
|
+
this.parent.save();
|
2128
|
+
});
|
2129
|
+
}
|
2115
2130
|
});
|
2116
2131
|
|
2117
2132
|
var StorylineConfiguration = Configuration.extend({
|
@@ -2268,7 +2283,7 @@ var PageConfigurationFileSelectionHandler = function PageConfigurationFileSelect
|
|
2268
2283
|
return '/pages/' + page.id + '/' + (options.returnToTab || 'files');
|
2269
2284
|
};
|
2270
2285
|
};
|
2271
|
-
editor.registerFileSelectionHandler('pageConfiguration', PageConfigurationFileSelectionHandler);
|
2286
|
+
editor$1.registerFileSelectionHandler('pageConfiguration', PageConfigurationFileSelectionHandler);
|
2272
2287
|
|
2273
2288
|
var ImageFile = ReusableFile.extend({
|
2274
2289
|
stages: [{
|
@@ -2290,16 +2305,16 @@ var ImageFile = ReusableFile.extend({
|
|
2290
2305
|
}
|
2291
2306
|
});
|
2292
2307
|
|
2293
|
-
var
|
2308
|
+
var EntryMetadataFileSelectionHandler = function EntryMetadataFileSelectionHandler(options) {
|
2294
2309
|
this.call = function (file) {
|
2295
|
-
state.entry.
|
2310
|
+
state.entry.metadata.setReference(options.attributeName, file);
|
2296
2311
|
};
|
2297
2312
|
|
2298
2313
|
this.getReferer = function () {
|
2299
2314
|
return '/meta_data/' + (options.returnToTab || 'general');
|
2300
2315
|
};
|
2301
2316
|
};
|
2302
|
-
editor.registerFileSelectionHandler('
|
2317
|
+
editor$1.registerFileSelectionHandler('entryMetadata', EntryMetadataFileSelectionHandler);
|
2303
2318
|
|
2304
2319
|
var EntryPublication = Backbone.Model.extend({
|
2305
2320
|
paramRoot: 'entry_publication',
|
@@ -2628,7 +2643,7 @@ var FileUploader = Object$1.extend({
|
|
2628
2643
|
},
|
2629
2644
|
add: function add(upload, options) {
|
2630
2645
|
options = options || {};
|
2631
|
-
var editor
|
2646
|
+
var editor = options.editor || editor$1;
|
2632
2647
|
var fileType = this.fileTypes.findByUpload(upload);
|
2633
2648
|
var file = new fileType.model({
|
2634
2649
|
state: 'uploadable',
|
@@ -2638,12 +2653,12 @@ var FileUploader = Object$1.extend({
|
|
2638
2653
|
}, {
|
2639
2654
|
fileType: fileType
|
2640
2655
|
});
|
2641
|
-
var setTargetFile = editor
|
2656
|
+
var setTargetFile = editor.nextUploadTargetFile;
|
2642
2657
|
|
2643
2658
|
if (setTargetFile) {
|
2644
2659
|
if (fileType.topLevelType || !setTargetFile.fileType().nestedFileTypes.contains(fileType)) {
|
2645
2660
|
throw new InvalidNestedTypeError(upload, {
|
2646
|
-
editor: editor
|
2661
|
+
editor: editor,
|
2647
2662
|
fileType: fileType
|
2648
2663
|
});
|
2649
2664
|
}
|
@@ -2723,7 +2738,7 @@ var orderedCollection = {
|
|
2723
2738
|
parentModel.trigger('sync:order', parentModel, response, {});
|
2724
2739
|
},
|
2725
2740
|
error: function error(jqXHR, textStatus, errorThrown) {
|
2726
|
-
editor.failures.add(new OrderingFailure(parentModel, collection));
|
2741
|
+
editor$1.failures.add(new OrderingFailure(parentModel, collection));
|
2727
2742
|
}
|
2728
2743
|
});
|
2729
2744
|
}
|
@@ -2749,7 +2764,7 @@ var ChapterPagesCollection = SubsetCollection.extend({
|
|
2749
2764
|
this.listenTo(this, 'add', function (model) {
|
2750
2765
|
model.chapter = chapter;
|
2751
2766
|
model.set('chapter_id', chapter.id);
|
2752
|
-
editor.trigger('add:page', model);
|
2767
|
+
editor$1.trigger('add:page', model);
|
2753
2768
|
});
|
2754
2769
|
this.listenTo(this, 'remove', function (model) {
|
2755
2770
|
model.chapter = null;
|
@@ -2828,7 +2843,7 @@ var StorylineChaptersCollection = SubsetCollection.extend({
|
|
2828
2843
|
this.listenTo(this, 'add', function (model) {
|
2829
2844
|
model.storyline = storyline;
|
2830
2845
|
model.set('storyline_id', storyline.id);
|
2831
|
-
editor.trigger('add:chapter', model);
|
2846
|
+
editor$1.trigger('add:chapter', model);
|
2832
2847
|
});
|
2833
2848
|
this.listenTo(this, 'remove', function (model) {
|
2834
2849
|
model.storyline = null;
|
@@ -2954,7 +2969,7 @@ var PageLinkFileSelectionHandler = function PageLinkFileSelectionHandler(options
|
|
2954
2969
|
return '/page_links/' + pageLink.id;
|
2955
2970
|
};
|
2956
2971
|
};
|
2957
|
-
editor.registerFileSelectionHandler('pageLink', PageLinkFileSelectionHandler);
|
2972
|
+
editor$1.registerFileSelectionHandler('pageLink', PageLinkFileSelectionHandler);
|
2958
2973
|
|
2959
2974
|
var persistedPromise = {
|
2960
2975
|
persisted: function persisted() {
|
@@ -3039,11 +3054,11 @@ var Entry = Backbone.Model.extend({
|
|
3039
3054
|
mixins: [filesCountWatcher, polling, failureTracking],
|
3040
3055
|
initialize: function initialize(attributes, options) {
|
3041
3056
|
options = options || {};
|
3042
|
-
this.
|
3043
|
-
this.
|
3057
|
+
this.metadata = new EntryMetadata(this.get('metadata') || {});
|
3058
|
+
this.metadata.parent = this;
|
3044
3059
|
this.themes = options.themes || state.themes;
|
3045
3060
|
this.files = options.files || state.files;
|
3046
|
-
this.fileTypes = options.fileTypes || editor.fileTypes;
|
3061
|
+
this.fileTypes = options.fileTypes || editor$1.fileTypes;
|
3047
3062
|
this.storylines = options.storylines || state.storylines;
|
3048
3063
|
this.storylines.parentModel = this;
|
3049
3064
|
this.chapters = options.chapters || state.chapters;
|
@@ -3062,11 +3077,11 @@ var Entry = Backbone.Model.extend({
|
|
3062
3077
|
this.listenTo(this.chapters, 'sort', function () {
|
3063
3078
|
this.pages.sort();
|
3064
3079
|
});
|
3065
|
-
this.listenTo(this.
|
3066
|
-
this.trigger('change:
|
3080
|
+
this.listenTo(this.metadata, 'change', function () {
|
3081
|
+
this.trigger('change:metadata');
|
3067
3082
|
this.save();
|
3068
3083
|
});
|
3069
|
-
this.listenTo(this.
|
3084
|
+
this.listenTo(this.metadata, 'change:locale', function () {
|
3070
3085
|
this.once('sync', function () {
|
3071
3086
|
// No other way of updating page templates used in
|
3072
3087
|
// EntryPreviewView at the moment.
|
@@ -3075,7 +3090,7 @@ var Entry = Backbone.Model.extend({
|
|
3075
3090
|
});
|
3076
3091
|
},
|
3077
3092
|
getTheme: function getTheme() {
|
3078
|
-
return this.themes.findByName(this.
|
3093
|
+
return this.themes.findByName(this.metadata.get('theme_name'));
|
3079
3094
|
},
|
3080
3095
|
addStoryline: function addStoryline(attributes) {
|
3081
3096
|
var storyline = this.buildStoryline(attributes);
|
@@ -3158,7 +3173,10 @@ var Entry = Backbone.Model.extend({
|
|
3158
3173
|
}, this);
|
3159
3174
|
},
|
3160
3175
|
toJSON: function toJSON() {
|
3161
|
-
|
3176
|
+
var metadataJSON = this.metadata.toJSON();
|
3177
|
+
var configJSON = this.metadata.configuration.toJSON();
|
3178
|
+
metadataJSON.configuration = configJSON;
|
3179
|
+
return metadataJSON;
|
3162
3180
|
}
|
3163
3181
|
});
|
3164
3182
|
|
@@ -3294,7 +3312,7 @@ var FileImport = Backbone.Model.extend({
|
|
3294
3312
|
|
3295
3313
|
if (localFile) {
|
3296
3314
|
state.files[collectionName].remove(localFile);
|
3297
|
-
var fileType = editor.fileTypes.findByUpload(file);
|
3315
|
+
var fileType = editor$1.fileTypes.findByUpload(file);
|
3298
3316
|
var file = new fileType.model(file, {
|
3299
3317
|
fileType: fileType
|
3300
3318
|
});
|
@@ -3622,7 +3640,7 @@ var BackButtonDecoratorView = Marionette.Layout.extend({
|
|
3622
3640
|
this.outlet.show(this.options.view);
|
3623
3641
|
},
|
3624
3642
|
goBack: function goBack() {
|
3625
|
-
editor.navigate('/', {
|
3643
|
+
editor$1.navigate('/', {
|
3626
3644
|
trigger: true
|
3627
3645
|
});
|
3628
3646
|
}
|
@@ -3765,7 +3783,7 @@ var failureIndicatingView = {
|
|
3765
3783
|
},
|
3766
3784
|
events: {
|
3767
3785
|
'click .retry': function clickRetry() {
|
3768
|
-
editor.failures.retry();
|
3786
|
+
editor$1.failures.retry();
|
3769
3787
|
return false;
|
3770
3788
|
}
|
3771
3789
|
},
|
@@ -3829,7 +3847,7 @@ var EditChapterView = Marionette.Layout.extend({
|
|
3829
3847
|
}
|
3830
3848
|
},
|
3831
3849
|
goBack: function goBack() {
|
3832
|
-
editor.navigate('/', {
|
3850
|
+
editor$1.navigate('/', {
|
3833
3851
|
trigger: true
|
3834
3852
|
});
|
3835
3853
|
}
|
@@ -3870,7 +3888,7 @@ var EditEntryView = Marionette.Layout.extend({
|
|
3870
3888
|
},
|
3871
3889
|
'click a.publish': function clickAPublish() {
|
3872
3890
|
if (!this.ui.publishButton.hasClass('disabled')) {
|
3873
|
-
editor.navigate('/publish', {
|
3891
|
+
editor$1.navigate('/publish', {
|
3874
3892
|
trigger: true
|
3875
3893
|
});
|
3876
3894
|
}
|
@@ -3878,7 +3896,7 @@ var EditEntryView = Marionette.Layout.extend({
|
|
3878
3896
|
return false;
|
3879
3897
|
},
|
3880
3898
|
'click .menu a': function clickMenuA(event) {
|
3881
|
-
editor.navigate($(event.target).data('path'), {
|
3899
|
+
editor$1.navigate($(event.target).data('path'), {
|
3882
3900
|
trigger: true
|
3883
3901
|
});
|
3884
3902
|
return false;
|
@@ -3889,7 +3907,7 @@ var EditEntryView = Marionette.Layout.extend({
|
|
3889
3907
|
|
3890
3908
|
this._updatePublishButton();
|
3891
3909
|
|
3892
|
-
this.outlineRegion.show(new editor.entryType.outlineView({
|
3910
|
+
this.outlineRegion.show(new editor$1.entryType.outlineView({
|
3893
3911
|
entry: state.entry,
|
3894
3912
|
navigatable: true,
|
3895
3913
|
editable: true,
|
@@ -3911,7 +3929,7 @@ var EditEntryView = Marionette.Layout.extend({
|
|
3911
3929
|
_addMenuItems: function _addMenuItems() {
|
3912
3930
|
var view = this;
|
3913
3931
|
|
3914
|
-
_$1.each(editor.mainMenuItems, function (options) {
|
3932
|
+
_$1.each(editor$1.mainMenuItems, function (options) {
|
3915
3933
|
var item = $('<li><a href="#"></a></li>');
|
3916
3934
|
var link = item.find('a');
|
3917
3935
|
|
@@ -3953,7 +3971,7 @@ var WidgetItemView = Marionette.Layout.extend({
|
|
3953
3971
|
},
|
3954
3972
|
events: {
|
3955
3973
|
'click .settings': function clickSettings() {
|
3956
|
-
editor.navigate('/widgets/' + this.model.role(), {
|
3974
|
+
editor$1.navigate('/widgets/' + this.model.role(), {
|
3957
3975
|
trigger: true
|
3958
3976
|
});
|
3959
3977
|
return false;
|
@@ -4435,7 +4453,7 @@ var FileInputView = Marionette.ItemView.extend({
|
|
4435
4453
|
},
|
4436
4454
|
events: {
|
4437
4455
|
'click .choose': function clickChoose() {
|
4438
|
-
editor.selectFile({
|
4456
|
+
editor$1.selectFile({
|
4439
4457
|
name: this.options.collection.name,
|
4440
4458
|
filter: this.options.filter
|
4441
4459
|
}, this.options.fileSelectionHandler || 'pageConfiguration', _$1.extend({
|
@@ -4457,7 +4475,7 @@ var FileInputView = Marionette.ItemView.extend({
|
|
4457
4475
|
}, this.options);
|
4458
4476
|
|
4459
4477
|
if (typeof this.options.collection === 'string') {
|
4460
|
-
this.options.collection = state.entry.getFileCollection(editor.fileTypes.findByCollectionName(this.options.collection));
|
4478
|
+
this.options.collection = state.entry.getFileCollection(editor$1.fileTypes.findByCollectionName(this.options.collection));
|
4461
4479
|
}
|
4462
4480
|
|
4463
4481
|
this.textTrackMenuItems = new Backbone.Collection();
|
@@ -4964,13 +4982,17 @@ var EditMetaDataView = Marionette.Layout.extend({
|
|
4964
4982
|
},
|
4965
4983
|
onRender: function onRender() {
|
4966
4984
|
var entry = this.model;
|
4985
|
+
var state = this.options.state || {};
|
4986
|
+
var features = this.options.features || {};
|
4987
|
+
var editor = this.options.editor || {};
|
4967
4988
|
var configurationEditor = new ConfigurationEditorView({
|
4968
|
-
model: entry.configuration,
|
4989
|
+
model: entry.metadata.configuration,
|
4969
4990
|
tab: this.options.tab
|
4970
4991
|
});
|
4971
4992
|
configurationEditor.tab('general', function () {
|
4972
4993
|
this.input('title', TextInputView, {
|
4973
|
-
placeholder: entry.get('entry_title')
|
4994
|
+
placeholder: entry.get('entry_title'),
|
4995
|
+
model: entry.metadata
|
4974
4996
|
});
|
4975
4997
|
this.input('locale', SelectInputView, {
|
4976
4998
|
values: state.config.availablePublicLocales,
|
@@ -4978,17 +5000,23 @@ var EditMetaDataView = Marionette.Layout.extend({
|
|
4978
5000
|
return I18n$1.t('pageflow.public._language', {
|
4979
5001
|
locale: locale
|
4980
5002
|
});
|
4981
|
-
})
|
5003
|
+
}),
|
5004
|
+
model: entry.metadata
|
5005
|
+
});
|
5006
|
+
this.input('credits', TextAreaInputView, {
|
5007
|
+
model: entry.metadata
|
4982
5008
|
});
|
4983
|
-
this.input('credits', TextAreaInputView);
|
4984
5009
|
this.input('author', TextInputView, {
|
4985
|
-
placeholder: state.config.defaultAuthorMetaTag
|
5010
|
+
placeholder: state.config.defaultAuthorMetaTag,
|
5011
|
+
model: entry.metadata
|
4986
5012
|
});
|
4987
5013
|
this.input('publisher', TextInputView, {
|
4988
|
-
placeholder: state.config.defaultPublisherMetaTag
|
5014
|
+
placeholder: state.config.defaultPublisherMetaTag,
|
5015
|
+
model: entry.metadata
|
4989
5016
|
});
|
4990
5017
|
this.input('keywords', TextInputView, {
|
4991
|
-
placeholder: state.config.defaultKeywordsMetaTag
|
5018
|
+
placeholder: state.config.defaultKeywordsMetaTag,
|
5019
|
+
model: entry.metadata
|
4992
5020
|
});
|
4993
5021
|
});
|
4994
5022
|
configurationEditor.tab('widgets', function () {
|
@@ -4998,31 +5026,36 @@ var EditMetaDataView = Marionette.Layout.extend({
|
|
4998
5026
|
widgetTypes: editor.widgetTypes
|
4999
5027
|
});
|
5000
5028
|
|
5001
|
-
if (
|
5029
|
+
if (features.isEnabled && features.isEnabled('selectable_themes') && state.themes.length > 1) {
|
5002
5030
|
this.view(ThemeInputView, {
|
5003
5031
|
themes: state.themes,
|
5004
|
-
propertyName: 'theme_name'
|
5032
|
+
propertyName: 'theme_name',
|
5033
|
+
model: entry.metadata
|
5005
5034
|
});
|
5006
5035
|
}
|
5007
5036
|
});
|
5008
5037
|
configurationEditor.tab('social', function () {
|
5009
5038
|
this.input('share_image_id', FileInputView, {
|
5010
5039
|
collection: state.imageFiles,
|
5011
|
-
fileSelectionHandler: '
|
5040
|
+
fileSelectionHandler: 'entryMetadata',
|
5041
|
+
model: entry.metadata
|
5012
5042
|
});
|
5013
5043
|
this.input('summary', TextAreaInputView, {
|
5014
5044
|
disableRichtext: true,
|
5015
|
-
disableLinks: true
|
5045
|
+
disableLinks: true,
|
5046
|
+
model: entry.metadata
|
5016
5047
|
});
|
5017
5048
|
this.input('share_url', TextInputView, {
|
5018
|
-
placeholder: state.entry.get('pretty_url')
|
5049
|
+
placeholder: state.entry.get('pretty_url'),
|
5050
|
+
model: entry.metadata
|
5019
5051
|
});
|
5020
5052
|
this.input('share_providers', CheckBoxGroupInputView, {
|
5021
5053
|
values: state.config.availableShareProviders,
|
5022
|
-
translationKeyPrefix: 'activerecord.values.pageflow/entry.share_providers'
|
5054
|
+
translationKeyPrefix: 'activerecord.values.pageflow/entry.share_providers',
|
5055
|
+
model: entry.metadata
|
5023
5056
|
});
|
5024
5057
|
});
|
5025
|
-
this.listenTo(entry.
|
5058
|
+
this.listenTo(entry.metadata, 'change:theme_name', function () {
|
5026
5059
|
configurationEditor.refresh();
|
5027
5060
|
});
|
5028
5061
|
this.formContainer.show(configurationEditor);
|
@@ -5078,7 +5111,7 @@ var EditPageLinkView = Marionette.Layout.extend({
|
|
5078
5111
|
}
|
5079
5112
|
},
|
5080
5113
|
goBack: function goBack() {
|
5081
|
-
editor.navigate('/pages/' + this.options.page.id + '/links', {
|
5114
|
+
editor$1.navigate('/pages/' + this.options.page.id + '/links', {
|
5082
5115
|
trigger: true
|
5083
5116
|
});
|
5084
5117
|
}
|
@@ -5147,7 +5180,7 @@ var EditPageView = Marionette.Layout.extend({
|
|
5147
5180
|
}
|
5148
5181
|
},
|
5149
5182
|
goBack: function goBack() {
|
5150
|
-
editor.navigate('/', {
|
5183
|
+
editor$1.navigate('/', {
|
5151
5184
|
trigger: true
|
5152
5185
|
});
|
5153
5186
|
}
|
@@ -5155,7 +5188,7 @@ var EditPageView = Marionette.Layout.extend({
|
|
5155
5188
|
|
5156
5189
|
var PageLinkInputView = ReferenceInputView.extend({
|
5157
5190
|
choose: function choose() {
|
5158
|
-
return editor.selectPage({
|
5191
|
+
return editor$1.selectPage({
|
5159
5192
|
isAllowed: this.options.isAllowed
|
5160
5193
|
});
|
5161
5194
|
},
|
@@ -5256,7 +5289,7 @@ var EditStorylineView = Marionette.Layout.extend({
|
|
5256
5289
|
}
|
5257
5290
|
},
|
5258
5291
|
goBack: function goBack() {
|
5259
|
-
editor.navigate('/?storyline=' + this.model.id, {
|
5292
|
+
editor$1.navigate('/?storyline=' + this.model.id, {
|
5260
5293
|
trigger: true
|
5261
5294
|
});
|
5262
5295
|
}
|
@@ -5275,7 +5308,7 @@ var EditWidgetView = Marionette.ItemView.extend({
|
|
5275
5308
|
className: 'edit_widget',
|
5276
5309
|
events: {
|
5277
5310
|
'click a.back': function clickABack() {
|
5278
|
-
editor.navigate('/meta_data/widgets', {
|
5311
|
+
editor$1.navigate('/meta_data/widgets', {
|
5279
5312
|
trigger: true
|
5280
5313
|
});
|
5281
5314
|
}
|
@@ -5489,7 +5522,7 @@ var FilesExplorerView = Marionette.ItemView.extend({
|
|
5489
5522
|
i18n: 'pageflow.editor.files.tabs',
|
5490
5523
|
defaultTab: this.options.tabName
|
5491
5524
|
});
|
5492
|
-
editor.fileTypes.each(function (fileType) {
|
5525
|
+
editor$1.fileTypes.each(function (fileType) {
|
5493
5526
|
if (fileType.topLevelType) {
|
5494
5527
|
this.tab(fileType);
|
5495
5528
|
}
|
@@ -5664,7 +5697,7 @@ var FileItemView = Marionette.ItemView.extend({
|
|
5664
5697
|
var result = this.options.selectionHandler.call(this.model);
|
5665
5698
|
|
5666
5699
|
if (result !== false) {
|
5667
|
-
editor.navigate(this.options.selectionHandler.getReferer(), {
|
5700
|
+
editor$1.navigate(this.options.selectionHandler.getReferer(), {
|
5668
5701
|
trigger: true
|
5669
5702
|
});
|
5670
5703
|
}
|
@@ -5749,7 +5782,7 @@ var FileItemView = Marionette.ItemView.extend({
|
|
5749
5782
|
this.model.cancelUpload();
|
5750
5783
|
},
|
5751
5784
|
confirm: function confirm() {
|
5752
|
-
editor.navigate('/confirmable_files?type=' + this.model.modelName + '&id=' + this.model.id, {
|
5785
|
+
editor$1.navigate('/confirmable_files?type=' + this.model.modelName + '&id=' + this.model.id, {
|
5753
5786
|
trigger: true
|
5754
5787
|
});
|
5755
5788
|
},
|
@@ -5785,7 +5818,7 @@ var FilteredFilesView = Marionette.ItemView.extend({
|
|
5785
5818
|
},
|
5786
5819
|
events: {
|
5787
5820
|
'click .filtered_files-reset_filter': function clickFiltered_filesReset_filter() {
|
5788
|
-
editor.navigate('/files/' + this.options.fileType.collectionName, {
|
5821
|
+
editor$1.navigate('/files/' + this.options.fileType.collectionName, {
|
5789
5822
|
trigger: true
|
5790
5823
|
});
|
5791
5824
|
return false;
|
@@ -5904,7 +5937,7 @@ var ChooseImporterView = Marionette.ItemView.extend({
|
|
5904
5937
|
},
|
5905
5938
|
onRender: function onRender() {
|
5906
5939
|
var self = this;
|
5907
|
-
editor.fileImporters.values().forEach(function (fileImporter) {
|
5940
|
+
editor$1.fileImporters.values().forEach(function (fileImporter) {
|
5908
5941
|
var importerSelectView = new ImporterSelectView({
|
5909
5942
|
importer: fileImporter,
|
5910
5943
|
parentView: self
|
@@ -6126,7 +6159,7 @@ var FilesImporterView = Marionette.ItemView.extend({
|
|
6126
6159
|
|
6127
6160
|
for (var i = 0; i < metaData.files.length; i++) {
|
6128
6161
|
var file = metaData.files[i];
|
6129
|
-
var fileType = editor.fileTypes.findByUpload(file);
|
6162
|
+
var fileType = editor$1.fileTypes.findByUpload(file);
|
6130
6163
|
var file = new fileType.model({
|
6131
6164
|
state: 'uploadable',
|
6132
6165
|
file_name: file.name,
|
@@ -6141,7 +6174,7 @@ var FilesImporterView = Marionette.ItemView.extend({
|
|
6141
6174
|
}
|
6142
6175
|
|
6143
6176
|
ConfirmFileImportUploadView.open({
|
6144
|
-
fileTypes: editor.fileTypes,
|
6177
|
+
fileTypes: editor$1.fileTypes,
|
6145
6178
|
fileImportModel: self.model,
|
6146
6179
|
files: state.files
|
6147
6180
|
});
|
@@ -6236,7 +6269,7 @@ var FilesView = Marionette.ItemView.extend({
|
|
6236
6269
|
}
|
6237
6270
|
}];
|
6238
6271
|
|
6239
|
-
if (editor.fileImporters.keys().length > 0) {
|
6272
|
+
if (editor$1.fileImporters.keys().length > 0) {
|
6240
6273
|
menuOptions.push({
|
6241
6274
|
label: I18n$1.t('pageflow.editor.views.files_view.import'),
|
6242
6275
|
handler: function handler() {
|
@@ -6263,7 +6296,7 @@ var FilesView = Marionette.ItemView.extend({
|
|
6263
6296
|
i18n: 'pageflow.editor.files.tabs',
|
6264
6297
|
defaultTab: this.options.tabName
|
6265
6298
|
});
|
6266
|
-
editor.fileTypes.each(function (fileType) {
|
6299
|
+
editor$1.fileTypes.each(function (fileType) {
|
6267
6300
|
if (fileType.topLevelType) {
|
6268
6301
|
this.tab(fileType);
|
6269
6302
|
}
|
@@ -6286,11 +6319,11 @@ var FilesView = Marionette.ItemView.extend({
|
|
6286
6319
|
},
|
6287
6320
|
goBack: function goBack() {
|
6288
6321
|
if (this.options.selectionHandler) {
|
6289
|
-
editor.navigate(this.options.selectionHandler.getReferer(), {
|
6322
|
+
editor$1.navigate(this.options.selectionHandler.getReferer(), {
|
6290
6323
|
trigger: true
|
6291
6324
|
});
|
6292
6325
|
} else {
|
6293
|
-
editor.navigate('/', {
|
6326
|
+
editor$1.navigate('/', {
|
6294
6327
|
trigger: true
|
6295
6328
|
});
|
6296
6329
|
}
|
@@ -6661,11 +6694,11 @@ var SidebarController = Marionette.Controller.extend({
|
|
6661
6694
|
files: function files(collectionName, handler, payload, filterName) {
|
6662
6695
|
this.region.show(new FilesView({
|
6663
6696
|
model: this.entry,
|
6664
|
-
selectionHandler: handler && editor.createFileSelectionHandler(handler, payload),
|
6697
|
+
selectionHandler: handler && editor$1.createFileSelectionHandler(handler, payload),
|
6665
6698
|
tabName: collectionName,
|
6666
6699
|
filterName: filterName
|
6667
6700
|
}));
|
6668
|
-
editor.setDefaultHelpEntry('pageflow.help_entries.files');
|
6701
|
+
editor$1.setDefaultHelpEntry('pageflow.help_entries.files');
|
6669
6702
|
},
|
6670
6703
|
confirmableFiles: function confirmableFiles(preselectedFileType, preselectedFileId) {
|
6671
6704
|
this.region.show(ConfirmEncodingView.create({
|
@@ -6678,7 +6711,10 @@ var SidebarController = Marionette.Controller.extend({
|
|
6678
6711
|
metaData: function metaData(tab) {
|
6679
6712
|
this.region.show(new EditMetaDataView({
|
6680
6713
|
model: this.entry,
|
6681
|
-
tab: tab
|
6714
|
+
tab: tab,
|
6715
|
+
state: state,
|
6716
|
+
features: pageflow.features,
|
6717
|
+
editor: editor$1
|
6682
6718
|
}));
|
6683
6719
|
},
|
6684
6720
|
publish: function publish() {
|
@@ -6686,7 +6722,7 @@ var SidebarController = Marionette.Controller.extend({
|
|
6686
6722
|
model: this.entry,
|
6687
6723
|
entryPublication: new EntryPublication()
|
6688
6724
|
}));
|
6689
|
-
editor.setDefaultHelpEntry('pageflow.help_entries.publish');
|
6725
|
+
editor$1.setDefaultHelpEntry('pageflow.help_entries.publish');
|
6690
6726
|
},
|
6691
6727
|
storyline: function storyline(id) {
|
6692
6728
|
this.region.show(new EditStorylineView({
|
@@ -6702,10 +6738,10 @@ var SidebarController = Marionette.Controller.extend({
|
|
6702
6738
|
var page = this.entry.pages.get(id);
|
6703
6739
|
this.region.show(new EditPageView({
|
6704
6740
|
model: page,
|
6705
|
-
api: editor,
|
6741
|
+
api: editor$1,
|
6706
6742
|
tab: tab
|
6707
6743
|
}));
|
6708
|
-
editor.setDefaultHelpEntry(page.pageType().help_entry_translation_key);
|
6744
|
+
editor$1.setDefaultHelpEntry(page.pageType().help_entry_translation_key);
|
6709
6745
|
},
|
6710
6746
|
pageLink: function pageLink(linkId) {
|
6711
6747
|
var pageId = linkId.split(':')[0];
|
@@ -6713,7 +6749,7 @@ var SidebarController = Marionette.Controller.extend({
|
|
6713
6749
|
this.region.show(new EditPageLinkView({
|
6714
6750
|
model: page.pageLinks().get(linkId),
|
6715
6751
|
page: page,
|
6716
|
-
api: editor
|
6752
|
+
api: editor$1
|
6717
6753
|
}));
|
6718
6754
|
},
|
6719
6755
|
widget: function widget(id) {
|
@@ -6851,7 +6887,7 @@ var HelpView = Marionette.ItemView.extend({
|
|
6851
6887
|
initialize: function initialize() {
|
6852
6888
|
this.listenTo(app, 'toggle-help', function (name) {
|
6853
6889
|
this.toggle();
|
6854
|
-
this.showSection(name || editor.defaultHelpEntry || this.defaultHelpEntry(), {
|
6890
|
+
this.showSection(name || editor$1.defaultHelpEntry || this.defaultHelpEntry(), {
|
6855
6891
|
scrollIntoView: true
|
6856
6892
|
});
|
6857
6893
|
});
|
@@ -6914,7 +6950,7 @@ var PageLinkItemView = Marionette.ItemView.extend({
|
|
6914
6950
|
},
|
6915
6951
|
events: {
|
6916
6952
|
'click .edit': function clickEdit() {
|
6917
|
-
editor.navigate(this.model.editPath(), {
|
6953
|
+
editor$1.navigate(this.model.editPath(), {
|
6918
6954
|
trigger: true
|
6919
6955
|
});
|
6920
6956
|
return false;
|
@@ -6972,7 +7008,7 @@ var PageLinksView = Marionette.ItemView.extend({
|
|
6972
7008
|
events: {
|
6973
7009
|
'click .add_link': function clickAdd_link() {
|
6974
7010
|
var view = this;
|
6975
|
-
editor.selectPage().then(function (page) {
|
7011
|
+
editor$1.selectPage().then(function (page) {
|
6976
7012
|
view.model.pageLinks().addLink(page.get('perma_id'));
|
6977
7013
|
});
|
6978
7014
|
return false;
|
@@ -7425,7 +7461,7 @@ var NotificationsView = Marionette.ItemView.extend({
|
|
7425
7461
|
},
|
7426
7462
|
events: {
|
7427
7463
|
'click .retry': function clickRetry() {
|
7428
|
-
editor.failures.retry();
|
7464
|
+
editor$1.failures.retry();
|
7429
7465
|
}
|
7430
7466
|
},
|
7431
7467
|
onRender: function onRender() {
|
@@ -7433,15 +7469,15 @@ var NotificationsView = Marionette.ItemView.extend({
|
|
7433
7469
|
this.listenTo(state.entry, 'change:confirmable_files_count', this.notifyConfirmableFilesCount);
|
7434
7470
|
this.listenTo(state.savingRecords, 'add', this.update);
|
7435
7471
|
this.listenTo(state.savingRecords, 'remove', this.update);
|
7436
|
-
this.listenTo(editor.failures, 'add', this.update);
|
7437
|
-
this.listenTo(editor.failures, 'remove', this.update);
|
7472
|
+
this.listenTo(editor$1.failures, 'add', this.update);
|
7473
|
+
this.listenTo(editor$1.failures, 'remove', this.update);
|
7438
7474
|
this.update();
|
7439
7475
|
this.notifyConfirmableFilesCount();
|
7440
7476
|
},
|
7441
7477
|
update: function update() {
|
7442
|
-
this.$el.toggleClass('failed', !editor.failures.isEmpty());
|
7478
|
+
this.$el.toggleClass('failed', !editor$1.failures.isEmpty());
|
7443
7479
|
this.$el.toggleClass('saving', !state.savingRecords.isEmpty());
|
7444
|
-
this.ui.failedCount.text(editor.failures.count());
|
7480
|
+
this.ui.failedCount.text(editor$1.failures.count());
|
7445
7481
|
},
|
7446
7482
|
notifyUploadCount: function notifyUploadCount(model, uploadCount) {
|
7447
7483
|
this.$el.toggleClass('uploading', uploadCount > 0);
|
@@ -7459,7 +7495,7 @@ var FileProcessingStateDisplayView = Marionette.View.extend({
|
|
7459
7495
|
mixins: [inputView],
|
7460
7496
|
initialize: function initialize() {
|
7461
7497
|
if (typeof this.options.collection === 'string') {
|
7462
|
-
this.options.collection = state.entry.getFileCollection(editor.fileTypes.findByCollectionName(this.options.collection));
|
7498
|
+
this.options.collection = state.entry.getFileCollection(editor$1.fileTypes.findByCollectionName(this.options.collection));
|
7463
7499
|
}
|
7464
7500
|
|
7465
7501
|
this.listenTo(this.model, 'change:' + this.options.propertyName, this._update);
|
@@ -7618,17 +7654,17 @@ var TextTracksView = Marionette.Layout.extend({
|
|
7618
7654
|
onRender: function onRender() {
|
7619
7655
|
this.nestedFilesView = new NestedFilesView({
|
7620
7656
|
collection: this.model.nestedFiles(this.options.supersetCollection),
|
7621
|
-
fileType: editor.fileTypes.findByCollectionName('text_track_files'),
|
7657
|
+
fileType: editor$1.fileTypes.findByCollectionName('text_track_files'),
|
7622
7658
|
selection: this.selection,
|
7623
7659
|
model: this.model,
|
7624
7660
|
tableBlankSlateText: I18n$1.t('pageflow.editor.nested_files.text_track_files.no_files_blank_slate')
|
7625
7661
|
});
|
7626
7662
|
this.ui.filesPanel.append(this.subview(this.nestedFilesView).el);
|
7627
7663
|
this.update();
|
7628
|
-
editor.setUploadTargetFile(this.model);
|
7664
|
+
editor$1.setUploadTargetFile(this.model);
|
7629
7665
|
},
|
7630
7666
|
onClose: function onClose() {
|
7631
|
-
editor.setUploadTargetFile(undefined);
|
7667
|
+
editor$1.setUploadTargetFile(undefined);
|
7632
7668
|
},
|
7633
7669
|
update: function update() {
|
7634
7670
|
var selectedFile = this.selection.get('file');
|
@@ -8053,7 +8089,7 @@ ConfigurationEditorTabView.groups.define('options', function (options) {
|
|
8053
8089
|
}
|
8054
8090
|
});
|
8055
8091
|
|
8056
|
-
editor.widgetTypes.register('classic_loading_spinner', {
|
8092
|
+
editor$1.widgetTypes.register('classic_loading_spinner', {
|
8057
8093
|
configurationEditorView: ConfigurationEditorView.extend({
|
8058
8094
|
configure: function configure() {
|
8059
8095
|
this.tab('loading_spinner', function () {
|
@@ -8065,10 +8101,10 @@ editor.widgetTypes.register('classic_loading_spinner', {
|
|
8065
8101
|
})
|
8066
8102
|
});
|
8067
8103
|
|
8068
|
-
editor.widgetTypes.registerRole('cookie_notice', {
|
8104
|
+
editor$1.widgetTypes.registerRole('cookie_notice', {
|
8069
8105
|
isOptional: true
|
8070
8106
|
});
|
8071
|
-
editor.widgetTypes.register('cookie_notice_bar', {
|
8107
|
+
editor$1.widgetTypes.register('cookie_notice_bar', {
|
8072
8108
|
configurationEditorView: ConfigurationEditorView.extend({
|
8073
8109
|
configure: function configure() {
|
8074
8110
|
this.tab('cookie_notice_bar', function () {
|
@@ -8080,7 +8116,7 @@ editor.widgetTypes.register('cookie_notice_bar', {
|
|
8080
8116
|
})
|
8081
8117
|
});
|
8082
8118
|
|
8083
|
-
editor.widgetTypes.register('media_loading_spinner', {
|
8119
|
+
editor$1.widgetTypes.register('media_loading_spinner', {
|
8084
8120
|
configurationEditorView: ConfigurationEditorView.extend({
|
8085
8121
|
configure: function configure() {
|
8086
8122
|
this.tab('loading_spinner', function () {
|
@@ -8099,7 +8135,7 @@ editor.widgetTypes.register('media_loading_spinner', {
|
|
8099
8135
|
})
|
8100
8136
|
});
|
8101
8137
|
|
8102
|
-
editor.widgetTypes.register('phone_horizontal_slideshow_mode', {
|
8138
|
+
editor$1.widgetTypes.register('phone_horizontal_slideshow_mode', {
|
8103
8139
|
configurationEditorView: ConfigurationEditorView.extend({
|
8104
8140
|
configure: function configure() {
|
8105
8141
|
this.tab('phone_horizontal_slideshow_mode', function () {
|
@@ -8114,7 +8150,7 @@ editor.widgetTypes.register('phone_horizontal_slideshow_mode', {
|
|
8114
8150
|
})
|
8115
8151
|
});
|
8116
8152
|
|
8117
|
-
editor.widgetTypes.register('title_loading_spinner', {
|
8153
|
+
editor$1.widgetTypes.register('title_loading_spinner', {
|
8118
8154
|
configurationEditorView: ConfigurationEditorView.extend({
|
8119
8155
|
configure: function configure() {
|
8120
8156
|
this.tab('loading_spinner', function () {
|
@@ -8122,7 +8158,7 @@ editor.widgetTypes.register('title_loading_spinner', {
|
|
8122
8158
|
text: I18n$1.t('pageflow.editor.title_loading_spinner.widget_type_info_box_text')
|
8123
8159
|
});
|
8124
8160
|
this.input('title', TextInputView, {
|
8125
|
-
placeholder: state.entry.
|
8161
|
+
placeholder: state.entry.metadata.get('title') || state.entry.get('entry_title')
|
8126
8162
|
});
|
8127
8163
|
this.input('subtitle', TextInputView);
|
8128
8164
|
this.input('custom_background_image_id', FileInputView, {
|
@@ -8164,7 +8200,7 @@ app.addInitializer(function (options) {
|
|
8164
8200
|
|
8165
8201
|
app.addInitializer(function () {
|
8166
8202
|
Backbone.history.on('route', function () {
|
8167
|
-
editor.applyDefaultHelpEntry();
|
8203
|
+
editor$1.applyDefaultHelpEntry();
|
8168
8204
|
});
|
8169
8205
|
});
|
8170
8206
|
|
@@ -8193,7 +8229,7 @@ app.addInitializer(function (options) {
|
|
8193
8229
|
settingsDialogTabLink: 'general'
|
8194
8230
|
}
|
8195
8231
|
};
|
8196
|
-
editor.fileTypes.register('image_files', {
|
8232
|
+
editor$1.fileTypes.register('image_files', {
|
8197
8233
|
model: ImageFile,
|
8198
8234
|
metaDataAttributes: ['dimensions', altMetaDataAttribute],
|
8199
8235
|
matchUpload: /^image/,
|
@@ -8202,7 +8238,7 @@ app.addInitializer(function (options) {
|
|
8202
8238
|
inputView: TextInputView
|
8203
8239
|
}]
|
8204
8240
|
});
|
8205
|
-
editor.fileTypes.register('video_files', {
|
8241
|
+
editor$1.fileTypes.register('video_files', {
|
8206
8242
|
model: VideoFile,
|
8207
8243
|
metaDataAttributes: ['format', 'dimensions', 'duration', textTracksMetaDataAttribute, altMetaDataAttribute],
|
8208
8244
|
matchUpload: /^video/,
|
@@ -8212,7 +8248,7 @@ app.addInitializer(function (options) {
|
|
8212
8248
|
}],
|
8213
8249
|
settingsDialogTabs: [textTracksSettingsDialogTab]
|
8214
8250
|
});
|
8215
|
-
editor.fileTypes.register('audio_files', {
|
8251
|
+
editor$1.fileTypes.register('audio_files', {
|
8216
8252
|
model: AudioFile,
|
8217
8253
|
metaDataAttributes: ['format', 'duration', textTracksMetaDataAttribute, altMetaDataAttribute],
|
8218
8254
|
matchUpload: /^audio/,
|
@@ -8222,7 +8258,7 @@ app.addInitializer(function (options) {
|
|
8222
8258
|
}],
|
8223
8259
|
settingsDialogTabs: [textTracksSettingsDialogTab]
|
8224
8260
|
});
|
8225
|
-
editor.fileTypes.register('text_track_files', {
|
8261
|
+
editor$1.fileTypes.register('text_track_files', {
|
8226
8262
|
model: TextTrackFile,
|
8227
8263
|
matchUpload: function matchUpload(upload) {
|
8228
8264
|
return upload.name.match(/\.vtt$/) || upload.name.match(/\.srt$/);
|
@@ -8277,30 +8313,30 @@ app.addInitializer(function (options) {
|
|
8277
8313
|
binding: 'label'
|
8278
8314
|
}
|
8279
8315
|
});
|
8280
|
-
editor.fileTypes.setup(options.config.fileTypes);
|
8316
|
+
editor$1.fileTypes.setup(options.config.fileTypes);
|
8281
8317
|
});
|
8282
8318
|
|
8283
8319
|
app.addInitializer(function (options) {
|
8284
|
-
editor.widgetTypes.registerRole('navigation', {
|
8320
|
+
editor$1.widgetTypes.registerRole('navigation', {
|
8285
8321
|
isOptional: true
|
8286
8322
|
});
|
8287
|
-
editor.widgetTypes.setup(options.widget_types);
|
8323
|
+
editor$1.widgetTypes.setup(options.widget_types);
|
8288
8324
|
});
|
8289
8325
|
|
8290
8326
|
app.addInitializer(function (options) {
|
8291
|
-
state.files = FilesCollection.createForFileTypes(editor.fileTypes, options.files);
|
8327
|
+
state.files = FilesCollection.createForFileTypes(editor$1.fileTypes, options.files);
|
8292
8328
|
state.imageFiles = state.files.image_files;
|
8293
8329
|
state.videoFiles = state.files.video_files;
|
8294
8330
|
state.audioFiles = state.files.audio_files;
|
8295
8331
|
state.textTrackFiles = state.files.text_track_files;
|
8296
8332
|
var widgets = new WidgetsCollection(options.widgets, {
|
8297
|
-
widgetTypes: editor.widgetTypes
|
8333
|
+
widgetTypes: editor$1.widgetTypes
|
8298
8334
|
});
|
8299
8335
|
state.themes = new ThemesCollection(options.themes);
|
8300
8336
|
state.pages = new PagesCollection(options.pages);
|
8301
8337
|
state.chapters = new ChaptersCollection(options.chapters);
|
8302
8338
|
state.storylines = new StorylinesCollection(options.storylines);
|
8303
|
-
state.entry = editor.createEntryModel(options, {
|
8339
|
+
state.entry = editor$1.createEntryModel(options, {
|
8304
8340
|
widgets: widgets
|
8305
8341
|
});
|
8306
8342
|
state.theming = new Theming(options.theming);
|
@@ -8321,9 +8357,9 @@ app.addInitializer(function (options) {
|
|
8321
8357
|
state.storylines.on('sort', _$1.debounce(function () {
|
8322
8358
|
state.storylines.saveOrder();
|
8323
8359
|
}, 100));
|
8324
|
-
editor.failures.watch(state.entry);
|
8325
|
-
editor.failures.watch(state.pages);
|
8326
|
-
editor.failures.watch(state.chapters);
|
8360
|
+
editor$1.failures.watch(state.entry);
|
8361
|
+
editor$1.failures.watch(state.pages);
|
8362
|
+
editor$1.failures.watch(state.chapters);
|
8327
8363
|
state.savingRecords = new SavingRecordsCollection();
|
8328
8364
|
state.savingRecords.watch(state.pages);
|
8329
8365
|
state.savingRecords.watch(state.chapters);
|
@@ -8333,13 +8369,13 @@ app.addInitializer(function (options) {
|
|
8333
8369
|
app.addInitializer(function (options) {
|
8334
8370
|
state.fileUploader = new FileUploader({
|
8335
8371
|
entry: state.entry,
|
8336
|
-
fileTypes: editor.fileTypes
|
8372
|
+
fileTypes: editor$1.fileTypes
|
8337
8373
|
});
|
8338
|
-
ConfirmUploadView.watch(state.fileUploader, editor.fileTypes, state.files);
|
8374
|
+
ConfirmUploadView.watch(state.fileUploader, editor$1.fileTypes, state.files);
|
8339
8375
|
});
|
8340
8376
|
|
8341
8377
|
app.addInitializer(function (options) {
|
8342
|
-
editor.pageTypes.setup(options.page_types);
|
8378
|
+
editor$1.pageTypes.setup(options.page_types);
|
8343
8379
|
});
|
8344
8380
|
|
8345
8381
|
app.addInitializer(function (options) {
|
@@ -8353,7 +8389,7 @@ app.addInitializer(function (options) {
|
|
8353
8389
|
pageflow.atmo.disable();
|
8354
8390
|
}
|
8355
8391
|
} else if (event.altKey && event.which === KEY_X) {
|
8356
|
-
editor.navigate('pages/' + pageflow.slides.currentPage().data('id'), {
|
8392
|
+
editor$1.navigate('pages/' + pageflow.slides.currentPage().data('id'), {
|
8357
8393
|
trigger: true
|
8358
8394
|
});
|
8359
8395
|
}
|
@@ -8361,7 +8397,7 @@ app.addInitializer(function (options) {
|
|
8361
8397
|
});
|
8362
8398
|
|
8363
8399
|
app.addInitializer(function (options) {
|
8364
|
-
editor.fileImporters.setup(options.config.fileImporters);
|
8400
|
+
editor$1.fileImporters.setup(options.config.fileImporters);
|
8365
8401
|
});
|
8366
8402
|
|
8367
8403
|
app.addInitializer(function (options) {
|
@@ -8383,14 +8419,14 @@ app.addInitializer(function (options) {
|
|
8383
8419
|
state.entry.on('use:files', function () {
|
8384
8420
|
pageflow.stylesheet.reload('entry');
|
8385
8421
|
});
|
8386
|
-
state.entry.
|
8422
|
+
state.entry.metadata.on('change:theme_name', function () {
|
8387
8423
|
var theme = state.entry.getTheme();
|
8388
8424
|
pageflow.stylesheet.update('theme', theme.get('stylesheet_path'));
|
8389
8425
|
});
|
8390
8426
|
});
|
8391
8427
|
|
8392
8428
|
app.addInitializer(function () {
|
8393
|
-
_$1.each(editor.sideBarRoutings, function (options) {
|
8429
|
+
_$1.each(editor$1.sideBarRoutings, function (options) {
|
8394
8430
|
new options.router({
|
8395
8431
|
controller: new options.controller({
|
8396
8432
|
region: app.sidebarRegion,
|
@@ -8399,13 +8435,13 @@ app.addInitializer(function () {
|
|
8399
8435
|
});
|
8400
8436
|
});
|
8401
8437
|
|
8402
|
-
editor.router = new SidebarRouter({
|
8438
|
+
editor$1.router = new SidebarRouter({
|
8403
8439
|
controller: new SidebarController({
|
8404
8440
|
region: app.sidebarRegion,
|
8405
8441
|
entry: state.entry
|
8406
8442
|
})
|
8407
8443
|
});
|
8408
|
-
window.editor = editor.router;
|
8444
|
+
window.editor = editor$1.router;
|
8409
8445
|
});
|
8410
8446
|
|
8411
8447
|
app.addInitializer(function () {
|
@@ -8427,7 +8463,7 @@ app.addInitializer(function ()
|
|
8427
8463
|
var context = this;
|
8428
8464
|
var args = arguments;
|
8429
8465
|
|
8430
|
-
_$1.each(editor.initializers, function (fn) {
|
8466
|
+
_$1.each(editor$1.initializers, function (fn) {
|
8431
8467
|
fn.call(context, args);
|
8432
8468
|
});
|
8433
8469
|
});
|
@@ -8440,7 +8476,7 @@ app.addInitializer(function (options) {
|
|
8440
8476
|
el: $('sidebar .scrolling'),
|
8441
8477
|
region: app.sidebarRegion
|
8442
8478
|
}).render();
|
8443
|
-
app.previewRegion.show(new editor.entryType.previewView({
|
8479
|
+
app.previewRegion.show(new editor$1.entryType.previewView({
|
8444
8480
|
model: state.entry
|
8445
8481
|
}));
|
8446
8482
|
app.indicatorsRegion.show(new DisabledAtmoIndicatorView());
|
@@ -8462,4 +8498,4 @@ app.addRegions({
|
|
8462
8498
|
sidebarFooterRegion: 'sidebar .sidebar_footer_container'
|
8463
8499
|
});
|
8464
8500
|
|
8465
|
-
export { AudioFile, BackButtonDecoratorView, BackgroundImageEmbeddedView, BackgroundPositioningPreviewView, BackgroundPositioningSlidersView, BackgroundPositioningView, ChangeThemeDialogView, Chapter, ChapterConfiguration, ChapterPagesCollection, ChapterScaffold, ChaptersCollection, ChooseImporterView, Configuration, ConfirmEncodingView, ConfirmFileImportUploadView, ConfirmUploadView, ConfirmableFileItemView, DisabledAtmoIndicatorView, DropDownButtonItemListView, DropDownButtonItemView, DropDownButtonView, EditChapterView, EditEntryView, EditFileView, EditLock, EditLockContainer, EditMetaDataView, EditPageLinkView, EditPageView, EditStorylineView, EditWidgetView, EditWidgetsView, EditorApi, EditorView, EmulationModeButtonView, EncodedFile, EncodingConfirmation, Entry,
|
8501
|
+
export { AudioFile, BackButtonDecoratorView, BackgroundImageEmbeddedView, BackgroundPositioningPreviewView, BackgroundPositioningSlidersView, BackgroundPositioningView, ChangeThemeDialogView, Chapter, ChapterConfiguration, ChapterPagesCollection, ChapterScaffold, ChaptersCollection, ChooseImporterView, Configuration, ConfirmEncodingView, ConfirmFileImportUploadView, ConfirmUploadView, ConfirmableFileItemView, DisabledAtmoIndicatorView, DropDownButtonItemListView, DropDownButtonItemView, DropDownButtonView, EditChapterView, EditEntryView, EditFileView, EditLock, EditLockContainer, EditMetaDataView, EditPageLinkView, EditPageView, EditStorylineView, EditWidgetView, EditWidgetsView, EditorApi, EditorView, EmulationModeButtonView, EncodedFile, EncodingConfirmation, Entry, EntryMetadata, EntryMetadataFileSelectionHandler, EntryPublication, EntryPublicationQuotaDecoratorView, ExplorerFileItemView, FileConfiguration, FileImport, FileInputView, FileItemView, FileMetaDataItemValueView, FileMetaDataItemView, FileProcessingStateDisplayView, FileReuse, FileSettingsDialogView, FileStage, FileStageItemView, FileThumbnailView, FileTypes, FileTypesCollection, FileUploader, FilesCollection, FilesExplorerView, FilesImporterView, FilesView, FilteredFilesView, HelpButtonView, HelpImageView, HelpView, ImageFile, InfoBoxView, InvalidNestedTypeError, LazyVideoEmbeddedView, ListItemView, ListView, LoadingView, LockedView, ModelThumbnailView, MultiCollection, NestedFilesCollection, NestedFilesView, NestedTypeError, NotificationsView, OrderedPageLinksCollection, OtherEntriesCollection, OtherEntriesCollectionView, OtherEntry, OtherEntryItemView, Page, PageConfigurationFileSelectionHandler, PageLink, PageLinkConfigurationEditorView, PageLinkFileSelectionHandler, PageLinkInputView, PageLinkItemView, PageLinksCollection, PageLinksView, PageThumbnailView, PagesCollection, PreviewEntryData, PublishEntryView, ReferenceInputView, ReusableFile, SavingRecordsCollection, Scaffold, ScrollingView, SelectButtonView, SidebarController, SidebarFooterView, SidebarRouter, StaticThumbnailView, Storyline, StorylineChaptersCollection, StorylineConfiguration, StorylineOrdering, StorylineScaffold, StorylineTransitiveChildPages, StorylinesCollection, SubsetCollection, TextFileMetaDataItemValueView, TextTrackFile, TextTracksFileMetaDataItemValueView, TextTracksView, Theme, ThemeInputView, ThemeItemView, ThemesCollection, Theming, UnmatchedUploadError, UploadError, UploadableFile, UploadableFilesView, UploaderView, VideoFile, Widget, WidgetConfiguration, WidgetConfigurationFileSelectionHandler, WidgetItemView, WidgetTypes, WidgetsCollection, addAndReturnModel, app, authenticationProvider, delayedDestroying, dialogView, editor$1 as editor, failureIndicatingView, failureTracking, fileWithType, filesCountWatcher, formDataUtils, loadable, orderedCollection, persistedPromise, polling, retryable, selectableView, stageProvider, startEditor, state, stylesheet, transientReferences, validFileTypeTranslationList };
|