Sha256: 761d9e7c7997afb897570d9e82f2dd75a5bdd7862213483e55de670bd91bdc99
Contents?: true
Size: 1.3 KB
Versions: 18
Compression:
Stored size: 1.3 KB
Contents
pageflow.PreviewEntryData = pageflow.EntryData.extend({ initialize: function(options) { this.storylines = options.storylines; this.chapters = options.chapters; this.pages = options.pages; this.theming = options.theming; }, getThemingOption: function(name) { return this.theming.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
18 entries across 18 versions & 1 rubygems