Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Update costs properly after changing filter
Browse files Browse the repository at this point in the history
  • Loading branch information
powdahound committed Nov 23, 2012
1 parent fa8e464 commit cd4b2fc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion www/default.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var current_cost_duration = null;

function change_cost(duration) {
// update menu text
var first = duration.charAt(0).toUpperCase();
Expand Down Expand Up @@ -30,6 +32,7 @@ function change_cost(duration) {
elem.text("$" + per_time + " " + duration);
});

current_cost_duration = duration;
}

$(function() {
Expand All @@ -42,7 +45,13 @@ $(function() {
"aTargets": ["memory", "computeunits", "storage", "ioperf"],
"sType": "span-sort"
}
]
],
"fnDrawCallback": function() {
// Whenever the table is drawn, update the costs. This is necessary
// because the cost duration may have changed while a filter was being
// used and so some rows will need updating.
change_cost(current_cost_duration);
}
});
});

Expand Down

0 comments on commit cd4b2fc

Please sign in to comment.