Sha256: 0d727e6004e45bb70ecbfe3ea0126dcdb363983ca3319f8dbc923e40b1897059
Contents?: true
Size: 1.3 KB
Versions: 13
Compression:
Stored size: 1.3 KB
Contents
pageflow.PreviewEntryData = pageflow.EntryData.extend({ initialize: function(options) { this.entry = options.entry; this.storylines = options.storylines; this.chapters = options.chapters; this.pages = options.pages; }, getThemingOption: function(name) { return this.entry.getTheme().get(name); }, getStorylineConfiguration: function(id) { var storyline = this.storylines.get(id); return storyline ? storyline.configuration.attributes : {}; }, getChapterConfiguration: function(id) { var chapter = this.chapters.get(id); return chapter ? chapter.configuration.attributes : {}; }, getChapterPagePermaIds: function(id) { var chapter = this.chapters.get(id); return chapter ? chapter.pages.pluck('perma_id') : []; }, getStorylineIdByChapterId: function(id) { var chapter = this.chapters.get(id); return chapter && chapter.get('storyline_id'); }, getChapterIdByPagePermaId: function(permaId) { var page = this.pages.getByPermaId(permaId); return page && page.get('chapter_id'); }, getPageConfiguration: function(permaId) { var page = this.pages.getByPermaId(permaId); return page ? page.configuration.attributes : {}; }, getPagePosition: function(permaId) { return this.pages.indexOf(this.pages.getByPermaId(permaId)); } });
Version data entries
13 entries across 13 versions & 1 rubygems