Commit 5624d294 authored by Matt Vanderpol's avatar Matt Vanderpol

Reset cost and selected tool when a new one is added.

parent 4449e280
Pipeline #34084098 passed with stages
in 25 minutes and 33 seconds
var CategoryRoiCalculator = {
selector: '.js-roi-calculator',
default_cost: 1000,
init: function() {
if ($(this.selector).length > 0) {
this.setup();
......@@ -27,6 +28,8 @@ var CategoryRoiCalculator = {
$newRow.find('.data-col').filter(':not(:last-child)').html('');
$$.remove();
$row.after($newRow);
$newRow.find('.js-roi-calculator-input').val(this.default_cost);
$newRow.find('.js-competitor-dropdown .dropdown-title').html('');
window.setTimeout(function() { this.updateTotal(); }.bind(this), 100);
},
setDefaultCompetitors: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment