Confirm leaving networks.

This commit is contained in:
Adam Ierymenko 2015-05-18 16:02:37 -07:00
parent 8c7a4efe1a
commit 992438f054
2 changed files with 14 additions and 12 deletions

View File

@ -4,17 +4,19 @@ var ZeroTierNetwork = React.createClass({
}, },
leaveNetwork: function(event) { leaveNetwork: function(event) {
Ajax.call({ if (confirm("Are you sure you want to leave this network?")) {
url: 'network/'+this.props.nwid+'?auth='+this.props.authToken, Ajax.call({
cache: false, url: 'network/'+this.props.nwid+'?auth='+this.props.authToken,
type: 'DELETE', cache: false,
success: function(data) { type: 'DELETE',
if (this.props.onNetworkDeleted) success: function(data) {
this.props.onNetworkDeleted(this.props.nwid); if (this.props.onNetworkDeleted)
}.bind(this), this.props.onNetworkDeleted(this.props.nwid);
error: function(error) { }.bind(this),
}.bind(this) error: function(error) {
}); }.bind(this)
});
}
event.preventDefault(); event.preventDefault();
}, },

2
ui/ztui.min.js vendored

File diff suppressed because one or more lines are too long