jiskattema/spot

View on GitHub
src/pages/configure-partition/partition-text.js

Summary

Maintainability
A
2 hrs
Test Coverage
var View = require('ampersand-view');
var templates = require('../../templates');

module.exports = View.extend({
  template: templates.configurePartition.partitionText,
  bindings: {
    'model.isText': {
      type: 'toggle',
      hook: 'group-text-panel'
    }
  },
  events: {
    'click [data-hook~=group-order-count]': function () {
      this.model.ordering = 'count';
      this.parent.resetFilter = true;
    },
    'click [data-hook~=group-order-abc]': function () {
      this.model.ordering = 'value';
      this.parent.resetFilter = true;
    }
  }
});