Sha256: 8488e15d7b78f70c490c733e53ff1917c99dac5f5ae49b451a9ed995ad23466c

Contents?: true

Size: 1.24 KB

Versions: 25

Compression:

Stored size: 1.24 KB

Contents

//= require_self
//= require_tree ./page_types/mixins

pageflow.pageType = (function() {
  var base = {
    enhance: function(pageElement, configuarion) {},
    prepare: function(pageElement, configuarion) {},
    unprepare: function(pageElement, configuarion) {},
    preload: function(pageElement, configuarion) {},
    resize: function(pageElement, configuarion) {},
    activating: function(pageElement, configuarion) {},
    activated: function(pageElement, configuarion) {},
    deactivating: function(pageElement, configuarion) {},
    deactivated: function(pageElement, configuarion) {},
    update: function(pageElement, configuarion) {},
    cleanup: function(pageElement, configuarion) {},

    embeddedEditorViews: function() {},

    linkedPages: function() {
      return [];
    },

    prepareNextPageTimeout: 200
  };

  return {
    repository: [],

    register: function(name, pageType) {
      var constructor = function() {};

      _.extend(constructor.prototype, base, Backbone.Events, pageType);
      this.repository[name] = constructor;
    },

    get: function(name) {
      if (!this.repository.hasOwnProperty(name)) {
        throw 'Unknown page type "' + name + '"';
      }

      return new this.repository[name]();
    }
  };
}());

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
pageflow-12.6.0 app/assets/javascripts/pageflow/page_type.js
pageflow-12.5.0 app/assets/javascripts/pageflow/page_type.js
pageflow-12.4.1 app/assets/javascripts/pageflow/page_type.js
pageflow-12.4.0 app/assets/javascripts/pageflow/page_type.js
pageflow-12.3.0 app/assets/javascripts/pageflow/page_type.js
pageflow-13.0.0.beta6 app/assets/javascripts/pageflow/page_type.js
pageflow-13.0.0.beta5 app/assets/javascripts/pageflow/page_type.js
pageflow-13.0.0.beta4 app/assets/javascripts/pageflow/page_type.js
pageflow-13.0.0.beta3 app/assets/javascripts/pageflow/page_type.js
pageflow-13.0.0.beta2 app/assets/javascripts/pageflow/page_type.js
pageflow-13.0.0.beta1 app/assets/javascripts/pageflow/page_type.js
pageflow-12.2.0 app/assets/javascripts/pageflow/page_type.js
pageflow-12.1.0 app/assets/javascripts/pageflow/page_type.js
pageflow-12.0.4 app/assets/javascripts/pageflow/page_type.js
pageflow-12.0.3 app/assets/javascripts/pageflow/page_type.js
pageflow-12.0.2 app/assets/javascripts/pageflow/page_type.js
pageflow-12.0.1 app/assets/javascripts/pageflow/page_type.js
pageflow-12.0.0 app/assets/javascripts/pageflow/page_type.js
pageflow-12.0.0.rc7 app/assets/javascripts/pageflow/page_type.js
pageflow-12.0.0.rc6 app/assets/javascripts/pageflow/page_type.js