Fix click handlers for filters

This commit is contained in:
Joe Fiorini 2015-01-22 17:45:56 -05:00
parent 8d29b170bc
commit 7f291c91b5
2 changed files with 2 additions and 5 deletions

View File

@ -59,8 +59,6 @@ angular.module('GraphDirectives', [])
}
scope.removeGraphDataReady = scope.$on('graphDataReady', function (e, data) {
console.log("building graph", data);
var timeFormat, graphData = [
{
"color": "#00aa00",
@ -133,7 +131,7 @@ angular.module('GraphDirectives', [])
});
// when the Period drop down filter is used, create a new graph based on the
d3.selectAll(element.find(".n")[0])
d3.selectAll(element.find(".n"))
.on("click", function() {
period = this.getAttribute("id");
$('#period-dropdown').replaceWith("<a id=\"period-dropdown\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+"<span class=\"caret\"><span>\n");
@ -142,7 +140,7 @@ angular.module('GraphDirectives', [])
});
//On click, update with new data
d3.selectAll(element.find(".m")[0])
d3.selectAll(element.find(".m"))
.on("click", function() {
job_type = this.getAttribute("id");
$('#type-dropdown').replaceWith("<a id=\"type-dropdown\" role=\"button\" data-toggle=\"dropdown\" data-target=\"#\" href=\"/page.html\">"+this.text+"<span class=\"caret\"><span>\n");

View File

@ -56,7 +56,6 @@ describe('Job Status Graph Directive', function() {
var successfulSeries = filterDataSeries(0, lineData);
var failedSeries = filterDataSeries(1, lineData);
console.log("test done");
expect(successfulSeries).to.eql(
[ {x: 1, y: 0, series: 0},
{x: 2, y: 0, series: 0},