Sha256: dd00057e1c37e035b1db057f3b5e8138771ca10a423d7466759916c4c90309b0
Contents?: true
Size: 1.45 KB
Versions: 24
Compression:
Stored size: 1.45 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); }, getFile: function(collectionName, id) { var file = this.entry.getFileCollection(collectionName).get(id); return file && file.attributes; }, 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
24 entries across 24 versions & 1 rubygems