Sha256: 9349cb0c7d085e7f0820ec7be3d017df681e02eaf06b78a95dbbaaad62f1d853

Contents?: true

Size: 648 Bytes

Versions: 3

Compression:

Stored size: 648 Bytes

Contents

{
  rememberSelection: function(selModel, selectedRecords) {
    if (!this.rendered || Ext.isEmpty(this.el)) {
      return;
    }

    this.selectedRecords = this.getSelectionModel().getSelection();
  },
  refreshSelection: function() {
    if (!this.selectedRecords || 0 >= this.selectedRecords.length) {
      return;
    }

    var newRecordsToSelect = [];
    for (var i = 0; i < this.selectedRecords.length; i++) {
      record = this.getStore().getById(this.selectedRecords[i].getId());
      if (!Ext.isEmpty(record)) {
        newRecordsToSelect.push(record);
      }
    }

    this.getSelectionModel().select(newRecordsToSelect);
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netzke-basepack-0.9.0 lib/netzke/basepack/grid/javascripts/remember_selection.js
netzke-basepack-0.10.0.rc2 lib/netzke/basepack/grid/javascripts/remember_selection.js
netzke-basepack-0.9.0.rc1 lib/netzke/basepack/grid/javascripts/remember_selection.js