},
allRowsSaved: function () {
return _.every(this.getValue().models,
- function (e) { return e.isReadyClean(); });
+ function (model) { return model.isReadyClean(); });
},
buttonTapped: function (inSender, inEvent) {
var editor = this.$.editableGridRow,
this.doExportAttr({ attr: gridbox.attr });
},
refreshLists: function () {
+ var collection = this.getValue();
this.$.aboveGridList.refresh();
this.$.belowGridList.refresh();
- this.$.exportButton.setDisabled(! this.allRowsSaved());
+ this.$.exportButton.setDisabled(! this.allRowsSaved() ||
+ ! collection.length);
},
reset: function () {
this.setEditableIndex(null);
this.$.summaryPanel.setValue(model);
}
- this.$.exportButton.setDisabled(! this.allRowsSaved());
+ this.$.exportButton.setDisabled(! this.allRowsSaved() ||
+ ! collection.length);
}
});
}());