Sha256: e78fb71ca5f079fb46239951ebd81a789aa3c3da7238cd0dd17f1d53ec6f3306

Contents?: true

Size: 860 Bytes

Versions: 70

Compression:

Stored size: 860 Bytes

Contents

import { Registry } from './registry'
import { UserControls } from './user_controls'
import { GroupControls } from './group_controls'

export default class PermissionsControl {
  /**
   * Initialize the save controls
   * @param {jQuery} element the jquery selector for the permissions container
   * @param {String} template_id the identifier of the template for the added elements
   */
  constructor(element, template_id) {
    if (element.length === 0) {
      return
    }
    this.element = element

    this.registry = new Registry(this.element, this.object_name(), template_id)
    this.user_controls = new UserControls(this.element, this.registry)
    this.group_controls = new GroupControls(this.element, this.registry)
  }

  // retrieve object_name the name of the object to create
  object_name() {
    return this.element.data('param-key')
  }
}

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
hyrax-3.4.2 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-4.0.0.beta1 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.4.1 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.4.0 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.3.0 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.2.0 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-2.9.6 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.1.0 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-2.9.5 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.0.2 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.0.1 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.0.0 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.0.0.pre.rc4 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-2.9.4 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.0.0.pre.rc3 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-2.9.3 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-2.9.2 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-2.9.1 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-2.9.0 app/assets/javascripts/hyrax/permissions/control.es6
hyrax-3.0.0.pre.rc2 app/assets/javascripts/hyrax/permissions/control.es6