Sha256: e4e4df04151422c4c81014af87ff3e9f6edd5dea6f17f85db9cc672877b8bfb4

Contents?: true

Size: 1.11 KB

Versions: 12

Compression:

Stored size: 1.11 KB

Contents

({
  initComponent() {
    this.callParent();

    this.getSelectionModel().on(
      "selectionchange",
      function(selModel) {
        this.actions.detail &&
          this.actions.detail.setDisabled(!selModel.hasSelection());
      },
      this
    );
  },

  detail() {
    const record_id = this.getSelectionModel()
      .getSelection()[0]
      .getId();
    this.server.detail({
      record_id
    });
  },

  netzkeShowDetail(details) {
    Ext.create("Ext.Window", {
      height: 150,
      minWidth: 250,
      autoWidth: true,
      modal: true,
      autoScroll: true,
      html: details,
      title: "Posting Details"
    }).show();
  },

  netzkeOnDelete() {
    const records = [];
    const me = this;
    me.getSelectionModel().selected.each(function(r) {
      records.push(r.getId());
    }, me);

    // find the root component (main application)
    let main_app = me;
    while (1) {
      const p = main_app.netzkeGetParentComponent();
      if (!p) {
        break;
      }
      main_app = p;
    }

    // assumes main_app has serverSelectPosting method
    main_app.server.selectPosting(records);
  }
});

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
marty-14.3.0 app/components/marty/postings/grid/client/grid.js
marty-14.0.0 app/components/marty/postings/grid/client/grid.js
marty-13.0.2 app/components/marty/postings/grid/client/grid.js
marty-11.0.0 app/components/marty/postings/grid/client/grid.js
marty-10.0.3 app/components/marty/posting_grid/client/posting_grid.js
marty-10.0.2 app/components/marty/posting_grid/client/posting_grid.js
marty-10.0.0 app/components/marty/posting_grid/client/posting_grid.js
marty-9.5.1 app/components/marty/posting_grid/client/posting_grid.js
marty-9.5.0 app/components/marty/posting_grid/client/posting_grid.js
marty-9.3.3 app/components/marty/posting_grid/client/posting_grid.js
marty-9.3.2 app/components/marty/posting_grid/client/posting_grid.js
marty-9.3.0 app/components/marty/posting_grid/client/posting_grid.js