switch function of close button in selected flows table. now close button deselects flow. double click to remove flow.
diff --git a/web/ons-demo/js/app.js b/web/ons-demo/js/app.js
index b9acbb2..7ef1a49 100644
--- a/web/ons-demo/js/app.js
+++ b/web/ons-demo/js/app.js
@@ -170,6 +170,10 @@
function rowUpdate(d) {
var row = d3.select(this);
row.select('.deleteFlow').on('click', function () {
+ selectedFlows[selectedFlows.indexOf(d)] = null;
+ updateSelectedFlows();
+ });
+ row.on('dblclick', function () {
if (d) {
var prompt = 'Delete flow ' + d.flowId.value + '?';
if (confirm(prompt)) {
@@ -246,8 +250,6 @@
} else if (flow.createPending) {
newSelectedFlows.push(flow);
}
- } else {
- newSelectedFlows.push(null);
}
});
selectedFlows = newSelectedFlows;