Sha256: 7d962d456ff82af7c58a536894518c8a5a27b6288b97fb0196813d537419d060

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

{
  netzkeShowGrid: function (options = {}) {
    var dg = options.dataGrid || 'data_grid'
    var title_str = options.titleStr || 'Data Grid'

    var sel = this.getSelectionModel().getSelection()[0];
    var record_id = sel && sel.getId();
    this.server.showGrid({
      record_id: record_id,
      data_grid: dg,
      title_str: title_str
    });
  },

  netzkeClientShowGrid: function (count, data, title_str) {
    var columns = [];
    var fields = [];

    for (var i = 0; i < count; i++) {
      fields.push("a" + i);
      columns.push({
        dataIndex: "a" + i,
        text: i,
        flex: 1
      });
    }

    Ext.create('Ext.Window', {
      height: "80%",
      width: "80%",
      x: 0,
      y: 0,
      autoWidth: true,
      modal: true,
      autoScroll: true,
      title: title_str,
      items: {
        xtype: 'grid',
        border: false,
        hideHeaders: false,
        columns: columns,
        store: Ext.create('Ext.data.ArrayStore', {
          fields: fields,
          data: data,
        })
      },
    }).show();
  },
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
marty-2.5.1 app/components/marty/data_grid_view/client/data_grid_view.js
marty-2.5.0 app/components/marty/data_grid_view/client/data_grid_view.js
marty-2.4.9 app/components/marty/data_grid_view/client/data_grid_view.js
marty-2.4.8 app/components/marty/data_grid_view/client/data_grid_view.js