mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Capitalization function
- adds a NanoUI helper function which the first character in a string
This commit is contained in:
@@ -83,6 +83,10 @@ NanoBaseHelpers = function ()
|
||||
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
return parts.join(".");
|
||||
},
|
||||
// Capitalize the first letter of a string. From http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript
|
||||
capitalizeFirstLetter: function(string) {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
},
|
||||
// Display a bar. Used to show health, capacity, etc.
|
||||
displayBar: function(value, rangeMin, rangeMax, styleClass, showText) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user