Sha256: 35f794e2aafb923cfca12699acf89cb64ce443c833de24bbf28dda4404c5c100

Contents?: true

Size: 1.89 KB

Versions: 33

Compression:

Stored size: 1.89 KB

Contents

pageflow.EntryData = pageflow.Object.extend({
  getThemingOption: function(name) {
    throw 'Not implemented';
  },

  getFile: function(collectionName, id) {
    throw 'Not implemented';
  },

  getPageConfiguration: function(permaId) {
    throw 'Not implemented';
  },

  getPagePosition: function(permaId) {
    throw 'Not implemented';
  },

  getChapterConfiguration: function(id) {
    throw 'Not implemented';
  },

  getStorylineConfiguration: function(id) {
    throw 'Not implemented';
  },

  getChapterIdByPagePermaId: function(permaId) {
    throw 'Not implemented';
  },

  getStorylineIdByChapterId: function(permaId) {
    throw 'Not implemented';
  },

  getChapterPagePermaIds: function(id) {
    throw 'Not implemented';
  },

  getParentPagePermaIdByPagePermaId: function(permaId) {
    var storylineId = this.getStorylineIdByPagePermaId(permaId);
    return this.getParentPagePermaId(storylineId);
  },

  getStorylineIdByPagePermaId: function(permaId) {
    var chapterId = this.getChapterIdByPagePermaId(permaId);
    return this.getStorylineIdByChapterId(chapterId);
  },

  getParentStorylineId: function(storylineId) {
    var parentPagePermaId = this.getParentPagePermaId(storylineId);
    return parentPagePermaId && this.getStorylineIdByPagePermaId(parentPagePermaId);
  },

  getParentChapterId: function(chapterId) {
    var storylineId = this.getStorylineIdByChapterId(chapterId);
    var pagePermaId = this.getParentPagePermaId(storylineId);
    return pagePermaId && this.getChapterIdByPagePermaId(pagePermaId);
  },

  getParentPagePermaId: function(storylineId) {
    return this.getStorylineConfiguration(storylineId).parent_page_perma_id;
  },

  getStorylineLevel: function(storylineId) {
    var parentStorylineId = this.getParentStorylineId(storylineId);

    if (parentStorylineId) {
      return this.getStorylineLevel(parentStorylineId) + 1;
    }
    else {
      return 0;
    }
  }
});

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
pageflow-14.5.2 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.2 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.1 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.0 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.5.1 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.5.0 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.0.rc2 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.0.rc1 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.0.beta4 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.0.beta3 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.4.0 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.0.beta2 app/assets/javascripts/pageflow/entry_data.js
pageflow-15.0.0.beta1 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.3.0 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.2.1 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.2.0 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.1.1 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.1.0 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.0.0 app/assets/javascripts/pageflow/entry_data.js
pageflow-14.0.0.rc2 app/assets/javascripts/pageflow/entry_data.js