Sha256: 6e670dd4de957739df183725131e95fe2b4307759cfe30cea6d1719ac84ecfe2

Contents?: true

Size: 1.6 KB

Versions: 38

Compression:

Stored size: 1.6 KB

Contents

{
  initComponent: function () {
    var me = this;
    me.tbar = ['->',
      {
        name: 'live_search_text',
        xtype: 'textfield',
        enable_key_events: true,
        ref: '../live_search_field',
        empty_text: 'Search',
        listeners: {
          change: {
            fn: me.listenFn,
            buffer: 500,
          }
        }
      }
    ]
    this.callParent();
    this.getSelectionModel().on('selectionchange', function (selModel) {
      this.actions.download && this.actions.download.setDisabled(!selModel.hasSelection());
    }, this);
    this.getView().getRowClass = this.defaultGetRowClass;
  },
  defaultGetRowClass: function (record, index, rowParams, ds) {
    var status = record.get('status');
    if (status === false) return "red-row";
    if (status === true) return "green-row";
    return "orange-row";
  },
  listenFn: function (obj, search_text) {
    var lg = this.ownerCt.ownerCt;
    lg.getStore().getProxy().extraParams.live_search = search_text;
    lg.getStore().load();
  },
  netzkeOnDownload: function () {
    var jid = this.getSelectionModel().getSelection()[0].getId();
    // FIXME: seems pretty hacky
    window.location = this.jobPath(jid);
  },
  netzkeOnRefresh: function () {
    this.store.load();
  },
  netzkeOnClear: function (params) {
    var me = this;
    Ext.Msg.show({
      title: 'Clear All Jobs',
      msg: 'Enter CLEAR and press OK to clear all previous jobs',
      width: 375,
      buttons: Ext.Msg.OKCANCEL,
      prompt: true,
      fn: function (btn, value) {
        (btn == "ok" && value == "CLEAR") && me.server.clear({});
      }
    });
  }
}

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
marty-6.1.0 app/components/marty/promise_view/client/promise_view.js
marty-5.2.0 app/components/marty/promise_view/client/promise_view.js
marty-5.1.4 app/components/marty/promise_view/client/promise_view.js
marty-5.1.3 app/components/marty/promise_view/client/promise_view.js
marty-5.1.2 app/components/marty/promise_view/client/promise_view.js
marty-5.1.1 app/components/marty/promise_view/client/promise_view.js
marty-5.1.0 app/components/marty/promise_view/client/promise_view.js
marty-3.1.0 app/components/marty/promise_view/client/promise_view.js
marty-3.0.1 app/components/marty/promise_view/client/promise_view.js
marty-4.0.0.rc2 app/components/marty/promise_view/client/promise_view.js
marty-3.0.0 app/components/marty/promise_view/client/promise_view.js
marty-2.9.3 app/components/marty/promise_view/client/promise_view.js
marty-2.9.2 app/components/marty/promise_view/client/promise_view.js
marty-2.9.1 app/components/marty/promise_view/client/promise_view.js
marty-2.8.0 app/components/marty/promise_view/client/promise_view.js
marty-2.7.3 app/components/marty/promise_view/client/promise_view.js
marty-2.7.2 app/components/marty/promise_view/client/promise_view.js
marty-2.7.1 app/components/marty/promise_view/client/promise_view.js
marty-2.7.0 app/components/marty/promise_view/client/promise_view.js
marty-2.6.8 app/components/marty/promise_view/client/promise_view.js