summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/web/js
diff options
context:
space:
mode:
authorKohei Yoshino <kohei.yoshino@gmail.com>2018-09-24 23:27:12 +0200
committerKohei Yoshino <kohei.yoshino@gmail.com>2018-09-26 19:23:39 +0200
commit09dd4d3192073ba9ecc7feb8a5dfcd213affd525 (patch)
tree72431fb524edf6e92afd63237e56f229217c3257 /extensions/BMO/web/js
parent03d03939f90f2a258d9a4840eaa9af16fca7581f (diff)
downloadbugzilla-09dd4d3192073ba9ecc7feb8a5dfcd213affd525.tar.gz
bugzilla-09dd4d3192073ba9ecc7feb8a5dfcd213affd525.tar.xz
Bug 1493500 - Remove all trailing whitespaces from all files
Diffstat (limited to 'extensions/BMO/web/js')
-rw-r--r--extensions/BMO/web/js/release_tracking_report.js2
-rw-r--r--extensions/BMO/web/js/sorttable.js52
-rw-r--r--extensions/BMO/web/js/swag.js18
3 files changed, 36 insertions, 36 deletions
diff --git a/extensions/BMO/web/js/release_tracking_report.js b/extensions/BMO/web/js/release_tracking_report.js
index c91222e0f..158cc7521 100644
--- a/extensions/BMO/web/js/release_tracking_report.js
+++ b/extensions/BMO/web/js/release_tracking_report.js
@@ -41,7 +41,7 @@ function onProductChange() {
'<input type="checkbox" id="field_' + field.id + '_cb" ' +
'onClick="onFieldToggle(this,' + field.id + ')">' +
'</td>' +
- '<td class="disabled" id="field_' + field.id + '_td">' +
+ '<td class="disabled" id="field_' + field.id + '_td">' +
'<label for="field_' + field.id + '_cb">' +
field.desc.htmlEncode() + ':</label>' +
'</td>' +
diff --git a/extensions/BMO/web/js/sorttable.js b/extensions/BMO/web/js/sorttable.js
index 0873dc20a..c20f02647 100644
--- a/extensions/BMO/web/js/sorttable.js
+++ b/extensions/BMO/web/js/sorttable.js
@@ -3,13 +3,13 @@
version 2
7th April 2007
Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
-
+
Instructions:
Download this file
Add <script src="sorttable.js"></script> to your HTML
Add class="sortable" to any table you'd like to make sortable
Click on the headers to sort
-
+
Thanks to many, many people for contributions and suggestions.
Licenced as X11: http://www.kryogenix.org/code/browser/licence.html
This basically means: do what you want with it.
@@ -25,20 +25,20 @@ sorttable = {
arguments.callee.done = true;
// kill the timer
if (_timer) clearInterval(_timer);
-
+
if (!document.createElement || !document.getElementsByTagName) return;
-
+
sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
-
+
forEach(document.getElementsByTagName('table'), function(table) {
if (table.className.search(/\bsortable\b/) != -1) {
sorttable.makeSortable(table);
}
});
-
+
},
- /*
+ /*
* Prepares the table so that it can be sorted
*
*/
@@ -53,9 +53,9 @@ sorttable = {
}
// Safari doesn't support table.tHead, sigh
if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];
-
+
//if (table.tHead.rows.length != 1) return; // can't cope with two header rows
-
+
// Sorttable v1 put rows with a class of "sortbottom" at the bottom (as
// "total" rows, for example). This is B&R, since what you're supposed
// to do is put them in a tfoot. So, if there are sortbottom rows,
@@ -106,7 +106,7 @@ sorttable = {
table.sorttable_rows = table_rows;
table.sorttable_body_size = body_size;
table.sorttable_bodies = bodies;
-
+
// work through each column and calculate its type
@@ -185,7 +185,7 @@ sorttable = {
_check_already_sorted: function(cell) {
if (cell.className.search(/\bsorttable_sorted\b/) != -1) {
- // if we're already sorted by this column, just
+ // if we're already sorted by this column, just
// reverse the table, which is quicker
sorttable.reverse_table(cell);
@@ -194,7 +194,7 @@ sorttable = {
}
if (cell.className.search(/\bsorttable_sorted_reverse\b/) != -1) {
- // if we're already sorted by this column in reverse, just
+ // if we're already sorted by this column in reverse, just
// re-reverse the table, which is quicker
sorttable.reverse_table(cell);
@@ -271,7 +271,7 @@ sorttable = {
return;
- // First, remove sorttable_sorted classes from the other header
+ // First, remove sorttable_sorted classes from the other header
// that is currently sorted and its marker (the simbol indicating
// that its sorted.
sorttable._remove_sorted_classes(this.table.tHead);
@@ -285,7 +285,7 @@ sorttable = {
sorttable._mark_column_as_sorted(this, '&#x25BC;', 0);
sorttable.sort_table(this);
-
+
},
sort_table: function(cell) {
@@ -312,7 +312,7 @@ sorttable = {
body_size = cell.table.sorttable_body_size;
body_index = 0;
- for (var j=0; j<rows.length; j++) {
+ for (var j=0; j<rows.length; j++) {
if (j % 2)
rows[j].className = rows[j].className.replace('bz_row_even',
'bz_row_odd');
@@ -336,7 +336,7 @@ sorttable = {
cell.table.sorttable_rows = rows;
},
-
+
reverse_table: function(cell) {
oldrows = cell.table.sorttable_rows;
newrows = [];
@@ -348,7 +348,7 @@ sorttable = {
tb = cell.table.sorttable_bodies[0];
body_size = cell.table.sorttable_body_size;
body_index = 0;
-
+
var BUGLIST = '';
cell.table.sorttable_rows = [];
@@ -379,17 +379,17 @@ sorttable = {
delete newrows;
},
-
+
guessType: function(table, column) {
// guess the type of a column based on its first non-blank row
sortfn = sorttable.sort_alpha;
for (var i=0; i<table.sorttable_bodies[0].rows.length; i++) {
text = sorttable.getInnerText(table.sorttable_bodies[0].rows[i].cells[column]);
if (text != '') {
- if (text.match(/^-?[£$¤]?[\d,.]+%?$/)) {
+ if (text.match(/^-?[£$¤]?[\d,.]+%?$/)) {
return sorttable.sort_numeric;
}
- // check for a date: dd/mm/yyyy or dd/mm/yy
+ // check for a date: dd/mm/yyyy or dd/mm/yy
// can have / or . or - as separator
// can be mm/dd as well
possdate = text.match(sorttable.DATE_RE)
@@ -412,7 +412,7 @@ sorttable = {
}
return sortfn;
},
-
+
getInnerText: function(node) {
// gets the text we want to use for sorting for a cell.
// strips leading and trailing whitespace.
@@ -422,7 +422,7 @@ sorttable = {
hasInputs = (typeof node.getElementsByTagName == 'function') &&
node.getElementsByTagName('input').length;
-
+
if (typeof node.getAttribute != 'undefined' && node.getAttribute("sorttable_customkey") != null) {
return node.getAttribute("sorttable_customkey");
}
@@ -457,14 +457,14 @@ sorttable = {
}
}
},
-
+
/* sort functions
each sort function takes two parameters, a and b
you are comparing a.sort_data and b.sort_data */
sort_numeric: function(a,b) {
aa = parseFloat(a.sort_data.replace(/[^0-9.-]/g,''));
if (isNaN(aa)) aa = 0;
- bb = parseFloat(b.sort_data.replace(/[^0-9.-]/g,''));
+ bb = parseFloat(b.sort_data.replace(/[^0-9.-]/g,''));
if (isNaN(bb)) bb = 0;
return aa-bb;
},
@@ -506,7 +506,7 @@ sorttable = {
if (dt1<dt2) return -1;
return 1;
},
-
+
shaker_sort: function(list, comp_func) {
// A stable sort function to allow multi-level sorting of data
// see: http://en.wikipedia.org/wiki/Cocktail_sort
@@ -536,7 +536,7 @@ sorttable = {
b++;
} // while(swap)
- }
+ }
}
/* ******************************************************************
diff --git a/extensions/BMO/web/js/swag.js b/extensions/BMO/web/js/swag.js
index cd9561b54..2a86c90f4 100644
--- a/extensions/BMO/web/js/swag.js
+++ b/extensions/BMO/web/js/swag.js
@@ -24,37 +24,37 @@ function getTotal(item_array) {
return total;
}
-function calculateTotalSwag() {
- document.getElementById('Totalswag').value =
+function calculateTotalSwag() {
+ document.getElementById('Totalswag').value =
getTotal( new Array('Lanyards',
'Stickers',
'Bracelets',
'Tattoos',
'Buttons',
'Posters'));
-
+
}
-function calculateTotalMensShirts() {
- document.getElementById('mens_total').value =
+function calculateTotalMensShirts() {
+ document.getElementById('mens_total').value =
getTotal( new Array('mens_s',
'mens_m',
'mens_l',
'mens_xl',
'mens_xxl',
'mens_xxxl'));
-
+
}
-function calculateTotalWomensShirts() {
- document.getElementById('womens_total').value =
+function calculateTotalWomensShirts() {
+ document.getElementById('womens_total').value =
getTotal( new Array('womens_s',
'womens_m',
'womens_l',
'womens_xl',
'womens_xxl',
'womens_xxxl'));
-
+
}