Sha256: 9bf5db65e3bb132720694296280a56ac962ba7e17ed93f0f3a9fd42ee5a4f16a

Contents?: true

Size: 1.28 KB

Versions: 2

Compression:

Stored size: 1.28 KB

Contents

Ext.define('TM.view.task.Grid', {
	extend: 'Ext.ux.MultiSelectablePagingGrid',
	xtype: 'task_grid',

  mixins: [
    'TM.helper.ApplicationHelper'
  ],
	store: 'TM.store.Tasks',

  requires: [
    'Ext.ux.RowExpander'
  ],

  plugins: [{
    ptype: 'rowexpander',
    rowBodyTpl: [
      '<table class="data">',
        '<tr>',
          '<td class="name">横向指标:</td>',
          '<td class="value">{[values.data.x == null ? "" : values.data.x]}</td>',
        '</tr>',
        '<tr>',
          '<td class="name">纵向指标:</td>',
          '<td class="value">{[values.data.y == null ? "" : values.data.y]}</td>',
        '</tr>',
      '</table>'
     ]
  }],

	tbar: [ {
    text: '删除',
    iconCls: 'btn-delete-icon',
    action: 'delete'
  }],

  columns: [{
  	text: '名称',
    dataIndex: 'name',
    flex: 2
  }, {
    text: '周期',
    dataIndex: 'task_type',
    renderer: function(v, m, record) {
      return this.translateType(v);
    },
    flex: 2
  }, {
    text: '状态',
    dataIndex: 'status',
    renderer: function(v, m, record) {
      return this.translateStatus(v);
    },
    flex:2
  }, {
    text: '完成时限',
    dataIndex: 'deadline',
    renderer: function(v, m, record) {
      return Ext.Date.format(v, 'Y年m月j日 H:i:s');
    },
    flex:2
  }]
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
task-manager-0.1.7 app/assets/javascripts/task-manager/extjs/app/view/task/Grid.js
task-manager-0.1.6 app/assets/javascripts/task-manager/extjs/app/view/task/Grid.js