summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a86dd5)
raw | patch | inline | side by side (parent: 9a86dd5)
author | Jakub Narebski <jnareb@gmail.com> | |
Thu, 28 Apr 2011 19:04:02 +0000 (21:04 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 24 May 2011 18:22:44 +0000 (11:22 -0700) |
This consists of adding a few extra explanation, fixing descriptions
of functions to match names of parameters in code, adding a few
separators, and fixing spelling -- while at it spell 'neighbor' using
American spelling (and not as 'neighbour').
This is post-split cleanup.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
of functions to match names of parameters in code, adding a few
separators, and fixing spelling -- while at it spell 'neighbor' using
American spelling (and not as 'neighbour').
This is post-split cleanup.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/static/js/blame_incremental.js | patch | blob | history | |
gitweb/static/js/lib/common-lib.js | patch | blob | history |
index f63f78b9ec102b35cf4db752deaa07cb36aa664b..676da6b590bb9335d8fe8d65d588fc72289b871c 100644 (file)
* @license GPLv2 or later
*/
-
+/* ============================================================ */
/*
* This code uses DOM methods instead of (nonstandard) innerHTML
* to modify page.
*/
-/* ============================================================ */
+/* ............................................................ */
/* utility/helper functions (and variables) */
var xhr; // XMLHttpRequest object
}
/**
- * show an error message alert to user within page (in prohress info area)
+ * show an error message alert to user within page (in progress info area)
* @param {String} str: plain text error message (no HTML)
*
* @globals div_progress_info
var colorsFreq = [0, 0, 0];
/**
- * return one of given possible colors (curently least used one)
+ * return one of given possible colors (currently least used one)
* example: chooseColorNoFrom(2, 3) returns 2 or 3
*
* @param {Number[]} arguments: one or more numbers
}
/**
- * given two neigbour <tr> elements, find color which would be different
- * from color of both of neighbours; used to 3-color blame table
+ * given two neighbor <tr> elements, find color which would be different
+ * from color of both of neighbors; used to 3-color blame table
*
* @param {HTMLElement} tr_prev
* @param {HTMLElement} tr_next
var color_next = getColorNo(tr_next);
- // neither of neighbours has color set
+ // neither of neighbors has color set
// THEN we can use any of 3 possible colors
if (!color_prev && !color_next) {
return chooseColorNoFrom(1,2,3);
}
- // either both neighbours have the same color,
- // or only one of neighbours have color set
+ // either both neighbors have the same color,
+ // or only one of neighbors have color set
// THEN we can use any color except given
var color;
if (color_prev === color_next) {
return chooseColorNoFrom((color % 3) + 1, ((color+1) % 3) + 1);
}
- // neighbours have different colors
+ // neighbors have different colors
// THEN there is only one color left
return (3 - ((color_prev + color_next) % 3));
}
/**
* change colors to use zebra coloring (2 colors) instead of 3 colors
- * concatenate neighbour commit groups belonging to the same commit
+ * concatenate neighbor commit groups belonging to the same commit
*
* @globals colorRe
*/
index 38f3b9e14454666ce489ac4521a7a1288fdd1a2e..6a6d2000c4228ad243474a69477da9eff0a1a2e4 100644 (file)
/* Padding */
/**
- * pad number N with nonbreakable spaces on the left, to WIDTH characters
+ * pad INPUT on the left with STR that is assumed to have visible
+ * width of single character (for example nonbreakable spaces),
+ * to WIDTH characters
+ *
* example: padLeftStr(12, 3, '\u00A0') == '\u00A012'
* ('\u00A0' is nonbreakable space)
*
* @param {Number|String} input: number to pad
* @param {Number} width: visible width of output
* @param {String} str: string to prefix to string, e.g. '\u00A0'
- * @returns {String} INPUT prefixed with (WIDTH - INPUT.length) x STR
+ * @returns {String} INPUT prefixed with STR x (WIDTH - INPUT.length)
*/
function padLeftStr(input, width, str) {
var prefix = '';
}
/**
- * Pad INPUT on the left to SIZE width, using given padding character CH,
+ * Pad INPUT on the left to WIDTH, using given padding character CH,
* for example padLeft('a', 3, '_') is '__a'.
*
* @param {String} input: input value converted to string.
/**#@-*/
/**
- * unquote maybe git-quoted filename
+ * unquote maybe C-quoted filename (as used by git, i.e. it is
+ * in double quotes '"' if there is any escape character used)
* e.g. 'aa' -> 'aa', '"a\ta"' -> 'a a'
*
* @param {String} str: git-quoted string