app/assets/javascripts/pageflow/editor/initializers/setup_collections.js in pageflow-12.0.4 vs app/assets/javascripts/pageflow/editor/initializers/setup_collections.js in pageflow-12.1.0

- old
+ new

@@ -4,21 +4,28 @@ pageflow.imageFiles = pageflow.files.image_files; pageflow.videoFiles = pageflow.files.video_files; pageflow.audioFiles = pageflow.files.audio_files; pageflow.textTrackFiles = pageflow.files.text_track_files; + var widgets = new pageflow.WidgetsCollection(options.widgets, { + widgetTypes: pageflow.editor.widgetTypes + }); + + pageflow.themes = new pageflow.ThemesCollection(options.themes); pageflow.pages = new pageflow.PagesCollection(options.pages); pageflow.chapters = new pageflow.ChaptersCollection(options.chapters); pageflow.storylines = new pageflow.StorylinesCollection(options.storylines); - pageflow.entry = new pageflow.Entry(options.entry); + pageflow.entry = new pageflow.Entry(options.entry, {widgets: widgets}); pageflow.theming = new pageflow.Theming(options.theming); pageflow.account = new Backbone.Model(options.account); + widgets.subject = pageflow.entry; + pageflow.entryData = new pageflow.PreviewEntryData({ + entry: pageflow.entry, storylines: pageflow.storylines, chapters: pageflow.chapters, - pages: pageflow.pages, - theming: pageflow.theming + pages: pageflow.pages }); pageflow.storylineOrdering = new pageflow.StorylineOrdering(pageflow.storylines, pageflow.pages); pageflow.storylineOrdering.sort({silent: true}); pageflow.storylineOrdering.watch();