From 2b11e4ce9253bf543bde87c16bd9b6d90446cff6 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Thu, 16 Aug 2012 16:26:46 -0400 Subject: Dashboard improvements --- extensions/ProductDashboard/web/js/productdashboard.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'extensions/ProductDashboard/web/js') diff --git a/extensions/ProductDashboard/web/js/productdashboard.js b/extensions/ProductDashboard/web/js/productdashboard.js index e7276b7b2..56bc451ff 100644 --- a/extensions/ProductDashboard/web/js/productdashboard.js +++ b/extensions/ProductDashboard/web/js/productdashboard.js @@ -6,7 +6,11 @@ * defined by the Mozilla Public License, v. 2.0. */ -function addStatListener (div_name, table_name, column_defs, fields, options) { +YAHOO.namespace('ProductDashboard'); + +var PD = YAHOO.ProductDashboard; + +PD.addStatListener = function (div_name, table_name, column_defs, fields, options) { YAHOO.util.Event.addListener(window, "load", function() { YAHOO.example.StatsFromMarkup = new function() { this.myDataSource = new YAHOO.util.DataSource(YAHOO.util.Dom.get(table_name)); @@ -20,7 +24,7 @@ function addStatListener (div_name, table_name, column_defs, fields, options) { } // Custom sort handler to sort by bug id inside an anchor tag -var sortBugIdLinks = function(a, b, desc) { +PD.sortBugIdLinks = function (a, b, desc) { // Deal with empty values if (!YAHOO.lang.isValue(a)) { return (!YAHOO.lang.isValue(b)) ? 0 : 1; @@ -52,7 +56,7 @@ var sortBugIdLinks = function(a, b, desc) { } // Custom sort handler for bug severities -var sortBugSeverity = function(a, b, desc) { +PD.sortBugSeverity = function (a, b, desc) { // Deal with empty values if (!YAHOO.lang.isValue(a)) { return (!YAHOO.lang.isValue(b)) ? 0 : 1; @@ -73,7 +77,7 @@ var sortBugSeverity = function(a, b, desc) { } // Custom sort handler for bug priorities -var sortBugPriority = function(a, b, desc) { +PD.sortBugPriority = function (a, b, desc) { // Deal with empty values if (!YAHOO.lang.isValue(a)) { return (!YAHOO.lang.isValue(b)) ? 0 : 1; -- cgit v1.2.3-24-g4f1b