mirror of https://github.com/perkeep/perkeep.git
UI permanode aspect: Don't save if nothing changed.
Bug: https://code.google.com/p/camlistore/issues/detail?id=505 Change-Id: I6816a51c2f005c7d903c9a02aa1410a52177cbec
This commit is contained in:
parent
4800931d55
commit
906ef089e6
|
@ -212,10 +212,13 @@ cam.PermanodeDetail = React.createClass({
|
|||
},
|
||||
|
||||
commitChanges_: function() {
|
||||
var changes = this.getChanges_();
|
||||
if (changes.adds.length == 0 && changes.deletes.length == 0) {
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
status: 'Saving...',
|
||||
});
|
||||
var changes = this.getChanges_();
|
||||
var promises = changes.adds.map(function(add) {
|
||||
return new goog.labs.Promise(this.props.serverConnection.newAddAttributeClaim.bind(this.props.serverConnection, this.props.meta.blobRef, add.name, add.value));
|
||||
}, this).concat(changes.deletes.map(function(del) {
|
||||
|
|
Loading…
Reference in New Issue