Sha256: 2897324a4594d5c50f224a28652b3998c43fae72e7e376a9c6be2dd63c904e4f

Contents?: true

Size: 752 Bytes

Versions: 36

Compression:

Stored size: 752 Bytes

Contents

pageflow.WidgetType = pageflow.Object.extend({
  initialize: function(serverSideConfig, clientSideConfig) {
    this.name = serverSideConfig.name;
    this.translationKey = serverSideConfig.translationKey;
    this.configurationEditorView = clientSideConfig.configurationEditorView;
    this.isOptional = clientSideConfig.isOptional;
  },

  hasConfiguration: function() {
    return !!this.configurationEditorView;
  },

  createConfigurationEditorView: function(options) {
    var constructor = this.configurationEditorView;

    return new constructor(_.extend({
      attributeTranslationKeyPrefixes: [
        'pageflow.editor.widgets.attributes.' + this.name,
        'pageflow.editor.widgets.common_attributes'
      ]
    }, options));
  }
});

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
pageflow-14.4.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-15.0.0.beta2 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-15.0.0.beta1 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.3.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.2.1 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.2.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.1.1 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.1.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.0.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.0.0.rc2 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.0.0.rc1 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.0.0.beta3 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.0.0.beta2 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-14.0.0.beta1 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-13.6.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-13.5.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-13.4.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-13.3.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-13.2.0 app/assets/javascripts/pageflow/editor/api/widget_type.js
pageflow-12.6.0 app/assets/javascripts/pageflow/editor/api/widget_type.js