summaryrefslogtreecommitdiffstats
path: root/extensions/ProductDashboard/web
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-08-16 22:26:46 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-08-16 22:26:46 +0200
commit2b11e4ce9253bf543bde87c16bd9b6d90446cff6 (patch)
tree8eefcc04c9273e8cd170c0b820395a66a8aa6b6e /extensions/ProductDashboard/web
parentae3016495ffde3e71d879109e35437dbeff0747f (diff)
downloadbugzilla-2b11e4ce9253bf543bde87c16bd9b6d90446cff6.tar.gz
bugzilla-2b11e4ce9253bf543bde87c16bd9b6d90446cff6.tar.xz
Dashboard improvements
Diffstat (limited to 'extensions/ProductDashboard/web')
-rw-r--r--extensions/ProductDashboard/web/js/productdashboard.js12
1 files changed, 8 insertions, 4 deletions
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;