Sha256: cb339aa3380eb8ddef90fd10d06cd22115ddc50f780cce7bd8ae6a9175f1f43a

Contents?: true

Size: 844 Bytes

Versions: 8

Compression:

Stored size: 844 Bytes

Contents

(function() {
  Rev.registerMixin('Visibility', {
    _visibilityRewriteClassName: function(props) {
      var classes;
      classes = {};
      ['showFor', 'hideFor', 'visibleFor', 'hiddenFor'].forEach(function(propName) {
        if (this.props[propName] != null) {
          return this.props[propName].split(' ').forEach(function(sizeName) {
            var className;
            className = (_.str.dasherize(propName)) + "-" + (_.str.dasherize(sizeName));
            return classes[className] = true;
          });
        }
      });
      return this.props.className = this.classAdd(classes);
    },
    componentWillMount: function() {
      return this._visibilityRewriteClassName(this.props);
    },
    componentWillReceiveProps: function(props) {
      return this._visibilityRewriteClassName(props);
    }
  });

}).call(this);

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
revelry_core-0.1.12.4 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js
revelry_core-0.1.12.2 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js
revelry_core-0.1.11.6 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js
revelry_core-0.1.10.1 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js
revelry_core-0.1.10.0 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js
revelry_core-0.1.9.1 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js
revelry_core-0.1.9.0 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js
revelry_core-0.1.8.0 spec/dummy/tmp/jasmine/assets/revelry/mixins/Visibility.self.js