diff --git a/web/client/actions/layers.js b/web/client/actions/layers.js index 97cb00d0bd..2446679f18 100644 --- a/web/client/actions/layers.js +++ b/web/client/actions/layers.js @@ -88,11 +88,12 @@ function sortNode(node, order, sortLayers = null) { }; } -function removeNode(node, type) { +function removeNode(node, type, properties) { return { type: REMOVE_NODE, node: node, - nodeType: type + nodeType: type, + properties }; } diff --git a/web/client/components/TOC/DefaultLayer.jsx b/web/client/components/TOC/DefaultLayer.jsx index d6d3091d7d..bc03e21662 100644 --- a/web/client/components/TOC/DefaultLayer.jsx +++ b/web/client/components/TOC/DefaultLayer.jsx @@ -82,7 +82,7 @@ var DefaultLayer = React.createClass({ }; }, onConfirmDelete() { - this.props.removeNode(this.props.node.id, "layers"); + this.props.removeNode(this.props.node.id, "layers", this.props.node); this.closeDeleteDialog(); }, getInitialState: function() { diff --git a/web/client/components/maps/modals/ConfirmModal.jsx b/web/client/components/maps/modals/ConfirmModal.jsx index 1ceedc55c5..f08d8bfb8a 100644 --- a/web/client/components/maps/modals/ConfirmModal.jsx +++ b/web/client/components/maps/modals/ConfirmModal.jsx @@ -9,6 +9,7 @@ const React = require('react'); const {Button} = require('react-bootstrap'); const Modal = require('../../misc/Modal'); +const Spinner = require('react-spinkit'); /** * A Modal window to show a confirmation dialog @@ -28,7 +29,8 @@ const ConfirmModal = React.createClass({ body: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]), titleText: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]), confirmText: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]), - cancelText: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]) + cancelText: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.element]), + running: React.PropTypes.bool }, getDefaultProps() { return { @@ -54,13 +56,14 @@ const ConfirmModal = React.createClass({ const footer = (
+ }}>{this.props.running ? : null}{this.props.confirmText} {this.props.includeCloseButton ?